diff options
author | 2015-11-11 15:38:30 -0800 | |
---|---|---|
committer | 2015-11-11 15:38:30 -0800 | |
commit | 9fa10fe52d30525505ca97afd1fce7cda44d27e5 (patch) | |
tree | c609106d175cf0d31de0f795798d3931eb7513ee /unsupported/Eigen/CXX11/src/Core/util/EmulateCXX11Meta.h | |
parent | c587293e4821c61de45b6fee7ff5c3a4cbc33f1c (diff) |
Don't use std::array when compiling with nvcc since nvidia doesn't support the use of STL containers on GPU.
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Core/util/EmulateCXX11Meta.h')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Core/util/EmulateCXX11Meta.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/unsupported/Eigen/CXX11/src/Core/util/EmulateCXX11Meta.h b/unsupported/Eigen/CXX11/src/Core/util/EmulateCXX11Meta.h index ecd1bddf1..ce34a7f04 100644 --- a/unsupported/Eigen/CXX11/src/Core/util/EmulateCXX11Meta.h +++ b/unsupported/Eigen/CXX11/src/Core/util/EmulateCXX11Meta.h @@ -23,7 +23,8 @@ template <typename T, size_t n> class array { EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const T& operator[] (size_t index) const { return values[index]; } - static const std::size_t size() { return n; } + EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE + static std::size_t size() { return n; } T values[n]; @@ -105,7 +106,8 @@ template <typename T, size_t n> class array { } #ifdef EIGEN_HAS_VARIADIC_TEMPLATES - array(std::initializer_list<T> l) { + EIGEN_DEVICE_FUNC + EIGEN_STRONG_INLINE array(std::initializer_list<T> l) { eigen_assert(l.size() == n); internal::smart_copy(l.begin(), l.end(), values); } |