10 #ifndef EIGEN_CXX11_TENSOR_TENSOR_BASE_H 11 #define EIGEN_CXX11_TENSOR_TENSOR_BASE_H 26 template<
typename Derived>
31 typedef typename DerivedTraits::Scalar
Scalar;
37 template <
typename CustomNullaryOp> EIGEN_DEVICE_FUNC
55 template <
typename RandomGenerator> EIGEN_DEVICE_FUNC
57 random(
const RandomGenerator& gen = RandomGenerator())
const {
58 return nullaryExpr(gen);
62 template <
typename Generator> EIGEN_DEVICE_FUNC
69 template <
typename CustomUnaryOp> EIGEN_DEVICE_FUNC
139 igamma(
const OtherDerived& other)
const {
153 zeta(
const OtherDerived& other)
const {
214 pow(Scalar exponent)
const {
285 operator% (Scalar rhs)
const {
293 return cwiseMax(constant(threshold));
299 return cwiseMin(constant(threshold));
302 template <
typename NewType> EIGEN_DEVICE_FUNC
327 template <
typename CustomBinaryOp,
typename OtherDerived> EIGEN_DEVICE_FUNC
329 binaryExpr(
const OtherDerived& other,
const CustomBinaryOp& func)
const {
359 const TensorCwiseBinaryOp<internal::scalar_max_op<Scalar>,
const Derived,
const OtherDerived>
365 const TensorCwiseBinaryOp<internal::scalar_min_op<Scalar>,
const Derived,
const OtherDerived>
424 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> >
429 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> >
434 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> >
439 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> >
444 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> >
449 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> >
474 select(
const ThenDerived& thenTensor,
const ElseDerived& elseTensor)
const {
483 contract(
const OtherDerived& other,
const Dimensions& dims)
const {
488 template<
typename KernelDerived,
typename Dimensions> EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE 490 convolve(
const KernelDerived& kernel,
const Dimensions& dims)
const {
495 template <
int FFTDataType,
int FFTDirection,
typename FFT> EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE 497 fft(
const FFT& fft)
const {
504 const TensorScanSumOp
505 cumsum(
const Index& axis,
bool exclusive =
false)
const {
506 return TensorScanSumOp(
derived(), axis, exclusive);
511 const TensorScanProdOp
512 cumprod(
const Index& axis,
bool exclusive =
false)
const {
513 return TensorScanProdOp(
derived(), axis, exclusive);
516 template <
typename Reducer>
519 scan(
const Index& axis,
const Reducer& reducer,
bool exclusive =
false)
const {
526 sum(
const Dims& dims)
const {
532 DimensionList<Index, NumDimensions> in_dims;
542 const TensorReductionOp<internal::MeanReducer<CoeffReturnType>,
const DimensionList<Index, NumDimensions>,
const Derived>
544 DimensionList<Index, NumDimensions> in_dims;
554 const TensorReductionOp<internal::ProdReducer<CoeffReturnType>,
const DimensionList<Index, NumDimensions>,
const Derived>
556 DimensionList<Index, NumDimensions> in_dims;
566 const TensorReductionOp<internal::MaxReducer<CoeffReturnType>,
const DimensionList<Index, NumDimensions>,
const Derived>
568 DimensionList<Index, NumDimensions> in_dims;
578 const TensorReductionOp<internal::MinReducer<CoeffReturnType>,
const DimensionList<Index, NumDimensions>,
const Derived>
580 DimensionList<Index, NumDimensions> in_dims;
586 all(
const Dims& dims)
const {
593 DimensionList<Index, NumDimensions> in_dims;
599 any(
const Dims& dims)
const {
606 DimensionList<Index, NumDimensions> in_dims;
615 array<Index, NumDimensions> in_dims;
618 internal::ArgMaxTupleReducer<Tuple<Index, CoeffReturnType> >,
619 const array<Index, NumDimensions>,
620 const Derived>(
derived(), internal::ArgMaxTupleReducer<Tuple<Index, CoeffReturnType> >(), -1, in_dims);
626 const array<Index, NumDimensions>,
const Derived>
628 array<Index, NumDimensions> in_dims;
631 internal::ArgMinTupleReducer<Tuple<Index, CoeffReturnType> >,
632 const array<Index, NumDimensions>,
633 const Derived>(
derived(), internal::ArgMinTupleReducer<Tuple<Index, CoeffReturnType> >(), -1, in_dims);
638 internal::ArgMaxTupleReducer<Tuple<Index, CoeffReturnType> >,
641 array<Index, 1> in_dims;
642 in_dims[0] = return_dim;
644 internal::ArgMaxTupleReducer<Tuple<Index, CoeffReturnType> >,
645 const array<Index, 1>,
646 const Derived>(
derived(), internal::ArgMaxTupleReducer<Tuple<Index, CoeffReturnType> >(), return_dim, in_dims);
651 internal::ArgMinTupleReducer<Tuple<Index, CoeffReturnType> >,
652 const array<Index, 1>,
const Derived>
654 array<Index, 1> in_dims;
655 in_dims[0] = return_dim;
657 internal::ArgMinTupleReducer<Tuple<Index, CoeffReturnType> >,
658 const array<Index, 1>,
659 const Derived>(
derived(), internal::ArgMinTupleReducer<Tuple<Index, CoeffReturnType> >(), return_dim, in_dims);
664 reduce(
const Dims& dims,
const Reducer& reducer)
const {
689 const Index row_stride = 1,
const Index col_stride = 1,
690 const Index in_row_stride = 1,
const Index in_col_stride = 1,
693 in_row_stride, in_col_stride, 1, 1, padding_type, padding_value);
699 const Index row_stride,
const Index col_stride,
700 const Index in_row_stride,
const Index in_col_stride,
701 const Index row_inflate_stride,
const Index col_inflate_stride,
702 const Index padding_top,
const Index padding_bottom,
703 const Index padding_left,
const Index padding_right,
704 const Scalar padding_value)
const {
706 in_row_stride, in_col_stride, row_inflate_stride, col_inflate_stride,
707 padding_top, padding_bottom, padding_left, padding_right, padding_value);
713 const Index plane_stride = 1,
const Index row_stride = 1,
const Index col_stride = 1,
715 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);
722 const Index plane_stride,
const Index row_stride,
const Index col_stride,
723 const Index plane_inflate_stride,
const Index row_inflate_stride,
const Index col_inflate_stride,
724 const Index padding_top_z,
const Index padding_bottom_z,
725 const Index padding_top,
const Index padding_bottom,
726 const Index padding_left,
const Index padding_right,
const Scalar padding_value =
Scalar(0))
const {
727 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);
738 reshape(
const NewDimensions& newDimensions)
const {
743 slice(
const StartIndices& startIndices,
const Sizes& sizes)
const {
746 template <
typename StartIndices,
typename StopIndices,
typename Str
ides> EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE 748 stridedSlice(
const StartIndices& startIndices,
const StopIndices& stopIndices,
const Strides& strides)
const {
750 const Derived>(
derived(), startIndices, stopIndices, strides);
754 chip(
const Index offset)
const {
759 chip(
const Index offset,
const Index
dim)
const {
769 pad(
const PaddingDimensions& padding)
const {
774 pad(
const PaddingDimensions& padding,
const Scalar padding_value)
const {
801 template <
typename CustomUnaryFunc>
806 template <
typename OtherDerived,
typename CustomBinaryFunc>
819 template <
typename Scalar,
int NumIndices,
int Options,
typename IndexType>
friend class Tensor;
820 template <
typename Scalar,
typename Dimensions,
int Option,
typename IndexTypes>
friend class TensorFixedSize;
821 template <
typename OtherDerived,
int AccessLevel>
friend class TensorBase;
826 template<typename Derived, int AccessLevel = internal::accessors_level<Derived>::value>
833 static const int NumDimensions = DerivedTraits::NumDimensions;
835 template <
typename Scalar,
int NumIndices,
int Options,
typename IndexType>
friend class Tensor;
836 template <
typename Scalar,
typename Dimensions,
int Option,
typename IndexTypes>
friend class TensorFixedSize;
837 template <
typename OtherDerived,
int OtherAccessLevel>
friend class TensorBase;
845 return derived() = this->constant(val);
851 template <
typename RandomGenerator> EIGEN_DEVICE_FUNC
853 return derived() = this->
template random<RandomGenerator>();
856 #if EIGEN_HAS_VARIADIC_TEMPLATES 859 const typename internal::Initializer<Derived, NumDimensions>::InitList& vals) {
861 internal::initialize_tensor<Derived, NumDimensions>(eval, vals);
864 #endif // EIGEN_HAS_VARIADIC_TEMPLATES 907 reshape(
const NewDimensions& newDimensions)
const {
918 slice(
const StartIndices& startIndices,
const Sizes& sizes)
const {
923 slice(
const StartIndices& startIndices,
const Sizes& sizes) {
927 template <
typename StartIndices,
typename StopIndices,
typename Str
ides> EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE 929 stridedSlice(
const StartIndices& startIndices,
const StopIndices& stopIndices,
const Strides& strides)
const {
931 const Derived>(
derived(), startIndices, stopIndices, strides);
933 template <
typename StartIndices,
typename StopIndices,
typename Str
ides> EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE 935 stridedSlice(
const StartIndices& startIndices,
const StopIndices& stopIndices,
const Strides& strides) {
937 Derived>(
derived(), startIndices, stopIndices, strides);
942 chip(
const Index offset)
const {
953 chip(
const Index offset,
const Index
dim)
const {
996 template <
typename DeviceType>
1010 #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 TensorSlicingOp< const StartIndices, const Sizes, const Derived > slice(const StartIndices &startIndices, const Sizes &sizes) 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 Derived & operator*=(const OtherDerived &other)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorBroadcastingOp< const Broadcast, const Derived > broadcast(const Broadcast &broadcast) const
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool() isfinite(const half &a)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_round_op< Scalar >, const Derived > round() 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_GT >, const Derived, const TensorCwiseNullaryOp< internal::scalar_constant_op< Scalar >, const Derived > > operator>(Scalar threshold) 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 TensorCwiseBinaryOp< internal::scalar_quotient_op< Scalar >, const Derived, const OtherDerived > operator/(const OtherDerived &other) const
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 const TensorCwiseUnaryOp< internal::scalar_floor_op< Scalar >, const Derived > floor() 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 Derived & derived() const
bool operator>(const TransformStorage &lhs, const TransformStorage &rhs)
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 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 TensorCustomUnaryOp< const CustomUnaryFunc, const Derived > customOp(const CustomUnaryFunc &op) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & operator/=(const OtherDerived &other)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorShufflingOp< const Shuffle, const Derived > shuffle(const Shuffle &shuffle) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< CustomUnaryOp, const Derived > unaryExpr(const CustomUnaryOp &func) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReductionOp< internal::SumReducer< CoeffReturnType >, const Dims, const Derived > sum(const Dims &dims) const
const TensorReductionOp< internal::MaxReducer< CoeffReturnType >, const DimensionList< Index, NumDimensions >, const Derived > maximum() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_sign_op< Scalar >, const Derived > sign() const
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_polygamma_op< Scalar >, const Derived, const OtherDerived > polygamma(const OtherDerived &other) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseNullaryOp< RandomGenerator, const Derived > random(const RandomGenerator &gen=RandomGenerator()) 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 TensorCwiseBinaryOp< internal::scalar_min_op< Scalar >, const Derived, const TensorCwiseNullaryOp< internal::scalar_constant_op< Scalar >, const Derived > > cwiseMin(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 EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_exp_op< Scalar >, const Derived > exp() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & setRandom()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & setRandom()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorChippingOp< DimId, const Derived > chip(const Index offset) 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_inverse_op< Scalar >, const Derived > inverse() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_square_op< Scalar >, const Derived > square() 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 ...
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
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 TensorForcedEvalOp< const Derived > eval() const
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 TensorCwiseUnaryOp< internal::scalar_sigmoid_op< Scalar >, const Derived > sigmoid() 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 TensorPaddingOp< const PaddingDimensions, const Derived > pad(const PaddingDimensions &padding, const Scalar padding_value) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorLayoutSwapOp< const Derived > swap_layout() const
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_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_tanh_op< Scalar >, const Derived > tanh() 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 CwiseBinaryOp< internal::scalar_min_op< Scalar, Scalar >, const Derived, const OtherDerived > cwiseMin(const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) 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
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & derived()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReductionOp< internal::MeanReducer< CoeffReturnType >, const Dims, const Derived > mean(const Dims &dims) const
internal::traits< Derived > DerivedTraits
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_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReductionOp< internal::OrReducer, const DimensionList< Index, NumDimensions >, const TensorConversionOp< bool, const Derived > > any() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorChippingOp< DimId, const Derived > chip(const Index offset) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_real_op< Scalar >, const Derived > real() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorReshapingOp< const NewDimensions, Derived > reshape(const NewDimensions &newDimensions)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorChippingOp< Dynamic, Derived > chip(const Index offset, const Index dim)
traits< XprType >::Index Index
const TensorReductionOp< internal::MinReducer< CoeffReturnType >, const DimensionList< Index, NumDimensions >, const Derived > minimum() 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 TensorCwiseUnaryOp< internal::scalar_sqrt_op< Scalar >, const Derived > sqrt() 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 TensorShufflingOp< const Shuffle, const Derived > shuffle(const Shuffle &shuffle) const
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 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 TensorCwiseUnaryOp< internal::scalar_erf_op< Scalar >, const Derived > erf() 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 TensorCwiseBinaryOp< internal::scalar_cmp_op< Scalar, Scalar, internal::cmp_GE >, const Derived, const OtherDerived > operator>=(const OtherDerived &other) const
Eigen::IndexPair< Index > DimensionPair
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_abs_op< Scalar >, const Derived > abs() 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 Derived & setConstant(const Scalar &val)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReductionOp< internal::ProdReducer< CoeffReturnType >, const Dims, const Derived > prod(const Dims &dims) const
DerivedTraits::Scalar Scalar
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 TensorCwiseBinaryOp< internal::scalar_zeta_op< Scalar >, const Derived, const OtherDerived > zeta(const OtherDerived &other) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorLayoutSwapOp< const Derived > swap_layout() 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 TensorReverseOp< const ReverseDimensions, const Derived > reverse(const ReverseDimensions &rev) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorGeneratorOp< Generator, const Derived > generate(const Generator &generator) 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 TensorReshapingOp< const NewDimensions, const Derived > reshape(const NewDimensions &newDimensions) 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_digamma_op< Scalar >, const Derived > digamma() const
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 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
Tensor conversion class. This class makes it possible to vectorize type casting operations when the n...
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorConversionOp< NewType, const Derived > cast() 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 TensorCwiseBinaryOp< internal::scalar_max_op< Scalar >, const Derived, const OtherDerived > cwiseMax(const OtherDerived &other) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorLayoutSwapOp< Derived > swap_layout()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorScanSumOp cumsum(const Index &axis, bool exclusive=false) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorShufflingOp< const Shuffle, Derived > shuffle(const Shuffle &shuffle)
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 const TensorReshapingOp< const NewDimensions, const Derived > reshape(const NewDimensions &newDimensions) 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::MinReducer< CoeffReturnType >, const Dims, const Derived > minimum(const Dims &dims) const
EIGEN_DEVICE_FUNC const Product< MatrixDerived, PermutationDerived, AliasFreeProduct > operator*(const MatrixBase< MatrixDerived > &matrix, const PermutationBase< PermutationDerived > &permutation)
const TensorReductionOp< internal::SumReducer< CoeffReturnType >, const DimensionList< Index, NumDimensions >, const Derived > sum() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & operator+=(const OtherDerived &other)
The fixed sized version of the tensor class.
const mpreal dim(const mpreal &a, const mpreal &b, mp_rnd_t r=mpreal::get_default_rnd())
TensorScanOp< internal::ProdReducer< CoeffReturnType >, const Derived > TensorScanProdOp
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_log_op< Scalar >, const Derived > log() const
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 TensorCwiseBinaryOp< internal::scalar_boolean_or_op, const Derived, const OtherDerived > operator||(const 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 const TensorCwiseNullaryOp< CustomNullaryOp, const Derived > nullaryExpr(const CustomNullaryOp &func) 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 TensorCwiseUnaryOp< internal::scalar_imag_op< Scalar >, const Derived > imag() const
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 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
internal::remove_const< Scalar >::type CoeffReturnType
const TensorReductionOp< internal::ProdReducer< CoeffReturnType >, const DimensionList< Index, NumDimensions >, const Derived > prod() const
TensorScanOp< internal::SumReducer< CoeffReturnType >, const Derived > TensorScanSumOp
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 TensorCwiseUnaryOp< internal::scalar_conjugate_op< Scalar >, const Derived > conjugate() 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 TensorCwiseBinaryOp< internal::scalar_difference_op< Scalar >, const Derived, const OtherDerived > operator-(const OtherDerived &other) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_rsqrt_op< Scalar >, const Derived > rsqrt() 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 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 TensorInflationOp< const Strides, const Derived > inflate(const Strides &strides) const
const mpreal random(unsigned int seed=0)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Derived & derived() 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 EIGEN_STRONG_INLINE const TensorPaddingOp< const PaddingDimensions, const Derived > pad(const PaddingDimensions &padding) const
DerivedTraits::Index Index
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 const TensorIndexTupleOp< const Derived > index_tuples() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorTupleReducerOp< internal::ArgMaxTupleReducer< Tuple< Index, CoeffReturnType > >, const array< Index, NumDimensions >, const Derived > argmax() const
const TensorReductionOp< internal::MeanReducer< CoeffReturnType >, const DimensionList< Index, NumDimensions >, const Derived > mean() const
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_ceil_op< Scalar >, const Derived > ceil() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_sum_op< Scalar >, const Derived, const OtherDerived > operator+(const OtherDerived &other) const
DerivedTraits::Scalar Scalar
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_boolean_and_op, const Derived, const OtherDerived > operator&&(const OtherDerived &other) 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 TensorCwiseUnaryOp< internal::scalar_lgamma_op< Scalar >, const Derived > lgamma() 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 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 TensorConcatenationOp< const Axis, const Derived, const OtherDerived > concatenate(const OtherDerived &other, const Axis &axis) 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 TensorCwiseUnaryOp< internal::scalar_opposite_op< Scalar >, const Derived > operator-() 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 TensorCwiseNullaryOp< internal::UniformRandomGenerator< Scalar >, const Derived > random() const
Tensor concatenation class.
internal::traits< Derived > DerivedTraits
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 TensorReverseOp< const ReverseDimensions, Derived > reverse(const ReverseDimensions &rev)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorConcatenationOp< Axis, const Derived, const OtherDerived > concatenate(const OtherDerived &other, Axis axis) const
static const int NumDimensions
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_erfc_op< Scalar >, const Derived > erfc() 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 & setZero()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReverseOp< const ReverseDimensions, const Derived > reverse(const ReverseDimensions &rev) 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
bool operator<(hardware_interface::ControllerInfo const &i1, hardware_interface::ControllerInfo const &i2)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReductionOp< internal::AndReducer, const Dims, const TensorConversionOp< bool, const Derived > > all(const Dims &dims) 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 TensorPatchOp< const PatchDims, const Derived > extract_patches(const PatchDims &patch_dims) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorTupleReducerOp< internal::ArgMinTupleReducer< Tuple< Index, CoeffReturnType > >, const array< Index, NumDimensions >, const Derived > argmin() const