diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h b/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h index c92b8c679..3e5687915 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h @@ -73,7 +73,7 @@ struct Sizes : internal::numeric_list { typedef internal::numeric_list Base; static const std::size_t total_size = internal::arg_prod(Indices...); - static std::size_t TotalSize() { + static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::size_t TotalSize() { return internal::arg_prod(Indices...); } @@ -119,7 +119,7 @@ template ::value; - static size_t TotalSize() { + static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE size_t TotalSize() { return internal::arg_prod::value; } @@ -156,7 +156,8 @@ namespace internal { template struct tensor_index_linearization_helper { - static inline Index run(array const& indices, array const& dimensions) + static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE + Index run(array const& indices, array const& dimensions) { return array_get(indices) + array_get(dimensions) * @@ -167,7 +168,8 @@ struct tensor_index_linearization_helper template struct tensor_index_linearization_helper { - static inline Index run(array const& indices, array const&) + static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE + Index run(array const& indices, array const&) { return array_get(indices); }