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
36 template<
typename T,
typename Dimensions,
int Options>
class TensorStorage;
40 template<
typename T,
typename FixedDimensions,
int Options_>
44 static constexpr std::size_t
Size = FixedDimensions::total_size;
61 EIGEN_STRONG_INLINE
const FixedDimensions
dimensions()
const {
return FixedDimensions(); }
69 template<
typename T,
typename IndexType,
int NumIndices_,
int Options_>
78 if (NumIndices_ == 0) {
79 m_data = internal::conditional_aligned_new_auto<T,(Options_&DontAlign)==0>(1);
95 , m_dimensions(other.m_dimensions)
101 if (
this != &other) {
110 *
this = std::move(other);
129 if(
size != currentSz)
131 internal::conditional_aligned_delete_auto<T,(Options_&DontAlign)==0>(
m_data, currentSz);
133 m_data = internal::conditional_aligned_new_auto<T,(Options_&DontAlign)==0>(
size);
134 else if (NumIndices_ == 0) {
135 m_data = internal::conditional_aligned_new_auto<T,(Options_&DontAlign)==0>(1);
141 m_dimensions = nbDimensions;
#define EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN(X)
#define EIGEN_DEVICE_FUNC
#define EIGEN_INTERNAL_TENSOR_STORAGE_CTOR_PLUGIN
TensorStorage(internal::constructor_without_unaligned_array_assert)
TensorStorage(DenseIndex... indices)
TensorStorage(Index size, const array< Index, NumIndices_ > &dimensions)
void resize(Index size, const array< Index, NumIndices_ > &nbDimensions)
DSizes< IndexType, NumIndices_ > Dimensions
const Dimensions & dimensions() const
Self & operator=(const Self &other)
TensorStorage< T, DSizes< IndexType, NumIndices_ >, Options_ > Self
Self & operator=(Self &&other)
TensorStorage(const Self &other)
TensorStorage(Self &&other)
EIGEN_ALIGN_MAX T m_data[MinSize]
const FixedDimensions dimensions() const
static constexpr std::size_t Size
static constexpr std::size_t MinSize
T * conditional_aligned_new_auto(std::size_t size)
constexpr array< t, n > repeat(t v)
void smart_copy(const T *start, const T *end, T *target)
constexpr auto array_prod(const array< T, N > &arr) -> decltype(array_reduce< product_op, T, N >(arr, static_cast< T >(1)))
void swap(scoped_array< T > &a, scoped_array< T > &b)
std::ptrdiff_t array_prod(const Sizes< Indices... > &)
: TensorContractionSycl.h, provides various tensor contraction kernel for SYCL backend
EIGEN_DEFAULT_DENSE_INDEX_TYPE DenseIndex