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 // IWYU pragma: private
16 #include "./InternalHeaderCheck.h"
17 
18 namespace Eigen {
19 
28 #ifndef EIGEN_PARSED_BY_DOXYGEN
29 // FIXME Doxygen does not like the inheritance with different template parameters
30 // Since there is no doxygen documentation inside, we disable it for now
31 template<typename Derived>
33 {
34  public:
36  typedef typename DerivedTraits::Scalar Scalar;
37  typedef typename DerivedTraits::Index Index;
38  typedef std::remove_const_t<Scalar> CoeffReturnType;
39  static constexpr int NumDimensions = DerivedTraits::NumDimensions;
40 
41  // Generic nullary operation support.
42  template <typename CustomNullaryOp> EIGEN_DEVICE_FUNC
44  nullaryExpr(const CustomNullaryOp& func) const {
46  }
47 
48  // Coefficient-wise nullary operators
51  constant(const Scalar& value) const {
52  return nullaryExpr(internal::scalar_constant_op<Scalar>(value));
53  }
54 
57  random() const {
58  return nullaryExpr(internal::UniformRandomGenerator<Scalar>());
59  }
60  template <typename RandomGenerator> EIGEN_DEVICE_FUNC
62  random(const RandomGenerator& gen = RandomGenerator()) const {
63  return nullaryExpr(gen);
64  }
65 
66  // Tensor generation
67  template <typename Generator> EIGEN_DEVICE_FUNC
69  generate(const Generator& generator) const {
71  }
72 
73  // Generic unary operation support.
74  template <typename CustomUnaryOp> EIGEN_DEVICE_FUNC
76  unaryExpr(const CustomUnaryOp& func) const {
78  }
79 
80  // Coefficient-wise unary operators
83  operator-() const {
84  return unaryExpr(internal::scalar_opposite_op<Scalar>());
85  }
86 
89  sqrt() const {
90  return unaryExpr(internal::scalar_sqrt_op<Scalar>());
91  }
92 
95  sign() const {
96  return unaryExpr(internal::scalar_sign_op<Scalar>());
97  }
98 
101  rsqrt() const {
102  return unaryExpr(internal::scalar_rsqrt_op<Scalar>());
103  }
104 
107  square() const {
108  return unaryExpr(internal::scalar_square_op<Scalar>());
109  }
110 
113  cube() const {
114  return unaryExpr(internal::scalar_cube_op<Scalar>());
115  }
116 
119  inverse() const {
120  return unaryExpr(internal::scalar_inverse_op<Scalar>());
121  }
122 
125  tanh() const {
126  return unaryExpr(internal::scalar_tanh_op<Scalar>());
127  }
128 
131  lgamma() const {
132  return unaryExpr(internal::scalar_lgamma_op<Scalar>());
133  }
134 
137  digamma() const {
138  return unaryExpr(internal::scalar_digamma_op<Scalar>());
139  }
140 
143  bessel_i0() const {
144  return unaryExpr(internal::scalar_bessel_i0_op<Scalar>());
145  }
146 
149  bessel_i0e() const {
150  return unaryExpr(internal::scalar_bessel_i0e_op<Scalar>());
151  }
152 
155  bessel_i1() const {
156  return unaryExpr(internal::scalar_bessel_i1_op<Scalar>());
157  }
158 
161  bessel_i1e() const {
162  return unaryExpr(internal::scalar_bessel_i1e_op<Scalar>());
163  }
164 
167  bessel_j0() const {
168  return unaryExpr(internal::scalar_bessel_j0_op<Scalar>());
169  }
170 
173  bessel_y0() const {
174  return unaryExpr(internal::scalar_bessel_y0_op<Scalar>());
175  }
176 
179  bessel_j1() const {
180  return unaryExpr(internal::scalar_bessel_j1_op<Scalar>());
181  }
182 
185  bessel_y1() const {
186  return unaryExpr(internal::scalar_bessel_y1_op<Scalar>());
187  }
188 
191  bessel_k0() const {
192  return unaryExpr(internal::scalar_bessel_k0_op<Scalar>());
193  }
194 
197  bessel_k0e() const {
198  return unaryExpr(internal::scalar_bessel_k0e_op<Scalar>());
199  }
200 
203  bessel_k1() const {
204  return unaryExpr(internal::scalar_bessel_k1_op<Scalar>());
205  }
206 
209  bessel_k1e() const {
210  return unaryExpr(internal::scalar_bessel_k1e_op<Scalar>());
211  }
212 
213  // igamma(a = this, x = other)
214  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
215  const TensorCwiseBinaryOp<internal::scalar_igamma_op<Scalar>, const Derived, const OtherDerived>
216  igamma(const OtherDerived& other) const {
217  return binaryExpr(other.derived(), internal::scalar_igamma_op<Scalar>());
218  }
219 
220  // igamma_der_a(a = this, x = other)
221  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
222  const TensorCwiseBinaryOp<internal::scalar_igamma_der_a_op<Scalar>, const Derived, const OtherDerived>
223  igamma_der_a(const OtherDerived& other) const {
224  return binaryExpr(other.derived(), internal::scalar_igamma_der_a_op<Scalar>());
225  }
226 
227  // gamma_sample_der_alpha(alpha = this, sample = other)
228  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
229  const TensorCwiseBinaryOp<internal::scalar_gamma_sample_der_alpha_op<Scalar>, const Derived, const OtherDerived>
230  gamma_sample_der_alpha(const OtherDerived& other) const {
231  return binaryExpr(other.derived(), internal::scalar_gamma_sample_der_alpha_op<Scalar>());
232  }
233 
234  // igammac(a = this, x = other)
235  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
236  const TensorCwiseBinaryOp<internal::scalar_igammac_op<Scalar>, const Derived, const OtherDerived>
237  igammac(const OtherDerived& other) const {
238  return binaryExpr(other.derived(), internal::scalar_igammac_op<Scalar>());
239  }
240 
241  // zeta(x = this, q = other)
242  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
243  const TensorCwiseBinaryOp<internal::scalar_zeta_op<Scalar>, const Derived, const OtherDerived>
244  zeta(const OtherDerived& other) const {
245  return binaryExpr(other.derived(), internal::scalar_zeta_op<Scalar>());
246  }
247 
248  // polygamma(n = this, x = other)
249  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
250  const TensorCwiseBinaryOp<internal::scalar_polygamma_op<Scalar>, const Derived, const OtherDerived>
251  polygamma(const OtherDerived& other) const {
252  return binaryExpr(other.derived(), internal::scalar_polygamma_op<Scalar>());
253  }
254 
257  erf() const {
258  return unaryExpr(internal::scalar_erf_op<Scalar>());
259  }
260 
263  erfc() const {
264  return unaryExpr(internal::scalar_erfc_op<Scalar>());
265  }
266 
269  ndtri() const {
270  return unaryExpr(internal::scalar_ndtri_op<Scalar>());
271  }
272 
275  sigmoid() const {
276  return unaryExpr(internal::scalar_logistic_op<Scalar>());
277  }
278 
281  exp() const {
282  return unaryExpr(internal::scalar_exp_op<Scalar>());
283  }
284 
287  expm1() const {
288  return unaryExpr(internal::scalar_expm1_op<Scalar>());
289  }
290 
293  log() const {
294  return unaryExpr(internal::scalar_log_op<Scalar>());
295  }
296 
299  log1p() const {
300  return unaryExpr(internal::scalar_log1p_op<Scalar>());
301  }
302 
305  log2() const {
306  return unaryExpr(internal::scalar_log2_op<Scalar>());
307  }
308 
311  abs() const {
312  return unaryExpr(internal::scalar_abs_op<Scalar>());
313  }
314 
317  arg() const {
318  return unaryExpr(internal::scalar_arg_op<Scalar>());
319  }
320 
324  return unaryExpr(internal::scalar_clamp_op<Scalar>(min, max));
325  }
326 
330  Derived>
331  conjugate() const {
333  }
334 
335  template<typename ScalarExponent>
338  pow(ScalarExponent exponent) const
339  {
340  return unaryExpr(internal::scalar_unary_pow_op<Scalar, ScalarExponent>(exponent));
341  }
342 
345  real() const {
346  return unaryExpr(internal::scalar_real_op<Scalar>());
347  }
348 
351  imag() const {
352  return unaryExpr(internal::scalar_imag_op<Scalar>());
353  }
354 
357  operator+ (Scalar rhs) const {
359  }
360 
362  EIGEN_STRONG_INLINE friend
364  operator+ (Scalar lhs, const Derived& rhs) {
365  return rhs.unaryExpr(internal::bind1st_op<internal::scalar_sum_op<Scalar> >(lhs));
366  }
367 
370  operator- (Scalar rhs) const {
371  EIGEN_STATIC_ASSERT((NumTraits<Scalar>::IsSigned || internal::is_same<Scalar, const std::complex<float> >::value), YOU_MADE_A_PROGRAMMING_MISTAKE);
373  }
374 
376  EIGEN_STRONG_INLINE friend
378  operator- (Scalar lhs, const Derived& rhs) {
380  }
381 
384  operator* (Scalar rhs) const {
386  }
387 
389  EIGEN_STRONG_INLINE friend
391  operator* (Scalar lhs, const Derived& rhs) {
392  return rhs.unaryExpr(internal::bind1st_op<internal::scalar_product_op<Scalar> >(lhs));
393  }
394 
397  operator/ (Scalar rhs) const {
399  }
400 
402  EIGEN_STRONG_INLINE friend
404  operator/ (Scalar lhs, const Derived& rhs) {
405  return rhs.unaryExpr(internal::bind1st_op<internal::scalar_quotient_op<Scalar> >(lhs));
406  }
407 
410  operator% (Scalar rhs) const {
411  EIGEN_STATIC_ASSERT(NumTraits<Scalar>::IsInteger, YOU_MADE_A_PROGRAMMING_MISTAKE_TRY_MOD);
412  return unaryExpr(internal::scalar_mod_op<Scalar>(rhs));
413  }
414 
415  template <int NanPropagation=PropagateFast>
418  cwiseMax(Scalar threshold) const {
419  return cwiseMax<NanPropagation>(constant(threshold));
420  }
421 
422  template <int NanPropagation=PropagateFast>
425  cwiseMin(Scalar threshold) const {
426  return cwiseMin<NanPropagation>(constant(threshold));
427  }
428 
429  template<typename NewType>
432  Derived,
434  cast() const {
436  }
437 
440  round() const {
441  return unaryExpr(internal::scalar_round_op<Scalar>());
442  }
443 
446  rint() const {
447  return unaryExpr(internal::scalar_rint_op<Scalar>());
448  }
449 
452  ceil() const {
453  return unaryExpr(internal::scalar_ceil_op<Scalar>());
454  }
455 
458  floor() const {
459  return unaryExpr(internal::scalar_floor_op<Scalar>());
460  }
461 
462  // Generic binary operation support.
463  template <typename CustomBinaryOp, typename OtherDerived> EIGEN_DEVICE_FUNC
465  binaryExpr(const OtherDerived& other, const CustomBinaryOp& func) const {
467  }
468 
469  // Coefficient-wise binary operators.
470  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
471  const TensorCwiseBinaryOp<internal::scalar_sum_op<Scalar>, const Derived, const OtherDerived>
472  operator+(const OtherDerived& other) const {
473  return binaryExpr(other.derived(), internal::scalar_sum_op<Scalar>());
474  }
475 
476  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
477  const TensorCwiseBinaryOp<internal::scalar_difference_op<Scalar>, const Derived, const OtherDerived>
478  operator-(const OtherDerived& other) const {
479  return binaryExpr(other.derived(), internal::scalar_difference_op<Scalar>());
480  }
481 
482  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
483  const TensorCwiseBinaryOp<internal::scalar_product_op<Scalar>, const Derived, const OtherDerived>
484  operator*(const OtherDerived& other) const {
485  return binaryExpr(other.derived(), internal::scalar_product_op<Scalar>());
486  }
487 
488  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
489  const TensorCwiseBinaryOp<internal::scalar_quotient_op<Scalar>, const Derived, const OtherDerived>
490  operator/(const OtherDerived& other) const {
491  return binaryExpr(other.derived(), internal::scalar_quotient_op<Scalar>());
492  }
493 
494  template<int NaNPropagation=PropagateFast, typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
496  cwiseMax(const OtherDerived& other) const {
497  return binaryExpr(other.derived(), internal::scalar_max_op<Scalar,Scalar, NaNPropagation>());
498  }
499 
500  template<int NaNPropagation=PropagateFast, typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
502  cwiseMin(const OtherDerived& other) const {
503  return binaryExpr(other.derived(), internal::scalar_min_op<Scalar,Scalar, NaNPropagation>());
504  }
505 
506  // logical operators
507  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
508  const TensorCwiseBinaryOp<internal::scalar_boolean_and_op<Scalar>, const Derived, const OtherDerived>
509  operator&&(const OtherDerived& other) const {
510  return binaryExpr(other.derived(), internal::scalar_boolean_and_op<Scalar>());
511  }
512 
513  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
514  const TensorCwiseBinaryOp<internal::scalar_boolean_or_op<Scalar>, const Derived, const OtherDerived>
515  operator||(const OtherDerived& other) const {
516  return binaryExpr(other.derived(), internal::scalar_boolean_or_op<Scalar>());
517  }
518 
519  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
520  const TensorCwiseBinaryOp<internal::scalar_bitwise_and_op<Scalar>, const Derived, const OtherDerived>
521  operator&(const OtherDerived& other) const {
522  return binaryExpr(other.derived(), internal::scalar_bitwise_and_op<Scalar>());
523  }
524 
525  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
526  const TensorCwiseBinaryOp<internal::scalar_bitwise_or_op<Scalar>, const Derived, const OtherDerived>
527  operator|(const OtherDerived& other) const {
528  return binaryExpr(other.derived(), internal::scalar_bitwise_or_op<Scalar>());
529  }
530 
531  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
532  const TensorCwiseBinaryOp<internal::scalar_bitwise_xor_op<Scalar>, const Derived, const OtherDerived>
533  operator^(const OtherDerived& other) const {
534  return binaryExpr(other.derived(), internal::scalar_bitwise_xor_op<Scalar>());
535  }
536 
539  operator!() const {
540  return unaryExpr(internal::scalar_boolean_not_op<Scalar>());
541  }
542 
545  operator~() const {
546  return unaryExpr(internal::scalar_bitwise_not_op<Scalar>());
547  }
548 
549  // Comparisons and tests.
550  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
554  }
555  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
559  }
560  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
564  }
565  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
569  }
570 
571  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
575  }
576 
577  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
581  }
582 
583  // comparisons and tests for Scalars
586  operator<(Scalar threshold) const {
587  return operator<(constant(threshold));
588  }
591  operator<=(Scalar threshold) const {
592  return operator<=(constant(threshold));
593  }
596  operator>(Scalar threshold) const {
597  return operator>(constant(threshold));
598  }
601  operator>=(Scalar threshold) const {
602  return operator>=(constant(threshold));
603  }
606  operator==(Scalar threshold) const {
607  return operator==(constant(threshold));
608  }
611  operator!=(Scalar threshold) const {
612  return operator!=(constant(threshold));
613  }
614 
615  // Predicates.
618  (isnan)() const {
619  return unaryExpr(internal::scalar_isnan_op<Scalar, true>()).template cast<bool>();
620  }
623  (isinf)() const {
624  return unaryExpr(internal::scalar_isinf_op<Scalar, true>()).template cast<bool>();
625  }
628  (isfinite)() const {
629  return unaryExpr(internal::scalar_isfinite_op<Scalar, true>()).template cast<bool>();
630  }
631 
632  // Coefficient-wise ternary operators.
633  template<typename ThenDerived, typename ElseDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
635  select(const ThenDerived& thenTensor, const ElseDerived& elseTensor) const {
636  return TensorSelectOp<const Derived, const ThenDerived, const ElseDerived>(derived(), thenTensor.derived(), elseTensor.derived());
637  }
638 
639  // Contractions.
641 
642  template<typename OtherDerived, typename Dimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
644  contract(const OtherDerived& other, const Dimensions& dims) const {
646  }
647 
648  template<typename OtherDerived, typename Dimensions, typename OutputKernel> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
650  contract(const OtherDerived& other, const Dimensions& dims, const OutputKernel& output_kernel) const {
652  }
653 
654  // Convolutions.
655  template<typename KernelDerived, typename Dimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
657  convolve(const KernelDerived& kernel, const Dimensions& dims) const {
659  }
660 
661  // Fourier transforms
662  template <int FFTDataType, int FFTDirection, typename FFT> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
664  fft(const FFT& dims) const {
666  }
667 
668  // Scan.
671  const TensorScanSumOp
672  cumsum(const Index& axis, bool exclusive = false) const {
673  return TensorScanSumOp(derived(), axis, exclusive);
674  }
675 
678  const TensorScanProdOp
679  cumprod(const Index& axis, bool exclusive = false) const {
680  return TensorScanProdOp(derived(), axis, exclusive);
681  }
682 
683  template <typename Reducer>
686  scan(const Index& axis, const Reducer& reducer, bool exclusive = false) const {
687  return TensorScanOp<Reducer, const Derived>(derived(), axis, exclusive, reducer);
688  }
689 
690  // Reductions.
691  template <typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
692  const TensorReductionOp<internal::SumReducer<CoeffReturnType>, const Dims, const Derived>
693  sum(const Dims& dims) const {
695  }
696 
698  sum() const {
701  }
702 
703  template <typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
704  const TensorReductionOp<internal::MeanReducer<CoeffReturnType>, const Dims, const Derived>
705  mean(const Dims& dims) const {
707  }
708 
710  mean() const {
713  }
714 
715  template <typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
716  const TensorReductionOp<internal::ProdReducer<CoeffReturnType>, const Dims, const Derived>
717  prod(const Dims& dims) const {
719  }
720 
722  prod() const {
725  }
726 
727  template <typename Dims,int NanPropagation=PropagateFast> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
729  maximum(const Dims& dims) const {
731  }
732 
733  template <int NanPropagation=PropagateFast>
735  maximum() const {
738  }
739 
740  template <typename Dims,int NanPropagation=PropagateFast> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
742  minimum(const Dims& dims) const {
744  }
745 
746  template <int NanPropagation=PropagateFast>
748  minimum() const {
751  }
752 
753  template <typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
755  all(const Dims& dims) const {
756  return cast<bool>().reduce(dims, internal::AndReducer());
757  }
758 
761  all() const {
763  return cast<bool>().reduce(in_dims, internal::AndReducer());
764  }
765 
766  template <typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
768  any(const Dims& dims) const {
769  return cast<bool>().reduce(dims, internal::OrReducer());
770  }
771 
774  any() const {
776  return cast<bool>().reduce(in_dims, internal::OrReducer());
777  }
778 
780  const TensorPairReducerOp<
782  const array<Index, NumDimensions>, const Derived>
783  argmax() const {
785  for (Index d = 0; d < NumDimensions; ++d) in_dims[d] = d;
786  return TensorPairReducerOp<
789  const Derived>(derived(), internal::ArgMaxPairReducer<Pair<Index, CoeffReturnType> >(), -1, in_dims);
790  }
791 
793  const TensorPairReducerOp<
795  const array<Index, NumDimensions>, const Derived>
796  argmin() const {
798  for (Index d = 0; d < NumDimensions; ++d) in_dims[d] = d;
799  return TensorPairReducerOp<
802  const Derived>(derived(), internal::ArgMinPairReducer<Pair<Index, CoeffReturnType> >(), -1, in_dims);
803  }
804 
806  const TensorPairReducerOp<
808  const array<Index, 1>, const Derived>
809  argmax(const Index return_dim) const {
810  array<Index, 1> in_dims;
811  in_dims[0] = return_dim;
812  return TensorPairReducerOp<
814  const array<Index, 1>,
815  const Derived>(derived(), internal::ArgMaxPairReducer<Pair<Index, CoeffReturnType> >(), return_dim, in_dims);
816  }
817 
819  const TensorPairReducerOp<
821  const array<Index, 1>, const Derived>
822  argmin(const Index return_dim) const {
823  array<Index, 1> in_dims;
824  in_dims[0] = return_dim;
825  return TensorPairReducerOp<
827  const array<Index, 1>,
828  const Derived>(derived(), internal::ArgMinPairReducer<Pair<Index, CoeffReturnType> >(), return_dim, in_dims);
829  }
830 
831  template <typename Reducer, typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
833  reduce(const Dims& dims, const Reducer& reducer) const {
835  }
836 
837  template <typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
839  trace(const Dims& dims) const {
841  }
842 
844  trace() const {
846  return TensorTraceOp<const DimensionList<Index, NumDimensions>, const Derived>(derived(), in_dims);
847  }
848 
849  template <typename Broadcast> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
851  broadcast(const Broadcast& bcast) const {
853  }
854 
855  template <typename Axis, typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
857  concatenate(const OtherDerived& other, Axis axis) const {
859  }
860 
861  template <typename PatchDims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
863  extract_patches(const PatchDims& patch_dims) const {
865  }
866 
869  extract_image_patches(const Index patch_rows = 1, const Index patch_cols = 1,
870  const Index row_stride = 1, const Index col_stride = 1,
871  const Index in_row_stride = 1, const Index in_col_stride = 1,
872  const PaddingType padding_type = PADDING_SAME, const Scalar padding_value = Scalar(0)) const {
873  return TensorImagePatchOp<Dynamic, Dynamic, const Derived>(derived(), patch_rows, patch_cols, row_stride, col_stride,
874  in_row_stride, in_col_stride, 1, 1, padding_type, padding_value);
875  }
876 
879  extract_image_patches(const Index patch_rows, const Index patch_cols,
880  const Index row_stride, const Index col_stride,
881  const Index in_row_stride, const Index in_col_stride,
882  const Index row_inflate_stride, const Index col_inflate_stride,
883  const Index padding_top, const Index padding_bottom,
884  const Index padding_left,const Index padding_right,
885  const Scalar padding_value) const {
886  return TensorImagePatchOp<Dynamic, Dynamic, const Derived>(derived(), patch_rows, patch_cols, row_stride, col_stride,
887  in_row_stride, in_col_stride, row_inflate_stride, col_inflate_stride,
888  padding_top, padding_bottom, padding_left, padding_right, padding_value);
889  }
890 
893  extract_volume_patches(const Index patch_planes, const Index patch_rows, const Index patch_cols,
894  const Index plane_stride = 1, const Index row_stride = 1, const Index col_stride = 1,
895  const PaddingType padding_type = PADDING_SAME, const Scalar padding_value = Scalar(0)) const {
896  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);
897  }
898 
899 
902  extract_volume_patches(const Index patch_planes, const Index patch_rows, const Index patch_cols,
903  const Index plane_stride, const Index row_stride, const Index col_stride,
904  const Index plane_inflate_stride, const Index row_inflate_stride, const Index col_inflate_stride,
905  const Index padding_top_z, const Index padding_bottom_z,
906  const Index padding_top, const Index padding_bottom,
907  const Index padding_left, const Index padding_right, const Scalar padding_value = Scalar(0)) const {
908  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);
909  }
910 
911  // Morphing operators.
914  swap_layout() const {
916  }
917  template <typename NewDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
919  reshape(const NewDimensions& newDimensions) const {
921  }
922  template <typename StartIndices, typename Sizes> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
924  slice(const StartIndices& startIndices, const Sizes& sizes) const {
926  }
927  template <typename StartIndices, typename StopIndices, typename Strides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
929  stridedSlice(const StartIndices& startIndices, const StopIndices& stopIndices, const Strides& strides) const {
930  return TensorStridingSlicingOp<const StartIndices, const StopIndices, const Strides,
931  const Derived>(derived(), startIndices, stopIndices, strides);
932  }
933  template <Index DimId> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
935  chip(const Index offset) const {
936  EIGEN_STATIC_ASSERT(DimId < Derived::NumDimensions && DimId >= 0, Chip_Dim_out_of_range)
937  return TensorChippingOp<DimId, const Derived>(derived(), offset, DimId);
938  }
941  chip(const Index offset, const Index dim) const {
942  return TensorChippingOp<Dynamic, const Derived>(derived(), offset, dim);
943  }
944  template <typename ReverseDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
946  reverse(const ReverseDimensions& rev) const {
948  }
949  template <typename Rolls> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
951  roll(const Rolls& rolls) const {
953  }
954  template <typename PaddingDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
956  pad(const PaddingDimensions& padding) const {
958  }
959  template <typename PaddingDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
961  pad(const PaddingDimensions& padding, const Scalar padding_value) const {
962  return TensorPaddingOp<const PaddingDimensions, const Derived>(derived(), padding, padding_value);
963  }
964  template <typename Shuffle> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
966  shuffle(const Shuffle& shfl) const {
968  }
969  template <typename Strides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
971  stride(const Strides& strides) const {
973  }
974  template <typename Strides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
976  inflate(const Strides& strides) const {
978  }
979 
980  // Returns a tensor containing index/value pairs
983  index_pairs() const {
985  }
986 
987  // Support for custom unary and binary operations
988  template <typename CustomUnaryFunc>
992  }
993  template <typename OtherDerived, typename CustomBinaryFunc>
995  const TensorCustomBinaryOp<const CustomBinaryFunc, const Derived, const OtherDerived> customOp(const OtherDerived& other, const CustomBinaryFunc& op) const {
997  }
998 
999  // Force the evaluation of the expression.
1003  }
1004 
1005  // Returns a formatted tensor ready for printing to a stream
1006  template<typename Format>
1009  }
1010 
1011  #ifdef EIGEN_READONLY_TENSORBASE_PLUGIN
1012  #include EIGEN_READONLY_TENSORBASE_PLUGIN
1013  #endif
1014 
1016  EIGEN_STRONG_INLINE const Derived& derived() const { return *static_cast<const Derived*>(this); }
1017 
1018  protected:
1019  template <typename Scalar, int NumIndices, int Options, typename IndexType> friend class Tensor;
1020  template <typename Scalar, typename Dimensions, int Option, typename IndexTypes> friend class TensorFixedSize;
1021  // the Eigen:: prefix is required to workaround a compilation issue with nvcc 9.0
1022  template <typename OtherDerived, int AccessLevel> friend class Eigen::TensorBase;
1023 };
1024 
1026 class TensorBase : public TensorBase<Derived, ReadOnlyAccessors> {
1027  public:
1030  typedef typename DerivedTraits::Scalar Scalar;
1031  typedef typename DerivedTraits::Index Index;
1033  static constexpr int NumDimensions = DerivedTraits::NumDimensions;
1034 
1035  template <typename Scalar, int NumIndices, int Options, typename IndexType> friend class Tensor;
1036  template <typename Scalar, typename Dimensions, int Option, typename IndexTypes> friend class TensorFixedSize;
1037  // the Eigen:: prefix is required to workaround a compilation issue with nvcc 9.0
1038  template <typename OtherDerived, int OtherAccessLevel> friend class Eigen::TensorBase;
1039 
1042  return setConstant(Scalar(0));
1043  }
1046  return derived() = this->constant(val);
1047  }
1050  return derived() = this->random();
1051  }
1052  template <typename RandomGenerator> EIGEN_DEVICE_FUNC
1054  return derived() = this->template random<RandomGenerator>();
1055  }
1056 
1061  internal::initialize_tensor<Derived, NumDimensions>(eval, vals);
1062  return derived();
1063  }
1064 
1065  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1066  Derived& operator+=(const OtherDerived& other) {
1067  return derived() = derived() + other.derived();
1068  }
1069  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1070  Derived& operator-=(const OtherDerived& other) {
1071  return derived() = derived() - other.derived();
1072  }
1073  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1074  Derived& operator*=(const OtherDerived& other) {
1075  return derived() = derived() * other.derived();
1076  }
1077  template<typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1078  Derived& operator/=(const OtherDerived& other) {
1079  return derived() = derived() / other.derived();
1080  }
1081 
1084  swap_layout() const {
1086  }
1091  }
1092 
1093  template <typename Axis, typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1095  concatenate(const OtherDerived& other, const Axis& axis) const {
1097  }
1098  template <typename Axis, typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1100  concatenate(const OtherDerived& other, const Axis& axis) {
1102  }
1103 
1104  template <typename NewDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1106  reshape(const NewDimensions& newDimensions) const {
1108  }
1109  template <typename NewDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1111  reshape(const NewDimensions& newDimensions) {
1113  }
1114 
1115  template <typename StartIndices, typename Sizes> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1117  slice(const StartIndices& startIndices, const Sizes& sizes) const {
1119  }
1120  template <typename StartIndices, typename Sizes> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1122  slice(const StartIndices& startIndices, const Sizes& sizes) {
1124  }
1125 
1126  template <typename StartIndices, typename StopIndices, typename Strides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1128  stridedSlice(const StartIndices& startIndices, const StopIndices& stopIndices, const Strides& strides) const {
1129  return TensorStridingSlicingOp<const StartIndices, const StopIndices, const Strides,
1130  const Derived>(derived(), startIndices, stopIndices, strides);
1131  }
1132  template <typename StartIndices, typename StopIndices, typename Strides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1134  stridedSlice(const StartIndices& startIndices, const StopIndices& stopIndices, const Strides& strides) {
1135  return TensorStridingSlicingOp<const StartIndices, const StopIndices, const Strides,
1136  Derived>(derived(), startIndices, stopIndices, strides);
1137  }
1138 
1139  template <DenseIndex DimId> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1141  chip(const Index offset) const {
1142  EIGEN_STATIC_ASSERT(DimId < Derived::NumDimensions && DimId >= 0, Chip_Dim_out_of_range)
1143  return TensorChippingOp<DimId, const Derived>(derived(), offset, DimId);
1144  }
1145  template <Index DimId> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1147  chip(const Index offset) {
1148  EIGEN_STATIC_ASSERT(DimId < Derived::NumDimensions && DimId >= 0, Chip_Dim_out_of_range)
1149  return TensorChippingOp<DimId, Derived>(derived(), offset, DimId);
1150  }
1151 
1154  chip(const Index offset, const Index dim) const {
1155  return TensorChippingOp<Dynamic, const Derived>(derived(), offset, dim);
1156  }
1159  chip(const Index offset, const Index dim) {
1160  return TensorChippingOp<Dynamic, Derived>(derived(), offset, dim);
1161  }
1162 
1163  template <typename ReverseDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1165  reverse(const ReverseDimensions& rev) const {
1167  }
1168  template <typename ReverseDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1170  reverse(const ReverseDimensions& rev) {
1172  }
1173 
1174  template <typename Rolls> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1176  roll(const Rolls& roll) const {
1178  }
1179  template <typename Rolls> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1181  roll(const Rolls& roll) {
1183  }
1184 
1185  template <typename Shuffle> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1187  shuffle(const Shuffle& shfl) const {
1189  }
1190  template <typename Shuffle> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1192  shuffle(const Shuffle& shfl) {
1194  }
1195 
1196  template <typename Strides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1198  stride(const Strides& strides) const {
1200  }
1201  template <typename Strides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1203  stride(const Strides& strides) {
1205  }
1206 
1207  // Select the device on which to evaluate the expression.
1208  template <typename DeviceType>
1211  }
1212 
1213  // Select the async device on which to evaluate the expression.
1214  template <typename DeviceType, typename DoneCallback>
1215  TensorAsyncDevice<Derived, DeviceType, DoneCallback> device(const DeviceType& dev, DoneCallback done) {
1216  return TensorAsyncDevice<Derived, DeviceType, DoneCallback>(dev, derived(), std::move(done));
1217  }
1218 
1220  EIGEN_STRONG_INLINE Derived& derived() { return *static_cast<Derived*>(this); }
1222  EIGEN_STRONG_INLINE const Derived& derived() const { return *static_cast<const Derived*>(this); }
1223 
1224  #ifdef EIGEN_TENSORBASE_PLUGIN
1225  #include EIGEN_TENSORBASE_PLUGIN
1226  #endif
1227 
1228  protected:
1231 
1232  template<typename OtherDerived> EIGEN_DEVICE_FUNC
1233  EIGEN_STRONG_INLINE Derived& operator=(const OtherDerived& other)
1234  {
1236  Assign assign(derived(), other.derived());
1238  return derived();
1239  }
1240 };
1241 #endif // EIGEN_PARSED_BY_DOXYGEN
1242 } // end namespace Eigen
1243 
1244 #endif // EIGEN_CXX11_TENSOR_TENSOR_BASE_H
constexpr bool operator<=(const Log rhs, const Log lhs)
Internally used to filter on loglevel. Do not edit, as this is required for an optimised logger.
Definition: Logger.h:119
#define EIGEN_DEFAULT_COPY_CONSTRUCTOR(CLASS)
Macro to explicitly define the default copy constructor. This is necessary, because the implicit defi...
Definition: Macros.h:1119
#define EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(Derived)
Macro to manually define default constructors and destructors. This is necessary when the copy constr...
Definition: Macros.h:1137
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:892
#define EIGEN_STRONG_INLINE
Definition: Macros.h:834
#define EIGEN_STATIC_ASSERT(X, MSG)
Definition: StaticAssert.h:26
SCALAR Scalar
Definition: bench_gemm.cpp:45
bool operator<(const benchmark_t &b1, const benchmark_t &b2)
Definition: benchmark-blocking-sizes.cpp:127
boost::multiprecision::number< boost::multiprecision::cpp_dec_float< 100 >, boost::multiprecision::et_on > Real
Definition: boostmultiprec.cpp:77
Definition: TensorAssign.h:57
Pseudo expression providing an operator = that will evaluate its argument asynchronously on the speci...
Definition: TensorDevice.h:88
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:606
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseNullaryOp< CustomNullaryOp, const Derived > nullaryExpr(const CustomNullaryOp &func) const
Definition: TensorBase.h:44
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReductionOp< internal::AndReducer, const Dims, const std::conditional_t< internal::is_same< bool, CoeffReturnType >::value, Derived, TensorConversionOp< bool, const Derived > > > all(const Dims &dims) const
Definition: TensorBase.h:755
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:251
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_abs_op< Scalar >, const Derived > abs() const
Definition: TensorBase.h:311
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReductionOp< internal::MeanReducer< CoeffReturnType >, const Dims, const Derived > mean(const Dims &dims) const
Definition: TensorBase.h:705
const TensorReductionOp< internal::SumReducer< CoeffReturnType >, const DimensionList< Index, NumDimensions >, const Derived > sum() const
Definition: TensorBase.h:698
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_arg_op< Scalar >, const Derived > arg() const
Definition: TensorBase.h:317
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorChippingOp< DimId, const Derived > chip(const Index offset) const
Definition: TensorBase.h:935
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_imag_op< Scalar >, const Derived > imag() const
Definition: TensorBase.h:351
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorTraceOp< const Dims, const Derived > trace(const Dims &dims) const
Definition: TensorBase.h:839
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:244
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorPairReducerOp< internal::ArgMinPairReducer< Pair< Index, CoeffReturnType > >, const array< Index, NumDimensions >, const Derived > argmin() const
Definition: TensorBase.h:796
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorLayoutSwapOp< const Derived > swap_layout() const
Definition: TensorBase.h:914
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReductionOp< internal::MaxReducer< CoeffReturnType, NanPropagation >, const Dims, const Derived > maximum(const Dims &dims) const
Definition: TensorBase.h:729
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_opposite_op< Scalar >, const Derived > operator-() const
Definition: TensorBase.h:83
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReductionOp< Reducer, const Dims, const Derived > reduce(const Dims &dims, const Reducer &reducer) const
Definition: TensorBase.h:833
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_ndtri_op< Scalar >, const Derived > ndtri() const
Definition: TensorBase.h:269
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_bessel_j0_op< Scalar >, const Derived > bessel_j0() const
Definition: TensorBase.h:167
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorScanProdOp cumprod(const Index &axis, bool exclusive=false) const
Definition: TensorBase.h:679
std::remove_const_t< Scalar > CoeffReturnType
Definition: TensorBase.h:38
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_log2_op< Scalar >, const Derived > log2() const
Definition: TensorBase.h:305
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseNullaryOp< internal::UniformRandomGenerator< Scalar >, const Derived > random() const
Definition: TensorBase.h:57
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_round_op< Scalar >, const Derived > round() const
Definition: TensorBase.h:440
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_sqrt_op< Scalar >, const Derived > sqrt() const
Definition: TensorBase.h:89
internal::traits< Derived > DerivedTraits
Definition: TensorBase.h:35
Eigen::IndexPair< Index > DimensionPair
Definition: TensorBase.h:640
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReductionOp< internal::MinReducer< CoeffReturnType, NanPropagation >, const Dims, const Derived > minimum(const Dims &dims) const
Definition: TensorBase.h:742
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:496
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:635
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:230
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:601
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_bessel_y1_op< Scalar >, const Derived > bessel_y1() const
Definition: TensorBase.h:185
TensorScanOp< internal::ProdReducer< CoeffReturnType >, const Derived > TensorScanProdOp
Definition: TensorBase.h:676
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:418
DerivedTraits::Index Index
Definition: TensorBase.h:37
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:611
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorInflationOp< const Strides, const Derived > inflate(const Strides &strides) const
Definition: TensorBase.h:976
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_real_op< Scalar >, const Derived > real() const
Definition: TensorBase.h:345
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:686
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorGeneratorOp< Generator, const Derived > generate(const Generator &generator) const
Definition: TensorBase.h:69
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_bitwise_or_op< Scalar >, const Derived, const OtherDerived > operator|(const OtherDerived &other) const
Definition: TensorBase.h:527
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_clamp_op< Scalar >, const Derived > clip(Scalar min, Scalar max) const
Definition: TensorBase.h:323
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:216
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorFFTOp< const FFT, const Derived, FFTDataType, FFTDirection > fft(const FFT &dims) const
Definition: TensorBase.h:664
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorConcatenationOp< Axis, const Derived, const OtherDerived > concatenate(const OtherDerived &other, Axis axis) const
Definition: TensorBase.h:857
const TensorReductionOp< internal::ProdReducer< CoeffReturnType >, const DimensionList< Index, NumDimensions >, const Derived > prod() const
Definition: TensorBase.h:722
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_square_op< Scalar >, const Derived > square() const
Definition: TensorBase.h:107
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_cmp_op< Scalar, Scalar, internal::cmp_GE >, const Derived, const OtherDerived > operator>=(const TensorBase< OtherDerived, ReadOnlyAccessors > &other) const
Definition: TensorBase.h:567
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorPatchOp< const PatchDims, const Derived > extract_patches(const PatchDims &patch_dims) const
Definition: TensorBase.h:863
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_cmp_op< Scalar, Scalar, internal::cmp_NEQ >, const Derived, const OtherDerived > operator!=(const TensorBase< OtherDerived, ReadOnlyAccessors > &other) const
Definition: TensorBase.h:579
TensorScanOp< internal::SumReducer< CoeffReturnType >, const Derived > TensorScanSumOp
Definition: TensorBase.h:669
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_lgamma_op< Scalar >, const Derived > lgamma() const
Definition: TensorBase.h:131
const TensorReductionOp< internal::MinReducer< CoeffReturnType, NanPropagation >, const DimensionList< Index, NumDimensions >, const Derived > minimum() const
Definition: TensorBase.h:748
DerivedTraits::Scalar Scalar
Definition: TensorBase.h:36
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorShufflingOp< const Shuffle, const Derived > shuffle(const Shuffle &shfl) const
Definition: TensorBase.h:966
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_boolean_or_op< Scalar >, const Derived, const OtherDerived > operator||(const OtherDerived &other) const
Definition: TensorBase.h:515
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const std::enable_if_t< internal::is_arithmetic< typename NumTraits< ScalarExponent >::Real >::value, TensorCwiseUnaryOp< internal::scalar_unary_pow_op< Scalar, ScalarExponent >, const Derived > > pow(ScalarExponent exponent) const
Definition: TensorBase.h:338
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_bessel_i0e_op< Scalar >, const Derived > bessel_i0e() const
Definition: TensorBase.h:149
const TensorWithFormat< Derived, DerivedTraits::Layout, DerivedTraits::NumDimensions, Format > format(const Format &fmt) const
Definition: TensorBase.h:1007
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_inverse_op< Scalar >, const Derived > inverse() const
Definition: TensorBase.h:119
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_log_op< Scalar >, const Derived > log() const
Definition: TensorBase.h:293
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:237
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:657
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_boolean_not_op< Scalar >, const Derived > operator!() const
Definition: TensorBase.h:539
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorPairReducerOp< internal::ArgMaxPairReducer< Pair< Index, CoeffReturnType > >, const array< Index, NumDimensions >, const Derived > argmax() const
Definition: TensorBase.h:783
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< CustomUnaryOp, const Derived > unaryExpr(const CustomUnaryOp &func) const
Definition: TensorBase.h:76
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReductionOp< internal::SumReducer< CoeffReturnType >, const Dims, const Derived > sum(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:173
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_bitwise_xor_op< Scalar >, const Derived, const OtherDerived > operator^(const OtherDerived &other) const
Definition: TensorBase.h:533
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_exp_op< Scalar >, const Derived > exp() const
Definition: TensorBase.h:281
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_erf_op< Scalar >, const Derived > erf() const
Definition: TensorBase.h:257
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const std::conditional_t< internal::is_same< NewType, CoeffReturnType >::value, Derived, TensorConversionOp< NewType, const Derived > > cast() const
Definition: TensorBase.h:434
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReshapingOp< const NewDimensions, const Derived > reshape(const NewDimensions &newDimensions) const
Definition: TensorBase.h:919
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_cube_op< Scalar >, const Derived > cube() const
Definition: TensorBase.h:113
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_rsqrt_op< Scalar >, const Derived > rsqrt() const
Definition: TensorBase.h:101
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_cmp_op< Scalar, Scalar, internal::cmp_GT >, const Derived, const OtherDerived > operator>(const TensorBase< OtherDerived, ReadOnlyAccessors > &other) const
Definition: TensorBase.h:562
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:879
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_bitwise_not_op< Scalar >, const Derived > operator~() const
Definition: TensorBase.h:545
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_bessel_k0_op< Scalar >, const Derived > bessel_k0() const
Definition: TensorBase.h:191
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:484
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorPaddingOp< const PaddingDimensions, const Derived > pad(const PaddingDimensions &padding, const Scalar padding_value) const
Definition: TensorBase.h:961
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_bessel_i0_op< Scalar >, const Derived > bessel_i0() const
Definition: TensorBase.h:143
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< CustomBinaryOp, const Derived, const OtherDerived > binaryExpr(const OtherDerived &other, const CustomBinaryOp &func) const
Definition: TensorBase.h:465
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_bessel_i1_op< Scalar >, const Derived > bessel_i1() const
Definition: TensorBase.h:155
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_bitwise_and_op< Scalar >, const Derived, const OtherDerived > operator&(const OtherDerived &other) const
Definition: TensorBase.h:521
const TensorTraceOp< const DimensionList< Index, NumDimensions >, const Derived > trace() const
Definition: TensorBase.h:844
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_digamma_op< Scalar >, const Derived > digamma() const
Definition: TensorBase.h:137
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:924
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorPaddingOp< const PaddingDimensions, const Derived > pad(const PaddingDimensions &padding) const
Definition: TensorBase.h:956
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReverseOp< const ReverseDimensions, const Derived > reverse(const ReverseDimensions &rev) const
Definition: TensorBase.h:946
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorBroadcastingOp< const Broadcast, const Derived > broadcast(const Broadcast &bcast) const
Definition: TensorBase.h:851
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:223
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorPairReducerOp< internal::ArgMinPairReducer< Pair< Index, CoeffReturnType > >, const array< Index, 1 >, const Derived > argmin(const Index return_dim) const
Definition: TensorBase.h:822
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_expm1_op< Scalar >, const Derived > expm1() const
Definition: TensorBase.h:287
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:650
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:490
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:478
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorPairReducerOp< internal::ArgMaxPairReducer< Pair< Index, CoeffReturnType > >, const array< Index, 1 >, const Derived > argmax(const Index return_dim) const
Definition: TensorBase.h:809
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_log1p_op< Scalar >, const Derived > log1p() const
Definition: TensorBase.h:299
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:644
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:929
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_logistic_op< Scalar >, const Derived > sigmoid() const
Definition: TensorBase.h:275
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_rint_op< Scalar >, const Derived > rint() const
Definition: TensorBase.h:446
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:596
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReductionOp< internal::OrReducer, const DimensionList< Index, NumDimensions >, const std::conditional_t< internal::is_same< bool, CoeffReturnType >::value, Derived, TensorConversionOp< bool, const Derived > > > any() const
Definition: TensorBase.h:774
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorStridingOp< const Strides, const Derived > stride(const Strides &strides) const
Definition: TensorBase.h:971
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorForcedEvalOp< const Derived > eval() const
Definition: TensorBase.h:1001
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_bessel_k1e_op< Scalar >, const Derived > bessel_k1e() const
Definition: TensorBase.h:209
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_erfc_op< Scalar >, const Derived > erfc() const
Definition: TensorBase.h:263
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_floor_op< Scalar >, const Derived > floor() const
Definition: TensorBase.h:458
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const std::conditional_t< NumTraits< CoeffReturnType >::IsComplex, TensorCwiseUnaryOp< internal::scalar_conjugate_op< Scalar >, const Derived >, Derived > conjugate() const
Definition: TensorBase.h:331
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReductionOp< internal::OrReducer, const Dims, const std::conditional_t< internal::is_same< bool, CoeffReturnType >::value, Derived, TensorConversionOp< bool, const Derived > > > any(const Dims &dims) const
Definition: TensorBase.h:768
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_cmp_op< Scalar, Scalar, internal::cmp_EQ >, const Derived, const OtherDerived > operator==(const TensorBase< OtherDerived, ReadOnlyAccessors > &other) const
Definition: TensorBase.h:573
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_bessel_k0e_op< Scalar >, const Derived > bessel_k0e() const
Definition: TensorBase.h:197
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCustomUnaryOp< const CustomUnaryFunc, const Derived > customOp(const CustomUnaryFunc &op) const
Definition: TensorBase.h:990
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReductionOp< internal::ProdReducer< CoeffReturnType >, const Dims, const Derived > prod(const Dims &dims) const
Definition: TensorBase.h:717
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_bessel_i1e_op< Scalar >, const Derived > bessel_i1e() const
Definition: TensorBase.h:161
const TensorReductionOp< internal::MaxReducer< CoeffReturnType, NanPropagation >, const DimensionList< Index, NumDimensions >, const Derived > maximum() const
Definition: TensorBase.h:735
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:869
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:893
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:502
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:472
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_bessel_k1_op< Scalar >, const Derived > bessel_k1() const
Definition: TensorBase.h:203
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseNullaryOp< internal::scalar_constant_op< Scalar >, const Derived > constant(const Scalar &value) const
Definition: TensorBase.h:51
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorChippingOp< Dynamic, const Derived > chip(const Index offset, const Index dim) const
Definition: TensorBase.h:941
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_tanh_op< Scalar >, const Derived > tanh() const
Definition: TensorBase.h:125
const TensorReductionOp< internal::MeanReducer< CoeffReturnType >, const DimensionList< Index, NumDimensions >, const Derived > mean() const
Definition: TensorBase.h:710
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Derived & derived() const
Definition: TensorBase.h:1016
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReductionOp< internal::AndReducer, const DimensionList< Index, NumDimensions >, const std::conditional_t< internal::is_same< bool, CoeffReturnType >::value, Derived, TensorConversionOp< bool, const Derived > > > all() const
Definition: TensorBase.h:761
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseNullaryOp< RandomGenerator, const Derived > random(const RandomGenerator &gen=RandomGenerator()) const
Definition: TensorBase.h:62
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorScanSumOp cumsum(const Index &axis, bool exclusive=false) const
Definition: TensorBase.h:672
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< internal::scalar_boolean_and_op< Scalar >, const Derived, const OtherDerived > operator&&(const OtherDerived &other) const
Definition: TensorBase.h:509
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:902
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorIndexPairOp< const Derived > index_pairs() const
Definition: TensorBase.h:983
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:995
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:425
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_bessel_j1_op< Scalar >, const Derived > bessel_j1() const
Definition: TensorBase.h:179
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_sign_op< Scalar >, const Derived > sign() const
Definition: TensorBase.h:95
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorRollOp< const Rolls, const Derived > roll(const Rolls &rolls) const
Definition: TensorBase.h:951
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< internal::scalar_ceil_op< Scalar >, const Derived > ceil() const
Definition: TensorBase.h:452
The tensor base class.
Definition: TensorBase.h:1026
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorChippingOp< DimId, Derived > chip(const Index offset)
Definition: TensorBase.h:1147
TensorBase< Derived, ReadOnlyAccessors > Base
Definition: TensorBase.h:1028
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & setRandom()
Definition: TensorBase.h:1049
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorLayoutSwapOp< const Derived > swap_layout() const
Definition: TensorBase.h:1084
DerivedTraits::Scalar Scalar
Definition: TensorBase.h:1030
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReshapingOp< const NewDimensions, const Derived > reshape(const NewDimensions &newDimensions) const
Definition: TensorBase.h:1106
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorStridingOp< const Strides, Derived > stride(const Strides &strides)
Definition: TensorBase.h:1203
TensorDevice< Derived, DeviceType > device(const DeviceType &dev)
Definition: TensorBase.h:1209
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorShufflingOp< const Shuffle, Derived > shuffle(const Shuffle &shfl)
Definition: TensorBase.h:1192
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:1128
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorConcatenationOp< const Axis, Derived, OtherDerived > concatenate(const OtherDerived &other, const Axis &axis)
Definition: TensorBase.h:1100
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReverseOp< const ReverseDimensions, const Derived > reverse(const ReverseDimensions &rev) const
Definition: TensorBase.h:1165
static constexpr int NumDimensions
Definition: TensorBase.h:1033
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:1095
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorChippingOp< Dynamic, Derived > chip(const Index offset, const Index dim)
Definition: TensorBase.h:1159
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & setValues(const typename internal::Initializer< Derived, NumDimensions >::InitList &vals)
Definition: TensorBase.h:1058
internal::traits< Derived > DerivedTraits
Definition: TensorBase.h:1029
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorChippingOp< Dynamic, const Derived > chip(const Index offset, const Index dim) const
Definition: TensorBase.h:1154
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & operator*=(const OtherDerived &other)
Definition: TensorBase.h:1074
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:1117
Scalar CoeffReturnType
Definition: TensorBase.h:1032
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & setConstant(const Scalar &val)
Definition: TensorBase.h:1045
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorLayoutSwapOp< Derived > swap_layout()
Definition: TensorBase.h:1089
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & setRandom()
Definition: TensorBase.h:1053
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorSlicingOp< const StartIndices, const Sizes, Derived > slice(const StartIndices &startIndices, const Sizes &sizes)
Definition: TensorBase.h:1122
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & setZero()
Definition: TensorBase.h:1041
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & derived()
Definition: TensorBase.h:1220
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & operator-=(const OtherDerived &other)
Definition: TensorBase.h:1070
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorRollOp< const Rolls, Derived > roll(const Rolls &roll)
Definition: TensorBase.h:1181
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Derived & derived() const
Definition: TensorBase.h:1222
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:1134
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorRollOp< const Rolls, const Derived > roll(const Rolls &roll) const
Definition: TensorBase.h:1176
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorStridingOp< const Strides, const Derived > stride(const Strides &strides) const
Definition: TensorBase.h:1198
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorChippingOp< DimId, const Derived > chip(const Index offset) const
Definition: TensorBase.h:1141
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & operator+=(const OtherDerived &other)
Definition: TensorBase.h:1066
TensorAsyncDevice< Derived, DeviceType, DoneCallback > device(const DeviceType &dev, DoneCallback done)
Definition: TensorBase.h:1215
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & operator/=(const OtherDerived &other)
Definition: TensorBase.h:1078
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorShufflingOp< const Shuffle, const Derived > shuffle(const Shuffle &shfl) const
Definition: TensorBase.h:1187
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorReverseOp< const ReverseDimensions, Derived > reverse(const ReverseDimensions &rev)
Definition: TensorBase.h:1170
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & operator=(const OtherDerived &other)
Definition: TensorBase.h:1233
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorReshapingOp< const NewDimensions, Derived > reshape(const NewDimensions &newDimensions)
Definition: TensorBase.h:1111
DerivedTraits::Index Index
Definition: TensorBase.h:1031
Definition: TensorBroadcasting.h:66
Definition: TensorChipping.h:70
Tensor concatenation class.
Definition: TensorConcatenation.h:60
Definition: TensorContraction.h:307
Tensor conversion class. This class makes it possible to vectorize type casting operations when the n...
Definition: TensorConversion.h:166
Definition: TensorConvolution.h:236
Tensor custom class.
Definition: TensorCustomOp.h:195
Tensor custom class.
Definition: TensorCustomOp.h:51
Definition: TensorExpr.h:162
Definition: TensorExpr.h:49
Definition: TensorExpr.h:97
Pseudo expression providing an operator = that will evaluate its argument on the specified computing ...
Definition: TensorDevice.h:31
Definition: TensorFFT.h:109
The fixed sized version of the tensor class.
Definition: TensorFixedSize.h:30
Definition: TensorForcedEval.h:57
Tensor generator class.
Definition: TensorGenerator.h:52
Definition: TensorImagePatch.h:117
Definition: TensorArgMax.h:52
Definition: TensorInflation.h:52
Definition: TensorLayoutSwap.h:67
Definition: TensorPadding.h:53
Definition: TensorArgMax.h:154
Definition: TensorPatch.h:52
Definition: TensorReduction.h:510
Definition: TensorMorphing.h:53
Definition: TensorReverse.h:52
Definition: TensorRoll.h:50
Definition: TensorScan.h:49
Definition: TensorExpr.h:302
Definition: TensorShuffling.h:52
Definition: TensorMorphing.h:289
Definition: TensorStriding.h:52
Definition: TensorMorphing.h:752
Definition: TensorTrace.h:53
Definition: TensorVolumePatch.h:56
Definition: TensorIO.h:117
The tensor class.
Definition: Tensor.h:68
static EIGEN_STRONG_INLINE void run(const Expression &expr, const Device &device=DefaultDevice())
Definition: TensorExecutor.h:92
Definition: TensorRandom.h:121
@ IsComplex
Definition: common.h:73
std::vector< Array2i > sizes
Definition: dense_solvers.cpp:12
@ ReadOnlyAccessors
Definition: Constants.h:372
char char * op
Definition: level2_impl.h:374
#define isfinite(X)
Definition: main.h:111
#define isnan(X)
Definition: main.h:109
#define isinf(X)
Definition: main.h:110
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 operator/(const bfloat16 &a, const bfloat16 &b)
Definition: BFloat16.h:284
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool operator>=(const bfloat16 &a, const bfloat16 &b)
Definition: BFloat16.h:340
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool operator>(const bfloat16 &a, const bfloat16 &b)
Definition: BFloat16.h:337
EIGEN_ALWAYS_INLINE DSizes< IndexType, NumDims > strides(const DSizes< IndexType, NumDims > &dimensions)
Definition: TensorBlock.h:29
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:70
std::array< T, N > array
Definition: EmulateArray.h:231
squared absolute value
Definition: GlobalFunctions.h:87
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)
Definition: SparseCwiseBinaryOp.h:922
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE const T1 & choose(Cond< true >, const T1 &first, const T2 &)
Definition: TensorMeta.h:22
PaddingType
Definition: TensorTraits.h:227
@ PADDING_SAME
Definition: TensorTraits.h:227
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:83
CleanedUpDerType< DerType >::type() min(const AutoDiffScalar< DerType > &x, const T &y)
Definition: AutoDiffScalar.h:494
CleanedUpDerType< DerType >::type() max(const AutoDiffScalar< DerType > &x, const T &y)
Definition: AutoDiffScalar.h:499
EIGEN_DEVICE_FUNC const Product< MatrixDerived, PermutationDerived, AliasFreeProduct > operator*(const MatrixBase< MatrixDerived > &matrix, const PermutationBase< PermutationDerived > &permutation)
Definition: PermutationMatrix.h:471
EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator!=(const Pair< U, V > &x, const Pair< U, V > &y)
Definition: TensorMeta.h:232
EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator==(const Pair< U, V > &x, const Pair< U, V > &y)
Definition: TensorMeta.h:227
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)
Definition: SparseCwiseBinaryOp.h:904
val
Definition: calibrate.py:119
internal::nested_eval< T, 1 >::type eval(const T &xpr)
Definition: sparse_permutations.cpp:47
Definition: TensorMeta.h:19
Definition: TensorDeviceDefault.h:19
Definition: TensorDimensionList.h:29
Definition: TensorMeta.h:238
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
Definition: NumTraits.h:217
Definition: TensorDimensions.h:85
A cost model used to limit the number of threads used for evaluating tensor expression.
Definition: TensorEvaluator.h:31
Definition: TensorFunctors.h:296
Definition: TensorFunctors.h:321
Definition: TensorFunctors.h:341
std::initializer_list< typename Initializer< Derived, N - 1 >::InitList > InitList
Definition: TensorInitializer.h:29
Definition: TensorFunctors.h:177
Definition: TensorFunctors.h:107
Definition: TensorFunctors.h:217
Definition: TensorFunctors.h:307
Definition: TensorFunctors.h:257
Definition: TensorFunctors.h:66
Definition: BinaryFunctors.h:716
Definition: BinaryFunctors.h:738
Definition: Meta.h:205
Template functor to compute the absolute value of a scalar.
Definition: functors/UnaryFunctors.h:44
Template functor to compute the phase angle of a complex.
Definition: functors/UnaryFunctors.h:161
Template functor to compute the modified Bessel function of the first kind of order zero.
Definition: BesselFunctionsFunctors.h:27
Template functor to compute the exponentially scaled modified Bessel function of the first kind of or...
Definition: BesselFunctionsFunctors.h:52
Template functor to compute the modified Bessel function of the first kind of order one.
Definition: BesselFunctionsFunctors.h:76
Template functor to compute the exponentially scaled modified Bessel function of the first kind of or...
Definition: BesselFunctionsFunctors.h:101
Template functor to compute the Bessel function of the second kind of order zero.
Definition: BesselFunctionsFunctors.h:125
Template functor to compute the Bessel function of the first kind of order one.
Definition: BesselFunctionsFunctors.h:175
Template functor to compute the modified Bessel function of the second kind of order zero.
Definition: BesselFunctionsFunctors.h:225
Template functor to compute the exponentially scaled modified Bessel function of the second kind of o...
Definition: BesselFunctionsFunctors.h:250
Template functor to compute the modified Bessel function of the second kind of order one.
Definition: BesselFunctionsFunctors.h:275
Template functor to compute the exponentially scaled modified Bessel function of the second kind of o...
Definition: BesselFunctionsFunctors.h:300
Template functor to compute the Bessel function of the second kind of order zero.
Definition: BesselFunctionsFunctors.h:150
Template functor to compute the Bessel function of the second kind of order one.
Definition: BesselFunctionsFunctors.h:200
Template functor to compute the bitwise and of two scalars.
Definition: BinaryFunctors.h:588
Template functor to compute the bitwise not of a scalar.
Definition: functors/UnaryFunctors.h:1145
Template functor to compute the bitwise or of two scalars.
Definition: BinaryFunctors.h:612
Template functor to compute the bitwise xor of two scalars.
Definition: BinaryFunctors.h:636
Template functor to compute the and of two scalars as if they were booleans.
Definition: BinaryFunctors.h:461
Template functor to compute the logical not of a scalar as if it were a boolean.
Definition: functors/UnaryFunctors.h:1099
Template functor to compute the or of two scalars as if they were booleans.
Definition: BinaryFunctors.h:489
Template functor to cast a scalar to another type.
Definition: functors/UnaryFunctors.h:205
Template functor to compute the ceil of a scalar.
Definition: functors/UnaryFunctors.h:954
Definition: TensorFunctors.h:399
Template functors for comparison of two scalars.
Definition: BinaryFunctors.h:199
Template functor to compute the conjugate of a complex value.
Definition: functors/UnaryFunctors.h:132
Definition: NullaryFunctors.h:21
Template functor to compute the cube of a scalar.
Definition: functors/UnaryFunctors.h:863
Template functor to compute the difference of two scalars.
Definition: BinaryFunctors.h:381
Template functor to compute psi, the derivative of lgamma of a scalar.
Definition: SpecialFunctionsFunctors.h:177
Template functor to compute the error function of a scalar.
Definition: SpecialFunctionsFunctors.h:247
Template functor to compute the Complementary Error Function of a scalar.
Definition: SpecialFunctionsFunctors.h:280
Template functor to compute the exponential of a scalar.
Definition: functors/UnaryFunctors.h:348
Template functor to compute the exponential of a scalar - 1.
Definition: functors/UnaryFunctors.h:402
Template functor to compute the floor of a scalar.
Definition: functors/UnaryFunctors.h:914
Template functor to compute the derivative of the sample of a Gamma(alpha, 1) random variable with re...
Definition: SpecialFunctionsFunctors.h:80
Template functor to compute the derivative of the incomplete gamma function igamma_der_a(a,...
Definition: SpecialFunctionsFunctors.h:53
Template functor to compute the incomplete gamma function igamma(a, x)
Definition: SpecialFunctionsFunctors.h:27
Template functor to compute the complementary incomplete gamma function igammac(a,...
Definition: SpecialFunctionsFunctors.h:105
Template functor to extract the imaginary part of a complex.
Definition: functors/UnaryFunctors.h:296
Template functor to compute the inverse of a scalar.
Definition: functors/UnaryFunctors.h:808
Definition: functors/UnaryFunctors.h:1074
Definition: functors/UnaryFunctors.h:1040
Definition: functors/UnaryFunctors.h:1005
Template functor to compute the natural log of the absolute value of Gamma of a scalar.
Definition: SpecialFunctionsFunctors.h:155
Template functor to compute the logarithm of 1 plus a scalar value.
Definition: functors/UnaryFunctors.h:456
Template functor to compute the base-2 logarithm of a scalar.
Definition: functors/UnaryFunctors.h:497
Template functor to compute the logarithm of a scalar.
Definition: functors/UnaryFunctors.h:424
Template functor to compute the logistic function of a scalar.
Definition: functors/UnaryFunctors.h:1215
Template functor to compute the max of two scalars.
Definition: BinaryFunctors.h:171
Template functor to compute the min of two scalars.
Definition: BinaryFunctors.h:142
Template functor to compute the modulo between an array and a scalar.
Definition: TensorFunctors.h:23
Template functor to compute the Inverse of the normal distribution function of a scalar.
Definition: SpecialFunctionsFunctors.h:303
Template functor to compute the opposite of a scalar.
Definition: functors/UnaryFunctors.h:26
Template functor to compute the polygamma function.
Definition: SpecialFunctionsFunctors.h:223
Template functor to compute the product of two scalars.
Definition: BinaryFunctors.h:73
Template functor to compute the quotient of two scalars.
Definition: BinaryFunctors.h:430
Template functor to extract the real part of a complex.
Definition: functors/UnaryFunctors.h:281
Template functor to compute the rounded (with current rounding mode) value of a scalar.
Definition: functors/UnaryFunctors.h:934
Template functor to compute the rounded value of a scalar.
Definition: functors/UnaryFunctors.h:894
Template functor to compute the reciprocal square root of a scalar.
Definition: functors/UnaryFunctors.h:573
Template functor to compute the signum of a scalar.
Definition: functors/UnaryFunctors.h:1168
Template functor to compute the square root of a scalar.
Definition: functors/UnaryFunctors.h:517
Template functor to compute the square of a scalar.
Definition: functors/UnaryFunctors.h:832
Template functor to compute the sum of two scalars.
Definition: BinaryFunctors.h:34
Template functor to compute the tanh of a scalar.
Definition: functors/UnaryFunctors.h:693
Definition: functors/UnaryFunctors.h:1325
Template functor to compute the Riemann Zeta function of two arguments.
Definition: SpecialFunctionsFunctors.h:199
Definition: benchGeometry.cpp:21