From cb37f818ca6e8dfc9d81343882401e3671531d1b Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Wed, 5 Nov 2014 23:25:11 -0800 Subject: Fixed a compilation error triggered by some operations on fixed sized tensors --- unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h') diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h b/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h index 3d646c455..6d9e09318 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h @@ -40,10 +40,6 @@ template struct IndexPair { // Boilerplate code namespace internal { -template struct dget { - static const std::size_t value = get::value; -}; - template struct fixed_size_tensor_index_linearization_helper @@ -53,7 +49,7 @@ struct fixed_size_tensor_index_linearization_helper const Dimensions& dimensions) { return array_get(indices) + - dget::value * + get::value * fixed_size_tensor_index_linearization_helper::run(indices, dimensions); } }; @@ -125,7 +121,7 @@ struct non_zero_size<0> { typedef internal::null_type type; }; -template struct Sizes { +template struct Sizes : typename internal::make_type_list::type, typename non_zero_size::type, typename non_zero_size::type, typename non_zero_size::type, typename non_zero_size::type >::type { typedef typename internal::make_type_list::type, typename non_zero_size::type, typename non_zero_size::type, typename non_zero_size::type, typename non_zero_size::type >::type Base; static const size_t count = Base::count; static const std::size_t total_size = internal::arg_prod::value; @@ -164,11 +160,11 @@ template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE size_t IndexOfColMajor(const array& indices) const { - return internal::fixed_size_tensor_index_linearization_helper::run(indices, *this); + return internal::fixed_size_tensor_index_linearization_helper::run(indices, *static_cast(this)); } template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE size_t IndexOfRowMajor(const array& indices) const { - return internal::fixed_size_tensor_index_linearization_helper::run(indices, *this); + return internal::fixed_size_tensor_index_linearization_helper::run(indices, *static_cast(this)); } }; -- cgit v1.2.3