TensorChipping.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_CHIPPING_H
11 #define EIGEN_CXX11_TENSOR_TENSOR_CHIPPING_H
12 
13 namespace Eigen {
14 
23 namespace internal {
24 template<DenseIndex DimId, typename XprType>
25 struct traits<TensorChippingOp<DimId, XprType> > : public traits<XprType>
26 {
27  typedef typename XprType::Scalar Scalar;
29  typedef typename XprTraits::StorageKind StorageKind;
30  typedef typename XprTraits::Index Index;
31  typedef typename XprType::Nested Nested;
33  static const int NumDimensions = XprTraits::NumDimensions - 1;
34  static const int Layout = XprTraits::Layout;
35 };
36 
37 template<DenseIndex DimId, typename XprType>
38 struct eval<TensorChippingOp<DimId, XprType>, Eigen::Dense>
39 {
41 };
42 
43 template<DenseIndex DimId, typename XprType>
44 struct nested<TensorChippingOp<DimId, XprType>, 1, typename eval<TensorChippingOp<DimId, XprType> >::type>
45 {
47 };
48 
49 template <DenseIndex DimId>
51 {
52  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DimensionId(DenseIndex dim) {
53  eigen_assert(dim == DimId);
54  }
55  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DenseIndex actualDim() const {
56  return DimId;
57  }
58 };
59 template <>
61 {
62  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DimensionId(DenseIndex dim) : actual_dim(dim) {
63  eigen_assert(dim >= 0);
64  }
65  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DenseIndex actualDim() const {
66  return actual_dim;
67  }
68  private:
70 };
71 
72 
73 } // end namespace internal
74 
75 
76 
77 template<DenseIndex DimId, typename XprType>
78 class TensorChippingOp : public TensorBase<TensorChippingOp<DimId, XprType> >
79 {
80  public:
83  typedef typename XprType::CoeffReturnType CoeffReturnType;
87 
88  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorChippingOp(const XprType& expr, const Index offset, const Index dim)
89  : m_xpr(expr), m_offset(offset), m_dim(dim) {
90  }
91 
92  EIGEN_DEVICE_FUNC
93  const Index offset() const { return m_offset; }
94  EIGEN_DEVICE_FUNC
95  const Index dim() const { return m_dim.actualDim(); }
96 
97  EIGEN_DEVICE_FUNC
99  expression() const { return m_xpr; }
100 
101  EIGEN_DEVICE_FUNC
103  {
105  Assign assign(*this, other);
107  return *this;
108  }
109 
110  template<typename OtherDerived>
111  EIGEN_DEVICE_FUNC
113  {
115  Assign assign(*this, other);
117  return *this;
118  }
119 
120  protected:
121  typename XprType::Nested m_xpr;
124 };
125 
126 
127 // Eval as rvalue
128 template<DenseIndex DimId, typename ArgType, typename Device>
129 struct TensorEvaluator<const TensorChippingOp<DimId, ArgType>, Device>
130 {
133  static const int NumDims = NumInputDims-1;
134  typedef typename XprType::Index Index;
136  typedef typename XprType::Scalar Scalar;
140 
141 
142  enum {
143  // Alignment can't be guaranteed at compile time since it depends on the
144  // slice offsets.
145  IsAligned = false,
148  CoordAccess = false, // to be implemented
149  RawAccess = false
150  };
151 
152  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)
153  : m_impl(op.expression(), device), m_dim(op.dim()), m_device(device)
154  {
155  EIGEN_STATIC_ASSERT((NumInputDims >= 1), YOU_MADE_A_PROGRAMMING_MISTAKE);
156  eigen_assert(NumInputDims > m_dim.actualDim());
157 
158  const typename TensorEvaluator<ArgType, Device>::Dimensions& input_dims = m_impl.dimensions();
159  eigen_assert(op.offset() < input_dims[m_dim.actualDim()]);
160 
161  int j = 0;
162  for (int i = 0; i < NumInputDims; ++i) {
163  if (i != m_dim.actualDim()) {
164  m_dimensions[j] = input_dims[i];
165  ++j;
166  }
167  }
168 
169  m_stride = 1;
170  m_inputStride = 1;
171  if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {
172  for (int i = 0; i < m_dim.actualDim(); ++i) {
173  m_stride *= input_dims[i];
174  m_inputStride *= input_dims[i];
175  }
176  } else {
177  for (int i = NumInputDims-1; i > m_dim.actualDim(); --i) {
178  m_stride *= input_dims[i];
179  m_inputStride *= input_dims[i];
180  }
181  }
182  m_inputStride *= input_dims[m_dim.actualDim()];
183  m_inputOffset = m_stride * op.offset();
184  }
185 
186  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions& dimensions() const { return m_dimensions; }
187 
188  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(Scalar* /*data*/) {
189  m_impl.evalSubExprsIfNeeded(NULL);
190  return true;
191  }
192 
193  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {
194  m_impl.cleanup();
195  }
196 
197  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
198  {
199  return m_impl.coeff(srcCoeff(index));
200  }
201 
202  template<int LoadMode>
203  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const
204  {
205  EIGEN_STATIC_ASSERT((PacketSize > 1), YOU_MADE_A_PROGRAMMING_MISTAKE)
206  eigen_assert(index+PacketSize-1 < dimensions().TotalSize());
207 
208  if ((static_cast<int>(Layout) == static_cast<int>(ColMajor) && m_dim.actualDim() == 0) ||
209  (static_cast<int>(Layout) == static_cast<int>(RowMajor) && m_dim.actualDim() == NumInputDims-1)) {
210  // m_stride is equal to 1, so let's avoid the integer division.
211  eigen_assert(m_stride == 1);
212  Index inputIndex = index * m_inputStride + m_inputOffset;
214  for (int i = 0; i < PacketSize; ++i) {
215  values[i] = m_impl.coeff(inputIndex);
216  inputIndex += m_inputStride;
217  }
218  PacketReturnType rslt = internal::pload<PacketReturnType>(values);
219  return rslt;
220  } else if ((static_cast<int>(Layout) == static_cast<int>(ColMajor) && m_dim.actualDim() == NumInputDims - 1) ||
221  (static_cast<int>(Layout) == static_cast<int>(RowMajor) && m_dim.actualDim() == 0)) {
222  // m_stride is aways greater than index, so let's avoid the integer division.
223  eigen_assert(m_stride > index);
224  return m_impl.template packet<LoadMode>(index + m_inputOffset);
225  } else {
226  const Index idx = index / m_stride;
227  const Index rem = index - idx * m_stride;
228  if (rem + PacketSize <= m_stride) {
229  Index inputIndex = idx * m_inputStride + m_inputOffset + rem;
230  return m_impl.template packet<LoadMode>(inputIndex);
231  } else {
232  // Cross the stride boundary. Fallback to slow path.
234  for (int i = 0; i < PacketSize; ++i) {
235  values[i] = coeff(index);
236  ++index;
237  }
238  PacketReturnType rslt = internal::pload<PacketReturnType>(values);
239  return rslt;
240  }
241  }
242  }
243 
244  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost
245  costPerCoeff(bool vectorized) const {
246  double cost = 0;
247  if ((static_cast<int>(Layout) == static_cast<int>(ColMajor) &&
248  m_dim.actualDim() == 0) ||
249  (static_cast<int>(Layout) == static_cast<int>(RowMajor) &&
250  m_dim.actualDim() == NumInputDims - 1)) {
251  cost += TensorOpCost::MulCost<Index>() + TensorOpCost::AddCost<Index>();
252  } else if ((static_cast<int>(Layout) == static_cast<int>(ColMajor) &&
253  m_dim.actualDim() == NumInputDims - 1) ||
254  (static_cast<int>(Layout) == static_cast<int>(RowMajor) &&
255  m_dim.actualDim() == 0)) {
256  cost += TensorOpCost::AddCost<Index>();
257  } else {
258  cost += 3 * TensorOpCost::MulCost<Index>() + TensorOpCost::DivCost<Index>() +
259  3 * TensorOpCost::AddCost<Index>();
260  }
261 
262  return m_impl.costPerCoeff(vectorized) +
263  TensorOpCost(0, 0, cost, vectorized, PacketSize);
264  }
265 
266  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType* data() const {
267  CoeffReturnType* result = const_cast<CoeffReturnType*>(m_impl.data());
268  if (((static_cast<int>(Layout) == static_cast<int>(ColMajor) && m_dim.actualDim() == NumDims) ||
269  (static_cast<int>(Layout) == static_cast<int>(RowMajor) && m_dim.actualDim() == 0)) &&
270  result) {
271  return result + m_inputOffset;
272  } else {
273  return NULL;
274  }
275  }
276 
277  protected:
278  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index srcCoeff(Index index) const
279  {
280  Index inputIndex;
281  if ((static_cast<int>(Layout) == static_cast<int>(ColMajor) && m_dim.actualDim() == 0) ||
282  (static_cast<int>(Layout) == static_cast<int>(RowMajor) && m_dim.actualDim() == NumInputDims-1)) {
283  // m_stride is equal to 1, so let's avoid the integer division.
284  eigen_assert(m_stride == 1);
285  inputIndex = index * m_inputStride + m_inputOffset;
286  } else if ((static_cast<int>(Layout) == static_cast<int>(ColMajor) && m_dim.actualDim() == NumInputDims-1) ||
287  (static_cast<int>(Layout) == static_cast<int>(RowMajor) && m_dim.actualDim() == 0)) {
288  // m_stride is aways greater than index, so let's avoid the integer division.
289  eigen_assert(m_stride > index);
290  inputIndex = index + m_inputOffset;
291  } else {
292  const Index idx = index / m_stride;
293  inputIndex = idx * m_inputStride + m_inputOffset;
294  index -= idx * m_stride;
295  inputIndex += index;
296  }
297  return inputIndex;
298  }
299 
306  const Device& m_device;
307 };
308 
309 
310 // Eval as lvalue
311 template<DenseIndex DimId, typename ArgType, typename Device>
312 struct TensorEvaluator<TensorChippingOp<DimId, ArgType>, Device>
313  : public TensorEvaluator<const TensorChippingOp<DimId, ArgType>, Device>
314 {
318  static const int NumDims = NumInputDims-1;
319  typedef typename XprType::Index Index;
321  typedef typename XprType::Scalar Scalar;
325 
326  enum {
327  IsAligned = false,
329  RawAccess = false
330  };
331 
332  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)
333  : Base(op, device)
334  { }
335 
337  {
338  return this->m_impl.coeffRef(this->srcCoeff(index));
339  }
340 
341  template <int StoreMode> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
342  void writePacket(Index index, const PacketReturnType& x)
343  {
344  EIGEN_STATIC_ASSERT((PacketSize > 1), YOU_MADE_A_PROGRAMMING_MISTAKE)
345 
346  if ((static_cast<int>(this->Layout) == static_cast<int>(ColMajor) && this->m_dim.actualDim() == 0) ||
347  (static_cast<int>(this->Layout) == static_cast<int>(RowMajor) && this->m_dim.actualDim() == NumInputDims-1)) {
348  // m_stride is equal to 1, so let's avoid the integer division.
349  eigen_assert(this->m_stride == 1);
351  internal::pstore<CoeffReturnType, PacketReturnType>(values, x);
352  Index inputIndex = index * this->m_inputStride + this->m_inputOffset;
353  for (int i = 0; i < PacketSize; ++i) {
354  this->m_impl.coeffRef(inputIndex) = values[i];
355  inputIndex += this->m_inputStride;
356  }
357  } else if ((static_cast<int>(this->Layout) == static_cast<int>(ColMajor) && this->m_dim.actualDim() == NumInputDims-1) ||
358  (static_cast<int>(this->Layout) == static_cast<int>(RowMajor) && this->m_dim.actualDim() == 0)) {
359  // m_stride is aways greater than index, so let's avoid the integer division.
360  eigen_assert(this->m_stride > index);
361  this->m_impl.template writePacket<StoreMode>(index + this->m_inputOffset, x);
362  } else {
363  const Index idx = index / this->m_stride;
364  const Index rem = index - idx * this->m_stride;
365  if (rem + PacketSize <= this->m_stride) {
366  const Index inputIndex = idx * this->m_inputStride + this->m_inputOffset + rem;
367  this->m_impl.template writePacket<StoreMode>(inputIndex, x);
368  } else {
369  // Cross stride boundary. Fallback to slow path.
371  internal::pstore<CoeffReturnType, PacketReturnType>(values, x);
372  for (int i = 0; i < PacketSize; ++i) {
373  this->coeffRef(index) = values[i];
374  ++index;
375  }
376  }
377  }
378  }
379 };
380 
381 
382 } // end namespace Eigen
383 
384 #endif // EIGEN_CXX11_TENSOR_TENSOR_CHIPPING_H
Eigen::TensorEvaluator::dimensions
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Dimensions & dimensions() const
Definition: TensorEvaluator.h:54
Eigen::TensorEvaluator::device
const Device & device() const
required by sycl in order to construct sycl buffer from raw pointer
Definition: TensorEvaluator.h:114
Eigen::TensorEvaluator< const TensorChippingOp< DimId, ArgType >, Device >::m_device
const Device & m_device
Definition: TensorChipping.h:306
Eigen::TensorEvaluator< const TensorChippingOp< DimId, ArgType >, Device >::coeff
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
Definition: TensorChipping.h:197
Eigen::TensorChippingOp::Nested
Eigen::internal::nested< TensorChippingOp >::type Nested
Definition: TensorChipping.h:84
Eigen::TensorEvaluator< const TensorChippingOp< DimId, ArgType >, Device >::data
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType * data() const
Definition: TensorChipping.h:266
Eigen
Definition: common.h:73
Eigen::TensorEvaluator< const TensorChippingOp< DimId, ArgType >, Device >::cleanup
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup()
Definition: TensorChipping.h:193
Eigen::TensorChippingOp::m_dim
const internal::DimensionId< DimId > m_dim
Definition: TensorChipping.h:123
Eigen::internal::DimensionId
Definition: TensorChipping.h:50
Eigen::TensorEvaluator< const TensorChippingOp< DimId, ArgType >, Device >::m_inputStride
Index m_inputStride
Definition: TensorChipping.h:303
Eigen::TensorEvaluator::m_device
const Device & m_device
Definition: TensorEvaluator.h:119
Eigen::internal::nested
Definition: TensorTraits.h:170
Eigen::TensorEvaluator< const TensorChippingOp< DimId, ArgType >, Device >::srcCoeff
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index srcCoeff(Index index) const
Definition: TensorChipping.h:278
Eigen::TensorEvaluator::PacketAccess
@ PacketAccess
Definition: TensorEvaluator.h:42
Eigen::TensorEvaluator< const TensorChippingOp< DimId, ArgType >, Device >::packet
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const
Definition: TensorChipping.h:203
Eigen::TensorEvaluator< const TensorChippingOp< DimId, ArgType >, Device >
Definition: TensorChipping.h:129
Eigen::internal::DimensionId< Dynamic >::DimensionId
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DimensionId(DenseIndex dim)
Definition: TensorChipping.h:62
eigen_assert
#define eigen_assert(x)
Definition: Macros.h:579
Eigen::TensorChippingOp::RealScalar
Eigen::NumTraits< Scalar >::Real RealScalar
Definition: TensorChipping.h:82
Eigen::TensorEvaluator::m_impl
const Derived & m_impl
Definition: TensorEvaluator.h:120
Eigen::PacketType::type
internal::packet_traits< Scalar >::type type
Definition: TensorMeta.h:51
Eigen::internal::remove_all::type
T type
Definition: Meta.h:78
Eigen::TensorEvaluator< const TensorChippingOp< DimId, ArgType >, Device >::Scalar
XprType::Scalar Scalar
Definition: TensorChipping.h:136
Eigen::internal::traits< TensorChippingOp< DimId, XprType > >::Scalar
XprType::Scalar Scalar
Definition: TensorChipping.h:27
Eigen::TensorEvaluator< TensorChippingOp< DimId, ArgType >, Device >::PacketReturnType
PacketType< CoeffReturnType, Device >::type PacketReturnType
Definition: TensorChipping.h:323
Eigen::TensorChippingOp::CoeffReturnType
XprType::CoeffReturnType CoeffReturnType
Definition: TensorChipping.h:83
Eigen::TensorEvaluator< TensorChippingOp< DimId, ArgType >, Device >::Index
XprType::Index Index
Definition: TensorChipping.h:319
Scalar
SCALAR Scalar
Definition: common.h:84
Eigen::RowMajor
@ RowMajor
Definition: Constants.h:322
Eigen::TensorEvaluator< const TensorChippingOp< DimId, ArgType >, Device >::XprType
TensorChippingOp< DimId, ArgType > XprType
Definition: TensorChipping.h:131
Eigen::internal::traits< TensorChippingOp< DimId, XprType > >::Nested
XprType::Nested Nested
Definition: TensorChipping.h:31
EIGEN_ALIGN_MAX
#define EIGEN_ALIGN_MAX
Definition: Macros.h:757
Eigen::TensorEvaluator::coeffRef
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index index)
Definition: TensorEvaluator.h:71
Eigen::internal::traits< TensorChippingOp< DimId, XprType > >::XprTraits
traits< XprType > XprTraits
Definition: TensorChipping.h:28
Eigen::TensorEvaluator< const TensorChippingOp< DimId, ArgType >, Device >::PacketReturnType
PacketType< CoeffReturnType, Device >::type PacketReturnType
Definition: TensorChipping.h:138
Eigen::TensorChippingOp::expression
const EIGEN_DEVICE_FUNC internal::remove_all< typename XprType::Nested >::type & expression() const
Definition: TensorChipping.h:99
Eigen::DSizes< Index, NumDims >
Eigen::TensorEvaluator< const TensorChippingOp< DimId, ArgType >, Device >::m_stride
Index m_stride
Definition: TensorChipping.h:301
Eigen::TensorEvaluator< TensorChippingOp< DimId, ArgType >, Device >::CoeffReturnType
XprType::CoeffReturnType CoeffReturnType
Definition: TensorChipping.h:322
Eigen::DefaultDevice
Definition: TensorDeviceDefault.h:17
Eigen::TensorEvaluator< const TensorChippingOp< DimId, ArgType >, Device >::m_inputOffset
Index m_inputOffset
Definition: TensorChipping.h:302
Eigen::internal::true_type
Definition: Meta.h:54
Eigen::internal::remove_reference::type
T type
Definition: Meta.h:66
Eigen::TensorEvaluator< TensorChippingOp< DimId, ArgType >, Device >::Dimensions
DSizes< Index, NumDims > Dimensions
Definition: TensorChipping.h:320
Eigen::TensorEvaluator< TensorChippingOp< DimId, ArgType >, Device >::writePacket
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void writePacket(Index index, const PacketReturnType &x)
Definition: TensorChipping.h:342
Eigen::TensorEvaluator< TensorChippingOp< DimId, ArgType >, Device >::TensorEvaluator
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType &op, const Device &device)
Definition: TensorChipping.h:332
Eigen::Dynamic
const int Dynamic
Definition: Constants.h:21
Eigen::TensorEvaluator< const TensorChippingOp< DimId, ArgType >, Device >::m_dim
const internal::DimensionId< DimId > m_dim
Definition: TensorChipping.h:305
Eigen::internal::unpacket_traits
Definition: XprHelper.h:158
Eigen::TensorEvaluator< const TensorChippingOp< DimId, ArgType >, Device >::dimensions
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Dimensions & dimensions() const
Definition: TensorChipping.h:186
Eigen::TensorChippingOp::m_xpr
XprType::Nested m_xpr
Definition: TensorChipping.h:121
Eigen::TensorEvaluator::IsAligned
@ IsAligned
Definition: TensorEvaluator.h:41
x
Scalar * x
Definition: level1_cplx_impl.h:89
EIGEN_STRONG_INLINE
#define EIGEN_STRONG_INLINE
Definition: Macros.h:494
Eigen::TensorEvaluator< TensorChippingOp< DimId, ArgType >, Device >::Base
TensorEvaluator< const TensorChippingOp< DimId, ArgType >, Device > Base
Definition: TensorChipping.h:315
Eigen::TensorChippingOp::operator=
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorChippingOp & operator=(const TensorChippingOp &other)
Definition: TensorChipping.h:102
Eigen::internal::DimensionId::DimensionId
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DimensionId(DenseIndex dim)
Definition: TensorChipping.h:52
Eigen::Map< Matrix< Scalar, Dynamic, Dynamic, ColMajor >, 0, OuterStride<> >
Eigen::TensorBase
The tensor base class.
Definition: TensorBase.h:829
Eigen::TensorEvaluator< const TensorChippingOp< DimId, ArgType >, Device >::m_dimensions
Dimensions m_dimensions
Definition: TensorChipping.h:300
Eigen::TensorChippingOp::TensorChippingOp
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorChippingOp(const XprType &expr, const Index offset, const Index dim)
Definition: TensorChipping.h:88
Eigen::TensorEvaluator::Layout
@ Layout
Definition: TensorEvaluator.h:43
Eigen::TensorEvaluator< const TensorChippingOp< DimId, ArgType >, Device >::m_impl
TensorEvaluator< ArgType, Device > m_impl
Definition: TensorChipping.h:304
Eigen::internal::array_size
Definition: EmulateArray.h:203
Eigen::internal::DimensionId< Dynamic >::actual_dim
const DenseIndex actual_dim
Definition: TensorChipping.h:69
Eigen::TensorChippingOp::offset
const EIGEN_DEVICE_FUNC Index offset() const
Definition: TensorChipping.h:93
Eigen::internal::eval< TensorChippingOp< DimId, XprType >, Eigen::Dense >::type
const typedef TensorChippingOp< DimId, XprType > & type
Definition: TensorChipping.h:40
Eigen::TensorChippingOp
Definition: TensorChipping.h:78
Eigen::internal::traits< TensorChippingOp< DimId, XprType > >::_Nested
remove_reference< Nested >::type _Nested
Definition: TensorChipping.h:32
Eigen::internal::nested< TensorChippingOp< DimId, XprType >, 1, typename eval< TensorChippingOp< DimId, XprType > >::type >::type
TensorChippingOp< DimId, XprType > type
Definition: TensorChipping.h:46
Eigen::internal::traits
Definition: ForwardDeclarations.h:17
Eigen::TensorEvaluator< TensorChippingOp< DimId, ArgType >, Device >::Scalar
XprType::Scalar Scalar
Definition: TensorChipping.h:321
EIGEN_STATIC_ASSERT
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
Definition: StaticAssert.h:124
Eigen::DenseIndex
EIGEN_DEFAULT_DENSE_INDEX_TYPE DenseIndex
Definition: Meta.h:25
Eigen::TensorEvaluator< TensorChippingOp< DimId, ArgType >, Device >::coeffRef
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType & coeffRef(Index index)
Definition: TensorChipping.h:336
Eigen::TensorChippingOp::m_offset
const Index m_offset
Definition: TensorChipping.h:122
Eigen::internal::TensorExecutor::run
static EIGEN_DEVICE_FUNC void run(const Expression &expr, const Device &device=Device())
Definition: TensorExecutor.h:32
Eigen::TensorEvaluator< const TensorChippingOp< DimId, ArgType >, Device >::Dimensions
DSizes< Index, NumDims > Dimensions
Definition: TensorChipping.h:135
Eigen::TensorEvaluator::coeff
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
Definition: TensorEvaluator.h:66
Eigen::TensorEvaluator< const TensorChippingOp< DimId, ArgType >, Device >::CoeffReturnType
XprType::CoeffReturnType CoeffReturnType
Definition: TensorChipping.h:137
Eigen::TensorEvaluator
A cost model used to limit the number of threads used for evaluating tensor expression.
Definition: TensorEvaluator.h:28
Eigen::internal::traits< TensorChippingOp< DimId, XprType > >::StorageKind
XprTraits::StorageKind StorageKind
Definition: TensorChipping.h:29
Eigen::TensorChippingOp::Index
Eigen::internal::traits< TensorChippingOp >::Index Index
Definition: TensorChipping.h:86
Eigen::TensorChippingOp::StorageKind
Eigen::internal::traits< TensorChippingOp >::StorageKind StorageKind
Definition: TensorChipping.h:85
Eigen::TensorEvaluator< TensorChippingOp< DimId, ArgType >, Device >::XprType
TensorChippingOp< DimId, ArgType > XprType
Definition: TensorChipping.h:316
Eigen::internal::DimensionId::actualDim
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DenseIndex actualDim() const
Definition: TensorChipping.h:55
Eigen::internal::DimensionId< Dynamic >::actualDim
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DenseIndex actualDim() const
Definition: TensorChipping.h:65
internal
Definition: BandTriangularSolver.h:13
Eigen::internal::traits< TensorChippingOp< DimId, XprType > >::Index
XprTraits::Index Index
Definition: TensorChipping.h:30
Eigen::ColMajor
@ ColMajor
Definition: Constants.h:320
Eigen::TensorEvaluator< const TensorChippingOp< DimId, ArgType >, Device >::evalSubExprsIfNeeded
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(Scalar *)
Definition: TensorChipping.h:188
Eigen::TensorEvaluator< const TensorChippingOp< DimId, ArgType >, Device >::Index
XprType::Index Index
Definition: TensorChipping.h:134
Eigen::TensorChippingOp::Scalar
Eigen::internal::traits< TensorChippingOp >::Scalar Scalar
Definition: TensorChipping.h:81
Eigen::internal::eval
Definition: XprHelper.h:312
Eigen::TensorEvaluator< const TensorChippingOp< DimId, ArgType >, Device >::TensorEvaluator
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType &op, const Device &device)
Definition: TensorChipping.h:152
Eigen::TensorAssignOp
Definition: TensorAssign.h:60
Eigen::TensorOpCost
Definition: TensorCostModel.h:25
Eigen::TensorChippingOp::dim
const EIGEN_DEVICE_FUNC Index dim() const
Definition: TensorChipping.h:95
Eigen::TensorEvaluator< const TensorChippingOp< DimId, ArgType >, Device >::costPerCoeff
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool vectorized) const
Definition: TensorChipping.h:245
Eigen::GenericNumTraits::Real
T Real
Definition: NumTraits.h:100
Eigen::Index
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:33
Eigen::Dense
Definition: Constants.h:491


control_box_rst
Author(s): Christoph Rösmann
autogenerated on Wed Mar 2 2022 00:06:37