Go to the documentation of this file.
11 #ifndef EIGEN_CXX11_TENSOR_TENSOR_H
12 #define EIGEN_CXX11_TENSOR_TENSOR_H
62 template<
typename Scalar_,
int NumIndices_,
int Options_,
typename IndexType_>
89 #ifdef EIGEN_HAS_SFINAE
90 template<
typename CustomIndices>
91 struct isOfNormalIndex{
92 static const bool is_array = internal::is_base_of<array<Index, NumIndices>, CustomIndices>
::value;
94 static const bool value = is_array | is_int;
113 #if EIGEN_HAS_VARIADIC_TEMPLATES
114 template<
typename... IndexTypes>
131 #ifdef EIGEN_HAS_SFINAE
132 template<
typename CustomIndices,
137 return coeff(internal::customIndices2Array<Index,NumIndices>(
indices));
153 #if EIGEN_HAS_VARIADIC_TEMPLATES
154 template<
typename... IndexTypes>
171 #ifdef EIGEN_HAS_SFINAE
172 template<
typename CustomIndices,
177 return coeffRef(internal::customIndices2Array<Index,NumIndices>(
indices));
193 #if EIGEN_HAS_VARIADIC_TEMPLATES
194 template<
typename... IndexTypes>
225 #ifdef EIGEN_HAS_SFINAE
226 template<
typename CustomIndices,
231 return coeff(internal::customIndices2Array<Index,NumIndices>(
indices));
260 #if EIGEN_HAS_VARIADIC_TEMPLATES
261 template<
typename... IndexTypes>
298 #ifdef EIGEN_HAS_SFINAE
299 template<
typename CustomIndices,
304 return coeffRef(internal::customIndices2Array<Index,NumIndices>(
indices));
339 #if EIGEN_HAS_VARIADIC_TEMPLATES
340 template<
typename... IndexTypes>
342 :
m_storage(firstDimension, otherDimensions...)
382 template<
typename OtherDerived>
387 Assign assign(*
this,
other.derived());
392 template<
typename OtherDerived>
397 Assign assign(*
this,
other.derived());
402 #if EIGEN_HAS_RVALUE_REFERENCES
420 Assign assign(*
this,
other);
425 template<
typename OtherDerived>
430 Assign assign(*
this,
other);
436 #if EIGEN_HAS_VARIADIC_TEMPLATES
438 void resize(
Index firstDimension, IndexTypes... otherDimensions)
455 #ifdef EIGEN_INITIALIZE_COEFFS
456 bool size_changed =
size != this->
size();
480 #ifdef EIGEN_HAS_INDEX_LIST
481 template <
typename FirstType,
typename... OtherTypes>
493 #ifdef EIGEN_HAS_SFINAE
494 template<
typename CustomDimension,
503 #ifndef EIGEN_EMULATE_CXX11_META_H
504 template <
typename std::ptrdiff_t...
Indices>
514 template <std::
size_t V1, std::
size_t V2, std::
size_t V3, std::
size_t V4, std::
size_t V5>
537 array_apply_and_reduce<logical_and_op, greater_equal_zero_op>(
indices) &&
554 #endif // EIGEN_CXX11_TENSOR_TENSOR_H
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalar * data() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index dimension(std::size_t n) const
EIGEN_DEVICE_FUNC void resize(const Sizes< Indices... > &dimensions)
#define EIGEN_DEVICE_FUNC
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalar & operator()() const
Namespace containing all symbols from the Eigen library.
internal::traits< Self >::StorageKind StorageKind
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalar & operator[](Index index) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Tensor(Index dim1, Index dim2)
constexpr EIGEN_STRONG_INLINE auto array_zip_and_reduce(array< A, N > a, array< B, N > b) -> decltype(h_array_zip_and_reduce< Reducer, Op, A, B, N >(a, b, typename gen_numeric_list< int, N >::type()))
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & operator()(const array< Index, NumIndices > &indices)
Base::CoeffReturnType CoeffReturnType
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalar & coeff(const array< Index, NumIndices > &indices) const
static EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE FixedDimensions & dimensions()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Tensor()
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalar & operator()(Index i0, Index i1, Index i2) const
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalar & operator()(Index i0, Index i1, Index i2, Index i3, Index i4) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & operator()(Index i0, Index i1, Index i2)
EIGEN_DEVICE_FUNC void resize(const DSizes< Index, NumIndices > &dimensions)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Tensor(Index dim1)
Eigen::internal::nested< Self >::type Nested
Tensor< Scalar_, NumIndices_, Options_, IndexType_ > Self
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalar & coeff() const
constexpr EIGEN_STRONG_INLINE auto array_apply_and_reduce(array< A, N > a) -> decltype(h_array_apply_and_reduce< Reducer, Op, A, N >(a, typename gen_numeric_list< int, N >::type()))
#define eigen_internal_assert(x)
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalar & operator()(Index i0, Index i1, Index i2, Index i3) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & operator[](Index index)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DenseIndex IndexOfRowMajor(const array< DenseIndex, NumDims > &indices) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Tensor(const Self &other)
static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void run(Index, Index)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index rank() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Tensor & operator=(const OtherDerived &other)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef()
NumTraits< Scalar >::Real RealScalar
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & operator()(Index index)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(const array< Index, NumIndices > &indices)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Tensor(const TensorBase< OtherDerived, ReadOnlyAccessors > &other)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Tensor(Index dim1, Index dim2, Index dim3)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DenseIndex size() const
EIGEN_DEVICE_FUNC void resize(const array< Index, NumIndices > &dimensions)
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Dimensions & dimensions() const
static const int NumIndices
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Tensor(Index dim1, Index dim2, Index dim3, Index dim4)
#define EIGEN_STRONG_INLINE
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T * data()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Tensor(const TensorBase< OtherDerived, WriteAccessors > &other)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & operator()(Index i0, Index i1)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & operator()(Index i0, Index i1, Index i2, Index i3)
#define EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED
#define EIGEN_SFINAE_ENABLE_IF(__condition__)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Tensor(const array< Index, NumIndices > &dimensions)
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalar & operator()(Index i0, Index i1) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & operator()(Index i0, Index i1, Index i2, Index i3, Index i4)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::ptrdiff_t array_prod(const Sizes< Indices... > &)
const Self & base() const
TensorStorage< Scalar, Dimensions, Options > m_storage
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index index)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Tensor(Index dim1, Index dim2, Index dim3, Index dim4, Index dim5)
EIGEN_DEVICE_FUNC void resize()
detail::enable_if_t<!detail::move_never< T >::value, T > move(object &&obj)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & operator()()
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalar & operator()(const array< Index, NumIndices > &indices) const
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DenseIndex IndexOfColMajor(const array< DenseIndex, NumDims > &indices) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar * data()
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalar & operator()(Index index) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Tensor & operator=(const Tensor &other)
DSizes< Index, NumIndices_ > Dimensions
A cost model used to limit the number of threads used for evaluating tensor expression.
bool checkIndexRange(const array< Index, NumIndices > &indices) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index size() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index linearizedIndex(const array< Index, NumIndices > &indices) const
std::vector< size_t > Indices
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalar & coeff(Index index) const
internal::traits< Self >::Index Index
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
TensorBase< Tensor< Scalar_, NumIndices_, Options_, IndexType_ > > Base
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(const Expression &expr, const Device &device=Device())
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:05:25