10 #ifndef EIGEN_CXX11_TENSOR_TENSOR_BASE_H 11 #define EIGEN_CXX11_TENSOR_TENSOR_BASE_H 25 #ifndef EIGEN_PARSED_BY_DOXYGEN 28 template<
typename Derived>
39 template <
typename CustomNullaryOp> EIGEN_DEVICE_FUNC
57 template <
typename RandomGenerator> EIGEN_DEVICE_FUNC
59 random(
const RandomGenerator& gen = RandomGenerator())
const {
60 return nullaryExpr(gen);
64 template <
typename Generator> EIGEN_DEVICE_FUNC
71 template <
typename CustomUnaryOp> EIGEN_DEVICE_FUNC
141 igamma(
const OtherDerived& other)
const {
155 zeta(
const OtherDerived& other)
const {
216 pow(Scalar exponent)
const {
287 operator% (Scalar rhs)
const {
295 return cwiseMax(constant(threshold));
301 return cwiseMin(constant(threshold));
304 template <
typename NewType> EIGEN_DEVICE_FUNC
329 template <
typename CustomBinaryOp,
typename OtherDerived> EIGEN_DEVICE_FUNC
331 binaryExpr(
const OtherDerived& other,
const CustomBinaryOp& func)
const {
361 const TensorCwiseBinaryOp<internal::scalar_max_op<Scalar>,
const Derived,
const OtherDerived>
367 const TensorCwiseBinaryOp<internal::scalar_min_op<Scalar>,
const Derived,
const OtherDerived>
426 EIGEN_STRONG_INLINE const TensorCwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_LT>,
const Derived,
const TensorCwiseNullaryOp<internal::scalar_constant_op<Scalar>,
const Derived> >
431 EIGEN_STRONG_INLINE const TensorCwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_LE>,
const Derived,
const TensorCwiseNullaryOp<internal::scalar_constant_op<Scalar>,
const Derived> >
436 EIGEN_STRONG_INLINE const TensorCwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_GT>,
const Derived,
const TensorCwiseNullaryOp<internal::scalar_constant_op<Scalar>,
const Derived> >
441 EIGEN_STRONG_INLINE const TensorCwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_GE>,
const Derived,
const TensorCwiseNullaryOp<internal::scalar_constant_op<Scalar>,
const Derived> >
446 EIGEN_STRONG_INLINE const TensorCwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_EQ>,
const Derived,
const TensorCwiseNullaryOp<internal::scalar_constant_op<Scalar>,
const Derived> >
451 EIGEN_STRONG_INLINE const TensorCwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_NEQ>,
const Derived,
const TensorCwiseNullaryOp<internal::scalar_constant_op<Scalar>,
const Derived> >
476 select(
const ThenDerived& thenTensor,
const ElseDerived& elseTensor)
const {
485 contract(
const OtherDerived& other,
const Dimensions& dims)
const {
490 template<
typename KernelDerived,
typename Dimensions> EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE 492 convolve(
const KernelDerived& kernel,
const Dimensions& dims)
const {
497 template <
int FFTDataType,
int FFTDirection,
typename FFT> EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE 499 fft(
const FFT& fft)
const {
506 const TensorScanSumOp
507 cumsum(
const Index& axis,
bool exclusive =
false)
const {
508 return TensorScanSumOp(
derived(), axis, exclusive);
513 const TensorScanProdOp
514 cumprod(
const Index& axis,
bool exclusive =
false)
const {
515 return TensorScanProdOp(
derived(), axis, exclusive);
518 template <
typename Reducer>
521 scan(
const Index& axis,
const Reducer& reducer,
bool exclusive =
false)
const {
528 sum(
const Dims& dims)
const {
534 DimensionList<Index, NumDimensions> in_dims;
544 const TensorReductionOp<internal::MeanReducer<CoeffReturnType>,
const DimensionList<Index, NumDimensions>,
const Derived>
546 DimensionList<Index, NumDimensions> in_dims;
556 const TensorReductionOp<internal::ProdReducer<CoeffReturnType>,
const DimensionList<Index, NumDimensions>,
const Derived>
558 DimensionList<Index, NumDimensions> in_dims;
568 const TensorReductionOp<internal::MaxReducer<CoeffReturnType>,
const DimensionList<Index, NumDimensions>,
const Derived>
570 DimensionList<Index, NumDimensions> in_dims;
580 const TensorReductionOp<internal::MinReducer<CoeffReturnType>,
const DimensionList<Index, NumDimensions>,
const Derived>
582 DimensionList<Index, NumDimensions> in_dims;
588 all(
const Dims& dims)
const {
595 DimensionList<Index, NumDimensions> in_dims;
601 any(
const Dims& dims)
const {
608 DimensionList<Index, NumDimensions> in_dims;
617 array<Index, NumDimensions> in_dims;
620 internal::ArgMaxTupleReducer<Tuple<Index, CoeffReturnType> >,
621 const array<Index, NumDimensions>,
622 const Derived>(
derived(), internal::ArgMaxTupleReducer<Tuple<Index, CoeffReturnType> >(), -1, in_dims);
628 const array<Index, NumDimensions>,
const Derived>
630 array<Index, NumDimensions> in_dims;
633 internal::ArgMinTupleReducer<Tuple<Index, CoeffReturnType> >,
634 const array<Index, NumDimensions>,
635 const Derived>(
derived(), internal::ArgMinTupleReducer<Tuple<Index, CoeffReturnType> >(), -1, in_dims);
640 internal::ArgMaxTupleReducer<Tuple<Index, CoeffReturnType> >,
643 array<Index, 1> in_dims;
644 in_dims[0] = return_dim;
646 internal::ArgMaxTupleReducer<Tuple<Index, CoeffReturnType> >,
647 const array<Index, 1>,
648 const Derived>(
derived(), internal::ArgMaxTupleReducer<Tuple<Index, CoeffReturnType> >(), return_dim, in_dims);
653 internal::ArgMinTupleReducer<Tuple<Index, CoeffReturnType> >,
654 const array<Index, 1>,
const Derived>
656 array<Index, 1> in_dims;
657 in_dims[0] = return_dim;
659 internal::ArgMinTupleReducer<Tuple<Index, CoeffReturnType> >,
660 const array<Index, 1>,
661 const Derived>(
derived(), internal::ArgMinTupleReducer<Tuple<Index, CoeffReturnType> >(), return_dim, in_dims);
666 reduce(
const Dims& dims,
const Reducer& reducer)
const {
691 const Index row_stride = 1,
const Index col_stride = 1,
692 const Index in_row_stride = 1,
const Index in_col_stride = 1,
695 in_row_stride, in_col_stride, 1, 1, padding_type, padding_value);
701 const Index row_stride,
const Index col_stride,
702 const Index in_row_stride,
const Index in_col_stride,
703 const Index row_inflate_stride,
const Index col_inflate_stride,
704 const Index padding_top,
const Index padding_bottom,
705 const Index padding_left,
const Index padding_right,
706 const Scalar padding_value)
const {
708 in_row_stride, in_col_stride, row_inflate_stride, col_inflate_stride,
709 padding_top, padding_bottom, padding_left, padding_right, padding_value);
715 const Index plane_stride = 1,
const Index row_stride = 1,
const Index col_stride = 1,
717 return TensorVolumePatchOp<Dynamic, Dynamic, Dynamic, const Derived>(
derived(), patch_planes, patch_rows, patch_cols, plane_stride, row_stride, col_stride, 1, 1, 1, 1, 1, 1, padding_type, padding_value);
724 const Index plane_stride,
const Index row_stride,
const Index col_stride,
725 const Index plane_inflate_stride,
const Index row_inflate_stride,
const Index col_inflate_stride,
726 const Index padding_top_z,
const Index padding_bottom_z,
727 const Index padding_top,
const Index padding_bottom,
728 const Index padding_left,
const Index padding_right,
const Scalar padding_value =
Scalar(0))
const {
729 return TensorVolumePatchOp<Dynamic, Dynamic, Dynamic, const Derived>(
derived(), patch_planes, patch_rows, patch_cols, plane_stride, row_stride, col_stride, 1, 1, 1, plane_inflate_stride, row_inflate_stride, col_inflate_stride, padding_top_z, padding_bottom_z, padding_top, padding_bottom, padding_left, padding_right, padding_value);
740 reshape(
const NewDimensions& newDimensions)
const {
745 slice(
const StartIndices& startIndices,
const Sizes& sizes)
const {
748 template <
typename StartIndices,
typename StopIndices,
typename Str
ides> EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE 750 stridedSlice(
const StartIndices& startIndices,
const StopIndices& stopIndices,
const Strides& strides)
const {
752 const Derived>(
derived(), startIndices, stopIndices, strides);
756 chip(
const Index offset)
const {
761 chip(
const Index offset,
const Index dim)
const {
771 pad(
const PaddingDimensions& padding)
const {
776 pad(
const PaddingDimensions& padding,
const Scalar padding_value)
const {
803 template <
typename CustomUnaryFunc>
808 template <
typename OtherDerived,
typename CustomBinaryFunc>
821 template <
typename Scalar,
int NumIndices,
int Options,
typename IndexType>
friend class Tensor;
822 template <
typename Scalar,
typename Dimensions,
int Option,
typename IndexTypes>
friend class TensorFixedSize;
823 template <
typename OtherDerived,
int AccessLevel>
friend class TensorBase;
828 template<typename Derived, int AccessLevel = internal::accessors_level<Derived>::value>
835 static const int NumDimensions = DerivedTraits::NumDimensions;
837 template <
typename Scalar,
int NumIndices,
int Options,
typename IndexType>
friend class Tensor;
838 template <
typename Scalar,
typename Dimensions,
int Option,
typename IndexTypes>
friend class TensorFixedSize;
839 template <
typename OtherDerived,
int OtherAccessLevel>
friend class TensorBase;
847 return derived() = this->constant(val);
851 return derived() = this->random();
853 template <
typename RandomGenerator> EIGEN_DEVICE_FUNC
855 return derived() = this->
template random<RandomGenerator>();
858 #if EIGEN_HAS_VARIADIC_TEMPLATES 861 const typename internal::Initializer<Derived, NumDimensions>::InitList& vals) {
863 internal::initialize_tensor<Derived, NumDimensions>(eval, vals);
866 #endif // EIGEN_HAS_VARIADIC_TEMPLATES 909 reshape(
const NewDimensions& newDimensions)
const {
920 slice(
const StartIndices& startIndices,
const Sizes& sizes)
const {
925 slice(
const StartIndices& startIndices,
const Sizes& sizes) {
929 template <
typename StartIndices,
typename StopIndices,
typename Str
ides> EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE 931 stridedSlice(
const StartIndices& startIndices,
const StopIndices& stopIndices,
const Strides& strides)
const {
933 const Derived>(
derived(), startIndices, stopIndices, strides);
935 template <
typename StartIndices,
typename StopIndices,
typename Str
ides> EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE 937 stridedSlice(
const StartIndices& startIndices,
const StopIndices& stopIndices,
const Strides& strides) {
939 Derived>(
derived(), startIndices, stopIndices, strides);
944 chip(
const Index offset)
const {
955 chip(
const Index offset,
const Index dim)
const {
960 chip(
const Index offset,
const Index dim) {
998 template <
typename DeviceType>
1009 #endif // EIGEN_PARSED_BY_DOXYGEN 1012 #endif // EIGEN_CXX11_TENSOR_TENSOR_BASE_H EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & operator-=(const OtherDerived &other)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_rsqrt_op< Scalar >, const Derived > rsqrt() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_difference_op< Scalar >, const Derived, const OtherDerived > operator-(const OtherDerived &other) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseBinaryOp< internal::scalar_max_op< Scalar, Scalar >, const Derived, const OtherDerived > cwiseMax(const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & operator*=(const OtherDerived &other)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorChippingOp< DimId, const Derived > chip(const Index offset) const
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool() isfinite(const half &a)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_cmp_op< Scalar, Scalar, internal::cmp_GT >, const Derived, const TensorCwiseNullaryOp< internal::scalar_constant_op< Scalar >, const Derived > > operator>(Scalar threshold) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_imag_op< Scalar >, const Derived > imag() const
#define EIGEN_STRONG_INLINE
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorChippingOp< DimId, Derived > chip(const Index offset)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorConcatenationOp< const Axis, Derived, OtherDerived > concatenate(const OtherDerived &other, const Axis &axis)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_cmp_op< Scalar, Scalar, internal::cmp_GE >, const Derived, const OtherDerived > operator>=(const OtherDerived &other) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_sum_op< Scalar >, const Derived, const OtherDerived > operator+(const OtherDerived &other) const
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
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_sign_op< Scalar >, const Derived > sign() const
EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator==(const Tuple< U, V > &x, const Tuple< U, V > &y)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_max_op< Scalar >, const Derived, const OtherDerived > cwiseMax(const OtherDerived &other) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorTupleReducerOp< internal::ArgMaxTupleReducer< Tuple< Index, CoeffReturnType > >, const array< Index, 1 >, const Derived > argmax(const int return_dim) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorVolumePatchOp< Dynamic, Dynamic, Dynamic, const Derived > extract_volume_patches(const Index patch_planes, const Index patch_rows, const Index patch_cols, const Index plane_stride, const Index row_stride, const Index col_stride, const Index plane_inflate_stride, const Index row_inflate_stride, const Index col_inflate_stride, const Index padding_top_z, const Index padding_bottom_z, const Index padding_top, const Index padding_bottom, const Index padding_left, const Index padding_right, const Scalar padding_value=Scalar(0)) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorShufflingOp< const Shuffle, const Derived > shuffle(const Shuffle &shuffle) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseNullaryOp< CustomNullaryOp, const Derived > nullaryExpr(const CustomNullaryOp &func) const
const TensorReductionOp< internal::SumReducer< CoeffReturnType >, const DimensionList< Index, NumDimensions >, const Derived > sum() const
const TensorReductionOp< internal::ProdReducer< CoeffReturnType >, const DimensionList< Index, NumDimensions >, const Derived > prod() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & operator/=(const OtherDerived &other)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< CustomUnaryOp, const Derived > unaryExpr(const CustomUnaryOp &func) const
const TensorReductionOp< internal::MeanReducer< CoeffReturnType >, const DimensionList< Index, NumDimensions >, const Derived > mean() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Derived & derived() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorConcatenationOp< const Axis, const Derived, const OtherDerived > concatenate(const OtherDerived &other, const Axis &axis) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorScanSumOp cumsum(const Index &axis, bool exclusive=false) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_sqrt_op< Scalar >, const Derived > sqrt() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & setRandom()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_boolean_or_op, const Derived, const OtherDerived > operator||(const OtherDerived &other) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & setRandom()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorBroadcastingOp< const Broadcast, const Derived > broadcast(const Broadcast &broadcast) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_real_op< Scalar >, const Derived > real() const
A cost model used to limit the number of threads used for evaluating tensor expression.
TensorDevice< Derived, DeviceType > device(const DeviceType &device)
Pseudo expression providing an operator = that will evaluate its argument on the specified computing ...
const TensorReductionOp< internal::MinReducer< CoeffReturnType >, const DimensionList< Index, NumDimensions >, const Derived > minimum() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorChippingOp< DimId, const Derived > chip(const Index offset) const
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool operator>(const half &a, const half &b)
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
EIGEN_STRONG_INLINE const CwiseBinaryOp< internal::scalar_sum_op< typename DenseDerived::Scalar, typename SparseDerived::Scalar >, const DenseDerived, const SparseDerived > operator+(const MatrixBase< DenseDerived > &a, const SparseMatrixBase< SparseDerived > &b)
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
DerivedTraits::Index Index
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorStridingOp< const Strides, const Derived > stride(const Strides &strides) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_round_op< Scalar >, const Derived > round() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReductionOp< internal::SumReducer< CoeffReturnType >, const Dims, const Derived > sum(const Dims &dims) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorIndexTupleOp< const Derived > index_tuples() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseNullaryOp< internal::UniformRandomGenerator< Scalar >, const Derived > random() const
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool operator>=(const half &a, const half &b)
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool() isinf(const half &a)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReductionOp< Reducer, const Dims, const Derived > reduce(const Dims &dims, const Reducer &reducer) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_abs_op< Scalar >, const Derived > abs() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseBinaryOp< CustomBinaryOp, const Derived, const OtherDerived > binaryExpr(const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other, const CustomBinaryOp &func=CustomBinaryOp()) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::bind2nd_op< internal::scalar_pow_op< Scalar, Scalar > >, const Derived > pow(Scalar exponent) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorScanOp< Reducer, const Derived > scan(const Index &axis, const Reducer &reducer, bool exclusive=false) const
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 const TensorGeneratorOp< Generator, const Derived > generate(const Generator &generator) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & derived()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorPaddingOp< const PaddingDimensions, const Derived > pad(const PaddingDimensions &padding) const
internal::traits< Derived > DerivedTraits
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReductionOp< internal::ProdReducer< CoeffReturnType >, const Dims, const Derived > prod(const Dims &dims) const
const TensorReductionOp< internal::MaxReducer< CoeffReturnType >, const DimensionList< Index, NumDimensions >, const Derived > maximum() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorLayoutSwapOp< const Derived > swap_layout() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_inverse_op< Scalar >, const Derived > inverse() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorReshapingOp< const NewDimensions, Derived > reshape(const NewDimensions &newDimensions)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_igamma_op< Scalar >, const Derived, const OtherDerived > igamma(const OtherDerived &other) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorChippingOp< Dynamic, Derived > chip(const Index offset, const Index dim)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReshapingOp< const NewDimensions, const Derived > reshape(const NewDimensions &newDimensions) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReverseOp< const ReverseDimensions, const Derived > reverse(const ReverseDimensions &rev) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Derived & derived() const
traits< XprType >::Index Index
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorContractionOp< const Dimensions, const Derived, const OtherDerived > contract(const OtherDerived &other, const Dimensions &dims) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_square_op< Scalar >, const Derived > square() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorStridingSlicingOp< const StartIndices, const StopIndices, const Strides, Derived > stridedSlice(const StartIndices &startIndices, const StopIndices &stopIndices, const Strides &strides)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_floor_op< Scalar >, const Derived > floor() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReshapingOp< const NewDimensions, const Derived > reshape(const NewDimensions &newDimensions) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorPaddingOp< const PaddingDimensions, const Derived > pad(const PaddingDimensions &padding, const Scalar padding_value) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCustomUnaryOp< const CustomUnaryFunc, const Derived > customOp(const CustomUnaryFunc &op) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorTupleReducerOp< internal::ArgMinTupleReducer< Tuple< Index, CoeffReturnType > >, const array< Index, NumDimensions >, const Derived > argmin() const
Eigen::IndexPair< Index > DimensionPair
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCustomBinaryOp< const CustomBinaryFunc, const Derived, const OtherDerived > customOp(const OtherDerived &other, const CustomBinaryFunc &op) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_quotient_op< Scalar >, const Derived, const OtherDerived > operator/(const OtherDerived &other) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorShufflingOp< const Shuffle, const Derived > shuffle(const Shuffle &shuffle) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorPatchOp< const PatchDims, const Derived > extract_patches(const PatchDims &patch_dims) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & setConstant(const Scalar &val)
DerivedTraits::Scalar Scalar
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorConcatenationOp< Axis, const Derived, const OtherDerived > concatenate(const OtherDerived &other, Axis axis) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorFFTOp< const FFT, const Derived, FFTDataType, FFTDirection > fft(const FFT &fft) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorSlicingOp< const StartIndices, const Sizes, Derived > slice(const StartIndices &startIndices, const Sizes &sizes)
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half operator/(const half &a, const half &b)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_cmp_op< Scalar, Scalar, internal::cmp_EQ >, const Derived, const OtherDerived > operator==(const OtherDerived &other) const
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_log_op< Scalar >, const Derived > log() const
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
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorLayoutSwapOp< const Derived > swap_layout() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_product_op< Scalar >, const Derived, const OtherDerived > operator*(const OtherDerived &other) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReductionOp< internal::MeanReducer< CoeffReturnType >, const Dims, const Derived > mean(const Dims &dims) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReductionOp< internal::OrReducer, const DimensionList< Index, NumDimensions >, const TensorConversionOp< bool, const Derived > > any() const
Tensor conversion class. This class makes it possible to vectorize type casting operations when the n...
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_conjugate_op< Scalar >, const Derived > conjugate() const
EIGEN_STRONG_INLINE const CwiseBinaryOp< internal::scalar_difference_op< typename DenseDerived::Scalar, typename SparseDerived::Scalar >, const DenseDerived, const SparseDerived > operator-(const MatrixBase< DenseDerived > &a, const SparseMatrixBase< SparseDerived > &b)
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool operator<=(const half &a, const half &b)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseNullaryOp< internal::scalar_constant_op< Scalar >, const Derived > constant(const Scalar &value) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_boolean_xor_op, const Derived, const OtherDerived > operator^(const OtherDerived &other) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorSelectOp< const Derived, const ThenDerived, const ElseDerived > select(const ThenDerived &thenTensor, const ElseDerived &elseTensor) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorTupleReducerOp< internal::ArgMaxTupleReducer< Tuple< Index, CoeffReturnType > >, const array< Index, NumDimensions >, const Derived > argmax() const
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool operator<(const half &a, const half &b)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorLayoutSwapOp< Derived > swap_layout()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorShufflingOp< const Shuffle, Derived > shuffle(const Shuffle &shuffle)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorSlicingOp< const StartIndices, const Sizes, const Derived > slice(const StartIndices &startIndices, const Sizes &sizes) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_erf_op< Scalar >, const Derived > erf() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_polygamma_op< Scalar >, const Derived, const OtherDerived > polygamma(const OtherDerived &other) const
EIGEN_DEVICE_FUNC const Product< MatrixDerived, PermutationDerived, AliasFreeProduct > operator*(const MatrixBase< MatrixDerived > &matrix, const PermutationBase< PermutationDerived > &permutation)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReductionOp< internal::AndReducer, const DimensionList< Index, NumDimensions >, const TensorConversionOp< bool, const Derived > > all() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorTupleReducerOp< internal::ArgMinTupleReducer< Tuple< Index, CoeffReturnType > >, const array< Index, 1 >, const Derived > argmin(const int return_dim) const
EIGEN_DEVICE_FUNC const CwiseBinaryOp< internal::scalar_boolean_and_op, const Derived, const OtherDerived > operator &&(const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorStridingOp< const Strides, const Derived > stride(const Strides &strides) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & operator+=(const OtherDerived &other)
The fixed sized version of the tensor class.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorImagePatchOp< Dynamic, Dynamic, const Derived > extract_image_patches(const Index patch_rows=1, const Index patch_cols=1, const Index row_stride=1, const Index col_stride=1, const Index in_row_stride=1, const Index in_col_stride=1, const PaddingType padding_type=PADDING_SAME, const Scalar padding_value=Scalar(0)) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReductionOp< internal::OrReducer, const Dims, const TensorConversionOp< bool, const Derived > > any(const Dims &dims) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_cmp_op< Scalar, Scalar, internal::cmp_GE >, const Derived, const TensorCwiseNullaryOp< internal::scalar_constant_op< Scalar >, const Derived > > operator>=(Scalar threshold) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_cube_op< Scalar >, const Derived > cube() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorConvolutionOp< const Dimensions, const Derived, const KernelDerived > convolve(const KernelDerived &kernel, const Dimensions &dims) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReductionOp< internal::AndReducer, const Dims, const TensorConversionOp< bool, const Derived > > all(const Dims &dims) const
TensorScanOp< internal::ProdReducer< CoeffReturnType >, const Derived > TensorScanProdOp
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseNullaryOp< RandomGenerator, const Derived > random(const RandomGenerator &gen=RandomGenerator()) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_log1p_op< Scalar >, const Derived > log1p() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorForcedEvalOp< const Derived > eval() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_cmp_op< Scalar, Scalar, internal::cmp_EQ >, const Derived, const TensorCwiseNullaryOp< internal::scalar_constant_op< Scalar >, const Derived > > operator==(Scalar threshold) const
internal::remove_const< Scalar >::type CoeffReturnType
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_min_op< Scalar >, const Derived, const TensorCwiseNullaryOp< internal::scalar_constant_op< Scalar >, const Derived > > cwiseMin(Scalar threshold) const
TensorScanOp< internal::SumReducer< CoeffReturnType >, const Derived > TensorScanSumOp
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorInflationOp< const Strides, const Derived > inflate(const Strides &strides) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorScanProdOp cumprod(const Index &axis, bool exclusive=false) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_digamma_op< Scalar >, const Derived > digamma() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_opposite_op< Scalar >, const Derived > operator-() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_min_op< Scalar >, const Derived, const OtherDerived > cwiseMin(const OtherDerived &other) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_zeta_op< Scalar >, const Derived, const OtherDerived > zeta(const OtherDerived &other) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_ceil_op< Scalar >, const Derived > ceil() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_erfc_op< Scalar >, const Derived > erfc() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_exp_op< Scalar >, const Derived > exp() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_max_op< Scalar >, const Derived, const TensorCwiseNullaryOp< internal::scalar_constant_op< Scalar >, const Derived > > cwiseMax(Scalar threshold) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorVolumePatchOp< Dynamic, Dynamic, Dynamic, const Derived > extract_volume_patches(const Index patch_planes, const Index patch_rows, const Index patch_cols, const Index plane_stride=1, const Index row_stride=1, const Index col_stride=1, const PaddingType padding_type=PADDING_SAME, const Scalar padding_value=Scalar(0)) const
EIGEN_DEVICE_FUNC const CwiseUnaryOp< CustomUnaryOp, const Derived > unaryExpr(const CustomUnaryOp &func=CustomUnaryOp()) const
Apply a unary operator coefficient-wise.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorSlicingOp< const StartIndices, const Sizes, const Derived > slice(const StartIndices &startIndices, const Sizes &sizes) const
DerivedTraits::Index Index
DerivedTraits::Scalar Scalar
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReverseOp< const ReverseDimensions, const Derived > reverse(const ReverseDimensions &rev) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_cmp_op< Scalar, Scalar, internal::cmp_GT >, const Derived, const OtherDerived > operator>(const OtherDerived &other) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorConversionOp< NewType, const Derived > cast() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_cmp_op< Scalar, Scalar, internal::cmp_NEQ >, const Derived, const TensorCwiseNullaryOp< internal::scalar_constant_op< Scalar >, const Derived > > operator!=(Scalar threshold) const
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool() isnan(const half &a)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorStridingOp< const Strides, Derived > stride(const Strides &strides)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_igammac_op< Scalar >, const Derived, const OtherDerived > igammac(const OtherDerived &other) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_lgamma_op< Scalar >, const Derived > lgamma() const
EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator!=(const Tuple< U, V > &x, const Tuple< U, V > &y)
Tensor concatenation class.
internal::traits< Derived > DerivedTraits
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorReverseOp< const ReverseDimensions, Derived > reverse(const ReverseDimensions &rev)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_sigmoid_op< Scalar >, const Derived > sigmoid() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_tanh_op< Scalar >, const Derived > tanh() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseBinaryOp< internal::scalar_min_op< Scalar, Scalar >, const Derived, const OtherDerived > cwiseMin(const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
static const int NumDimensions
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< CustomBinaryOp, const Derived, const OtherDerived > binaryExpr(const OtherDerived &other, const CustomBinaryOp &func) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & setZero()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReductionOp< internal::MaxReducer< CoeffReturnType >, const Dims, const Derived > maximum(const Dims &dims) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorImagePatchOp< Dynamic, Dynamic, const Derived > extract_image_patches(const Index patch_rows, const Index patch_cols, const Index row_stride, const Index col_stride, const Index in_row_stride, const Index in_col_stride, const Index row_inflate_stride, const Index col_inflate_stride, const Index padding_top, const Index padding_bottom, const Index padding_left, const Index padding_right, const Scalar padding_value) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_cmp_op< Scalar, Scalar, internal::cmp_NEQ >, const Derived, const OtherDerived > operator!=(const OtherDerived &other) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReductionOp< internal::MinReducer< CoeffReturnType >, const Dims, const Derived > minimum(const Dims &dims) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorChippingOp< Dynamic, const Derived > chip(const Index offset, const Index dim) const