mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-22 22:33:15 +08:00
Removed a template parameter for fixed sized tensors
This commit is contained in:
parent
5f2dd503ff
commit
0a4c4d40b4
@ -817,7 +817,7 @@ class TensorBase<Derived, ReadOnlyAccessors>
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
template <typename Scalar, int NumIndices, int Options, typename IndexType> friend class Tensor;
|
template <typename Scalar, int NumIndices, int Options, typename IndexType> friend class Tensor;
|
||||||
template <typename Scalar, typename Dimensions, int Option, typename IndexTypes, template <class> class MakePointer_> friend class TensorFixedSize;
|
template <typename Scalar, typename Dimensions, int Option, typename IndexTypes> friend class TensorFixedSize;
|
||||||
template <typename OtherDerived, int AccessLevel> friend class TensorBase;
|
template <typename OtherDerived, int AccessLevel> friend class TensorBase;
|
||||||
EIGEN_DEVICE_FUNC
|
EIGEN_DEVICE_FUNC
|
||||||
EIGEN_STRONG_INLINE const Derived& derived() const { return *static_cast<const Derived*>(this); }
|
EIGEN_STRONG_INLINE const Derived& derived() const { return *static_cast<const Derived*>(this); }
|
||||||
@ -833,7 +833,7 @@ class TensorBase : public TensorBase<Derived, ReadOnlyAccessors> {
|
|||||||
static const int NumDimensions = DerivedTraits::NumDimensions;
|
static const int NumDimensions = DerivedTraits::NumDimensions;
|
||||||
|
|
||||||
template <typename Scalar, int NumIndices, int Options, typename IndexType> friend class Tensor;
|
template <typename Scalar, int NumIndices, int Options, typename IndexType> friend class Tensor;
|
||||||
template <typename Scalar, typename Dimensions, int Option, typename IndexTypes, template <class> class MakePointer_> friend class TensorFixedSize;
|
template <typename Scalar, typename Dimensions, int Option, typename IndexTypes> friend class TensorFixedSize;
|
||||||
template <typename OtherDerived, int OtherAccessLevel> friend class TensorBase;
|
template <typename OtherDerived, int OtherAccessLevel> friend class TensorBase;
|
||||||
|
|
||||||
EIGEN_DEVICE_FUNC
|
EIGEN_DEVICE_FUNC
|
||||||
|
@ -23,8 +23,8 @@ namespace Eigen {
|
|||||||
* Eigen::TensorFixedSize<float, Size<3,5,7>> t;
|
* Eigen::TensorFixedSize<float, Size<3,5,7>> t;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
template<typename Scalar_, typename Dimensions_, int Options_, typename IndexType, template <class> class MakePointer_>
|
template<typename Scalar_, typename Dimensions_, int Options_, typename IndexType>
|
||||||
class TensorFixedSize : public TensorBase<TensorFixedSize<Scalar_, Dimensions_, Options_, IndexType, MakePointer_> >
|
class TensorFixedSize : public TensorBase<TensorFixedSize<Scalar_, Dimensions_, Options_, IndexType> >
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef TensorFixedSize<Scalar_, Dimensions_, Options_, IndexType> Self;
|
typedef TensorFixedSize<Scalar_, Dimensions_, Options_, IndexType> Self;
|
||||||
|
@ -24,7 +24,7 @@ template<typename T> struct MakePointer {
|
|||||||
|
|
||||||
template<typename PlainObjectType, int Options_ = Unaligned, template <class> class MakePointer_ = MakePointer> class TensorMap;
|
template<typename PlainObjectType, int Options_ = Unaligned, template <class> class MakePointer_ = MakePointer> class TensorMap;
|
||||||
template<typename Scalar_, int NumIndices_, int Options_ = 0, typename IndexType = DenseIndex> class Tensor;
|
template<typename Scalar_, int NumIndices_, int Options_ = 0, typename IndexType = DenseIndex> class Tensor;
|
||||||
template<typename Scalar_, typename Dimensions, int Options_ = 0, typename IndexType = DenseIndex, template <class> class MakePointer_ = MakePointer> class TensorFixedSize;
|
template<typename Scalar_, typename Dimensions, int Options_ = 0, typename IndexType = DenseIndex> class TensorFixedSize;
|
||||||
template<typename PlainObjectType> class TensorRef;
|
template<typename PlainObjectType> class TensorRef;
|
||||||
template<typename Derived, int AccessLevel> class TensorBase;
|
template<typename Derived, int AccessLevel> class TensorBase;
|
||||||
|
|
||||||
|
@ -62,8 +62,8 @@ struct traits<Tensor<Scalar_, NumIndices_, Options_, IndexType_> >
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
template<typename Scalar_, typename Dimensions, int Options_, typename IndexType_, template <class> class MakePointer_>
|
template<typename Scalar_, typename Dimensions, int Options_, typename IndexType_>
|
||||||
struct traits<TensorFixedSize<Scalar_, Dimensions, Options_, IndexType_, MakePointer_> >
|
struct traits<TensorFixedSize<Scalar_, Dimensions, Options_, IndexType_> >
|
||||||
{
|
{
|
||||||
typedef Scalar_ Scalar;
|
typedef Scalar_ Scalar;
|
||||||
typedef Dense StorageKind;
|
typedef Dense StorageKind;
|
||||||
@ -75,7 +75,7 @@ struct traits<TensorFixedSize<Scalar_, Dimensions, Options_, IndexType_, MakePoi
|
|||||||
Flags = compute_tensor_flags<Scalar_, Options_>::ret | (is_const<Scalar_>::value ? 0: LvalueBit)
|
Flags = compute_tensor_flags<Scalar_, Options_>::ret | (is_const<Scalar_>::value ? 0: LvalueBit)
|
||||||
};
|
};
|
||||||
template <typename T> struct MakePointer {
|
template <typename T> struct MakePointer {
|
||||||
typedef typename MakePointer_<T>::Type Type;
|
typedef T* Type;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user