Eigen::TensorBase< Derived, AccessLevel > Class Template Reference

The tensor base class. More...

#include <TensorBase.h>

+ Inheritance diagram for Eigen::TensorBase< Derived, AccessLevel >:

Public Types

typedef TensorBase< Derived, ReadOnlyAccessorsBase
 
typedef internal::traits< Derived > DerivedTraits
 
typedef DerivedTraits::Scalar Scalar
 
typedef DerivedTraits::Index Index
 
typedef Scalar CoeffReturnType
 

Public Member Functions

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & setZero ()
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & setConstant (const Scalar &val)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & setRandom ()
 
template<typename RandomGenerator >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & setRandom ()
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & setValues (const typename internal::Initializer< Derived, NumDimensions >::InitList &vals)
 
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & operator+= (const OtherDerived &other)
 
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & operator-= (const OtherDerived &other)
 
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & operator*= (const OtherDerived &other)
 
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & operator/= (const OtherDerived &other)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorLayoutSwapOp< const Derived > swap_layout () const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorLayoutSwapOp< Derived > swap_layout ()
 
template<typename Axis , typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorConcatenationOp< const Axis, const Derived, const OtherDerived > concatenate (const OtherDerived &other, const Axis &axis) const
 
template<typename Axis , typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorConcatenationOp< const Axis, Derived, OtherDerived > concatenate (const OtherDerived &other, const Axis &axis)
 
template<typename NewDimensions >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReshapingOp< const NewDimensions, const Derived > reshape (const NewDimensions &newDimensions) const
 
template<typename NewDimensions >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorReshapingOp< const NewDimensions, Derived > reshape (const NewDimensions &newDimensions)
 
template<typename StartIndices , typename Sizes >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorSlicingOp< const StartIndices, const Sizes, const Derived > slice (const StartIndices &startIndices, const Sizes &sizes) const
 
template<typename StartIndices , typename Sizes >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorSlicingOp< const StartIndices, const Sizes, Derived > slice (const StartIndices &startIndices, const Sizes &sizes)
 
template<typename StartIndices , typename StopIndices , typename Strides >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorStridingSlicingOp< const StartIndices, const StopIndices, const Strides, const Derived > stridedSlice (const StartIndices &startIndices, const StopIndices &stopIndices, const Strides &strides) const
 
template<typename StartIndices , typename StopIndices , typename Strides >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorStridingSlicingOp< const StartIndices, const StopIndices, const Strides, Derived > stridedSlice (const StartIndices &startIndices, const StopIndices &stopIndices, const Strides &strides)
 
template<DenseIndex DimId>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorChippingOp< DimId, const Derived > chip (const Index offset) const
 
template<Index DimId>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorChippingOp< DimId, Derived > chip (const Index offset)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorChippingOp< Dynamic, const Derived > chip (const Index offset, const Index dim) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorChippingOp< Dynamic, Derived > chip (const Index offset, const Index dim)
 
template<typename ReverseDimensions >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReverseOp< const ReverseDimensions, const Derived > reverse (const ReverseDimensions &rev) const
 
template<typename ReverseDimensions >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorReverseOp< const ReverseDimensions, Derived > reverse (const ReverseDimensions &rev)
 
template<typename Rolls >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorRollOp< const Rolls, const Derived > roll (const Rolls &roll) const
 
template<typename Rolls >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorRollOp< const Rolls, Derived > roll (const Rolls &roll)
 
template<typename Shuffle >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorShufflingOp< const Shuffle, const Derived > shuffle (const Shuffle &shfl) const
 
template<typename Shuffle >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorShufflingOp< const Shuffle, Derived > shuffle (const Shuffle &shfl)
 
template<typename Strides >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorStridingOp< const Strides, const Derived > stride (const Strides &strides) const
 
template<typename Strides >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorStridingOp< const Strides, Derived > stride (const Strides &strides)
 
template<typename DeviceType >
TensorDevice< Derived, DeviceType > device (const DeviceType &dev)
 
template<typename DeviceType , typename DoneCallback >
TensorAsyncDevice< Derived, DeviceType, DoneCallback > device (const DeviceType &dev, DoneCallback done)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & derived ()
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Derived & derived () const
 

Static Public Attributes

static constexpr int NumDimensions = DerivedTraits::NumDimensions
 

Protected Member Functions

template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & operator= (const OtherDerived &other)
 

Friends

template<typename Scalar , int NumIndices, int Options, typename IndexType >
class Tensor
 
template<typename Scalar , typename Dimensions , int Option, typename IndexTypes >
class TensorFixedSize
 
template<typename OtherDerived , int OtherAccessLevel>
class Eigen::TensorBase
 

Detailed Description

template<typename Derived, int AccessLevel = internal::accessors_level<Derived>::value>
class Eigen::TensorBase< Derived, AccessLevel >

The tensor base class.

This class is the common parent of the Tensor and TensorMap class, thus making it possible to use either class interchangeably in expressions.

Member Typedef Documentation

◆ Base

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
typedef TensorBase<Derived, ReadOnlyAccessors> Eigen::TensorBase< Derived, AccessLevel >::Base

◆ CoeffReturnType

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
typedef Scalar Eigen::TensorBase< Derived, AccessLevel >::CoeffReturnType

◆ DerivedTraits

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
typedef internal::traits<Derived> Eigen::TensorBase< Derived, AccessLevel >::DerivedTraits

◆ Index

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
typedef DerivedTraits::Index Eigen::TensorBase< Derived, AccessLevel >::Index

◆ Scalar

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
typedef DerivedTraits::Scalar Eigen::TensorBase< Derived, AccessLevel >::Scalar

Member Function Documentation

◆ chip() [1/4]

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
template<Index DimId>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorChippingOp<DimId, Derived> Eigen::TensorBase< Derived, AccessLevel >::chip ( const Index  offset)
inline
1147  {
1148  EIGEN_STATIC_ASSERT(DimId < Derived::NumDimensions && DimId >= 0, Chip_Dim_out_of_range)
1149  return TensorChippingOp<DimId, Derived>(derived(), offset, DimId);
1150  }
#define EIGEN_STATIC_ASSERT(X, MSG)
Definition: StaticAssert.h:26
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & derived()
Definition: TensorBase.h:1220

References Eigen::TensorBase< Derived, AccessLevel >::derived(), and EIGEN_STATIC_ASSERT.

◆ chip() [2/4]

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
template<DenseIndex DimId>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorChippingOp<DimId, const Derived> Eigen::TensorBase< Derived, AccessLevel >::chip ( const Index  offset) const
inline

◆ chip() [3/4]

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorChippingOp<Dynamic, Derived> Eigen::TensorBase< Derived, AccessLevel >::chip ( const Index  offset,
const Index  dim 
)
inline
1159  {
1160  return TensorChippingOp<Dynamic, Derived>(derived(), offset, dim);
1161  }

References Eigen::TensorBase< Derived, AccessLevel >::derived().

◆ chip() [4/4]

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorChippingOp<Dynamic, const Derived> Eigen::TensorBase< Derived, AccessLevel >::chip ( const Index  offset,
const Index  dim 
) const
inline
1154  {
1155  return TensorChippingOp<Dynamic, const Derived>(derived(), offset, dim);
1156  }

References Eigen::TensorBase< Derived, AccessLevel >::derived().

◆ concatenate() [1/2]

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
template<typename Axis , typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorConcatenationOp<const Axis, Derived, OtherDerived> Eigen::TensorBase< Derived, AccessLevel >::concatenate ( const OtherDerived &  other,
const Axis &  axis 
)
inline
1100  {
1101  return TensorConcatenationOp<const Axis, Derived, OtherDerived>(derived(), other, axis);
1102  }

References Eigen::TensorBase< Derived, AccessLevel >::derived().

◆ concatenate() [2/2]

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
template<typename Axis , typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorConcatenationOp<const Axis, const Derived, const OtherDerived> Eigen::TensorBase< Derived, AccessLevel >::concatenate ( const OtherDerived &  other,
const Axis &  axis 
) const
inline
1095  {
1096  return TensorConcatenationOp<const Axis, const Derived, const OtherDerived>(derived(), other, axis);
1097  }

References Eigen::TensorBase< Derived, AccessLevel >::derived().

Referenced by test_concat(), test_concatenation_as_lvalue(), test_dimension_failures(), test_simple_concatenation(), and test_static_dimension_failure().

◆ derived() [1/2]

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& Eigen::TensorBase< Derived, AccessLevel >::derived ( )
inline
1220 { return *static_cast<Derived*>(this); }

Referenced by Eigen::TensorBase< Derived, ReadOnlyAccessors >::argmax(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::argmin(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::binaryExpr(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::broadcast(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::cast(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::chip(), Eigen::TensorBase< Derived, AccessLevel >::chip(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::concatenate(), Eigen::TensorBase< Derived, AccessLevel >::concatenate(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::conjugate(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::contract(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::convolve(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::cumprod(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::cumsum(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::customOp(), Eigen::TensorBase< Derived, AccessLevel >::device(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::eval(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::extract_image_patches(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::extract_patches(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::extract_volume_patches(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::fft(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::format(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::generate(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::index_pairs(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::inflate(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::maximum(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::mean(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::minimum(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::nullaryExpr(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::operator!=(), Eigen::TensorBase< Derived, AccessLevel >::operator*=(), Eigen::TensorBase< Derived, AccessLevel >::operator+=(), Eigen::TensorBase< Derived, AccessLevel >::operator-=(), Eigen::TensorBase< Derived, AccessLevel >::operator/=(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::operator<(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::operator<=(), Eigen::TensorBase< Derived, AccessLevel >::operator=(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::operator==(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::operator>(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::operator>=(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::pad(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::prod(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::reduce(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::reshape(), Eigen::TensorBase< Derived, AccessLevel >::reshape(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::reverse(), Eigen::TensorBase< Derived, AccessLevel >::reverse(), Eigen::TensorBase< Derived, AccessLevel >::roll(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::roll(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::scan(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::select(), Eigen::TensorBase< Derived, AccessLevel >::setConstant(), Eigen::TensorBase< Derived, AccessLevel >::setRandom(), Eigen::TensorBase< Derived, AccessLevel >::setValues(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::shuffle(), Eigen::TensorBase< Derived, AccessLevel >::shuffle(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::slice(), Eigen::TensorBase< Derived, AccessLevel >::slice(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::stride(), Eigen::TensorBase< Derived, AccessLevel >::stride(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::stridedSlice(), Eigen::TensorBase< Derived, AccessLevel >::stridedSlice(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::sum(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::swap_layout(), Eigen::TensorBase< Derived, AccessLevel >::swap_layout(), Eigen::Tensor< Scalar_, NumIndices_, Options_, IndexType_ >::Tensor(), Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::TensorFixedSize(), Eigen::TensorBase< Derived, ReadOnlyAccessors >::trace(), and Eigen::TensorBase< Derived, ReadOnlyAccessors >::unaryExpr().

◆ derived() [2/2]

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Derived& Eigen::TensorBase< Derived, AccessLevel >::derived ( ) const
inline
1222 { return *static_cast<const Derived*>(this); }

◆ device() [1/2]

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
template<typename DeviceType >
TensorDevice<Derived, DeviceType> Eigen::TensorBase< Derived, AccessLevel >::device ( const DeviceType &  dev)
inline
1209  {
1210  return TensorDevice<Derived, DeviceType>(dev, derived());
1211  }

References Eigen::TensorBase< Derived, AccessLevel >::derived().

Referenced by contraction_both_transposed(), contraction_lhs_transposed(), contraction_rhs_transposed(), main(), test_1D_sycl(), test_2D_sycl(), test_async_multithread_contraction_agrees_with_singlethread(), test_async_sharded_by_inner_dim_contraction(), test_async_sharded_by_inner_dim_contraction_with_output_kernel(), test_binary_builtins_fixed_arg2(), test_binary_builtins_func(), test_broadcast_sycl(), test_broadcast_sycl_fixed(), test_chip_as_lvalue_sycl(), test_chip_in_expr(), test_contraction_corner_cases(), test_dynamic_chip_sycl(), test_entire_volume_patch_sycl(), test_evals(), test_expr(), test_expr_reverse(), test_first_dim_reductions_max_sycl(), test_first_dim_reductions_max_with_offset_sycl(), test_first_dim_reductions_mean_sycl(), test_first_dim_reductions_sum_sycl(), test_forced_eval_sycl(), test_full_contraction(), test_full_reductions_custom_sycl(), test_full_reductions_max_sycl(), test_full_reductions_max_with_offset_sycl(), test_full_reductions_mean_sycl(), test_full_reductions_mean_with_odd_offset_sycl(), test_full_reductions_mean_with_offset_sycl(), test_full_reductions_min_sycl(), test_full_reductions_min_with_offset_sycl(), test_full_reductions_sum_sycl(), test_full_reductions_sum_with_offset_sycl(), test_gaussian_sycl(), test_gpu_contractions(), test_gpu_conversion(), test_gpu_elementwise(), test_gpu_forced_evals(), test_gpu_full_reductions(), test_gpu_numext(), test_gpu_reductions(), test_gpu_trancendental(), test_gpu_unary(), test_image_op_sycl(), test_imagenet_patches_sycl(), test_larg_expr1D(), test_larg_expr2D(), test_larg_expr3D(), test_last_dim_reductions_max_with_offset_sycl(), test_last_dim_reductions_mean_sycl(), test_last_dim_reductions_sum_sycl(), test_last_reductions_mean_sycl(), test_last_reductions_sum_sycl(), test_modes(), test_multithread_contraction(), test_multithread_contraction_agrees_with_singlethread(), test_multithread_contraction_with_output_kernel(), test_multithreaded_reductions(), test_no_out_of_bounds(), test_padded_expr(), test_patch_no_extra_dim_sycl(), test_patch_padding_same_sycl(), test_patch_padding_valid_same_value_sycl(), test_patch_padding_valid_sycl(), test_scalar(), test_sharded_by_inner_dim_contraction(), test_sharded_by_inner_dim_contraction_with_output_kernel(), test_sigmoid_sycl(), test_simple_concatenation(), test_simple_image_patch_sycl(), test_simple_inflation_sycl(), test_simple_padding(), test_simple_patch_sycl(), test_simple_reshape(), test_simple_reverse(), test_simple_shuffling_sycl(), test_simple_slice(), test_simple_striding(), test_simple_swap_sycl(), test_single_voxel_patch_sycl(), test_static_chip_sycl(), test_strided_slice_as_rhs_sycl(), test_strided_slice_write_sycl(), test_strides(), test_sycl_argmax_dim(), test_sycl_argmin_dim(), test_sycl_cast(), test_sycl_computations(), test_sycl_contraction(), test_sycl_cumsum(), test_sycl_mem_transfers(), test_sycl_random_normal(), test_sycl_random_uniform(), test_sycl_simple_argmax(), test_tanh_sycl(), test_unary_builtins_for_scalar(), and test_unary_builtins_return_bool().

◆ device() [2/2]

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
template<typename DeviceType , typename DoneCallback >
TensorAsyncDevice<Derived, DeviceType, DoneCallback> Eigen::TensorBase< Derived, AccessLevel >::device ( const DeviceType &  dev,
DoneCallback  done 
)
inline
1215  {
1216  return TensorAsyncDevice<Derived, DeviceType, DoneCallback>(dev, derived(), std::move(done));
1217  }

References Eigen::TensorBase< Derived, AccessLevel >::derived().

◆ operator*=()

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& Eigen::TensorBase< Derived, AccessLevel >::operator*= ( const OtherDerived &  other)
inline
1074  {
1075  return derived() = derived() * other.derived();
1076  }

References Eigen::TensorBase< Derived, AccessLevel >::derived().

◆ operator+=()

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& Eigen::TensorBase< Derived, AccessLevel >::operator+= ( const OtherDerived &  other)
inline
1066  {
1067  return derived() = derived() + other.derived();
1068  }

References Eigen::TensorBase< Derived, AccessLevel >::derived().

◆ operator-=()

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& Eigen::TensorBase< Derived, AccessLevel >::operator-= ( const OtherDerived &  other)
inline
1070  {
1071  return derived() = derived() - other.derived();
1072  }

References Eigen::TensorBase< Derived, AccessLevel >::derived().

◆ operator/=()

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& Eigen::TensorBase< Derived, AccessLevel >::operator/= ( const OtherDerived &  other)
inline
1078  {
1079  return derived() = derived() / other.derived();
1080  }

References Eigen::TensorBase< Derived, AccessLevel >::derived().

◆ operator=()

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& Eigen::TensorBase< Derived, AccessLevel >::operator= ( const OtherDerived &  other)
inlineprotected
1234  {
1235  typedef TensorAssignOp<Derived, const OtherDerived> Assign;
1236  Assign assign(derived(), other.derived());
1238  return derived();
1239  }
static EIGEN_STRONG_INLINE void run(const Expression &expr, const Device &device=DefaultDevice())
Definition: TensorExecutor.h:92

References Eigen::TensorBase< Derived, AccessLevel >::derived(), and Eigen::internal::TensorExecutor< Expression, Device, Vectorizable, Tiling >::run().

◆ reshape() [1/2]

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
template<typename NewDimensions >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorReshapingOp<const NewDimensions, Derived> Eigen::TensorBase< Derived, AccessLevel >::reshape ( const NewDimensions &  newDimensions)
inline
1111  {
1112  return TensorReshapingOp<const NewDimensions, Derived>(derived(), newDimensions);
1113  }

References Eigen::TensorBase< Derived, AccessLevel >::derived().

◆ reshape() [2/2]

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
template<typename NewDimensions >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReshapingOp<const NewDimensions, const Derived> Eigen::TensorBase< Derived, AccessLevel >::reshape ( const NewDimensions &  newDimensions) const
inline

◆ reverse() [1/2]

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
template<typename ReverseDimensions >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorReverseOp<const ReverseDimensions, Derived> Eigen::TensorBase< Derived, AccessLevel >::reverse ( const ReverseDimensions &  rev)
inline
1170  {
1171  return TensorReverseOp<const ReverseDimensions, Derived>(derived(), rev);
1172  }

References Eigen::TensorBase< Derived, AccessLevel >::derived().

◆ reverse() [2/2]

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
template<typename ReverseDimensions >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReverseOp<const ReverseDimensions, const Derived> Eigen::TensorBase< Derived, AccessLevel >::reverse ( const ReverseDimensions &  rev) const
inline
1165  {
1166  return TensorReverseOp<const ReverseDimensions, const Derived>(derived(), rev);
1167  }

References Eigen::TensorBase< Derived, AccessLevel >::derived().

Referenced by test_eval_tensor_reverse(), test_execute_reverse_rvalue(), test_expr_reverse(), and test_simple_reverse().

◆ roll() [1/2]

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
template<typename Rolls >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorRollOp<const Rolls, Derived> Eigen::TensorBase< Derived, AccessLevel >::roll ( const Rolls &  roll)
inline
1181  {
1182  return TensorRollOp<const Rolls, Derived>(derived(), roll);
1183  }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorRollOp< const Rolls, const Derived > roll(const Rolls &roll) const
Definition: TensorBase.h:1176

References Eigen::TensorBase< Derived, AccessLevel >::derived(), and Eigen::TensorBase< Derived, AccessLevel >::roll().

◆ roll() [2/2]

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
template<typename Rolls >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorRollOp<const Rolls, const Derived> Eigen::TensorBase< Derived, AccessLevel >::roll ( const Rolls &  roll) const
inline
1176  {
1177  return TensorRollOp<const Rolls, const Derived>(derived(), roll);
1178  }

References Eigen::TensorBase< Derived, AccessLevel >::derived().

Referenced by Eigen::TensorBase< Derived, AccessLevel >::roll(), test_expr_roll(), and test_simple_roll().

◆ setConstant()

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& Eigen::TensorBase< Derived, AccessLevel >::setConstant ( const Scalar val)
inline
1045  {
1046  return derived() = this->constant(val);
1047  }
val
Definition: calibrate.py:119

References Eigen::TensorBase< Derived, AccessLevel >::derived(), and calibrate::val.

Referenced by Eigen::TensorBase< Derived, AccessLevel >::setZero(), and test_minmax_nan_propagation_templ().

◆ setRandom() [1/2]

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& Eigen::TensorBase< Derived, AccessLevel >::setRandom ( )
inline
1049  {
1050  return derived() = this->random();
1051  }

References Eigen::TensorBase< Derived, AccessLevel >::derived().

Referenced by contraction_both_transposed(), contraction_lhs_transposed(), contraction_rhs_transposed(), test_0D_trace(), test_1D_fft_ifft_invariant(), test_1d_scan(), test_2D_fft_ifft_invariant(), test_3D_fft_ifft_invariant(), test_4d_scan(), test_abs(), test_all_dimensions_trace(), test_arg(), test_argmax_dim(), test_argmax_pair_reducer(), test_argmin_dim(), test_argmin_pair_reducer(), test_assign_of_const_tensor(), test_async_execute_binary_expr(), test_async_execute_unary_expr(), test_async_multithread_chip(), test_async_multithread_contraction_agrees_with_singlethread(), test_async_multithread_elementwise(), test_async_multithread_volume_patch(), test_async_sharded_by_inner_dim_contraction(), test_async_sharded_by_inner_dim_contraction_with_output_kernel(), test_auto_resize(), test_block_io_copy_data_from_source_to_target(), test_block_io_copy_using_reordered_dimensions(), test_block_io_copy_using_reordered_dimensions_do_not_squeeze(), test_block_io_copy_using_reordered_dimensions_squeeze(), test_block_io_squeeze_ones(), test_block_io_zero_stride(), test_chip_as_lvalue(), test_chip_as_lvalue_sycl(), test_chip_in_expr(), test_chip_raw_data_col_major(), test_chip_raw_data_row_major(), test_coeff_ref(), test_compound_assign(), test_compound_assignment(), test_concatenation_as_lvalue(), test_conjugate(), test_consistency(), test_const_inputs(), test_contraction_of_contraction(), test_contractions(), test_custom(), test_custom_binary_op(), test_custom_binary_op_sycl(), test_custom_unary_op(), test_custom_unary_op_sycl(), test_default(), test_dimension_failures(), test_dynamic_chip(), test_dynamic_chip_sycl(), test_dynamic_index_list(), test_empty_shuffling(), test_empty_slice(), test_entire_volume_patch(), test_entire_volume_patch_sycl(), test_equality(), test_eval_tensor_binary_expr_block(), test_eval_tensor_binary_with_unary_expr_block(), test_eval_tensor_block(), test_eval_tensor_broadcast(), test_eval_tensor_cast(), test_eval_tensor_chipping(), test_eval_tensor_chipping_of_bcast(), test_eval_tensor_forced_eval(), test_eval_tensor_generator(), test_eval_tensor_padding(), test_eval_tensor_reshape(), test_eval_tensor_reshape_with_bcast(), test_eval_tensor_reverse(), test_eval_tensor_select(), test_eval_tensor_shuffle(), test_eval_tensor_slice(), test_eval_tensor_unary_expr_block(), test_evals(), test_execute_binary_expr(), test_execute_broadcasting(), test_execute_broadcasting_of_forced_eval(), test_execute_generator_op(), test_execute_reshape(), test_execute_reverse_rvalue(), test_execute_shuffle_lvalue(), test_execute_shuffle_rvalue(), test_execute_slice_lvalue(), test_execute_slice_rvalue(), test_execute_unary_expr(), test_expr(), test_expr_reverse(), test_expr_roll(), test_expr_shuffling(), test_fft_non_power_of_2_round_trip(), test_fft_real_input_energy(), test_first_dim_reductions_max_sycl(), test_first_dim_reductions_mean_sycl(), test_first_dim_reductions_sum_sycl(), test_fixed_size_broadcasting(), test_full_contraction(), test_full_reductions(), test_full_reductions_custom_sycl(), test_full_reductions_max_sycl(), test_full_reductions_mean_sycl(), test_full_reductions_min_sycl(), test_full_reductions_sum_sycl(), test_full_redux(), test_holes(), test_image_op_sycl(), test_imagenet_patches(), test_imagenet_patches_sycl(), test_index_pairs_dim(), test_innermost_first_dims(), test_innermost_last_dims(), test_larg_expr1D(), test_larg_expr2D(), test_larg_expr3D(), test_large_contraction(), test_large_contraction_with_output_kernel(), test_last_dim_reductions_mean_sycl(), test_last_dim_reductions_sum_sycl(), test_last_reductions_mean_sycl(), test_last_reductions_sum_sycl(), test_map_as_index(), test_matrix_as_index(), test_matrix_vector(), test_memcpy(), test_mixed_index_list(), test_modes(), test_multidims(), test_multiple_dims(), test_multithread_chip(), test_multithread_compound_assignment(), test_multithread_contraction(), test_multithread_contraction_agrees_with_singlethread(), test_multithread_contraction_with_output_kernel(), test_multithread_elementwise(), test_multithread_shuffle(), test_multithread_volume_patch(), test_multithreaded_reductions(), test_no_out_of_bounds(), test_orderings(), test_out_of_order_contraction(), test_padded_expr(), test_patch_no_extra_dim(), test_patch_no_extra_dim_sycl(), test_reduce_middle_dims(), test_reductions_in_expr(), test_ref_in_expr(), test_ref_of_ref(), test_reshape_as_lvalue(), test_same_type(), test_scalar(), test_select(), test_sharded_by_inner_dim_contraction(), test_sharded_by_inner_dim_contraction_with_output_kernel(), test_shuffle_unshuffle(), test_shuffling_as_value(), test_simple_argmax(), test_simple_argmin(), test_simple_assign(), test_simple_broadcasting(), test_simple_broadcasting_n_by_one(), test_simple_broadcasting_one_by_n(), test_simple_broadcasting_one_by_n_by_one_1d(), test_simple_broadcasting_one_by_n_by_one_2d(), test_simple_chip(), test_simple_concatenation(), test_simple_image_patch_sycl(), test_simple_index_pairs(), test_simple_inflation(), test_simple_inflation_sycl(), test_simple_lvalue_ref(), test_simple_padding(), test_simple_patch(), test_simple_patch_sycl(), test_simple_reductions(), test_simple_reshape(), test_simple_reverse(), test_simple_roll(), test_simple_rvalue_ref(), test_simple_shuffling(), test_simple_shuffling_sycl(), test_simple_slice(), test_simple_striding(), test_simple_swap(), test_simple_swap_sycl(), test_simple_trace(), test_single_voxel_patch(), test_single_voxel_patch_sycl(), test_size_one_broadcasting(), test_sizes_as_index(), test_slice(), test_slice_as_lvalue(), test_slice_raw_data(), test_small_blocking_factors(), test_static_broadcasting(), test_static_chip_sycl(), test_static_dimension_failure(), test_static_dims(), test_static_index_list(), test_static_reshape(), test_strided_slice(), test_strided_slice_as_rhs_sycl(), test_strided_slice_write_sycl(), test_strides(), test_striding_as_lvalue(), test_sub_fft_ifft_invariant(), test_sum_accuracy(), test_swap_as_lvalue(), test_swap_as_lvalue_sycl(), test_sycl_contraction(), test_sycl_cumsum(), test_sycl_simple_argmax(), test_tensor_maps(), test_tensor_product(), test_tensor_vector(), test_trace_in_expr(), test_trivial_reductions(), test_type2index_list(), test_type2indexpair_list(), test_type_casting(), test_user_defined_reductions(), test_varlist_as_index(), and test_vectorized_broadcasting().

◆ setRandom() [2/2]

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
template<typename RandomGenerator >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& Eigen::TensorBase< Derived, AccessLevel >::setRandom ( )
inline
1053  {
1054  return derived() = this->template random<RandomGenerator>();
1055  }

References Eigen::TensorBase< Derived, AccessLevel >::derived().

◆ setValues()

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& Eigen::TensorBase< Derived, AccessLevel >::setValues ( const typename internal::Initializer< Derived, NumDimensions >::InitList &  vals)
inline
1059  {
1060  TensorEvaluator<Derived, DefaultDevice> eval(derived(), DefaultDevice());
1061  internal::initialize_tensor<Derived, NumDimensions>(eval, vals);
1062  return derived();
1063  }
internal::nested_eval< T, 1 >::type eval(const T &xpr)
Definition: sparse_permutations.cpp:47

References Eigen::TensorBase< Derived, AccessLevel >::derived(), and eval().

Referenced by test_0d().

◆ setZero()

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& Eigen::TensorBase< Derived, AccessLevel >::setZero ( )
inline
1041  {
1042  return setConstant(Scalar(0));
1043  }
DerivedTraits::Scalar Scalar
Definition: TensorBase.h:1030
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & setConstant(const Scalar &val)
Definition: TensorBase.h:1045

References Eigen::TensorBase< Derived, AccessLevel >::setConstant().

Referenced by test_0d(), test_1d(), test_2d(), test_3d(), test_evals(), test_larg_expr1D(), test_larg_expr2D(), test_larg_expr3D(), test_minmax_nan_propagation_templ(), test_move(), test_multidims(), test_simple_assign(), test_sycl_mem_sync(), VerifyBlockAssignment(), and VerifyBlockEvaluator().

◆ shuffle() [1/2]

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
template<typename Shuffle >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorShufflingOp<const Shuffle, Derived> Eigen::TensorBase< Derived, AccessLevel >::shuffle ( const Shuffle &  shfl)
inline
1192  {
1193  return TensorShufflingOp<const Shuffle, Derived>(derived(), shfl);
1194  }

References Eigen::TensorBase< Derived, AccessLevel >::derived().

◆ shuffle() [2/2]

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
template<typename Shuffle >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorShufflingOp<const Shuffle, const Derived> Eigen::TensorBase< Derived, AccessLevel >::shuffle ( const Shuffle &  shfl) const
inline

◆ slice() [1/2]

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
template<typename StartIndices , typename Sizes >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorSlicingOp<const StartIndices, const Sizes, Derived> Eigen::TensorBase< Derived, AccessLevel >::slice ( const StartIndices &  startIndices,
const Sizes sizes 
)
inline
1122  {
1123  return TensorSlicingOp<const StartIndices, const Sizes, Derived>(derived(), startIndices, sizes);
1124  }
std::vector< Array2i > sizes
Definition: dense_solvers.cpp:12

References Eigen::TensorBase< Derived, AccessLevel >::derived(), and sizes.

◆ slice() [2/2]

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
template<typename StartIndices , typename Sizes >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorSlicingOp<const StartIndices, const Sizes, const Derived> Eigen::TensorBase< Derived, AccessLevel >::slice ( const StartIndices &  startIndices,
const Sizes sizes 
) const
inline

◆ stride() [1/2]

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
template<typename Strides >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorStridingOp<const Strides, Derived> Eigen::TensorBase< Derived, AccessLevel >::stride ( const Strides &  strides)
inline
1203  {
1204  return TensorStridingOp<const Strides, Derived>(derived(), strides);
1205  }
EIGEN_ALWAYS_INLINE DSizes< IndexType, NumDims > strides(const DSizes< IndexType, NumDims > &dimensions)
Definition: TensorBlock.h:29

References Eigen::TensorBase< Derived, AccessLevel >::derived(), and Eigen::internal::strides().

◆ stride() [2/2]

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
template<typename Strides >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorStridingOp<const Strides, const Derived> Eigen::TensorBase< Derived, AccessLevel >::stride ( const Strides &  strides) const
inline
1198  {
1199  return TensorStridingOp<const Strides, const Derived>(derived(), strides);
1200  }

References Eigen::TensorBase< Derived, AccessLevel >::derived(), and Eigen::internal::strides().

Referenced by test_simple_striding(), test_strides(), and test_striding_as_lvalue().

◆ stridedSlice() [1/2]

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
template<typename StartIndices , typename StopIndices , typename Strides >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorStridingSlicingOp<const StartIndices, const StopIndices, const Strides, Derived> Eigen::TensorBase< Derived, AccessLevel >::stridedSlice ( const StartIndices &  startIndices,
const StopIndices &  stopIndices,
const Strides &  strides 
)
inline
1134  {
1135  return TensorStridingSlicingOp<const StartIndices, const StopIndices, const Strides,
1136  Derived>(derived(), startIndices, stopIndices, strides);
1137  }

References Eigen::TensorBase< Derived, AccessLevel >::derived(), and Eigen::internal::strides().

◆ stridedSlice() [2/2]

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
template<typename StartIndices , typename StopIndices , typename Strides >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorStridingSlicingOp<const StartIndices, const StopIndices, const Strides, const Derived> Eigen::TensorBase< Derived, AccessLevel >::stridedSlice ( const StartIndices &  startIndices,
const StopIndices &  stopIndices,
const Strides &  strides 
) const
inline
1128  {
1129  return TensorStridingSlicingOp<const StartIndices, const StopIndices, const Strides,
1130  const Derived>(derived(), startIndices, stopIndices, strides);
1131  }

References Eigen::TensorBase< Derived, AccessLevel >::derived(), and Eigen::internal::strides().

Referenced by test_image_op_sycl(), test_strided_slice(), test_strided_slice_as_rhs_sycl(), test_strided_slice_write(), and test_strided_slice_write_sycl().

◆ swap_layout() [1/2]

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorLayoutSwapOp<Derived> Eigen::TensorBase< Derived, AccessLevel >::swap_layout ( )
inline
1089  {
1090  return TensorLayoutSwapOp<Derived>(derived());
1091  }

References Eigen::TensorBase< Derived, AccessLevel >::derived().

◆ swap_layout() [2/2]

Friends And Related Function Documentation

◆ Eigen::TensorBase

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
template<typename OtherDerived , int OtherAccessLevel>
friend class Eigen::TensorBase
friend

◆ Tensor

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
template<typename Scalar , int NumIndices, int Options, typename IndexType >
friend class Tensor
friend

◆ TensorFixedSize

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
template<typename Scalar , typename Dimensions , int Option, typename IndexTypes >
friend class TensorFixedSize
friend

Member Data Documentation

◆ NumDimensions

template<typename Derived , int AccessLevel = internal::accessors_level<Derived>::value>
constexpr int Eigen::TensorBase< Derived, AccessLevel >::NumDimensions = DerivedTraits::NumDimensions
staticconstexpr

The documentation for this class was generated from the following file: