aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2014-06-09 09:43:51 -0700
committerGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2014-06-09 09:43:51 -0700
commit36a2b2e9dc9368356b3f327a1fb00616397c1e0e (patch)
tree53815c0fc248917f7e935e3439b1d4273a407a8b /unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h
parent2859a31ac80af86fa58e5347be50d32fd07bcd3c (diff)
Prevent the generation of unlaunchable cuda kernels when compiling in debug mode.
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h')
-rw-r--r--unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h10
1 files 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<std::size_t, Indices...> {
typedef internal::numeric_list<std::size_t, Indices...> 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 <std::size_t V1=0, std::size_t V2=0, std::size_t V3=0, std::size_t V4=0
static const size_t count = Base::count;
static const std::size_t total_size = internal::arg_prod<Base>::value;
- static size_t TotalSize() {
+ static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE size_t TotalSize() {
return internal::arg_prod<Base>::value;
}
@@ -156,7 +156,8 @@ namespace internal {
template<typename Index, std::size_t NumIndices, std::size_t n, bool RowMajor>
struct tensor_index_linearization_helper
{
- static inline Index run(array<Index, NumIndices> const& indices, array<Index, NumIndices> const& dimensions)
+ static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
+ Index run(array<Index, NumIndices> const& indices, array<Index, NumIndices> const& dimensions)
{
return array_get<RowMajor ? n : (NumIndices - n - 1)>(indices) +
array_get<RowMajor ? n : (NumIndices - n - 1)>(dimensions) *
@@ -167,7 +168,8 @@ struct tensor_index_linearization_helper
template<typename Index, std::size_t NumIndices, bool RowMajor>
struct tensor_index_linearization_helper<Index, NumIndices, 0, RowMajor>
{
- static inline Index run(array<Index, NumIndices> const& indices, array<Index, NumIndices> const&)
+ static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
+ Index run(array<Index, NumIndices> const& indices, array<Index, NumIndices> const&)
{
return array_get<RowMajor ? 0 : NumIndices - 1>(indices);
}