diff options
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorDimensionList.h')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorDimensionList.h | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorDimensionList.h b/unsupported/Eigen/CXX11/src/Tensor/TensorDimensionList.h index b7adc3bcc..ca9ac79df 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorDimensionList.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorDimensionList.h @@ -47,39 +47,39 @@ template<DenseIndex n, typename Index, std::size_t Rank> const Index array_get(c #if defined(EIGEN_HAS_CONSTEXPR) template <typename Index, std::size_t Rank> struct index_known_statically_impl<DimensionList<Index, Rank> > { - static constexpr bool run(const DenseIndex) { + EIGEN_DEVICE_FUNC static constexpr bool run(const DenseIndex) { return true; } }; template <typename Index, std::size_t Rank> struct index_known_statically_impl<const DimensionList<Index, Rank> > { - static constexpr bool run(const DenseIndex) { + EIGEN_DEVICE_FUNC static constexpr bool run(const DenseIndex) { return true; } }; template <typename Index, std::size_t Rank> struct all_indices_known_statically_impl<DimensionList<Index, Rank> > { - static constexpr bool run() { + EIGEN_DEVICE_FUNC static constexpr bool run() { return true; } }; template <typename Index, std::size_t Rank> struct all_indices_known_statically_impl<const DimensionList<Index, Rank> > { - static constexpr bool run() { + EIGEN_DEVICE_FUNC static constexpr bool run() { return true; } }; template <typename Index, std::size_t Rank> struct indices_statically_known_to_increase_impl<DimensionList<Index, Rank> > { - static constexpr bool run() { + EIGEN_DEVICE_FUNC static constexpr bool run() { return true; } }; template <typename Index, std::size_t Rank> struct indices_statically_known_to_increase_impl<const DimensionList<Index, Rank> > { - static constexpr bool run() { + EIGEN_DEVICE_FUNC static constexpr bool run() { return true; } }; @@ -92,14 +92,14 @@ struct index_statically_eq_impl<DimensionList<Index, Rank> > { }; template <typename Index, std::size_t Rank> struct index_statically_eq_impl<const DimensionList<Index, Rank> > { - static constexpr bool run(const DenseIndex i, const DenseIndex value) { + EIGEN_DEVICE_FUNC static constexpr bool run(const DenseIndex i, const DenseIndex value) { return i == value; } }; template <typename Index, std::size_t Rank> struct index_statically_ne_impl<DimensionList<Index, Rank> > { - static constexpr bool run(const DenseIndex i, const DenseIndex value) { + EIGEN_DEVICE_FUNC static constexpr bool run(const DenseIndex i, const DenseIndex value) { return i != value; } }; @@ -112,26 +112,26 @@ struct index_statically_ne_impl<const DimensionList<Index, Rank> > { template <typename Index, std::size_t Rank> struct index_statically_gt_impl<DimensionList<Index, Rank> > { - static constexpr bool run(const DenseIndex i, const DenseIndex value) { + EIGEN_DEVICE_FUNC static constexpr bool run(const DenseIndex i, const DenseIndex value) { return i > value; } }; template <typename Index, std::size_t Rank> struct index_statically_gt_impl<const DimensionList<Index, Rank> > { - static constexpr bool run(const DenseIndex i, const DenseIndex value) { + EIGEN_DEVICE_FUNC static constexpr bool run(const DenseIndex i, const DenseIndex value) { return i > value; } }; template <typename Index, std::size_t Rank> struct index_statically_lt_impl<DimensionList<Index, Rank> > { - static constexpr bool run(const DenseIndex i, const DenseIndex value) { + EIGEN_DEVICE_FUNC static constexpr bool run(const DenseIndex i, const DenseIndex value) { return i < value; } }; template <typename Index, std::size_t Rank> struct index_statically_lt_impl<const DimensionList<Index, Rank> > { - static constexpr bool run(const DenseIndex i, const DenseIndex value) { + EIGEN_DEVICE_FUNC static constexpr bool run(const DenseIndex i, const DenseIndex value) { return i < value; } }; @@ -139,26 +139,26 @@ struct index_statically_lt_impl<const DimensionList<Index, Rank> > { #else template <typename Index, std::size_t Rank> struct index_known_statically_impl<DimensionList<Index, Rank> > { - static EIGEN_ALWAYS_INLINE bool run(const DenseIndex) { + EIGEN_DEVICE_FUNC static EIGEN_ALWAYS_INLINE bool run(const DenseIndex) { return true; } }; template <typename Index, std::size_t Rank> struct index_known_statically_impl<const DimensionList<Index, Rank> > { - static EIGEN_ALWAYS_INLINE bool run(const DenseIndex) { + EIGEN_DEVICE_FUNC static EIGEN_ALWAYS_INLINE bool run(const DenseIndex) { return true; } }; template <typename Index, std::size_t Rank> struct all_indices_known_statically_impl<DimensionList<Index, Rank> > { - static EIGEN_ALWAYS_INLINE bool run() { + EIGEN_DEVICE_FUNC static EIGEN_ALWAYS_INLINE bool run() { return true; } }; template <typename Index, std::size_t Rank> struct all_indices_known_statically_impl<const DimensionList<Index, Rank> > { - static EIGEN_ALWAYS_INLINE bool run() { + EIGEN_DEVICE_FUNC static EIGEN_ALWAYS_INLINE bool run() { return true; } }; @@ -178,52 +178,52 @@ struct indices_statically_known_to_increase_impl<const DimensionList<Index, Rank template <typename Index, std::size_t Rank> struct index_statically_eq_impl<DimensionList<Index, Rank> > { - static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(const DenseIndex, const DenseIndex) const { + static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(const DenseIndex, const DenseIndex) { return false; } }; template <typename Index, std::size_t Rank> struct index_statically_eq_impl<const DimensionList<Index, Rank> > { - static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(const DenseIndex, const DenseIndex) const { + static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(const DenseIndex, const DenseIndex) { return false; } }; template <typename Index, std::size_t Rank> struct index_statically_ne_impl<DimensionList<Index, Rank> > { - static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run() (const DenseIndex, const DenseIndex) const { + static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(const DenseIndex, const DenseIndex){ return false; } }; template <typename Index, std::size_t Rank> struct index_statically_ne_impl<const DimensionList<Index, Rank> > { - static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(const DenseIndex, const DenseIndex) const { + static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(const DenseIndex, const DenseIndex) { return false; } }; template <typename Index, std::size_t Rank> struct index_statically_gt_impl<DimensionList<Index, Rank> > { - static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run() (const DenseIndex, const DenseIndex) const { + static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(const DenseIndex, const DenseIndex) { return false; } }; template <typename Index, std::size_t Rank> struct index_statically_gt_impl<const DimensionList<Index, Rank> > { - static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(const DenseIndex, const DenseIndex) const { + static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(const DenseIndex, const DenseIndex) { return false; } }; template <typename Index, std::size_t Rank> struct index_statically_lt_impl<DimensionList<Index, Rank> > { - static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run() (const DenseIndex, const DenseIndex) const { + static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(const DenseIndex, const DenseIndex) { return false; } }; template <typename Index, std::size_t Rank> struct index_statically_lt_impl<const DimensionList<Index, Rank> > { - static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(const DenseIndex, const DenseIndex) const { + static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool run(const DenseIndex, const DenseIndex) { return false; } }; |