mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-30 18:25:11 +08:00
Merge branch 'lambdaknight/eigen-master'
This commit is contained in:
commit
3bee9422d6
@ -45,8 +45,6 @@ class TensorStorage
|
|||||||
static const std::size_t MinSize = max_n_1<Size>::size;
|
static const std::size_t MinSize = max_n_1<Size>::size;
|
||||||
EIGEN_ALIGN_MAX T m_data[MinSize];
|
EIGEN_ALIGN_MAX T m_data[MinSize];
|
||||||
|
|
||||||
FixedDimensions m_dimensions;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
EIGEN_DEVICE_FUNC
|
EIGEN_DEVICE_FUNC
|
||||||
EIGEN_STRONG_INLINE TensorStorage() {
|
EIGEN_STRONG_INLINE TensorStorage() {
|
||||||
@ -57,14 +55,17 @@ class TensorStorage
|
|||||||
EIGEN_DEVICE_FUNC
|
EIGEN_DEVICE_FUNC
|
||||||
EIGEN_STRONG_INLINE const T *data() const { return m_data; }
|
EIGEN_STRONG_INLINE const T *data() const { return m_data; }
|
||||||
|
|
||||||
EIGEN_DEVICE_FUNC
|
static EIGEN_DEVICE_FUNC
|
||||||
EIGEN_STRONG_INLINE const FixedDimensions& dimensions() const { return m_dimensions; }
|
EIGEN_STRONG_INLINE const FixedDimensions& dimensions()
|
||||||
|
{
|
||||||
|
static const FixedDimensions* singleton_dimensions = new FixedDimensions();
|
||||||
|
return *singleton_dimensions;
|
||||||
|
}
|
||||||
|
|
||||||
EIGEN_DEVICE_FUNC
|
EIGEN_DEVICE_FUNC
|
||||||
EIGEN_STRONG_INLINE DenseIndex size() const { return m_dimensions.TotalSize(); }
|
EIGEN_STRONG_INLINE DenseIndex size() const { return Size; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// pure dynamic
|
// pure dynamic
|
||||||
template<typename T, typename IndexType, int NumIndices_, int Options_>
|
template<typename T, typename IndexType, int NumIndices_, int Options_>
|
||||||
class TensorStorage<T, DSizes<IndexType, NumIndices_>, Options_>
|
class TensorStorage<T, DSizes<IndexType, NumIndices_>, Options_>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user