Made the index type a template parameter of the tensor class instead of encoding it in the options.

This commit is contained in:
Benoit Steiner
2015-03-30 14:55:54 -07:00
parent 71950f02e5
commit 35722fa022
9 changed files with 66 additions and 104 deletions

View File

@@ -460,8 +460,7 @@ class TensorBase<Derived, ReadOnlyAccessors>
}
protected:
template <typename Scalar, std::size_t NumIndices, int Options> friend class Tensor;
template <typename Scalar, int Options> friend class TensorVarDim;
template <typename Scalar, std::size_t NumIndices, int Options, typename IndexType> friend class Tensor;
template <typename OtherDerived, int AccessLevel> friend class TensorBase;
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE const Derived& derived() const { return *static_cast<const Derived*>(this); }
@@ -477,8 +476,7 @@ class TensorBase<Derived, WriteAccessors> : public TensorBase<Derived, ReadOnlyA
typedef typename internal::packet_traits<Scalar>::type PacketReturnType;
static const int NumDimensions = DerivedTraits::NumDimensions;
template <typename Scalar, std::size_t NumIndices, int Options> friend class Tensor;
template <typename Scalar, int Options> friend class TensorVarDim;
template <typename Scalar, std::size_t NumIndices, int Options, typename IndexType> friend class Tensor;
template <typename OtherDerived, int AccessLevel> friend class TensorBase;
EIGEN_DEVICE_FUNC