diff --git a/unsupported/Eigen/CXX11/src/Tensor/Tensor.h b/unsupported/Eigen/CXX11/src/Tensor/Tensor.h index f9d367e0e..2b892571e 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/Tensor.h +++ b/unsupported/Eigen/CXX11/src/Tensor/Tensor.h @@ -88,9 +88,9 @@ class Tensor : public TensorBase m_storage; - template + template struct isOfNormalIndex{ - static const bool value = internal::is_base_of< array, CustomIndex >::value; + static const bool value = internal::is_base_of< array, CustomIndices >::value; }; public: @@ -121,20 +121,20 @@ class Tensor : public TensorBase& indices) const { eigen_internal_assert(checkIndexRange(indices)); return m_storage.data()[linearizedIndex(indices)]; } - /** Custom Index */ - template::value) ) + // custom indices + template::value) ) > - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar& coeff(const CustomIndex & indices) const + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar& coeff(const CustomIndices & indices) const { - return coeff(internal::customIndex2Array(indices)); + return coeff(internal::CustomIndices2Array(indices)); } @@ -155,20 +155,20 @@ class Tensor : public TensorBase& indices) { eigen_internal_assert(checkIndexRange(indices)); return m_storage.data()[linearizedIndex(indices)]; } - /** Custom Index */ - template::value) ) + // custom indices + template::value) ) > - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& coeffRef(const CustomIndex & indices) + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& coeffRef(const CustomIndices & indices) { - return coeffRef(internal::customIndex2Array(indices)); + return coeffRef(internal::CustomIndices2Array(indices)); } @@ -209,17 +209,17 @@ class Tensor : public TensorBase::value) ) + // custom indices + template::value) ) > - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar& operator()(const CustomIndex & indices) const + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar& operator()(const CustomIndices & indices) const { //eigen_assert(checkIndexRange(indices)); /* already in coeff */ - return coeff(internal::customIndex2Array(indices)); + return coeff(internal::CustomIndices2Array(indices)); } - /** Normal Index */ + // normal indices EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar& operator()(const array& indices) const { //eigen_assert(checkIndexRange(indices)); /* already in coeff */ @@ -270,21 +270,21 @@ class Tensor : public TensorBase& indices) { //eigen_assert(checkIndexRange(indices)); /* already in coeff */ return coeffRef(indices); } - /** Custom Index */ - template::value) ) + // custom indices + template::value) ) > - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& operator()(const CustomIndex & indices) + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& operator()(const CustomIndices & indices) { //eigen_assert(checkIndexRange(indices)); /* already in coeff */ - return coeffRef(internal::customIndex2Array(indices)); + return coeffRef(internal::CustomIndices2Array(indices)); } EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& operator()(Index index) @@ -359,7 +359,7 @@ class Tensor : public TensorBase::value) ) > - inline explicit Tensor(const CustomDimension & dimensions) : Tensor(internal::customIndex2Array(dimensions)) + inline explicit Tensor(const CustomDimension & dimensions) : Tensor(internal::CustomIndices2Array(dimensions)) {} template @@ -446,7 +446,7 @@ class Tensor : public TensorBase(dimensions)); + return coeffRef(internal::CustomIndices2Array(dimensions)); }