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;
32 typedef typename DerivedTraits::Index Index;
34 static const int NumDimensions = DerivedTraits::NumDimensions;
37 template <
typename CustomNullaryOp> EIGEN_DEVICE_FUNC
39 nullaryExpr(
const CustomNullaryOp&
func)
const {
46 constant(
const Scalar& value)
const {
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
64 generate(
const Generator& generator)
const {
69 template <
typename CustomUnaryOp> EIGEN_DEVICE_FUNC
71 unaryExpr(
const CustomUnaryOp& func)
const {
137 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
139 igamma(
const OtherDerived& other)
const {
144 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
146 igammac(
const OtherDerived& other)
const {
151 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
153 zeta(
const OtherDerived& other)
const {
158 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
160 polygamma(
const OtherDerived& other)
const {
214 pow(Scalar exponent)
const {
232 operator+ (Scalar rhs)
const {
237 EIGEN_STRONG_INLINE
friend 239 operator+ (Scalar lhs,
const Derived& rhs) {
245 operator- (Scalar rhs)
const {
251 EIGEN_STRONG_INLINE
friend 253 operator- (Scalar lhs,
const Derived& rhs) {
264 EIGEN_STRONG_INLINE
friend 266 operator* (Scalar lhs,
const Derived& rhs) {
272 operator/ (Scalar rhs)
const {
277 EIGEN_STRONG_INLINE
friend 279 operator/ (Scalar lhs,
const Derived& rhs) {
285 operator% (Scalar rhs)
const {
292 cwiseMax(Scalar threshold)
const {
293 return cwiseMax(constant(threshold));
298 cwiseMin(Scalar threshold)
const {
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 {
334 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
336 operator+(
const OtherDerived& other)
const {
340 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
342 operator-(
const OtherDerived& other)
const {
346 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
348 operator*(
const OtherDerived& other)
const {
352 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
354 operator/(
const OtherDerived& other)
const {
358 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
359 const TensorCwiseBinaryOp<internal::scalar_max_op<Scalar>,
const Derived,
const OtherDerived>
360 cwiseMax(
const OtherDerived& other)
const {
364 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
365 const TensorCwiseBinaryOp<internal::scalar_min_op<Scalar>,
const Derived,
const OtherDerived>
366 cwiseMin(
const OtherDerived& other)
const {
370 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
372 operator&&(
const OtherDerived& other)
const {
376 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
378 operator||(
const OtherDerived& other)
const {
382 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
384 operator^(
const OtherDerived& other)
const {
389 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
391 operator<(
const OtherDerived& other)
const {
394 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
396 operator<=(
const OtherDerived& other)
const {
399 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
401 operator>(
const OtherDerived& other)
const {
404 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
406 operator>=(
const OtherDerived& other)
const {
410 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
412 operator==(
const OtherDerived& other)
const {
416 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
418 operator!=(
const OtherDerived& other)
const {
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> >
425 operator<(Scalar threshold)
const {
426 return operator<(constant(threshold));
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> >
430 operator<=(Scalar threshold)
const {
431 return operator<=(constant(threshold));
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> >
435 operator>(Scalar threshold)
const {
436 return operator>(constant(threshold));
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> >
440 operator>=(Scalar threshold)
const {
441 return operator>=(constant(threshold));
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> >
445 operator==(Scalar threshold)
const {
446 return operator==(constant(threshold));
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> >
450 operator!=(Scalar threshold)
const {
451 return operator!=(constant(threshold));
472 template<
typename ThenDerived,
typename ElseDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
474 select(
const ThenDerived& thenTensor,
const ElseDerived& elseTensor)
const {
481 template<
typename OtherDerived,
typename Dimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
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 {
503 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
504 const TensorScanSumOp
505 cumsum(
const Index& axis,
bool exclusive =
false)
const {
506 return TensorScanSumOp(derived(), axis, exclusive);
510 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
511 const TensorScanProdOp
512 cumprod(
const Index& axis,
bool exclusive =
false)
const {
513 return TensorScanProdOp(derived(), axis, exclusive);
516 template <
typename Reducer>
517 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
519 scan(
const Index& axis,
const Reducer& reducer,
bool exclusive =
false)
const {
524 template <
typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
526 sum(
const Dims& dims)
const {
532 DimensionList<Index, NumDimensions> in_dims;
533 return TensorReductionOp<internal::SumReducer<CoeffReturnType>,
const DimensionList<Index, NumDimensions>,
const Derived>(derived(), in_dims,
internal::SumReducer<CoeffReturnType>());
536 template <
typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
538 mean(
const Dims& dims)
const {
542 const TensorReductionOp<internal::MeanReducer<CoeffReturnType>,
const DimensionList<Index, NumDimensions>,
const Derived>
544 DimensionList<Index, NumDimensions> in_dims;
548 template <
typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
550 prod(
const Dims& dims)
const {
554 const TensorReductionOp<internal::ProdReducer<CoeffReturnType>,
const DimensionList<Index, NumDimensions>,
const Derived>
556 DimensionList<Index, NumDimensions> in_dims;
560 template <
typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
562 maximum(
const Dims& dims)
const {
566 const TensorReductionOp<internal::MaxReducer<CoeffReturnType>,
const DimensionList<Index, NumDimensions>,
const Derived>
568 DimensionList<Index, NumDimensions> in_dims;
569 return TensorReductionOp<internal::MaxReducer<CoeffReturnType>,
const DimensionList<Index, NumDimensions>,
const Derived>(derived(), in_dims,
internal::MaxReducer<CoeffReturnType>());
572 template <
typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
574 minimum(
const Dims& dims)
const {
578 const TensorReductionOp<internal::MinReducer<CoeffReturnType>,
const DimensionList<Index, NumDimensions>,
const Derived>
580 DimensionList<Index, NumDimensions> in_dims;
581 return TensorReductionOp<internal::MinReducer<CoeffReturnType>,
const DimensionList<Index, NumDimensions>,
const Derived>(derived(), in_dims,
internal::MinReducer<CoeffReturnType>());
584 template <
typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
586 all(
const Dims& dims)
const {
590 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
593 DimensionList<Index, NumDimensions> in_dims;
597 template <
typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
599 any(
const Dims& dims)
const {
603 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
606 DimensionList<Index, NumDimensions> in_dims;
610 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
615 array<Index, NumDimensions> in_dims;
616 for (
int d = 0; d < NumDimensions; ++d) in_dims[d] = d;
618 internal::ArgMaxTupleReducer<Tuple<Index, CoeffReturnType> >,
619 const array<Index, NumDimensions>,
620 const Derived>(derived(), internal::ArgMaxTupleReducer<Tuple<Index, CoeffReturnType> >(), -1, in_dims);
623 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
626 const array<Index, NumDimensions>,
const Derived>
628 array<Index, NumDimensions> in_dims;
629 for (
int d = 0; d < NumDimensions; ++d) in_dims[d] = d;
631 internal::ArgMinTupleReducer<Tuple<Index, CoeffReturnType> >,
632 const array<Index, NumDimensions>,
633 const Derived>(derived(), internal::ArgMinTupleReducer<Tuple<Index, CoeffReturnType> >(), -1, in_dims);
636 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
638 internal::ArgMaxTupleReducer<Tuple<Index, CoeffReturnType> >,
640 argmax(
const int return_dim)
const {
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);
649 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
651 internal::ArgMinTupleReducer<Tuple<Index, CoeffReturnType> >,
652 const array<Index, 1>,
const Derived>
653 argmin(
const int return_dim)
const {
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);
662 template <
typename Reducer,
typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
664 reduce(
const Dims& dims,
const Reducer& reducer)
const {
668 template <
typename Broadcast> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
670 broadcast(
const Broadcast& broadcast)
const {
674 template <
typename Axis,
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
676 concatenate(
const OtherDerived& other, Axis axis)
const {
680 template <
typename PatchDims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
682 extract_patches(
const PatchDims& patch_dims)
const {
686 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
688 extract_image_patches(
const Index patch_rows = 1,
const Index patch_cols = 1,
689 const Index row_stride = 1,
const Index col_stride = 1,
690 const Index in_row_stride = 1,
const Index in_col_stride = 1,
691 const PaddingType padding_type = PADDING_SAME,
const Scalar padding_value = Scalar(0))
const {
693 in_row_stride, in_col_stride, 1, 1, padding_type, padding_value);
696 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
698 extract_image_patches(
const Index patch_rows,
const Index patch_cols,
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);
710 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
712 extract_volume_patches(
const Index patch_planes,
const Index patch_rows,
const Index patch_cols,
713 const Index plane_stride = 1,
const Index row_stride = 1,
const Index col_stride = 1,
714 const PaddingType padding_type = PADDING_SAME,
const Scalar padding_value = Scalar(0))
const {
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);
719 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
721 extract_volume_patches(
const Index patch_planes,
const Index patch_rows,
const Index patch_cols,
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);
731 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
733 swap_layout()
const {
736 template <
typename NewDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
738 reshape(
const NewDimensions& newDimensions)
const {
741 template <
typename StartIndices,
typename Sizes> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
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);
752 template <Index DimId> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
754 chip(
const Index offset)
const {
757 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
759 chip(
const Index offset,
const Index dim)
const {
762 template <
typename ReverseDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
764 reverse(
const ReverseDimensions& rev)
const {
767 template <
typename PaddingDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
769 pad(
const PaddingDimensions& padding)
const {
772 template <
typename PaddingDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
774 pad(
const PaddingDimensions& padding,
const Scalar padding_value)
const {
777 template <
typename Shuffle> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
779 shuffle(
const Shuffle& shuffle)
const {
782 template <
typename Str
ides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
784 stride(
const Strides& strides)
const {
787 template <
typename Str
ides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
789 inflate(
const Strides& strides)
const {
794 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
796 index_tuples()
const {
801 template <
typename CustomUnaryFunc>
802 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
806 template <
typename OtherDerived,
typename CustomBinaryFunc>
807 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
813 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
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;
823 EIGEN_STRONG_INLINE
const Derived& derived()
const {
return *
static_cast<const Derived*
>(
this); }
826 template<typename Derived, int AccessLevel = internal::accessors_level<Derived>::value>
830 typedef typename DerivedTraits::Scalar Scalar;
831 typedef typename DerivedTraits::Index Index;
832 typedef Scalar CoeffReturnType;
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;
840 EIGEN_STRONG_INLINE Derived& setZero() {
841 return setConstant(Scalar(0));
844 EIGEN_STRONG_INLINE Derived& setConstant(
const Scalar& val) {
845 return derived() = this->constant(val);
848 EIGEN_STRONG_INLINE Derived& setRandom() {
849 return derived() = this->random();
851 template <
typename RandomGenerator> EIGEN_DEVICE_FUNC
852 EIGEN_STRONG_INLINE Derived& setRandom() {
853 return derived() = this->
template random<RandomGenerator>();
856 #if EIGEN_HAS_VARIADIC_TEMPLATES 858 EIGEN_STRONG_INLINE Derived& setValues(
859 const typename internal::Initializer<Derived, NumDimensions>::InitList& vals) {
861 internal::initialize_tensor<Derived, NumDimensions>(eval, vals);
864 #endif // EIGEN_HAS_VARIADIC_TEMPLATES 866 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
867 Derived& operator+=(
const OtherDerived& other) {
868 return derived() = derived() + other.derived();
870 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
871 Derived& operator-=(
const OtherDerived& other) {
872 return derived() = derived() - other.derived();
874 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
875 Derived& operator*=(
const OtherDerived& other) {
876 return derived() = derived() * other.derived();
878 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
879 Derived& operator/=(
const OtherDerived& other) {
880 return derived() = derived() / other.derived();
883 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
885 swap_layout()
const {
888 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
894 template <
typename Axis,
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
896 concatenate(
const OtherDerived& other,
const Axis& axis)
const {
899 template <
typename Axis,
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
901 concatenate(
const OtherDerived& other,
const Axis& axis) {
905 template <
typename NewDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
907 reshape(
const NewDimensions& newDimensions)
const {
910 template <
typename NewDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
912 reshape(
const NewDimensions& newDimensions) {
916 template <
typename StartIndices,
typename Sizes> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
918 slice(
const StartIndices& startIndices,
const Sizes& sizes)
const {
921 template <
typename StartIndices,
typename Sizes> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
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);
940 template <DenseIndex DimId> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
942 chip(
const Index offset)
const {
945 template <Index DimId> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
947 chip(
const Index offset) {
951 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
953 chip(
const Index offset,
const Index dim)
const {
956 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
958 chip(
const Index offset,
const Index dim) {
962 template <
typename ReverseDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
964 reverse(
const ReverseDimensions& rev)
const {
967 template <
typename ReverseDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
969 reverse(
const ReverseDimensions& rev) {
973 template <
typename Shuffle> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
975 shuffle(
const Shuffle& shuffle)
const {
978 template <
typename Shuffle> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
980 shuffle(
const Shuffle& shuffle) {
984 template <
typename Str
ides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
986 stride(
const Strides& strides)
const {
989 template <
typename Str
ides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
991 stride(
const Strides& strides) {
996 template <
typename DeviceType>
1003 EIGEN_STRONG_INLINE Derived& derived() {
return *
static_cast<Derived*
>(
this); }
1005 EIGEN_STRONG_INLINE
const Derived& derived()
const {
return *
static_cast<const Derived*
>(
this); }
1010 #endif // EIGEN_CXX11_TENSOR_TENSOR_BASE_H Definition: ForwardDeclarations.h:217
Definition: TensorMeta.h:154
Definition: TensorDimensionList.h:25
Definition: TensorFunctors.h:96
Definition: TensorForwardDeclarations.h:43
Tensor custom class.
Definition: TensorCustomOp.h:52
Definition: UnaryFunctors.h:109
Definition: UnaryFunctors.h:183
Definition: TensorExpr.h:187
Definition: TensorForwardDeclarations.h:60
Definition: TensorExpr.h:111
Tensor custom class.
Definition: TensorCustomOp.h:202
Definition: TensorForwardDeclarations.h:49
Definition: UnaryFunctors.h:363
Definition: TensorFunctors.h:398
Definition: ForwardDeclarations.h:214
Definition: TensorForwardDeclarations.h:56
Definition: TensorForwardDeclarations.h:58
Definition: UnaryFunctors.h:271
Definition: UnaryFunctors.h:499
Definition: TensorForwardDeclarations.h:57
Definition: UnaryFunctors.h:696
Definition: UnaryFunctors.h:606
Definition: TensorForwardDeclarations.h:55
Definition: TensorFunctors.h:423
Definition: BinaryFunctors.h:32
Definition: TensorForwardDeclarations.h:53
Definition: TensorForcedEval.h:69
Definition: UnaryFunctors.h:678
Definition: UnaryFunctors.h:22
Definition: TensorFunctors.h:221
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:85
Definition: UnaryFunctors.h:152
A cost model used to limit the number of threads used for evaluating tensor expression.
Definition: TensorEvaluator.h:28
Definition: TensorFunctors.h:303
Pseudo expression providing an operator = that will evaluate its argument on the specified computing ...
Definition: TensorDevice.h:27
Holds information about the various numeric (i.e.
Definition: NumTraits.h:150
Definition: UnaryFunctors.h:231
Definition: ForwardDeclarations.h:215
const Eigen::CwiseBinaryOp< Eigen::internal::scalar_igammac_op< typename Derived::Scalar >, const Derived, const ExponentDerived > igammac(const Eigen::ArrayBase< Derived > &a, const Eigen::ArrayBase< ExponentDerived > &x)
Definition: SpecialFunctionsArrayAPI.h:48
Definition: ForwardDeclarations.h:218
const Eigen::CwiseBinaryOp< Eigen::internal::scalar_igamma_op< typename Derived::Scalar >, const Derived, const ExponentDerived > igamma(const Eigen::ArrayBase< Derived > &a, const Eigen::ArrayBase< ExponentDerived > &x)
Definition: SpecialFunctionsArrayAPI.h:28
Definition: TensorArgMax.h:163
Definition: TensorChipping.h:78
Definition: UnaryFunctors.h:336
Definition: TensorDimensions.h:93
Definition: TensorForwardDeclarations.h:45
Definition: BinaryFunctors.h:190
Definition: UnaryFunctors.h:714
Definition: BinaryFunctors.h:389
Definition: TensorForwardDeclarations.h:52
Definition: BinaryFunctors.h:76
Definition: ForwardDeclarations.h:212
Read-only access via a member function.
Definition: Constants.h:366
Definition: TensorForwardDeclarations.h:51
Definition: UnaryFunctors.h:749
Definition: BinaryFunctors.h:358
Definition: TensorForwardDeclarations.h:46
Definition: SpecialFunctionsFunctors.h:168
Definition: UnaryFunctors.h:590
Definition: TensorForwardDeclarations.h:54
Definition: UnaryFunctors.h:659
Definition: TensorFunctors.h:262
Definition: TensorFunctors.h:21
Definition: TensorBroadcasting.h:68
Tensor conversion class.
Definition: TensorConversion.h:145
Definition: TensorContraction.h:75
Definition: TensorDeviceDefault.h:17
Definition: BinaryFunctors.h:421
Definition: BinaryFunctors.h:459
Definition: TensorForwardDeclarations.h:36
EIGEN_DEVICE_FUNC const Product< MatrixDerived, PermutationDerived, AliasFreeProduct > operator*(const MatrixBase< MatrixDerived > &matrix, const PermutationBase< PermutationDerived > &permutation)
Definition: PermutationMatrix.h:543
The fixed sized version of the tensor class.
Definition: TensorFixedSize.h:27
Definition: UnaryFunctors.h:167
The tensor base class.
Definition: TensorBase.h:827
Definition: benchGeometry.cpp:23
Definition: EmulateArray.h:21
Definition: BinaryFunctors.h:405
Definition: TensorFunctors.h:348
Definition: ForwardDeclarations.h:213
Definition: BinaryFunctors.h:140
Definition: TensorConvolution.h:257
Definition: BinaryFunctors.h:299
Definition: TensorFunctors.h:373
Definition: UnaryFunctors.h:640
const Eigen::CwiseBinaryOp< Eigen::internal::scalar_zeta_op< typename DerivedX::Scalar >, const DerivedX, const DerivedQ > zeta(const Eigen::ArrayBase< DerivedX > &x, const Eigen::ArrayBase< DerivedQ > &q)
Definition: SpecialFunctionsArrayAPI.h:114
Definition: BinaryFunctors.h:329
Definition: UnaryFunctors.h:621
Definition: TensorExpr.h:335
Definition: TensorForwardDeclarations.h:44
Definition: TensorExpr.h:52
const Eigen::CwiseBinaryOp< Eigen::internal::scalar_polygamma_op< typename DerivedX::Scalar >, const DerivedN, const DerivedX > polygamma(const Eigen::ArrayBase< DerivedN > &n, const Eigen::ArrayBase< DerivedX > &x)
Definition: SpecialFunctionsArrayAPI.h:70
Definition: TensorFunctors.h:63
Definition: TensorArgMax.h:53
Tensor concatenation class.
Definition: TensorConcatenation.h:58
Definition: BinaryFunctors.h:440
Definition: UnaryFunctors.h:574
Definition: ForwardDeclarations.h:216
The tensor class.
Definition: Tensor.h:63
Definition: TensorFunctors.h:141
Definition: UnaryFunctors.h:302
Definition: BinaryFunctors.h:166
Definition: UnaryFunctors.h:41
Definition: NullaryFunctors.h:18
Definition: TensorForwardDeclarations.h:50