11 #ifndef EIGEN_CXX11_TENSOR_TENSORSTORAGE_H
12 #define EIGEN_CXX11_TENSOR_TENSORSTORAGE_H
14 #ifdef EIGEN_TENSOR_STORAGE_CTOR_PLUGIN
15 #define EIGEN_INTERNAL_TENSOR_STORAGE_CTOR_PLUGIN EIGEN_TENSOR_STORAGE_CTOR_PLUGIN;
17 #define EIGEN_INTERNAL_TENSOR_STORAGE_CTOR_PLUGIN
37 template <
typename T,
typename Dimensions,
int Options>
41 template <
typename T,
typename FixedDimensions,
int Options_>
44 static constexpr std::size_t
Size = FixedDimensions::total_size;
62 template <
typename T,
typename IndexType,
int NumIndices_,
int Options_>
70 if (NumIndices_ == 0) {
71 m_data = internal::conditional_aligned_new_auto<T, (Options_ & DontAlign) == 0>(1);
87 m_dimensions(other.m_dimensions) {
107 internal::conditional_aligned_delete_auto<T, (Options_ & DontAlign) == 0>(
m_data,
119 if (
size != currentSz) {
120 internal::conditional_aligned_delete_auto<T, (Options_ & DontAlign) == 0>(
m_data, currentSz);
122 m_data = internal::conditional_aligned_new_auto<T, (Options_ & DontAlign) == 0>(
size);
123 else if (NumIndices_ == 0) {
124 m_data = internal::conditional_aligned_new_auto<T, (Options_ & DontAlign) == 0>(1);
129 m_dimensions = nbDimensions;
#define EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN(X)
Definition: DenseStorage.h:20
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:892
#define EIGEN_STRONG_INLINE
Definition: Macros.h:834
#define EIGEN_INTERNAL_TENSOR_STORAGE_CTOR_PLUGIN
Definition: TensorStorage.h:17
Definition: TensorStorage.h:63
EIGEN_DEVICE_FUNC Self & operator=(const Self &other)
Definition: TensorStorage.h:90
EIGEN_DEVICE_FUNC TensorStorage(Self &&other)
Definition: TensorStorage.h:98
EIGEN_DEVICE_FUNC ~TensorStorage()
Definition: TensorStorage.h:106
T * m_data
Definition: TensorStorage.h:138
EIGEN_DEVICE_FUNC TensorStorage()
Definition: TensorStorage.h:69
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions & dimensions() const
Definition: TensorStorage.h:115
EIGEN_DEVICE_FUNC void swap(Self &other)
Definition: TensorStorage.h:110
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T * data()
Definition: TensorStorage.h:132
DSizes< IndexType, NumIndices_ > Dimensions
Definition: TensorStorage.h:66
EIGEN_DEVICE_FUNC Self & operator=(Self &&other)
Definition: TensorStorage.h:100
EIGEN_DEVICE_FUNC TensorStorage(DenseIndex... indices)
Definition: TensorStorage.h:80
IndexType Index
Definition: TensorStorage.h:65
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index size() const
Definition: TensorStorage.h:135
TensorStorage< T, DSizes< IndexType, NumIndices_ >, Options_ > Self
Definition: TensorStorage.h:67
Dimensions m_dimensions
Definition: TensorStorage.h:139
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const T * data() const
Definition: TensorStorage.h:133
EIGEN_DEVICE_FUNC void resize(Index size, const array< Index, NumIndices_ > &nbDimensions)
Definition: TensorStorage.h:117
EIGEN_DEVICE_FUNC TensorStorage(const Self &other)
Definition: TensorStorage.h:84
EIGEN_DEVICE_FUNC TensorStorage(Index size, const array< Index, NumIndices_ > &dimensions)
Definition: TensorStorage.h:74
Stores the data of a tensor.
Definition: TensorStorage.h:42
EIGEN_ALIGN_MAX T m_data[MinSize]
Definition: TensorStorage.h:48
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DenseIndex size() const
Definition: TensorStorage.h:58
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const FixedDimensions dimensions() const
Definition: TensorStorage.h:56
static constexpr std::size_t Size
Definition: TensorStorage.h:44
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T * data()
Definition: TensorStorage.h:53
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const T * data() const
Definition: TensorStorage.h:54
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorStorage()
Definition: TensorStorage.h:51
static constexpr std::size_t MinSize
Definition: TensorStorage.h:47
@ DontAlign
Definition: Constants.h:324
Eigen::Matrix< Scalar, Dynamic, Dynamic, ColMajor > tmp
Definition: level3_impl.h:365
constexpr EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE auto array_prod(const array< T, N > &arr) -> decltype(array_reduce< product_op, T, N >(arr, static_cast< T >(1)))
Definition: MoreMeta.h:497
EIGEN_DEVICE_FUNC void smart_copy(const T *start, const T *end, T *target)
Definition: Memory.h:569
EIGEN_DEVICE_FUNC T * conditional_aligned_new_auto(std::size_t size)
Definition: Memory.h:476
EIGEN_STRONG_INLINE void swap(T &a, T &b)
Definition: Meta.h:536
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:70
std::array< T, N > array
Definition: EmulateArray.h:231
EIGEN_DEFAULT_DENSE_INDEX_TYPE DenseIndex
Definition: Meta.h:75
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::enable_if_t< std::is_base_of< DenseBase< std::decay_t< DerivedA > >, std::decay_t< DerivedA > >::value &&std::is_base_of< DenseBase< std::decay_t< DerivedB > >, std::decay_t< DerivedB > >::value, void > swap(DerivedA &&a, DerivedB &&b)
Definition: DenseBase.h:655
Definition: Eigen_Colamd.h:49
Definition: TensorDimensions.h:161
Definition: TensorMeta.h:32