From 36a2b2e9dc9368356b3f327a1fb00616397c1e0e Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Mon, 9 Jun 2014 09:43:51 -0700 Subject: [PATCH] Prevent the generation of unlaunchable cuda kernels when compiling in debug mode. --- unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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); }