10 #ifndef EIGEN_EMULATE_ARRAY_H 11 #define EIGEN_EMULATE_ARRAY_H 18 #if (__cplusplus <= 199711L && EIGEN_COMP_MSVC < 1900) || defined(__CUDACC__) || defined(EIGEN_AVOID_STL_ARRAY) 21 template <
typename T,
size_t n>
class array {
39 static std::size_t
size() {
return n; }
84 const T& v5,
const T& v6) {
95 const T& v5,
const T& v6,
const T& v7) {
107 const T& v1,
const T& v2,
const T& v3,
const T& v4,
108 const T& v5,
const T& v6,
const T& v7,
const T& v8) {
120 #if EIGEN_HAS_VARIADIC_TEMPLATES 131 template <
typename T>
class array<T, 0> {
170 #if EIGEN_HAS_VARIADIC_TEMPLATES 171 EIGEN_DEVICE_FUNC
array(std::initializer_list<T> l) : dummy() {
182 template<
class T, std::
size_t N>
184 for (std::size_t i = 0; i <
N; ++i) {
185 if (lhs[i] != rhs[i]) {
194 template<std::
size_t I,
class T, std::
size_t N>
198 template<std::
size_t I,
class T, std::
size_t N>
205 static const size_t value =
N;
209 static const size_t value =
N;
213 static const size_t value =
N;
217 static const size_t value =
N;
229 template <
typename T, std::
size_t N>
using array = std::array<T, N>;
240 #if defined(__GLIBCXX__) && __GLIBCXX__ < 20120322 241 #define STD_GET_ARR_HACK a._M_instance[I] 242 #elif defined(_LIBCPP_VERSION) 243 #define STD_GET_ARR_HACK a.__elems_[I] 245 #define STD_GET_ARR_HACK std::template get<I, T, N>(a) 248 template<std::
size_t I,
class T, std::
size_t N> constexpr
inline T&
array_get(std::array<T,N>& a) {
return (T&) STD_GET_ARR_HACK; }
249 template<std::
size_t I,
class T, std::
size_t N> constexpr
inline T&&
array_get(std::array<T,N>&& a) {
return (T&&) STD_GET_ARR_HACK; }
250 template<std::
size_t I,
class T, std::
size_t N> constexpr
inline T
const&
array_get(std::array<T,N>
const& a) {
return (T
const&) STD_GET_ARR_HACK; }
252 #undef STD_GET_ARR_HACK 255 template<
class T, std::
size_t N>
struct array_size<const std::array<T,N> > {
256 static const size_t value =
N;
259 template<
class T, std::
size_t N>
struct array_size<std::array<T,N> > {
260 static const size_t value =
N;
267 #endif // EIGEN_EMULATE_ARRAY_H EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const T & array_get(const array< T, N > &a)
#define EIGEN_ALWAYS_INLINE
#define EIGEN_STRONG_INLINE
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T & front()
EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator==(const Tuple< U, V > &x, const Tuple< U, V > &y)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE array()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const T & front() const
EIGEN_DEVICE_FUNC static EIGEN_ALWAYS_INLINE std::size_t size()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE array()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T & operator[](size_t index)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE array(const T &v1, const T &v2, const T &v3, const T &v4, const T &v5, const T &v6, const T &v7, const T &v8)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE array(const T &v1, const T &v2, const T &v3, const T &v4, const T &v5, const T &v6, const T &v7)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE array(const T &v1, const T &v2, const T &v3, const T &v4, const T &v5, const T &v6)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T & back()
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE array(const T &v1, const T &v2, const T &v3, const T &v4)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE array(const T &v1, const T &v2)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T & front()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const T & back() const
EIGEN_DEVICE_FUNC void smart_copy(const T *start, const T *end, T *target)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE array(const T &v)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE array(const T &v1, const T &v2, const T &v3, const T &v4, const T &v5)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE array(const T &v1, const T &v2, const T &v3)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const T & back() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T & back()
static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE std::size_t size()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const T & front() const