TensorBase.h
Go to the documentation of this file.
1 // This file is part of Eigen, a lightweight C++ template library
2 // for linear algebra.
3 //
4 // Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>
5 //
6 // This Source Code Form is subject to the terms of the Mozilla
7 // Public License v. 2.0. If a copy of the MPL was not distributed
8 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 
10 #ifndef EIGEN_CXX11_TENSOR_TENSOR_BASE_H
11 #define EIGEN_CXX11_TENSOR_TENSOR_BASE_H
12 
13 // clang-format off
14 
15 namespace Eigen {
16 
25 #ifndef EIGEN_PARSED_BY_DOXYGEN
26 // FIXME Doxygen does not like the inheritance with different template parameters
27 // Since there is no doxygen documentation inside, we disable it for now
28 template<typename Derived>
30 {
31  public:
33  typedef typename DerivedTraits::Scalar Scalar;
34  typedef typename DerivedTraits::Index Index;
36  static const int NumDimensions = DerivedTraits::NumDimensions;
37 
38  // Generic nullary operation support.
39  template <typename CustomNullaryOp> EIGEN_DEVICE_FUNC
41  nullaryExpr(const CustomNullaryOp& func) const {
43  }
44 
45  // Coefficient-wise nullary operators
48  constant(const Scalar& value) const {
49  return nullaryExpr(internal::scalar_constant_op<Scalar>(value));
50  }
51 
54  random() const {
55  return nullaryExpr(internal::UniformRandomGenerator<Scalar>());
56  }
57  template <typename RandomGenerator> EIGEN_DEVICE_FUNC
59  random(const RandomGenerator& gen = RandomGenerator()) const {
60  return nullaryExpr(gen);
61  }
62 
63  // Tensor generation
64  template <typename Generator> EIGEN_DEVICE_FUNC
66  generate(const Generator& generator) const {
68  }
69 
70  // Generic unary operation support.
71  template <typename CustomUnaryOp> EIGEN_DEVICE_FUNC
73  unaryExpr(const CustomUnaryOp& func) const {
75  }
76 
77  // Coefficient-wise unary operators
80  operator-() const {
82  }
83 
86  sqrt() const {
88  }
89 
92  sign() const {
94  }
95 
98  rsqrt() const {
100  }
101 
104  square() const {
106  }
107 
110  cube() const {
112  }
113 
116  inverse() const {
118  }
119 
122  tanh() const {
124  }
125 
128  lgamma() const {
130  }
131 
134  digamma() const {
136  }
137 
140  bessel_i0() const {
142  }
143 
146  bessel_i0e() const {
148  }
149 
152  bessel_i1() const {
154  }
155 
158  bessel_i1e() const {
160  }
161 
164  bessel_j0() const {
166  }
167 
170  bessel_y0() const {
172  }
173 
176  bessel_j1() const {
178  }
179 
182  bessel_y1() const {
184  }
185 
188  bessel_k0() const {
190  }
191 
194  bessel_k0e() const {
196  }
197 
200  bessel_k1() const {
202  }
203 
206  bessel_k1e() const {
208  }
209 
210  // igamma(a = this, x = other)
211  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
212  const TensorCwiseBinaryOp<internal::scalar_igamma_op<Scalar>, const Derived, const OtherDerived>
213  igamma(const OtherDerived& other) const {
214  return binaryExpr(other.derived(), internal::scalar_igamma_op<Scalar>());
215  }
216 
217  // igamma_der_a(a = this, x = other)
218  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
219  const TensorCwiseBinaryOp<internal::scalar_igamma_der_a_op<Scalar>, const Derived, const OtherDerived>
220  igamma_der_a(const OtherDerived& other) const {
221  return binaryExpr(other.derived(), internal::scalar_igamma_der_a_op<Scalar>());
222  }
223 
224  // gamma_sample_der_alpha(alpha = this, sample = other)
225  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
226  const TensorCwiseBinaryOp<internal::scalar_gamma_sample_der_alpha_op<Scalar>, const Derived, const OtherDerived>
227  gamma_sample_der_alpha(const OtherDerived& other) const {
229  }
230 
231  // igammac(a = this, x = other)
232  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
233  const TensorCwiseBinaryOp<internal::scalar_igammac_op<Scalar>, const Derived, const OtherDerived>
234  igammac(const OtherDerived& other) const {
235  return binaryExpr(other.derived(), internal::scalar_igammac_op<Scalar>());
236  }
237 
238  // zeta(x = this, q = other)
239  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
240  const TensorCwiseBinaryOp<internal::scalar_zeta_op<Scalar>, const Derived, const OtherDerived>
241  zeta(const OtherDerived& other) const {
242  return binaryExpr(other.derived(), internal::scalar_zeta_op<Scalar>());
243  }
244 
245  // polygamma(n = this, x = other)
246  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
247  const TensorCwiseBinaryOp<internal::scalar_polygamma_op<Scalar>, const Derived, const OtherDerived>
248  polygamma(const OtherDerived& other) const {
249  return binaryExpr(other.derived(), internal::scalar_polygamma_op<Scalar>());
250  }
251 
254  erf() const {
256  }
257 
260  erfc() const {
262  }
263 
266  ndtri() const {
268  }
269 
272  sigmoid() const {
274  }
275 
278  exp() const {
280  }
281 
284  expm1() const {
286  }
287 
290  log() const {
292  }
293 
296  log1p() const {
298  }
299 
302  log2() const {
304  }
305 
308  abs() const {
310  }
311 
314  clip(Scalar min, Scalar max) const {
316  }
317 
321  Derived>::type
322  conjugate() const {
324  }
325 
328  pow(Scalar exponent) const {
330  }
331 
334  real() const {
336  }
337 
340  imag() const {
342  }
343 
346  operator+ (Scalar rhs) const {
348  }
349 
351  EIGEN_STRONG_INLINE friend
353  operator+ (Scalar lhs, const Derived& rhs) {
354  return rhs.unaryExpr(internal::bind1st_op<internal::scalar_sum_op<Scalar> >(lhs));
355  }
356 
359  operator- (Scalar rhs) const {
360  EIGEN_STATIC_ASSERT((NumTraits<Scalar>::IsSigned || internal::is_same<Scalar, const std::complex<float> >::value), YOU_MADE_A_PROGRAMMING_MISTAKE);
362  }
363 
365  EIGEN_STRONG_INLINE friend
367  operator- (Scalar lhs, const Derived& rhs) {
369  }
370 
373  operator* (Scalar rhs) const {
375  }
376 
378  EIGEN_STRONG_INLINE friend
380  operator* (Scalar lhs, const Derived& rhs) {
381  return rhs.unaryExpr(internal::bind1st_op<internal::scalar_product_op<Scalar> >(lhs));
382  }
383 
386  operator/ (Scalar rhs) const {
388  }
389 
391  EIGEN_STRONG_INLINE friend
393  operator/ (Scalar lhs, const Derived& rhs) {
394  return rhs.unaryExpr(internal::bind1st_op<internal::scalar_quotient_op<Scalar> >(lhs));
395  }
396 
399  operator% (Scalar rhs) const {
400  EIGEN_STATIC_ASSERT(NumTraits<Scalar>::IsInteger, YOU_MADE_A_PROGRAMMING_MISTAKE_TRY_MOD);
402  }
403 
404  template <int NanPropagation=PropagateFast>
406  EIGEN_STRONG_INLINE const TensorCwiseBinaryOp<internal::scalar_max_op<Scalar,Scalar,NanPropagation>, const Derived, const TensorCwiseNullaryOp<internal::scalar_constant_op<Scalar>, const Derived> >
407  cwiseMax(Scalar threshold) const {
408  return cwiseMax<NanPropagation>(constant(threshold));
409  }
410 
411  template <int NanPropagation=PropagateFast>
413  EIGEN_STRONG_INLINE const TensorCwiseBinaryOp<internal::scalar_min_op<Scalar,Scalar,NanPropagation>, const Derived, const TensorCwiseNullaryOp<internal::scalar_constant_op<Scalar>, const Derived> >
414  cwiseMin(Scalar threshold) const {
415  return cwiseMin<NanPropagation>(constant(threshold));
416  }
417 
418  template<typename NewType>
421  Derived,
423  cast() const {
425  }
426 
429  round() const {
431  }
432 
435  rint() const {
437  }
438 
441  ceil() const {
443  }
444 
447  floor() const {
449  }
450 
451  // Generic binary operation support.
452  template <typename CustomBinaryOp, typename OtherDerived> EIGEN_DEVICE_FUNC
454  binaryExpr(const OtherDerived& other, const CustomBinaryOp& func) const {
456  }
457 
458  // Coefficient-wise binary operators.
459  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
460  const TensorCwiseBinaryOp<internal::scalar_sum_op<Scalar>, const Derived, const OtherDerived>
461  operator+(const OtherDerived& other) const {
462  return binaryExpr(other.derived(), internal::scalar_sum_op<Scalar>());
463  }
464 
465  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
466  const TensorCwiseBinaryOp<internal::scalar_difference_op<Scalar>, const Derived, const OtherDerived>
467  operator-(const OtherDerived& other) const {
468  return binaryExpr(other.derived(), internal::scalar_difference_op<Scalar>());
469  }
470 
471  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
472  const TensorCwiseBinaryOp<internal::scalar_product_op<Scalar>, const Derived, const OtherDerived>
473  operator*(const OtherDerived& other) const {
474  return binaryExpr(other.derived(), internal::scalar_product_op<Scalar>());
475  }
476 
477  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
478  const TensorCwiseBinaryOp<internal::scalar_quotient_op<Scalar>, const Derived, const OtherDerived>
479  operator/(const OtherDerived& other) const {
480  return binaryExpr(other.derived(), internal::scalar_quotient_op<Scalar>());
481  }
482 
483  template<int NaNPropagation=PropagateFast, typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
485  cwiseMax(const OtherDerived& other) const {
487  }
488 
489  template<int NaNPropagation=PropagateFast, typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
491  cwiseMin(const OtherDerived& other) const {
493  }
494 
495  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
497  operator&&(const OtherDerived& other) const {
498  return binaryExpr(other.derived(), internal::scalar_boolean_and_op());
499  }
500 
501  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
503  operator||(const OtherDerived& other) const {
504  return binaryExpr(other.derived(), internal::scalar_boolean_or_op());
505  }
506 
507  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
509  operator^(const OtherDerived& other) const {
510  return binaryExpr(other.derived(), internal::scalar_boolean_xor_op());
511  }
512 
513  // Comparisons and tests.
514  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
516  operator<(const OtherDerived& other) const {
518  }
519  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
521  operator<=(const OtherDerived& other) const {
523  }
524  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
526  operator>(const OtherDerived& other) const {
528  }
529  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
531  operator>=(const OtherDerived& other) const {
533  }
534 
535  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
537  operator==(const OtherDerived& other) const {
539  }
540 
541  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
543  operator!=(const OtherDerived& other) const {
545  }
546 
547  // comparisons and tests for Scalars
549  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> >
550  operator<(Scalar threshold) const {
551  return operator<(constant(threshold));
552  }
554  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> >
555  operator<=(Scalar threshold) const {
556  return operator<=(constant(threshold));
557  }
559  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> >
560  operator>(Scalar threshold) const {
561  return operator>(constant(threshold));
562  }
564  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> >
565  operator>=(Scalar threshold) const {
566  return operator>=(constant(threshold));
567  }
569  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> >
570  operator==(Scalar threshold) const {
571  return operator==(constant(threshold));
572  }
574  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> >
575  operator!=(Scalar threshold) const {
576  return operator!=(constant(threshold));
577  }
578 
579  // Checks
582  (isnan)() const {
584  }
587  (isinf)() const {
589  }
592  (isfinite)() const {
594  }
595 
596  // Coefficient-wise ternary operators.
597  template<typename ThenDerived, typename ElseDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
599  select(const ThenDerived& thenTensor, const ElseDerived& elseTensor) const {
600  return TensorSelectOp<const Derived, const ThenDerived, const ElseDerived>(derived(), thenTensor.derived(), elseTensor.derived());
601  }
602 
603  // Contractions.
605 
606  template<typename OtherDerived, typename Dimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
608  contract(const OtherDerived& other, const Dimensions& dims) const {
610  }
611 
612  template<typename OtherDerived, typename Dimensions, typename OutputKernel> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
614  contract(const OtherDerived& other, const Dimensions& dims, const OutputKernel& output_kernel) const {
616  }
617 
618  // Convolutions.
619  template<typename KernelDerived, typename Dimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
621  convolve(const KernelDerived& kernel, const Dimensions& dims) const {
623  }
624 
625  // Fourier transforms
626  template <int FFTDataType, int FFTDirection, typename FFT> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
628  fft(const FFT& dims) const {
630  }
631 
632  // Scan.
635  const TensorScanSumOp
636  cumsum(const Index& axis, bool exclusive = false) const {
637  return TensorScanSumOp(derived(), axis, exclusive);
638  }
639 
642  const TensorScanProdOp
643  cumprod(const Index& axis, bool exclusive = false) const {
644  return TensorScanProdOp(derived(), axis, exclusive);
645  }
646 
647  template <typename Reducer>
650  scan(const Index& axis, const Reducer& reducer, bool exclusive = false) const {
651  return TensorScanOp<Reducer, const Derived>(derived(), axis, exclusive, reducer);
652  }
653 
654  // Reductions.
655  template <typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
657  sum(const Dims& dims) const {
658  return TensorReductionOp<internal::SumReducer<CoeffReturnType>, const Dims, const Derived>(derived(), dims, internal::SumReducer<CoeffReturnType>());
659  }
660 
661  const TensorReductionOp<internal::SumReducer<CoeffReturnType>, const DimensionList<Index, NumDimensions>, const Derived>
662  sum() const {
663  DimensionList<Index, NumDimensions> in_dims;
664  return TensorReductionOp<internal::SumReducer<CoeffReturnType>, const DimensionList<Index, NumDimensions>, const Derived>(derived(), in_dims, internal::SumReducer<CoeffReturnType>());
665  }
666 
667  template <typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
669  mean(const Dims& dims) const {
670  return TensorReductionOp<internal::MeanReducer<CoeffReturnType>, const Dims, const Derived>(derived(), dims, internal::MeanReducer<CoeffReturnType>());
671  }
672 
673  const TensorReductionOp<internal::MeanReducer<CoeffReturnType>, const DimensionList<Index, NumDimensions>, const Derived>
674  mean() const {
675  DimensionList<Index, NumDimensions> in_dims;
676  return TensorReductionOp<internal::MeanReducer<CoeffReturnType>, const DimensionList<Index, NumDimensions>, const Derived>(derived(), in_dims, internal::MeanReducer<CoeffReturnType>());
677  }
678 
679  template <typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
681  prod(const Dims& dims) const {
682  return TensorReductionOp<internal::ProdReducer<CoeffReturnType>, const Dims, const Derived>(derived(), dims, internal::ProdReducer<CoeffReturnType>());
683  }
684 
685  const TensorReductionOp<internal::ProdReducer<CoeffReturnType>, const DimensionList<Index, NumDimensions>, const Derived>
686  prod() const {
687  DimensionList<Index, NumDimensions> in_dims;
688  return TensorReductionOp<internal::ProdReducer<CoeffReturnType>, const DimensionList<Index, NumDimensions>, const Derived>(derived(), in_dims, internal::ProdReducer<CoeffReturnType>());
689  }
690 
691  template <typename Dims,int NanPropagation=PropagateFast> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
693  maximum(const Dims& dims) const {
694  return TensorReductionOp<internal::MaxReducer<CoeffReturnType,NanPropagation>, const Dims, const Derived>(derived(), dims, internal::MaxReducer<CoeffReturnType,NanPropagation>());
695  }
696 
697  template <int NanPropagation=PropagateFast>
698  const TensorReductionOp<internal::MaxReducer<CoeffReturnType,NanPropagation>, const DimensionList<Index, NumDimensions>, const Derived>
699  maximum() const {
700  DimensionList<Index, NumDimensions> in_dims;
701  return TensorReductionOp<internal::MaxReducer<CoeffReturnType,NanPropagation>, const DimensionList<Index, NumDimensions>, const Derived>(derived(), in_dims, internal::MaxReducer<CoeffReturnType,NanPropagation>());
702  }
703 
704  template <typename Dims,int NanPropagation=PropagateFast> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
706  minimum(const Dims& dims) const {
707  return TensorReductionOp<internal::MinReducer<CoeffReturnType,NanPropagation>, const Dims, const Derived>(derived(), dims, internal::MinReducer<CoeffReturnType,NanPropagation>());
708  }
709 
710  template <int NanPropagation=PropagateFast>
711  const TensorReductionOp<internal::MinReducer<CoeffReturnType,NanPropagation>, const DimensionList<Index, NumDimensions>, const Derived>
712  minimum() const {
713  DimensionList<Index, NumDimensions> in_dims;
714  return TensorReductionOp<internal::MinReducer<CoeffReturnType,NanPropagation>, const DimensionList<Index, NumDimensions>, const Derived>(derived(), in_dims, internal::MinReducer<CoeffReturnType,NanPropagation>());
715  }
716 
717  template <typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
719  all(const Dims& dims) const {
720  return cast<bool>().reduce(dims, internal::AndReducer());
721  }
722 
725  all() const {
726  DimensionList<Index, NumDimensions> in_dims;
727  return cast<bool>().reduce(in_dims, internal::AndReducer());
728  }
729 
730  template <typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
732  any(const Dims& dims) const {
733  return cast<bool>().reduce(dims, internal::OrReducer());
734  }
735 
737  const TensorReductionOp<internal::OrReducer, const DimensionList<Index, NumDimensions>, const typename internal::conditional<internal::is_same<bool, CoeffReturnType>::value, Derived, TensorConversionOp<bool, const Derived> >::type >
738  any() const {
739  DimensionList<Index, NumDimensions> in_dims;
740  return cast<bool>().reduce(in_dims, internal::OrReducer());
741  }
742 
744  const TensorTupleReducerOp<
746  const array<Index, NumDimensions>, const Derived>
747  argmax() const {
748  array<Index, NumDimensions> in_dims;
749  for (Index d = 0; d < NumDimensions; ++d) in_dims[d] = d;
750  return TensorTupleReducerOp<
751  internal::ArgMaxTupleReducer<Tuple<Index, CoeffReturnType> >,
752  const array<Index, NumDimensions>,
753  const Derived>(derived(), internal::ArgMaxTupleReducer<Tuple<Index, CoeffReturnType> >(), -1, in_dims);
754  }
755 
757  const TensorTupleReducerOp<
759  const array<Index, NumDimensions>, const Derived>
760  argmin() const {
761  array<Index, NumDimensions> in_dims;
762  for (Index d = 0; d < NumDimensions; ++d) in_dims[d] = d;
763  return TensorTupleReducerOp<
764  internal::ArgMinTupleReducer<Tuple<Index, CoeffReturnType> >,
765  const array<Index, NumDimensions>,
766  const Derived>(derived(), internal::ArgMinTupleReducer<Tuple<Index, CoeffReturnType> >(), -1, in_dims);
767  }
768 
770  const TensorTupleReducerOp<
771  internal::ArgMaxTupleReducer<Tuple<Index, CoeffReturnType> >,
772  const array<Index, 1>, const Derived>
773  argmax(const Index return_dim) const {
774  array<Index, 1> in_dims;
775  in_dims[0] = return_dim;
776  return TensorTupleReducerOp<
777  internal::ArgMaxTupleReducer<Tuple<Index, CoeffReturnType> >,
778  const array<Index, 1>,
779  const Derived>(derived(), internal::ArgMaxTupleReducer<Tuple<Index, CoeffReturnType> >(), return_dim, in_dims);
780  }
781 
783  const TensorTupleReducerOp<
784  internal::ArgMinTupleReducer<Tuple<Index, CoeffReturnType> >,
785  const array<Index, 1>, const Derived>
786  argmin(const Index return_dim) const {
787  array<Index, 1> in_dims;
788  in_dims[0] = return_dim;
789  return TensorTupleReducerOp<
790  internal::ArgMinTupleReducer<Tuple<Index, CoeffReturnType> >,
791  const array<Index, 1>,
792  const Derived>(derived(), internal::ArgMinTupleReducer<Tuple<Index, CoeffReturnType> >(), return_dim, in_dims);
793  }
794 
795  template <typename Reducer, typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
797  reduce(const Dims& dims, const Reducer& reducer) const {
799  }
800 
801  template <typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
803  trace(const Dims& dims) const {
805  }
806 
808  trace() const {
809  DimensionList<Index, NumDimensions> in_dims;
810  return TensorTraceOp<const DimensionList<Index, NumDimensions>, const Derived>(derived(), in_dims);
811  }
812 
813  template <typename Broadcast> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
815  broadcast(const Broadcast& bcast) const {
817  }
818 
819  template <typename Axis, typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
821  concatenate(const OtherDerived& other, Axis axis) const {
823  }
824 
825  template <typename PatchDims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
827  extract_patches(const PatchDims& patch_dims) const {
829  }
830 
833  extract_image_patches(const Index patch_rows = 1, const Index patch_cols = 1,
834  const Index row_stride = 1, const Index col_stride = 1,
835  const Index in_row_stride = 1, const Index in_col_stride = 1,
836  const PaddingType padding_type = PADDING_SAME, const Scalar padding_value = Scalar(0)) const {
837  return TensorImagePatchOp<Dynamic, Dynamic, const Derived>(derived(), patch_rows, patch_cols, row_stride, col_stride,
838  in_row_stride, in_col_stride, 1, 1, padding_type, padding_value);
839  }
840 
843  extract_image_patches(const Index patch_rows, const Index patch_cols,
844  const Index row_stride, const Index col_stride,
845  const Index in_row_stride, const Index in_col_stride,
846  const Index row_inflate_stride, const Index col_inflate_stride,
847  const Index padding_top, const Index padding_bottom,
848  const Index padding_left,const Index padding_right,
849  const Scalar padding_value) const {
850  return TensorImagePatchOp<Dynamic, Dynamic, const Derived>(derived(), patch_rows, patch_cols, row_stride, col_stride,
851  in_row_stride, in_col_stride, row_inflate_stride, col_inflate_stride,
852  padding_top, padding_bottom, padding_left, padding_right, padding_value);
853  }
854 
857  extract_volume_patches(const Index patch_planes, const Index patch_rows, const Index patch_cols,
858  const Index plane_stride = 1, const Index row_stride = 1, const Index col_stride = 1,
859  const PaddingType padding_type = PADDING_SAME, const Scalar padding_value = Scalar(0)) const {
860  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);
861  }
862 
863 
866  extract_volume_patches(const Index patch_planes, const Index patch_rows, const Index patch_cols,
867  const Index plane_stride, const Index row_stride, const Index col_stride,
868  const Index plane_inflate_stride, const Index row_inflate_stride, const Index col_inflate_stride,
869  const Index padding_top_z, const Index padding_bottom_z,
870  const Index padding_top, const Index padding_bottom,
871  const Index padding_left, const Index padding_right, const Scalar padding_value = Scalar(0)) const {
872  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);
873  }
874 
875  // Morphing operators.
878  swap_layout() const {
880  }
881  template <typename NewDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
883  reshape(const NewDimensions& newDimensions) const {
885  }
886  template <typename StartIndices, typename Sizes> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
888  slice(const StartIndices& startIndices, const Sizes& sizes) const {
890  }
891  template <typename StartIndices, typename StopIndices, typename Strides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
893  stridedSlice(const StartIndices& startIndices, const StopIndices& stopIndices, const Strides& strides) const {
894  return TensorStridingSlicingOp<const StartIndices, const StopIndices, const Strides,
895  const Derived>(derived(), startIndices, stopIndices, strides);
896  }
897  template <Index DimId> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
899  chip(const Index offset) const {
901  }
904  chip(const Index offset, const Index dim) const {
906  }
907  template <typename ReverseDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
909  reverse(const ReverseDimensions& rev) const {
911  }
912  template <typename PaddingDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
914  pad(const PaddingDimensions& padding) const {
916  }
917  template <typename PaddingDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
919  pad(const PaddingDimensions& padding, const Scalar padding_value) const {
920  return TensorPaddingOp<const PaddingDimensions, const Derived>(derived(), padding, padding_value);
921  }
922  template <typename Shuffle> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
924  shuffle(const Shuffle& shfl) const {
926  }
927  template <typename Strides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
929  stride(const Strides& strides) const {
931  }
932  template <typename Strides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
934  inflate(const Strides& strides) const {
936  }
937 
938  // Returns a tensor containing index/value tuples
941  index_tuples() const {
943  }
944 
945  // Support for custom unary and binary operations
946  template <typename CustomUnaryFunc>
950  }
951  template <typename OtherDerived, typename CustomBinaryFunc>
953  const TensorCustomBinaryOp<const CustomBinaryFunc, const Derived, const OtherDerived> customOp(const OtherDerived& other, const CustomBinaryFunc& op) const {
955  }
956 
957  // Force the evaluation of the expression.
961  }
962 
963  protected:
964  template <typename Scalar, int NumIndices, int Options, typename IndexType> friend class Tensor;
965  template <typename Scalar, typename Dimensions, int Option, typename IndexTypes> friend class TensorFixedSize;
966  // the Eigen:: prefix is required to workaround a compilation issue with nvcc 9.0
967  template <typename OtherDerived, int AccessLevel> friend class Eigen::TensorBase;
969  EIGEN_STRONG_INLINE const Derived& derived() const { return *static_cast<const Derived*>(this); }
970 };
971 
973 class TensorBase : public TensorBase<Derived, ReadOnlyAccessors> {
974  public:
977  typedef typename DerivedTraits::Scalar Scalar;
978  typedef typename DerivedTraits::Index Index;
979  typedef Scalar CoeffReturnType;
980  static const int NumDimensions = DerivedTraits::NumDimensions;
981 
982  template <typename Scalar, int NumIndices, int Options, typename IndexType> friend class Tensor;
983  template <typename Scalar, typename Dimensions, int Option, typename IndexTypes> friend class TensorFixedSize;
984  // the Eigen:: prefix is required to workaround a compilation issue with nvcc 9.0
985  template <typename OtherDerived, int OtherAccessLevel> friend class Eigen::TensorBase;
986 
989  return setConstant(Scalar(0));
990  }
992  EIGEN_STRONG_INLINE Derived& setConstant(const Scalar& val) {
993  return derived() = this->constant(val);
994  }
997  return derived() = this->random();
998  }
999  template <typename RandomGenerator> EIGEN_DEVICE_FUNC
1001  return derived() = this->template random<RandomGenerator>();
1002  }
1003 
1004 #if EIGEN_HAS_VARIADIC_TEMPLATES
1006  EIGEN_STRONG_INLINE Derived& setValues(
1007  const typename internal::Initializer<Derived, NumDimensions>::InitList& vals) {
1009  internal::initialize_tensor<Derived, NumDimensions>(eval, vals);
1010  return derived();
1011  }
1012 #endif // EIGEN_HAS_VARIADIC_TEMPLATES
1013 
1014  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1015  Derived& operator+=(const OtherDerived& other) {
1016  return derived() = derived() + other.derived();
1017  }
1018  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1019  Derived& operator-=(const OtherDerived& other) {
1020  return derived() = derived() - other.derived();
1021  }
1022  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1023  Derived& operator*=(const OtherDerived& other) {
1024  return derived() = derived() * other.derived();
1025  }
1026  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1027  Derived& operator/=(const OtherDerived& other) {
1028  return derived() = derived() / other.derived();
1029  }
1030 
1033  swap_layout() const {
1035  }
1040  }
1041 
1042  template <typename Axis, typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1044  concatenate(const OtherDerived& other, const Axis& axis) const {
1046  }
1047  template <typename Axis, typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1049  concatenate(const OtherDerived& other, const Axis& axis) {
1051  }
1052 
1053  template <typename NewDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1055  reshape(const NewDimensions& newDimensions) const {
1057  }
1058  template <typename NewDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1060  reshape(const NewDimensions& newDimensions) {
1062  }
1063 
1064  template <typename StartIndices, typename Sizes> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1066  slice(const StartIndices& startIndices, const Sizes& sizes) const {
1068  }
1069  template <typename StartIndices, typename Sizes> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1071  slice(const StartIndices& startIndices, const Sizes& sizes) {
1073  }
1074 
1075  template <typename StartIndices, typename StopIndices, typename Strides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1077  stridedSlice(const StartIndices& startIndices, const StopIndices& stopIndices, const Strides& strides) const {
1078  return TensorStridingSlicingOp<const StartIndices, const StopIndices, const Strides,
1079  const Derived>(derived(), startIndices, stopIndices, strides);
1080  }
1081  template <typename StartIndices, typename StopIndices, typename Strides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1083  stridedSlice(const StartIndices& startIndices, const StopIndices& stopIndices, const Strides& strides) {
1084  return TensorStridingSlicingOp<const StartIndices, const StopIndices, const Strides,
1085  Derived>(derived(), startIndices, stopIndices, strides);
1086  }
1087 
1088  template <DenseIndex DimId> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1090  chip(const Index offset) const {
1092  }
1093  template <Index DimId> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1095  chip(const Index offset) {
1097  }
1098 
1101  chip(const Index offset, const Index dim) const {
1103  }
1106  chip(const Index offset, const Index dim) {
1108  }
1109 
1110  template <typename ReverseDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1112  reverse(const ReverseDimensions& rev) const {
1114  }
1115  template <typename ReverseDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1117  reverse(const ReverseDimensions& rev) {
1119  }
1120 
1121  template <typename Shuffle> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1123  shuffle(const Shuffle& shfl) const {
1125  }
1126  template <typename Shuffle> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1128  shuffle(const Shuffle& shfl) {
1130  }
1131 
1132  template <typename Strides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1134  stride(const Strides& strides) const {
1136  }
1137  template <typename Strides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1139  stride(const Strides& strides) {
1141  }
1142 
1143  // Select the device on which to evaluate the expression.
1144  template <typename DeviceType>
1147  }
1148 
1149  // Select the async device on which to evaluate the expression.
1150  template <typename DeviceType, typename DoneCallback>
1151  TensorAsyncDevice<Derived, DeviceType, DoneCallback> device(const DeviceType& dev, DoneCallback done) {
1152  return TensorAsyncDevice<Derived, DeviceType, DoneCallback>(dev, derived(), std::move(done));
1153  }
1154 
1155  protected:
1158 
1159  template<typename OtherDerived> EIGEN_DEVICE_FUNC
1160  EIGEN_STRONG_INLINE Derived& operator=(const OtherDerived& other)
1161  {
1163  Assign assign(derived(), other.derived());
1165  return derived();
1166  }
1167 
1169  EIGEN_STRONG_INLINE Derived& derived() { return *static_cast<Derived*>(this); }
1171  EIGEN_STRONG_INLINE const Derived& derived() const { return *static_cast<const Derived*>(this); }
1172 };
1173 #endif // EIGEN_PARSED_BY_DOXYGEN
1174 } // end namespace Eigen
1175 
1176 #endif // EIGEN_CXX11_TENSOR_TENSOR_BASE_H
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & operator-=(const OtherDerived &other)
Definition: TensorBase.h:1019
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_rsqrt_op< Scalar >, const Derived > rsqrt() const
Definition: TensorBase.h:98
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_difference_op< Scalar >, const Derived, const OtherDerived > operator-(const OtherDerived &other) const
Definition: TensorBase.h:467
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReductionOp< internal::MinReducer< CoeffReturnType, NanPropagation >, const Dims, const Derived > minimum(const Dims &dims) const
Definition: TensorBase.h:706
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorTraceOp< const Dims, const Derived > trace(const Dims &dims) const
Definition: TensorBase.h:803
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & operator*=(const OtherDerived &other)
Definition: TensorBase.h:1023
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorChippingOp< DimId, const Derived > chip(const Index offset) const
Definition: TensorBase.h:899
SCALAR Scalar
Definition: bench_gemm.cpp:46
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
Definition: TensorBase.h:560
Tensor custom class.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_imag_op< Scalar >, const Derived > imag() const
Definition: TensorBase.h:340
#define EIGEN_STRONG_INLINE
Definition: Macros.h:917
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorChippingOp< DimId, Derived > chip(const Index offset)
Definition: TensorBase.h:1095
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorConcatenationOp< const Axis, Derived, OtherDerived > concatenate(const OtherDerived &other, const Axis &axis)
Definition: TensorBase.h:1049
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
Definition: TensorBase.h:531
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_sum_op< Scalar >, const Derived, const OtherDerived > operator+(const OtherDerived &other) const
Definition: TensorBase.h:461
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
Definition: TensorBase.h:1077
Tensor custom class.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_sign_op< Scalar >, const Derived > sign() const
Definition: TensorBase.h:92
Tensor generator class.
EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator==(const Tuple< U, V > &x, const Tuple< U, V > &y)
Definition: TensorMeta.h:235
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_max_op< Scalar, Scalar, NanPropagation >, const Derived, const TensorCwiseNullaryOp< internal::scalar_constant_op< Scalar >, const Derived > > cwiseMax(Scalar threshold) const
Definition: TensorBase.h:407
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
Definition: TensorBase.h:866
bool operator<(const benchmark_t &b1, const benchmark_t &b2)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseNullaryOp< CustomNullaryOp, const Derived > nullaryExpr(const CustomNullaryOp &func) const
Definition: TensorBase.h:41
const TensorReductionOp< internal::SumReducer< CoeffReturnType >, const DimensionList< Index, NumDimensions >, const Derived > sum() const
Definition: TensorBase.h:662
const TensorReductionOp< internal::ProdReducer< CoeffReturnType >, const DimensionList< Index, NumDimensions >, const Derived > prod() const
Definition: TensorBase.h:686
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorContractionOp< const Dimensions, const Derived, const OtherDerived, const OutputKernel > contract(const OtherDerived &other, const Dimensions &dims, const OutputKernel &output_kernel) const
Definition: TensorBase.h:614
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & operator/=(const OtherDerived &other)
Definition: TensorBase.h:1027
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE const T1 & choose(Cond< true >, const T1 &first, const T2 &)
Definition: TensorMeta.h:18
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< CustomUnaryOp, const Derived > unaryExpr(const CustomUnaryOp &func) const
Definition: TensorBase.h:73
const TensorReductionOp< internal::MeanReducer< CoeffReturnType >, const DimensionList< Index, NumDimensions >, const Derived > mean() const
Definition: TensorBase.h:674
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Derived & derived() const
Definition: TensorBase.h:1171
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorConcatenationOp< const Axis, const Derived, const OtherDerived > concatenate(const OtherDerived &other, const Axis &axis) const
Definition: TensorBase.h:1044
std::vector< Array2i > sizes
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_min_op< Scalar, Scalar, NanPropagation >, const Derived, const TensorCwiseNullaryOp< internal::scalar_constant_op< Scalar >, const Derived > > cwiseMin(Scalar threshold) const
Definition: TensorBase.h:414
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorTupleReducerOp< internal::ArgMaxTupleReducer< Tuple< Index, CoeffReturnType > >, const array< Index, 1 >, const Derived > argmax(const Index return_dim) const
Definition: TensorBase.h:773
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_bessel_i0_op< Scalar >, const Derived > bessel_i0() const
Definition: TensorBase.h:140
std::vector< Eigen::Index > Dims
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_gamma_sample_der_alpha_op< Scalar >, const Derived, const OtherDerived > gamma_sample_der_alpha(const OtherDerived &other) const
Definition: TensorBase.h:227
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorScanSumOp cumsum(const Index &axis, bool exclusive=false) const
Definition: TensorBase.h:636
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorBroadcastingOp< const Broadcast, const Derived > broadcast(const Broadcast &bcast) const
Definition: TensorBase.h:815
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReductionOp< internal::MaxReducer< CoeffReturnType, NanPropagation >, const Dims, const Derived > maximum(const Dims &dims) const
Definition: TensorBase.h:693
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_bessel_y0_op< Scalar >, const Derived > bessel_y0() const
Definition: TensorBase.h:170
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_sqrt_op< Scalar >, const Derived > sqrt() const
Definition: TensorBase.h:86
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & setRandom()
Definition: TensorBase.h:996
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy y set format x g set format y g set format x2 g set format y2 g set format z g set angles radians set nogrid set key title set key left top Right noreverse box linetype linewidth samplen spacing width set nolabel set noarrow set nologscale set logscale x set set pointsize set encoding default set nopolar set noparametric set set set set surface set nocontour set clabel set mapping cartesian set nohidden3d set cntrparam order set cntrparam linear set cntrparam levels auto set cntrparam points set size set set xzeroaxis lt lw set x2zeroaxis lt lw set yzeroaxis lt lw set y2zeroaxis lt lw set tics in set ticslevel set tics set mxtics default set mytics default set mx2tics default set my2tics default set xtics border mirror norotate autofreq set ytics border mirror norotate autofreq set ztics border nomirror norotate autofreq set nox2tics set noy2tics set timestamp bottom norotate offset
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_boolean_or_op, const Derived, const OtherDerived > operator||(const OtherDerived &other) const
Definition: TensorBase.h:503
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & setRandom()
Definition: TensorBase.h:1000
Namespace containing all symbols from the Eigen library.
Definition: jet.h:637
CleanedUpDerType< DerType >::type() max(const AutoDiffScalar< DerType > &x, const T &y)
Scalar CoeffReturnType
Definition: TensorBase.h:979
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_real_op< Scalar >, const Derived > real() const
Definition: TensorBase.h:334
A cost model used to limit the number of threads used for evaluating tensor expression.
Pseudo expression providing an operator = that will evaluate its argument on the specified computing ...
Definition: TensorDevice.h:27
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorChippingOp< DimId, const Derived > chip(const Index offset) const
Definition: TensorBase.h:1090
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool operator>=(const bfloat16 &a, const bfloat16 &b)
Definition: BFloat16.h:233
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
Definition: NumTraits.h:232
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)
Definition: StaticAssert.h:127
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_bessel_k1_op< Scalar >, const Derived > bessel_k1() const
Definition: TensorBase.h:200
#define isfinite(X)
Definition: main.h:95
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorStridingOp< const Strides, const Derived > stride(const Strides &strides) const
Definition: TensorBase.h:929
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_round_op< Scalar >, const Derived > round() const
Definition: TensorBase.h:429
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReductionOp< internal::SumReducer< CoeffReturnType >, const Dims, const Derived > sum(const Dims &dims) const
Definition: TensorBase.h:657
#define EIGEN_DEFAULT_COPY_CONSTRUCTOR(CLASS)
Definition: Macros.h:1221
#define isinf(X)
Definition: main.h:94
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorIndexTupleOp< const Derived > index_tuples() const
Definition: TensorBase.h:941
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseNullaryOp< internal::UniformRandomGenerator< Scalar >, const Derived > random() const
Definition: TensorBase.h:54
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReductionOp< Reducer, const Dims, const Derived > reduce(const Dims &dims, const Reducer &reducer) const
Definition: TensorBase.h:797
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_abs_op< Scalar >, const Derived > abs() const
Definition: TensorBase.h:308
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
Definition: TensorBase.h:328
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorScanOp< Reducer, const Derived > scan(const Index &axis, const Reducer &reducer, bool exclusive=false) const
Definition: TensorBase.h:650
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorChippingOp< Dynamic, const Derived > chip(const Index offset, const Index dim) const
Definition: TensorBase.h:1101
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorTupleReducerOp< internal::ArgMinTupleReducer< Tuple< Index, CoeffReturnType > >, const array< Index, 1 >, const Derived > argmin(const Index return_dim) const
Definition: TensorBase.h:786
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorGeneratorOp< Generator, const Derived > generate(const Generator &generator) const
Definition: TensorBase.h:66
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & derived()
Definition: TensorBase.h:1169
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReductionOp< internal::OrReducer, const DimensionList< Index, NumDimensions >, const typename internal::conditional< internal::is_same< bool, CoeffReturnType >::value, Derived, TensorConversionOp< bool, const Derived > >::type > any() const
Definition: TensorBase.h:738
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorPaddingOp< const PaddingDimensions, const Derived > pad(const PaddingDimensions &padding) const
Definition: TensorBase.h:914
internal::traits< Derived > DerivedTraits
Definition: TensorBase.h:32
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_bessel_i0e_op< Scalar >, const Derived > bessel_i0e() const
Definition: TensorBase.h:146
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReductionOp< internal::ProdReducer< CoeffReturnType >, const Dims, const Derived > prod(const Dims &dims) const
Definition: TensorBase.h:681
const TensorReductionOp< internal::MaxReducer< CoeffReturnType, NanPropagation >, const DimensionList< Index, NumDimensions >, const Derived > maximum() const
Definition: TensorBase.h:699
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_bessel_k0e_op< Scalar >, const Derived > bessel_k0e() const
Definition: TensorBase.h:194
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_bessel_j1_op< Scalar >, const Derived > bessel_j1() const
Definition: TensorBase.h:176
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorLayoutSwapOp< const Derived > swap_layout() const
Definition: TensorBase.h:1033
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_inverse_op< Scalar >, const Derived > inverse() const
Definition: TensorBase.h:116
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorReshapingOp< const NewDimensions, Derived > reshape(const NewDimensions &newDimensions)
Definition: TensorBase.h:1060
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_igamma_op< Scalar >, const Derived, const OtherDerived > igamma(const OtherDerived &other) const
Definition: TensorBase.h:213
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorChippingOp< Dynamic, Derived > chip(const Index offset, const Index dim)
Definition: TensorBase.h:1106
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReshapingOp< const NewDimensions, const Derived > reshape(const NewDimensions &newDimensions) const
Definition: TensorBase.h:883
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReverseOp< const ReverseDimensions, const Derived > reverse(const ReverseDimensions &rev) const
Definition: TensorBase.h:909
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Derived & derived() const
Definition: TensorBase.h:969
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_square_op< Scalar >, const Derived > square() const
Definition: TensorBase.h:104
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorStridingSlicingOp< const StartIndices, const StopIndices, const Strides, Derived > stridedSlice(const StartIndices &startIndices, const StopIndices &stopIndices, const Strides &strides)
Definition: TensorBase.h:1083
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_floor_op< Scalar >, const Derived > floor() const
Definition: TensorBase.h:447
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReshapingOp< const NewDimensions, const Derived > reshape(const NewDimensions &newDimensions) const
Definition: TensorBase.h:1055
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorShufflingOp< const Shuffle, const Derived > shuffle(const Shuffle &shfl) const
Definition: TensorBase.h:1123
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & operator=(const OtherDerived &other)
Definition: TensorBase.h:1160
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_min_op< Scalar, Scalar, NaNPropagation >, const Derived, const OtherDerived > cwiseMin(const OtherDerived &other) const
Definition: TensorBase.h:491
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorPaddingOp< const PaddingDimensions, const Derived > pad(const PaddingDimensions &padding, const Scalar padding_value) const
Definition: TensorBase.h:919
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReductionOp< internal::OrReducer, const Dims, const typename internal::conditional< internal::is_same< bool, CoeffReturnType >::value, Derived, TensorConversionOp< bool, const Derived > >::type > any(const Dims &dims) const
Definition: TensorBase.h:732
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCustomUnaryOp< const CustomUnaryFunc, const Derived > customOp(const CustomUnaryFunc &op) const
Definition: TensorBase.h:948
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorTupleReducerOp< internal::ArgMinTupleReducer< Tuple< Index, CoeffReturnType > >, const array< Index, NumDimensions >, const Derived > argmin() const
Definition: TensorBase.h:760
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorFFTOp< const FFT, const Derived, FFTDataType, FFTDirection > fft(const FFT &dims) const
Definition: TensorBase.h:628
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCustomBinaryOp< const CustomBinaryFunc, const Derived, const OtherDerived > customOp(const OtherDerived &other, const CustomBinaryFunc &op) const
Definition: TensorBase.h:953
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_quotient_op< Scalar >, const Derived, const OtherDerived > operator/(const OtherDerived &other) const
Definition: TensorBase.h:479
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReductionOp< internal::AndReducer, const Dims, const typename internal::conditional< internal::is_same< bool, CoeffReturnType >::value, Derived, TensorConversionOp< bool, const Derived > >::type > all(const Dims &dims) const
Definition: TensorBase.h:719
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorPatchOp< const PatchDims, const Derived > extract_patches(const PatchDims &patch_dims) const
Definition: TensorBase.h:827
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_logistic_op< Scalar >, const Derived > sigmoid() const
Definition: TensorBase.h:272
TensorBase< Derived, ReadOnlyAccessors > Base
Definition: TensorBase.h:975
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & setConstant(const Scalar &val)
Definition: TensorBase.h:992
DerivedTraits::Scalar Scalar
Definition: TensorBase.h:977
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool operator<=(const bfloat16 &a, const bfloat16 &b)
Definition: BFloat16.h:227
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorConcatenationOp< Axis, const Derived, const OtherDerived > concatenate(const OtherDerived &other, Axis axis) const
Definition: TensorBase.h:821
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_bessel_i1_op< Scalar >, const Derived > bessel_i1() const
Definition: TensorBase.h:152
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseBinaryOp< internal::scalar_quotient_op< Scalar, typename OtherDerived::Scalar >, const Derived, const OtherDerived > operator/(const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorSlicingOp< const StartIndices, const Sizes, Derived > slice(const StartIndices &startIndices, const Sizes &sizes)
Definition: TensorBase.h:1071
EIGEN_ALWAYS_INLINE DSizes< IndexType, NumDims > strides(const DSizes< IndexType, NumDims > &dimensions)
Definition: TensorBlock.h:26
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
Definition: TensorBase.h:537
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_bessel_j0_op< Scalar >, const Derived > bessel_j0() const
Definition: TensorBase.h:164
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_log_op< Scalar >, const Derived > log() const
Definition: TensorBase.h:290
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
Definition: TensorBase.h:893
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorLayoutSwapOp< const Derived > swap_layout() const
Definition: TensorBase.h:878
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_product_op< Scalar >, const Derived, const OtherDerived > operator*(const OtherDerived &other) const
Definition: TensorBase.h:473
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReductionOp< internal::MeanReducer< CoeffReturnType >, const Dims, const Derived > mean(const Dims &dims) const
Definition: TensorBase.h:669
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_igamma_der_a_op< Scalar >, const Derived, const OtherDerived > igamma_der_a(const OtherDerived &other) const
Definition: TensorBase.h:220
Tensor conversion class. This class makes it possible to vectorize type casting operations when the n...
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_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseNullaryOp< internal::scalar_constant_op< Scalar >, const Derived > constant(const Scalar &value) const
Definition: TensorBase.h:48
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_boolean_xor_op, const Derived, const OtherDerived > operator^(const OtherDerived &other) const
Definition: TensorBase.h:509
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorSelectOp< const Derived, const ThenDerived, const ElseDerived > select(const ThenDerived &thenTensor, const ElseDerived &elseTensor) const
Definition: TensorBase.h:599
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_expm1_op< Scalar >, const Derived > expm1() const
Definition: TensorBase.h:284
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorTupleReducerOp< internal::ArgMaxTupleReducer< Tuple< Index, CoeffReturnType > >, const array< Index, NumDimensions >, const Derived > argmax() const
Definition: TensorBase.h:747
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorShufflingOp< const Shuffle, const Derived > shuffle(const Shuffle &shfl) const
Definition: TensorBase.h:924
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorContractionOp< const Dimensions, const Derived, const OtherDerived, const NoOpOutputKernel > contract(const OtherDerived &other, const Dimensions &dims) const
Definition: TensorBase.h:608
TensorDevice< Derived, DeviceType > device(const DeviceType &dev)
Definition: TensorBase.h:1145
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorLayoutSwapOp< Derived > swap_layout()
Definition: TensorBase.h:1038
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorSlicingOp< const StartIndices, const Sizes, const Derived > slice(const StartIndices &startIndices, const Sizes &sizes) const
Definition: TensorBase.h:1066
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const internal::conditional< NumTraits< CoeffReturnType >::IsComplex, TensorCwiseUnaryOp< internal::scalar_conjugate_op< Scalar >, const Derived >, Derived >::type conjugate() const
Definition: TensorBase.h:322
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorShufflingOp< const Shuffle, Derived > shuffle(const Shuffle &shfl)
Definition: TensorBase.h:1128
Signature operator%(const DiscreteKey &key, const string &parent)
Definition: Signature.cpp:134
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_erf_op< Scalar >, const Derived > erf() const
Definition: TensorBase.h:254
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_polygamma_op< Scalar >, const Derived, const OtherDerived > polygamma(const OtherDerived &other) const
Definition: TensorBase.h:248
const TensorReductionOp< internal::MinReducer< CoeffReturnType, NanPropagation >, const DimensionList< Index, NumDimensions >, const Derived > minimum() const
Definition: TensorBase.h:712
EIGEN_DEVICE_FUNC const Product< MatrixDerived, PermutationDerived, AliasFreeProduct > operator*(const MatrixBase< MatrixDerived > &matrix, const PermutationBase< PermutationDerived > &permutation)
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
Definition: TensorBase.h:1134
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & operator+=(const OtherDerived &other)
Definition: TensorBase.h:1015
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
Definition: TensorBase.h:833
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
Definition: TensorBase.h:565
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_cube_op< Scalar >, const Derived > cube() const
Definition: TensorBase.h:110
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorConvolutionOp< const Dimensions, const Derived, const KernelDerived > convolve(const KernelDerived &kernel, const Dimensions &dims) const
Definition: TensorBase.h:621
TensorScanOp< internal::ProdReducer< CoeffReturnType >, const Derived > TensorScanProdOp
Definition: TensorBase.h:640
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseNullaryOp< RandomGenerator, const Derived > random(const RandomGenerator &gen=RandomGenerator()) const
Definition: TensorBase.h:59
CleanedUpDerType< DerType >::type() min(const AutoDiffScalar< DerType > &x, const T &y)
The tensor base class.
Definition: TensorBase.h:973
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:976
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_log1p_op< Scalar >, const Derived > log1p() const
Definition: TensorBase.h:296
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorForcedEvalOp< const Derived > eval() const
Definition: TensorBase.h:959
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
Definition: TensorBase.h:570
int func(const int &a)
Definition: testDSF.cpp:221
Pseudo expression providing an operator = that will evaluate its argument asynchronously on the speci...
Definition: TensorDevice.h:83
internal::remove_const< Scalar >::type CoeffReturnType
Definition: TensorBase.h:35
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool operator>(const bfloat16 &a, const bfloat16 &b)
Definition: BFloat16.h:230
TensorScanOp< internal::SumReducer< CoeffReturnType >, const Derived > TensorScanSumOp
Definition: TensorBase.h:633
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorInflationOp< const Strides, const Derived > inflate(const Strides &strides) const
Definition: TensorBase.h:934
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorScanProdOp cumprod(const Index &axis, bool exclusive=false) const
Definition: TensorBase.h:643
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_digamma_op< Scalar >, const Derived > digamma() const
Definition: TensorBase.h:134
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_bessel_i1e_op< Scalar >, const Derived > bessel_i1e() const
Definition: TensorBase.h:158
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_opposite_op< Scalar >, const Derived > operator-() const
Definition: TensorBase.h:80
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_zeta_op< Scalar >, const Derived, const OtherDerived > zeta(const OtherDerived &other) const
Definition: TensorBase.h:241
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_ceil_op< Scalar >, const Derived > ceil() const
Definition: TensorBase.h:441
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_erfc_op< Scalar >, const Derived > erfc() const
Definition: TensorBase.h:260
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_exp_op< Scalar >, const Derived > exp() const
Definition: TensorBase.h:278
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReductionOp< internal::AndReducer, const DimensionList< Index, NumDimensions >, const typename internal::conditional< internal::is_same< bool, CoeffReturnType >::value, Derived, TensorConversionOp< bool, const Derived > >::type > all() const
Definition: TensorBase.h:725
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
Definition: TensorBase.h:857
EIGEN_DEVICE_FUNC const CwiseUnaryOp< CustomUnaryOp, const Derived > unaryExpr(const CustomUnaryOp &func=CustomUnaryOp()) const
Apply a unary operator coefficient-wise.
#define EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(Derived)
Definition: Macros.h:1247
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const internal::conditional< internal::is_same< NewType, CoeffReturnType >::value, Derived, TensorConversionOp< NewType, const Derived > >::type cast() const
Definition: TensorBase.h:423
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_bessel_k0_op< Scalar >, const Derived > bessel_k0() const
Definition: TensorBase.h:188
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_bessel_k1e_op< Scalar >, const Derived > bessel_k1e() const
Definition: TensorBase.h:206
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorSlicingOp< const StartIndices, const Sizes, const Derived > slice(const StartIndices &startIndices, const Sizes &sizes) const
Definition: TensorBase.h:888
DerivedTraits::Index Index
Definition: TensorBase.h:978
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReverseOp< const ReverseDimensions, const Derived > reverse(const ReverseDimensions &rev) const
Definition: TensorBase.h:1112
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
Definition: TensorBase.h:526
internal::nested_eval< T, 1 >::type eval(const T &xpr)
const TensorTraceOp< const DimensionList< Index, NumDimensions >, const Derived > trace() const
Definition: TensorBase.h:808
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
Definition: TensorBase.h:575
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorStridingOp< const Strides, Derived > stride(const Strides &strides)
Definition: TensorBase.h:1139
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_igammac_op< Scalar >, const Derived, const OtherDerived > igammac(const OtherDerived &other) const
Definition: TensorBase.h:234
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_max_op< Scalar, Scalar, NaNPropagation >, const Derived, const OtherDerived > cwiseMax(const OtherDerived &other) const
Definition: TensorBase.h:485
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_lgamma_op< Scalar >, const Derived > lgamma() const
Definition: TensorBase.h:128
EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator!=(const Tuple< U, V > &x, const Tuple< U, V > &y)
Definition: TensorMeta.h:241
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_clamp_op< Scalar >, const Derived > clip(Scalar min, Scalar max) const
Definition: TensorBase.h:314
Tensor concatenation class.
internal::traits< Derived > DerivedTraits
Definition: TensorBase.h:976
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorReverseOp< const ReverseDimensions, Derived > reverse(const ReverseDimensions &rev)
Definition: TensorBase.h:1117
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_bessel_y1_op< Scalar >, const Derived > bessel_y1() const
Definition: TensorBase.h:182
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_tanh_op< Scalar >, const Derived > tanh() const
Definition: TensorBase.h:122
static const int NumDimensions
Definition: TensorBase.h:980
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< CustomBinaryOp, const Derived, const OtherDerived > binaryExpr(const OtherDerived &other, const CustomBinaryOp &func) const
Definition: TensorBase.h:454
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_log2_op< Scalar >, const Derived > log2() const
Definition: TensorBase.h:302
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_rint_op< Scalar >, const Derived > rint() const
Definition: TensorBase.h:435
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(const Expression &expr, const Device &device=Device())
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & setZero()
Definition: TensorBase.h:988
The tensor class.
Definition: Tensor.h:63
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
Definition: TensorBase.h:843
#define isnan(X)
Definition: main.h:93
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
Definition: TensorBase.h:543
Definition: pytypes.h:1370
TensorAsyncDevice< Derived, DeviceType, DoneCallback > device(const DeviceType &dev, DoneCallback done)
Definition: TensorBase.h:1151
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorChippingOp< Dynamic, const Derived > chip(const Index offset, const Index dim) const
Definition: TensorBase.h:904
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_ndtri_op< Scalar >, const Derived > ndtri() const
Definition: TensorBase.h:266


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:36:41