Go to the documentation of this file.
10 #ifndef EIGEN_CXX11_TENSOR_TENSOR_REF_H
11 #define EIGEN_CXX11_TENSOR_TENSOR_REF_H
17 template <
typename Dimensions,
typename Scalar>
42 template <
typename Dimensions,
typename Expr,
typename Device>
70 eigen_assert(
false &&
"can't reference the coefficient of a rvalue");
80 template <
typename Dimensions,
typename Expr,
typename Device>
98 template <
typename Dimensions,
typename Expr,
typename Device>
100 TensorLazyEvaluatorWritable<Dimensions, Expr, Device>,
101 TensorLazyEvaluatorReadOnly<Dimensions, const Expr, Device> >
::type {
124 template<
typename PlainObjectType>
class TensorRef :
public TensorBase<TensorRef<PlainObjectType> >
128 typedef typename PlainObjectType::Base
Base;
158 template <
typename Expression>
163 template <
typename Expression>
181 if (
this != &
other) {
207 #if EIGEN_HAS_VARIADIC_TEMPLATES
211 const std::size_t num_indices = (
sizeof...(otherIndices) + 1);
218 const std::size_t num_indices = (
sizeof...(otherIndices) + 1);
307 if (PlainObjectType::Options &
RowMajor) {
325 if (PlainObjectType::Options &
RowMajor) {
366 template<
typename Derived,
typename Device>
404 return m_ref.coeff(index);
408 return m_ref.coeffRef(index);
419 template<
typename Derived,
typename Device>
446 return this->m_ref.coeffRef(index);
454 #endif // EIGEN_CXX11_TENSOR_TENSOR_REF_H
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Dimensions & dimensions() const
Storage::Type EvaluatorPointerType
#define EIGEN_DEVICE_FUNC
Namespace containing all symbols from the Eigen library.
PacketType< CoeffReturnType, Device >::type PacketReturnType
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalar operator()(Index i0, Index i1) const
virtual const EIGEN_DEVICE_FUNC Dimensions & dimensions() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index i0, Index i1, Index i2, Index i3, Index i4)
static const double d[K][N]
internal::conditional< bool(internal::is_lvalue< Expr >::value), TensorLazyEvaluatorWritable< Dimensions, Expr, Device >, TensorLazyEvaluatorReadOnly< Dimensions, const Expr, Device > >::type Base
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index i0, Index i1)
TensorLazyEvaluatorReadOnly(const Expr &expr, const Device &device)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index index)
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Dimensions & dimensions() const
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Dimensions & dimensions() const
PacketType< CoeffReturnType, Device >::type PacketReturnType
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index rank() const
virtual const EIGEN_DEVICE_FUNC Dimensions & dimensions() const =0
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalar operator()(Index i0, Index i1, Index i2, Index i3) const
EIGEN_STRONG_INLINE TensorRef()
internal::TensorBlockNotImplemented TensorBlock
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalar * data() const
TensorRef< Derived > m_ref
virtual ~TensorLazyEvaluatorReadOnly()
TensorRef(const TensorRef &other)
EIGEN_STRONG_INLINE TensorRef(const Expression &expr)
virtual const EIGEN_DEVICE_FUNC Scalar coeff(DenseIndex index) const =0
virtual EIGEN_DEVICE_FUNC Scalar & coeffRef(DenseIndex index)
TensorLazyBaseEvaluator & operator=(const TensorLazyBaseEvaluator &other)
EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType dest)
virtual ~TensorLazyEvaluator()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index index)
virtual const EIGEN_DEVICE_FUNC Scalar * data() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index index)
internal::TensorBlockNotImplemented TensorBlock
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index dimension(Index n) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index size() const
internal::traits< PlainObjectType >::Scalar Scalar
Derived::Dimensions Dimensions
virtual EIGEN_DEVICE_FUNC Scalar & coeffRef(DenseIndex index)=0
TensorEvaluator< Expr, Device > EvalType
const EIGEN_DEVICE_FUNC Scalar * data() const
internal::traits< PlainObjectType >::StorageKind StorageKind
TensorEvaluator< Expr, Device > m_impl
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & operator()(Index i0, Index i1, Index i2, Index i3)
Eigen::internal::nested< Self >::type Nested
EIGEN_DEVICE_FUNC EvaluatorPointerType data() const
TensorRef< PlainObjectType > Self
#define EIGEN_STRONG_INLINE
virtual const EIGEN_DEVICE_FUNC Scalar * data() const =0
EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType)
virtual EIGEN_DEVICE_FUNC Scalar & coeffRef(DenseIndex)
Derived::Scalar CoeffReturnType
internal::TensorLazyBaseEvaluator< Dimensions, Scalar > * m_evaluator
TensorLazyEvaluatorWritable(const Expr &expr, const Device &device)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
TensorLazyEvaluatorReadOnly< Dimensions, Expr, Device > Base
virtual ~TensorLazyBaseEvaluator()
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 & coeffRef(Index i0, Index i1, Index i2)
EIGEN_STRONG_INLINE void unrefEvaluator()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType & coeffRef(Index index)
PointerType PointerArgType
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalar coeff(const array< Index, NumIndices > &indices) const
Derived::Scalar CoeffReturnType
StorageMemory< Scalar, Device > Storage
Derived::Dimensions Dimensions
EIGEN_STRONG_INLINE void cleanup()
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalar coeff(Index index) const
NumTraits< Scalar >::Real RealScalar
internal::traits< PlainObjectType >::Index Index
EIGEN_DEFAULT_DENSE_INDEX_TYPE DenseIndex
virtual const EIGEN_DEVICE_FUNC Scalar coeff(DenseIndex index) const
internal::TensorBlockNotImplemented TensorBlock
StorageMemory< CoeffReturnType, Device > Storage
StorageMemory< Scalar, Device > Storage
virtual ~TensorLazyEvaluatorWritable()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
EIGEN_STRONG_INLINE TensorEvaluator(TensorRef< Derived > &m, const Device &d)
Storage::Type EvaluatorPointerType
EIGEN_STRONG_INLINE void cleanup()
A cost model used to limit the number of threads used for evaluating tensor expression.
TensorLazyEvaluator(const Expr &expr, const Device &device)
PlainObjectType::Base Base
static const Index NumIndices
EIGEN_STRONG_INLINE TensorRef & operator=(const Expression &expr)
TensorLazyBaseEvaluator()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(const array< Index, NumIndices > &indices)
Base::CoeffReturnType CoeffReturnType
TensorEvaluator< const TensorRef< Derived >, Device > Base
Storage::Type EvaluatorPointerType
TensorEvaluator< Expr, Device >::Scalar Scalar
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalar operator()(Index i0, Index i1, Index i2) const
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalar operator()(Index index) const
EIGEN_STRONG_INLINE TensorEvaluator(const TensorRef< Derived > &m, const Device &)
PlainObjectType::Dimensions Dimensions
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:06:50