TensorArgMax.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) 2015 Eugene Brevdo <ebrevdo@gmail.com>
5 // Benoit Steiner <benoit.steiner.goog@gmail.com>
6 //
7 // This Source Code Form is subject to the terms of the Mozilla
8 // Public License v. 2.0. If a copy of the MPL was not distributed
9 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 
11 #ifndef EIGEN_CXX11_TENSOR_TENSOR_ARG_MAX_H
12 #define EIGEN_CXX11_TENSOR_TENSOR_ARG_MAX_H
13 
14 namespace Eigen {
15 namespace internal {
16 
24 template<typename XprType>
25 struct traits<TensorIndexTupleOp<XprType> > : public traits<XprType>
26 {
28  typedef typename XprTraits::StorageKind StorageKind;
29  typedef typename XprTraits::Index Index;
31  typedef typename XprType::Nested Nested;
33  static const int NumDimensions = XprTraits::NumDimensions;
34  static const int Layout = XprTraits::Layout;
35 };
36 
37 template<typename XprType>
39 {
41 };
42 
43 template<typename XprType>
45  typename eval<TensorIndexTupleOp<XprType> >::type>
46 {
48 };
49 
50 } // end namespace internal
51 
52 template<typename XprType>
53 class TensorIndexTupleOp : public TensorBase<TensorIndexTupleOp<XprType>, ReadOnlyAccessors>
54 {
55  public:
62 
64  : m_xpr(expr) {}
65 
68  expression() const { return m_xpr; }
69 
70  protected:
71  typename XprType::Nested m_xpr;
72 };
73 
74 // Eval as rvalue
75 template<typename ArgType, typename Device>
76 struct TensorEvaluator<const TensorIndexTupleOp<ArgType>, Device>
77 {
79  typedef typename XprType::Index Index;
80  typedef typename XprType::Scalar Scalar;
82 
84  static const int NumDims = internal::array_size<Dimensions>::value;
87 
88  enum {
89  IsAligned = /*TensorEvaluator<ArgType, Device>::IsAligned*/ false,
90  PacketAccess = /*TensorEvaluator<ArgType, Device>::PacketAccess*/ false,
91  BlockAccess = false,
94  CoordAccess = false, // to be implemented
95  RawAccess = false
96  };
97 
98  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//
100  //===--------------------------------------------------------------------===//
101 
102  EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)
103  : m_impl(op.expression(), device) { }
104 
106  return m_impl.dimensions();
107  }
108 
110  m_impl.evalSubExprsIfNeeded(NULL);
111  return true;
112  }
114  m_impl.cleanup();
115  }
116 
118  {
119  return CoeffReturnType(index, m_impl.coeff(index));
120  }
121 
123  costPerCoeff(bool vectorized) const {
124  return m_impl.costPerCoeff(vectorized) + TensorOpCost(0, 0, 1);
125  }
126 
128 
129 #ifdef EIGEN_USE_SYCL
130  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {
131  m_impl.bind(cgh);
132  }
133 #endif
134 
135  protected:
137 };
138 
139 namespace internal {
140 
147 template<typename ReduceOp, typename Dims, typename XprType>
148 struct traits<TensorTupleReducerOp<ReduceOp, Dims, XprType> > : public traits<XprType>
149 {
151  typedef typename XprTraits::StorageKind StorageKind;
152  typedef typename XprTraits::Index Index;
153  typedef Index Scalar;
154  typedef typename XprType::Nested Nested;
156  static const int NumDimensions = XprTraits::NumDimensions - array_size<Dims>::value;
157  static const int Layout = XprTraits::Layout;
158 };
159 
160 template<typename ReduceOp, typename Dims, typename XprType>
162 {
164 };
165 
166 template<typename ReduceOp, typename Dims, typename XprType>
167 struct nested<TensorTupleReducerOp<ReduceOp, Dims, XprType>, 1,
168  typename eval<TensorTupleReducerOp<ReduceOp, Dims, XprType> >::type>
169 {
171 };
172 
173 } // end namespace internal
174 
175 template<typename ReduceOp, typename Dims, typename XprType>
176 class TensorTupleReducerOp : public TensorBase<TensorTupleReducerOp<ReduceOp, Dims, XprType>, ReadOnlyAccessors>
177 {
178  public:
185 
187  const ReduceOp& reduce_op,
188  const Index return_dim,
189  const Dims& reduce_dims)
191 
194  expression() const { return m_xpr; }
195 
197  const ReduceOp& reduce_op() const { return m_reduce_op; }
198 
200  const Dims& reduce_dims() const { return m_reduce_dims; }
201 
203  Index return_dim() const { return m_return_dim; }
204 
205  protected:
206  typename XprType::Nested m_xpr;
207  const ReduceOp m_reduce_op;
210 };
211 
212 // Eval as rvalue
213 template<typename ReduceOp, typename Dims, typename ArgType, typename Device>
214 struct TensorEvaluator<const TensorTupleReducerOp<ReduceOp, Dims, ArgType>, Device>
215 {
217  typedef typename XprType::Index Index;
218  typedef typename XprType::Scalar Scalar;
228 
229  enum {
230  IsAligned = /*TensorEvaluator<ArgType, Device>::IsAligned*/ false,
231  PacketAccess = /*TensorEvaluator<ArgType, Device>::PacketAccess*/ false,
232  BlockAccess = false,
235  CoordAccess = false, // to be implemented
236  RawAccess = false
237  };
238 
239  //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//
241  //===--------------------------------------------------------------------===//
242 
243  EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)
244  : m_orig_impl(op.expression(), device),
245  m_impl(op.expression().index_tuples().reduce(op.reduce_dims(), op.reduce_op()), device),
246  m_return_dim(op.return_dim())
247  {
248  gen_strides(m_orig_impl.dimensions(), m_strides);
249  if (Layout == static_cast<int>(ColMajor)) {
250  const Index total_size = internal::array_prod(m_orig_impl.dimensions());
251  m_stride_mod = (m_return_dim < NumDims - 1) ? m_strides[m_return_dim + 1] : total_size;
252  } else {
253  const Index total_size = internal::array_prod(m_orig_impl.dimensions());
254  m_stride_mod = (m_return_dim > 0) ? m_strides[m_return_dim - 1] : total_size;
255  }
256  // If m_return_dim is not a valid index, returns 1 or this can crash on Windows.
257  m_stride_div = ((m_return_dim >= 0) &&
258  (m_return_dim < static_cast<Index>(m_strides.size())))
259  ? m_strides[m_return_dim] : 1;
260  }
261 
263  return m_impl.dimensions();
264  }
265 
267  m_impl.evalSubExprsIfNeeded(NULL);
268  return true;
269  }
271  m_impl.cleanup();
272  }
273 
275  const TupleType v = m_impl.coeff(index);
276  return (m_return_dim < 0) ? v.first : (v.first % m_stride_mod) / m_stride_div;
277  }
278 
280 #ifdef EIGEN_USE_SYCL
281  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void bind(cl::sycl::handler &cgh) const {
282  m_impl.bind(cgh);
283  m_orig_impl.bind(cgh);
284  }
285 #endif
286 
288  costPerCoeff(bool vectorized) const {
289  const double compute_cost = 1.0 +
290  (m_return_dim < 0 ? 0.0 : (TensorOpCost::ModCost<Index>() + TensorOpCost::DivCost<Index>()));
291  return m_orig_impl.costPerCoeff(vectorized) +
292  m_impl.costPerCoeff(vectorized) + TensorOpCost(0, 0, compute_cost);
293  }
294 
295  private:
297  if (m_return_dim < 0) {
298  return; // Won't be using the strides.
299  }
300  eigen_assert(m_return_dim < NumDims &&
301  "Asking to convert index to a dimension outside of the rank");
302 
303  // Calculate m_stride_div and m_stride_mod, which are used to
304  // calculate the value of an index w.r.t. the m_return_dim.
305  if (Layout == static_cast<int>(ColMajor)) {
306  strides[0] = 1;
307  for (int i = 1; i < NumDims; ++i) {
308  strides[i] = strides[i-1] * dims[i-1];
309  }
310  } else {
311  strides[NumDims-1] = 1;
312  for (int i = NumDims - 2; i >= 0; --i) {
313  strides[i] = strides[i+1] * dims[i+1];
314  }
315  }
316  }
317 
318  protected:
325 };
326 
327 } // end namespace Eigen
328 
329 #endif // EIGEN_CXX11_TENSOR_TENSOR_ARG_MAX_H
Dims
std::vector< Eigen::Index > Dims
Definition: testGaussianConditional.cpp:46
Eigen::TensorIndexTupleOp::StorageKind
Eigen::internal::traits< TensorIndexTupleOp >::StorageKind StorageKind
Definition: TensorArgMax.h:59
Eigen::TensorEvaluator< const TensorTupleReducerOp< ReduceOp, Dims, ArgType >, Device >::m_stride_div
Index m_stride_div
Definition: TensorArgMax.h:324
Eigen::TensorIndexTupleOp::Index
Eigen::internal::traits< TensorIndexTupleOp >::Index Index
Definition: TensorArgMax.h:60
Eigen::internal::traits< TensorTupleReducerOp< ReduceOp, Dims, XprType > >::Nested
XprType::Nested Nested
Definition: TensorArgMax.h:154
Eigen::TensorTupleReducerOp::m_reduce_dims
const Dims m_reduce_dims
Definition: TensorArgMax.h:209
EIGEN_DEVICE_FUNC
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:976
Eigen::TensorEvaluator< const TensorIndexTupleOp< ArgType >, Device >::costPerCoeff
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool vectorized) const
Definition: TensorArgMax.h:123
Eigen
Namespace containing all symbols from the Eigen library.
Definition: jet.h:637
Eigen::TensorEvaluator< const TensorTupleReducerOp< ReduceOp, Dims, ArgType >, Device >::coeff
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
Definition: TensorArgMax.h:274
Eigen::TensorEvaluator< const TensorTupleReducerOp< ReduceOp, Dims, ArgType >, Device >::InputDimensions
TensorEvaluator< const TensorIndexTupleOp< ArgType >, Device >::Dimensions InputDimensions
Definition: TensorArgMax.h:222
Eigen::TensorEvaluator< const TensorIndexTupleOp< ArgType >, Device >::Scalar
XprType::Scalar Scalar
Definition: TensorArgMax.h:80
Eigen::TensorEvaluator< const TensorTupleReducerOp< ReduceOp, Dims, ArgType >, Device >::m_orig_impl
TensorEvaluator< const TensorIndexTupleOp< ArgType >, Device > m_orig_impl
Definition: TensorArgMax.h:319
Eigen::internal::eval< TensorTupleReducerOp< ReduceOp, Dims, XprType >, Eigen::Dense >::type
const typedef TensorTupleReducerOp< ReduceOp, Dims, XprType > EIGEN_DEVICE_REF type
Definition: TensorArgMax.h:163
Eigen::TensorEvaluator< const TensorTupleReducerOp< ReduceOp, Dims, ArgType >, Device >::costPerCoeff
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool vectorized) const
Definition: TensorArgMax.h:288
Eigen::TensorEvaluator< const TensorIndexTupleOp< ArgType >, Device >::evalSubExprsIfNeeded
EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType)
Definition: TensorArgMax.h:109
Eigen::TensorIndexTupleOp::Scalar
Eigen::internal::traits< TensorIndexTupleOp >::Scalar Scalar
Definition: TensorArgMax.h:56
Eigen::TensorEvaluator< const TensorTupleReducerOp< ReduceOp, Dims, ArgType >, Device >::Storage
StorageMemory< CoeffReturnType, Device > Storage
Definition: TensorArgMax.h:225
Eigen::internal::TensorBlockNotImplemented
Definition: TensorBlock.h:617
Eigen::TensorEvaluator< const TensorTupleReducerOp< ReduceOp, Dims, ArgType >, Device >::TensorBlock
internal::TensorBlockNotImplemented TensorBlock
Definition: TensorArgMax.h:240
Eigen::internal::nested< TensorTupleReducerOp< ReduceOp, Dims, XprType >, 1, typename eval< TensorTupleReducerOp< ReduceOp, Dims, XprType > >::type >::type
TensorTupleReducerOp< ReduceOp, Dims, XprType > type
Definition: TensorArgMax.h:170
Eigen::internal::strides
EIGEN_ALWAYS_INLINE DSizes< IndexType, NumDims > strides(const DSizes< IndexType, NumDims > &dimensions)
Definition: TensorBlock.h:26
Eigen::TensorEvaluator< const TensorIndexTupleOp< ArgType >, Device >::m_impl
TensorEvaluator< ArgType, Device > m_impl
Definition: TensorArgMax.h:136
Eigen::CwiseBinaryOp
Generic expression where a coefficient-wise binary operator is applied to two expressions.
Definition: CwiseBinaryOp.h:77
Eigen::array< Index, NumDims >
Eigen::TensorEvaluator< const TensorTupleReducerOp< ReduceOp, Dims, ArgType >, Device >::Index
XprType::Index Index
Definition: TensorArgMax.h:217
Eigen::internal::nested
Definition: TensorTraits.h:174
Eigen::TensorEvaluator< const TensorTupleReducerOp< ReduceOp, Dims, ArgType >, Device >::Scalar
XprType::Scalar Scalar
Definition: TensorArgMax.h:218
Eigen::TensorTupleReducerOp::m_xpr
XprType::Nested m_xpr
Definition: TensorArgMax.h:206
Eigen::TensorEvaluator< const TensorTupleReducerOp< ReduceOp, Dims, ArgType >, Device >::Dimensions
TensorEvaluator< const TensorReductionOp< ReduceOp, Dims, const TensorIndexTupleOp< ArgType > >, Device >::Dimensions Dimensions
Definition: TensorArgMax.h:221
eigen_assert
#define eigen_assert(x)
Definition: Macros.h:1037
Eigen::Tuple
Definition: TensorMeta.h:211
Eigen::TensorEvaluator< const TensorTupleReducerOp< ReduceOp, Dims, ArgType >, Device >::data
EIGEN_DEVICE_FUNC EvaluatorPointerType data() const
Definition: TensorArgMax.h:279
Eigen::TensorTupleReducerOp::StorageKind
Eigen::internal::traits< TensorTupleReducerOp >::StorageKind StorageKind
Definition: TensorArgMax.h:182
Eigen::TensorEvaluator< const TensorIndexTupleOp< ArgType >, Device >::EvaluatorPointerType
Storage::Type EvaluatorPointerType
Definition: TensorArgMax.h:86
Eigen::TensorEvaluator::Layout
@ Layout
Definition: TensorEvaluator.h:50
Eigen::TensorEvaluator< const TensorIndexTupleOp< ArgType >, Device >::dimensions
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Dimensions & dimensions() const
Definition: TensorArgMax.h:105
Eigen::internal::traits< TensorIndexTupleOp< XprType > >::Scalar
Tuple< Index, typename XprTraits::Scalar > Scalar
Definition: TensorArgMax.h:30
Eigen::TensorTupleReducerOp::Index
Eigen::internal::traits< TensorTupleReducerOp >::Index Index
Definition: TensorArgMax.h:183
Eigen::internal::eval< TensorIndexTupleOp< XprType >, Eigen::Dense >::type
const typedef TensorIndexTupleOp< XprType > EIGEN_DEVICE_REF type
Definition: TensorArgMax.h:40
Eigen::TensorEvaluator< const TensorTupleReducerOp< ReduceOp, Dims, ArgType >, Device >::XprType
TensorTupleReducerOp< ReduceOp, Dims, ArgType > XprType
Definition: TensorArgMax.h:216
Eigen::TensorEvaluator< const TensorTupleReducerOp< ReduceOp, Dims, ArgType >, Device >::m_strides
StrideDims m_strides
Definition: TensorArgMax.h:322
Eigen::TensorEvaluator< const TensorIndexTupleOp< ArgType >, Device >::Index
XprType::Index Index
Definition: TensorArgMax.h:79
Eigen::internal::traits< TensorIndexTupleOp< XprType > >::StorageKind
XprTraits::StorageKind StorageKind
Definition: TensorArgMax.h:28
Eigen::TensorEvaluator< const TensorIndexTupleOp< ArgType >, Device >::cleanup
EIGEN_STRONG_INLINE void cleanup()
Definition: TensorArgMax.h:113
Eigen::TensorTupleReducerOp::CoeffReturnType
Index CoeffReturnType
Definition: TensorArgMax.h:184
Eigen::TensorIndexTupleOp::Nested
Eigen::internal::nested< TensorIndexTupleOp >::type Nested
Definition: TensorArgMax.h:58
Eigen::TensorEvaluator< const TensorIndexTupleOp< ArgType >, Device >::data
EIGEN_DEVICE_FUNC EvaluatorPointerType data() const
Definition: TensorArgMax.h:127
Eigen::TensorEvaluator< const TensorIndexTupleOp< ArgType >, Device >::TensorEvaluator
EIGEN_STRONG_INLINE TensorEvaluator(const XprType &op, const Device &device)
Definition: TensorArgMax.h:102
Eigen::internal::traits< TensorIndexTupleOp< XprType > >::_Nested
remove_reference< Nested >::type _Nested
Definition: TensorArgMax.h:32
Eigen::TensorTupleReducerOp::expression
const EIGEN_DEVICE_FUNC internal::remove_all< typename XprType::Nested >::type & expression() const
Definition: TensorArgMax.h:194
Eigen::internal::true_type
Definition: Meta.h:96
Eigen::TensorEvaluator< const TensorTupleReducerOp< ReduceOp, Dims, ArgType >, Device >::m_impl
TensorEvaluator< const TensorReductionOp< ReduceOp, Dims, const TensorIndexTupleOp< ArgType > >, Device > m_impl
Definition: TensorArgMax.h:320
Eigen::TensorTupleReducerOp::reduce_op
const EIGEN_DEVICE_FUNC ReduceOp & reduce_op() const
Definition: TensorArgMax.h:197
Eigen::internal::traits< TensorTupleReducerOp< ReduceOp, Dims, XprType > >::_Nested
remove_reference< Nested >::type _Nested
Definition: TensorArgMax.h:155
Eigen::TensorEvaluator< const TensorIndexTupleOp< ArgType >, Device >::TensorBlock
internal::TensorBlockNotImplemented TensorBlock
Definition: TensorArgMax.h:99
Eigen::TensorTupleReducerOp::return_dim
EIGEN_DEVICE_FUNC Index return_dim() const
Definition: TensorArgMax.h:203
Eigen::TensorEvaluator< const TensorTupleReducerOp< ReduceOp, Dims, ArgType >, Device >::dimensions
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Dimensions & dimensions() const
Definition: TensorArgMax.h:262
Eigen::TensorIndexTupleOp::expression
const EIGEN_DEVICE_FUNC internal::remove_all< typename XprType::Nested >::type & expression() const
Definition: TensorArgMax.h:68
Eigen::TensorEvaluator< const TensorTupleReducerOp< ReduceOp, Dims, ArgType >, Device >::TupleType
TensorIndexTupleOp< ArgType >::CoeffReturnType TupleType
Definition: TensorArgMax.h:220
Eigen::TensorEvaluator< const TensorIndexTupleOp< ArgType >, Device >::XprType
TensorIndexTupleOp< ArgType > XprType
Definition: TensorArgMax.h:78
Eigen::internal::traits< TensorTupleReducerOp< ReduceOp, Dims, XprType > >::XprTraits
traits< XprType > XprTraits
Definition: TensorArgMax.h:150
EIGEN_STRONG_INLINE
#define EIGEN_STRONG_INLINE
Definition: Macros.h:917
Eigen::TensorEvaluator::PreferBlockAccess
@ PreferBlockAccess
Definition: TensorEvaluator.h:49
Eigen::TensorEvaluator< const TensorTupleReducerOp< ReduceOp, Dims, ArgType >, Device >::m_return_dim
const Index m_return_dim
Definition: TensorArgMax.h:321
Eigen::internal::traits< TensorIndexTupleOp< XprType > >::Nested
XprType::Nested Nested
Definition: TensorArgMax.h:31
Eigen::Triplet< double >
Eigen::TensorEvaluator< const TensorTupleReducerOp< ReduceOp, Dims, ArgType >, Device >::cleanup
EIGEN_STRONG_INLINE void cleanup()
Definition: TensorArgMax.h:270
Eigen::TensorTupleReducerOp::Scalar
Eigen::internal::traits< TensorTupleReducerOp >::Scalar Scalar
Definition: TensorArgMax.h:179
Eigen::TensorIndexTupleOp::m_xpr
XprType::Nested m_xpr
Definition: TensorArgMax.h:71
Eigen::StorageMemory
Definition: TensorForwardDeclarations.h:37
Eigen::internal::traits< TensorTupleReducerOp< ReduceOp, Dims, XprType > >::StorageKind
XprTraits::StorageKind StorageKind
Definition: TensorArgMax.h:151
Eigen::TensorBase
The tensor base class.
Definition: TensorBase.h:973
Eigen::TensorTupleReducerOp::Nested
Eigen::internal::nested< TensorTupleReducerOp >::type Nested
Definition: TensorArgMax.h:181
Eigen::internal::array_prod
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::ptrdiff_t array_prod(const Sizes< Indices... > &)
Definition: TensorDimensions.h:140
Eigen::internal::array_size
Definition: Meta.h:445
Eigen::TensorTupleReducerOp
Definition: TensorArgMax.h:176
Eigen::internal::traits< TensorIndexTupleOp< XprType > >::Index
XprTraits::Index Index
Definition: TensorArgMax.h:29
Eigen::TensorEvaluator::BlockAccess
@ BlockAccess
Definition: TensorEvaluator.h:48
Eigen::TensorEvaluator< const TensorTupleReducerOp< ReduceOp, Dims, ArgType >, Device >::gen_strides
EIGEN_DEVICE_FUNC void gen_strides(const InputDimensions &dims, StrideDims &strides)
Definition: TensorArgMax.h:296
Eigen::internal::nested< TensorIndexTupleOp< XprType >, 1, typename eval< TensorIndexTupleOp< XprType > >::type >::type
TensorIndexTupleOp< XprType > type
Definition: TensorArgMax.h:47
Eigen::TensorTupleReducerOp::reduce_dims
const EIGEN_DEVICE_FUNC Dims & reduce_dims() const
Definition: TensorArgMax.h:200
Eigen::internal::traits< TensorTupleReducerOp< ReduceOp, Dims, XprType > >::Scalar
Index Scalar
Definition: TensorArgMax.h:153
Eigen::TensorTupleReducerOp::m_return_dim
const Index m_return_dim
Definition: TensorArgMax.h:208
Eigen::internal::traits
Definition: ForwardDeclarations.h:17
Eigen::TensorEvaluator< const TensorTupleReducerOp< ReduceOp, Dims, ArgType >, Device >::CoeffReturnType
XprType::CoeffReturnType CoeffReturnType
Definition: TensorArgMax.h:219
Eigen::TensorEvaluator< const TensorTupleReducerOp< ReduceOp, Dims, ArgType >, Device >::TensorEvaluator
EIGEN_STRONG_INLINE TensorEvaluator(const XprType &op, const Device &device)
Definition: TensorArgMax.h:243
Eigen::TensorEvaluator< const TensorIndexTupleOp< ArgType >, Device >::CoeffReturnType
XprType::CoeffReturnType CoeffReturnType
Definition: TensorArgMax.h:81
Eigen::TensorEvaluator< const TensorIndexTupleOp< ArgType >, Device >::Storage
StorageMemory< CoeffReturnType, Device > Storage
Definition: TensorArgMax.h:85
EIGEN_DEVICE_REF
#define EIGEN_DEVICE_REF
Definition: TensorMacros.h:50
v
Array< int, Dynamic, 1 > v
Definition: Array_initializer_list_vector_cxx11.cpp:1
Eigen::TensorIndexTupleOp::TensorIndexTupleOp
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorIndexTupleOp(const XprType &expr)
Definition: TensorArgMax.h:63
Eigen::TensorEvaluator
A cost model used to limit the number of threads used for evaluating tensor expression.
Definition: TensorEvaluator.h:28
Eigen::TensorEvaluator< const TensorTupleReducerOp< ReduceOp, Dims, ArgType >, Device >::m_stride_mod
Index m_stride_mod
Definition: TensorArgMax.h:323
Eigen::TensorEvaluator< const TensorTupleReducerOp< ReduceOp, Dims, ArgType >, Device >::StrideDims
array< Index, NumDims > StrideDims
Definition: TensorArgMax.h:224
Eigen::TensorTupleReducerOp::RealScalar
Eigen::NumTraits< Scalar >::Real RealScalar
Definition: TensorArgMax.h:180
internal
Definition: BandTriangularSolver.h:13
Eigen::TensorEvaluator< const TensorIndexTupleOp< ArgType >, Device >::coeff
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
Definition: TensorArgMax.h:117
Eigen::TensorEvaluator::CoeffReturnType
Derived::Scalar CoeffReturnType
Definition: TensorEvaluator.h:32
NULL
#define NULL
Definition: ccolamd.c:609
Eigen::TensorTupleReducerOp::TensorTupleReducerOp
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorTupleReducerOp(const XprType &expr, const ReduceOp &reduce_op, const Index return_dim, const Dims &reduce_dims)
Definition: TensorArgMax.h:186
Eigen::TensorEvaluator< const TensorTupleReducerOp< ReduceOp, Dims, ArgType >, Device >::evalSubExprsIfNeeded
EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType)
Definition: TensorArgMax.h:266
Eigen::internal::traits< TensorTupleReducerOp< ReduceOp, Dims, XprType > >::Index
XprTraits::Index Index
Definition: TensorArgMax.h:152
Eigen::TensorIndexTupleOp::RealScalar
Eigen::NumTraits< Scalar >::Real RealScalar
Definition: TensorArgMax.h:57
Eigen::ColMajor
@ ColMajor
Definition: Constants.h:319
Eigen::TensorEvaluator::IsAligned
@ IsAligned
Definition: TensorEvaluator.h:46
Eigen::internal::eval
Definition: XprHelper.h:332
Eigen::TensorEvaluator::PacketAccess
@ PacketAccess
Definition: TensorEvaluator.h:47
Eigen::TensorOpCost
Definition: TensorCostModel.h:25
Eigen::internal::traits< TensorIndexTupleOp< XprType > >::XprTraits
traits< XprType > XprTraits
Definition: TensorArgMax.h:27
Eigen::TensorIndexTupleOp::CoeffReturnType
Tuple< Index, typename XprType::CoeffReturnType > CoeffReturnType
Definition: TensorArgMax.h:61
i
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Eigen::TensorIndexTupleOp
Definition: TensorArgMax.h:53
Eigen::TensorEvaluator< const TensorIndexTupleOp< ArgType >, Device >::Dimensions
TensorEvaluator< ArgType, Device >::Dimensions Dimensions
Definition: TensorArgMax.h:83
Eigen::TensorEvaluator< const TensorTupleReducerOp< ReduceOp, Dims, ArgType >, Device >::TupleStorageMem
StorageMemory< TupleType, Device > TupleStorageMem
Definition: TensorArgMax.h:227
Eigen::TensorTupleReducerOp::m_reduce_op
const ReduceOp m_reduce_op
Definition: TensorArgMax.h:207
Eigen::Index
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74
Eigen::Dense
Definition: Constants.h:507
Eigen::TensorEvaluator< const TensorTupleReducerOp< ReduceOp, Dims, ArgType >, Device >::EvaluatorPointerType
Storage::Type EvaluatorPointerType
Definition: TensorArgMax.h:226


gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:37:02