Reshaped.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) 2008-2017 Gael Guennebaud <gael.guennebaud@inria.fr>
5 // Copyright (C) 2014 yoco <peter.xiau@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_RESHAPED_H
12 #define EIGEN_RESHAPED_H
13 
14 namespace Eigen {
15 
46 namespace internal {
47 
48 template<typename XprType, int Rows, int Cols, int Order>
49 struct traits<Reshaped<XprType, Rows, Cols, Order> > : traits<XprType>
50 {
51  typedef typename traits<XprType>::Scalar Scalar;
54  enum{
57  RowsAtCompileTime = Rows,
58  ColsAtCompileTime = Cols,
59  MaxRowsAtCompileTime = Rows,
60  MaxColsAtCompileTime = Cols,
62  ReshapedStorageOrder = (RowsAtCompileTime == 1 && ColsAtCompileTime != 1) ? RowMajor
63  : (ColsAtCompileTime == 1 && RowsAtCompileTime != 1) ? ColMajor
64  : XpxStorageOrder,
65  HasSameStorageOrderAsXprType = (ReshapedStorageOrder == XpxStorageOrder),
66  InnerSize = (ReshapedStorageOrder==int(RowMajor)) ? int(ColsAtCompileTime) : int(RowsAtCompileTime),
67  InnerStrideAtCompileTime = HasSameStorageOrderAsXprType
69  : Dynamic,
70  OuterStrideAtCompileTime = Dynamic,
71 
72  HasDirectAccess = internal::has_direct_access<XprType>::ret
73  && (Order==int(XpxStorageOrder))
75 
76  MaskPacketAccessBit = (InnerSize == Dynamic || (InnerSize % packet_traits<Scalar>::size) == 0)
77  && (InnerStrideAtCompileTime == 1)
78  ? PacketAccessBit : 0,
79  //MaskAlignedBit = ((OuterStrideAtCompileTime!=Dynamic) && (((OuterStrideAtCompileTime * int(sizeof(Scalar))) % 16) == 0)) ? AlignedBit : 0,
80  FlagsLinearAccessBit = (RowsAtCompileTime == 1 || ColsAtCompileTime == 1) ? LinearAccessBit : 0,
81  FlagsLvalueBit = is_lvalue<XprType>::value ? LvalueBit : 0,
82  FlagsRowMajorBit = (ReshapedStorageOrder==int(RowMajor)) ? RowMajorBit : 0,
83  FlagsDirectAccessBit = HasDirectAccess ? DirectAccessBit : 0,
84  Flags0 = traits<XprType>::Flags & ( (HereditaryBits & ~RowMajorBit) | MaskPacketAccessBit),
85 
86  Flags = (Flags0 | FlagsLinearAccessBit | FlagsLvalueBit | FlagsRowMajorBit | FlagsDirectAccessBit)
87  };
88 };
89 
90 template<typename XprType, int Rows, int Cols, int Order, bool HasDirectAccess> class ReshapedImpl_dense;
91 
92 } // end namespace internal
93 
94 template<typename XprType, int Rows, int Cols, int Order, typename StorageKind> class ReshapedImpl;
95 
96 template<typename XprType, int Rows, int Cols, int Order> class Reshaped
97  : public ReshapedImpl<XprType, Rows, Cols, Order, typename internal::traits<XprType>::StorageKind>
98 {
100  public:
101  //typedef typename Impl::Base Base;
102  typedef Impl Base;
105 
106 
109  inline Reshaped(XprType& xpr)
110  : Impl(xpr)
111  {
112  EIGEN_STATIC_ASSERT(RowsAtCompileTime!=Dynamic && ColsAtCompileTime!=Dynamic,THIS_METHOD_IS_ONLY_FOR_FIXED_SIZE)
113  eigen_assert(Rows * Cols == xpr.rows() * xpr.cols());
114  }
115 
119  inline Reshaped(XprType& xpr,
120  Index reshapeRows, Index reshapeCols)
121  : Impl(xpr, reshapeRows, reshapeCols)
122  {
123  eigen_assert((RowsAtCompileTime==Dynamic || RowsAtCompileTime==reshapeRows)
124  && (ColsAtCompileTime==Dynamic || ColsAtCompileTime==reshapeCols));
125  eigen_assert(reshapeRows * reshapeCols == xpr.rows() * xpr.cols());
126  }
127 };
128 
129 // The generic default implementation for dense reshape simply forward to the internal::ReshapedImpl_dense
130 // that must be specialized for direct and non-direct access...
131 template<typename XprType, int Rows, int Cols, int Order>
132 class ReshapedImpl<XprType, Rows, Cols, Order, Dense>
133  : public internal::ReshapedImpl_dense<XprType, Rows, Cols, Order,internal::traits<Reshaped<XprType,Rows,Cols,Order> >::HasDirectAccess>
134 {
136  public:
137  typedef Impl Base;
140  EIGEN_DEVICE_FUNC inline ReshapedImpl(XprType& xpr, Index reshapeRows, Index reshapeCols)
141  : Impl(xpr, reshapeRows, reshapeCols) {}
142 };
143 
144 namespace internal {
145 
147 template<typename XprType, int Rows, int Cols, int Order>
148 class ReshapedImpl_dense<XprType,Rows,Cols,Order,false>
149  : public internal::dense_xpr_base<Reshaped<XprType, Rows, Cols, Order> >::type
150 {
152  public:
153 
157 
158  typedef typename internal::ref_selector<XprType>::non_const_type MatrixTypeNested;
160 
161  class InnerIterator;
162 
167  : m_xpr(xpr), m_rows(Rows), m_cols(Cols)
168  {}
169 
173  inline ReshapedImpl_dense(XprType& xpr, Index nRows, Index nCols)
174  : m_xpr(xpr), m_rows(nRows), m_cols(nCols)
175  {}
176 
177  EIGEN_DEVICE_FUNC Index rows() const { return m_rows; }
178  EIGEN_DEVICE_FUNC Index cols() const { return m_cols; }
179 
180  #ifdef EIGEN_PARSED_BY_DOXYGEN
181 
182  EIGEN_DEVICE_FUNC inline const Scalar* data() const;
183  EIGEN_DEVICE_FUNC inline Index innerStride() const;
184  EIGEN_DEVICE_FUNC inline Index outerStride() const;
185  #endif
186 
190  nestedExpression() const { return m_xpr; }
191 
195  nestedExpression() { return m_xpr; }
196 
197  protected:
198 
202 };
203 
204 
206 template<typename XprType, int Rows, int Cols, int Order>
207 class ReshapedImpl_dense<XprType, Rows, Cols, Order, true>
208  : public MapBase<Reshaped<XprType, Rows, Cols, Order> >
209 {
212  public:
213 
217 
218 
222  : Base(xpr.data()), m_xpr(xpr)
223  {}
224 
228  inline ReshapedImpl_dense(XprType& xpr, Index nRows, Index nCols)
229  : Base(xpr.data(), nRows, nCols),
230  m_xpr(xpr)
231  {}
232 
235  {
236  return m_xpr;
237  }
238 
240  XprType& nestedExpression() { return m_xpr; }
241 
244  inline Index innerStride() const
245  {
246  return m_xpr.innerStride();
247  }
248 
251  inline Index outerStride() const
252  {
253  return ((Flags&RowMajorBit)==RowMajorBit) ? this->cols() : this->rows();
254  }
255 
256  protected:
257 
258  XprTypeNested m_xpr;
259 };
260 
261 // Evaluators
262 template<typename ArgType, int Rows, int Cols, int Order, bool HasDirectAccess> struct reshaped_evaluator;
263 
264 template<typename ArgType, int Rows, int Cols, int Order>
265 struct evaluator<Reshaped<ArgType, Rows, Cols, Order> >
266  : reshaped_evaluator<ArgType, Rows, Cols, Order, traits<Reshaped<ArgType,Rows,Cols,Order> >::HasDirectAccess>
267 {
269  typedef typename XprType::Scalar Scalar;
270  // TODO: should check for smaller packet types
272 
273  enum {
276 
277 // RowsAtCompileTime = traits<XprType>::RowsAtCompileTime,
278 // ColsAtCompileTime = traits<XprType>::ColsAtCompileTime,
279 // MaxRowsAtCompileTime = traits<XprType>::MaxRowsAtCompileTime,
280 // MaxColsAtCompileTime = traits<XprType>::MaxColsAtCompileTime,
281 //
282 // InnerStrideAtCompileTime = traits<XprType>::HasSameStorageOrderAsXprType
283 // ? int(inner_stride_at_compile_time<ArgType>::ret)
284 // : Dynamic,
285 // OuterStrideAtCompileTime = Dynamic,
286 
287  FlagsLinearAccessBit = (traits<XprType>::RowsAtCompileTime == 1 || traits<XprType>::ColsAtCompileTime == 1 || HasDirectAccess) ? LinearAccessBit : 0,
289  FlagsDirectAccessBit = HasDirectAccess ? DirectAccessBit : 0,
291  Flags = Flags0 | FlagsLinearAccessBit | FlagsRowMajorBit | FlagsDirectAccessBit,
292 
295  };
298  {
299  EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);
300  }
301 };
302 
303 template<typename ArgType, int Rows, int Cols, int Order>
304 struct reshaped_evaluator<ArgType, Rows, Cols, Order, /* HasDirectAccess */ false>
305  : evaluator_base<Reshaped<ArgType, Rows, Cols, Order> >
306 {
308 
309  enum {
310  CoeffReadCost = evaluator<ArgType>::CoeffReadCost /* TODO + cost of index computations */,
311 
312  Flags = (evaluator<ArgType>::Flags & (HereditaryBits /*| LinearAccessBit | DirectAccessBit*/)),
313 
314  Alignment = 0
315  };
316 
317  EIGEN_DEVICE_FUNC explicit reshaped_evaluator(const XprType& xpr) : m_argImpl(xpr.nestedExpression()), m_xpr(xpr)
318  {
319  EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);
320  }
321 
322  typedef typename XprType::Scalar Scalar;
323  typedef typename XprType::CoeffReturnType CoeffReturnType;
324 
325  typedef std::pair<Index, Index> RowCol;
326 
327  inline RowCol index_remap(Index rowId, Index colId) const
328  {
329  if(Order==ColMajor)
330  {
331  const Index nth_elem_idx = colId * m_xpr.rows() + rowId;
332  return RowCol(nth_elem_idx % m_xpr.nestedExpression().rows(),
333  nth_elem_idx / m_xpr.nestedExpression().rows());
334  }
335  else
336  {
337  const Index nth_elem_idx = colId + rowId * m_xpr.cols();
338  return RowCol(nth_elem_idx / m_xpr.nestedExpression().cols(),
339  nth_elem_idx % m_xpr.nestedExpression().cols());
340  }
341  }
342 
344  inline Scalar& coeffRef(Index rowId, Index colId)
345  {
347  const RowCol row_col = index_remap(rowId, colId);
348  return m_argImpl.coeffRef(row_col.first, row_col.second);
349  }
350 
352  inline const Scalar& coeffRef(Index rowId, Index colId) const
353  {
354  const RowCol row_col = index_remap(rowId, colId);
355  return m_argImpl.coeffRef(row_col.first, row_col.second);
356  }
357 
360  {
361  const RowCol row_col = index_remap(rowId, colId);
362  return m_argImpl.coeff(row_col.first, row_col.second);
363  }
364 
366  inline Scalar& coeffRef(Index index)
367  {
369  const RowCol row_col = index_remap(Rows == 1 ? 0 : index,
370  Rows == 1 ? index : 0);
371  return m_argImpl.coeffRef(row_col.first, row_col.second);
372 
373  }
374 
376  inline const Scalar& coeffRef(Index index) const
377  {
378  const RowCol row_col = index_remap(Rows == 1 ? 0 : index,
379  Rows == 1 ? index : 0);
380  return m_argImpl.coeffRef(row_col.first, row_col.second);
381  }
382 
384  inline const CoeffReturnType coeff(Index index) const
385  {
386  const RowCol row_col = index_remap(Rows == 1 ? 0 : index,
387  Rows == 1 ? index : 0);
388  return m_argImpl.coeff(row_col.first, row_col.second);
389  }
390 #if 0
392  template<int LoadMode>
393  inline PacketScalar packet(Index rowId, Index colId) const
394  {
395  const RowCol row_col = index_remap(rowId, colId);
396  return m_argImpl.template packet<Unaligned>(row_col.first, row_col.second);
397 
398  }
399 
400  template<int LoadMode>
402  inline void writePacket(Index rowId, Index colId, const PacketScalar& val)
403  {
404  const RowCol row_col = index_remap(rowId, colId);
405  m_argImpl.const_cast_derived().template writePacket<Unaligned>
406  (row_col.first, row_col.second, val);
407  }
408 
409  template<int LoadMode>
411  inline PacketScalar packet(Index index) const
412  {
413  const RowCol row_col = index_remap(RowsAtCompileTime == 1 ? 0 : index,
414  RowsAtCompileTime == 1 ? index : 0);
415  return m_argImpl.template packet<Unaligned>(row_col.first, row_col.second);
416  }
417 
418  template<int LoadMode>
420  inline void writePacket(Index index, const PacketScalar& val)
421  {
422  const RowCol row_col = index_remap(RowsAtCompileTime == 1 ? 0 : index,
423  RowsAtCompileTime == 1 ? index : 0);
424  return m_argImpl.template packet<Unaligned>(row_col.first, row_col.second, val);
425  }
426 #endif
427 protected:
428 
430  const XprType& m_xpr;
431 
432 };
433 
434 template<typename ArgType, int Rows, int Cols, int Order>
435 struct reshaped_evaluator<ArgType, Rows, Cols, Order, /* HasDirectAccess */ true>
436 : mapbase_evaluator<Reshaped<ArgType, Rows, Cols, Order>,
437  typename Reshaped<ArgType, Rows, Cols, Order>::PlainObject>
438 {
440  typedef typename XprType::Scalar Scalar;
441 
443  : mapbase_evaluator<XprType, typename XprType::PlainObject>(xpr)
444  {
445  // TODO: for the 3.4 release, this should be turned to an internal assertion, but let's keep it as is for the beta lifetime
446  eigen_assert(((internal::UIntPtr(xpr.data()) % EIGEN_PLAIN_ENUM_MAX(1,evaluator<XprType>::Alignment)) == 0) && "data is not aligned");
447  }
448 };
449 
450 } // end namespace internal
451 
452 } // end namespace Eigen
453 
454 #endif // EIGEN_RESHAPED_H
Eigen::internal::mapbase_evaluator
Definition: CoreEvaluators.h:881
gtsam.examples.DogLegOptimizerExample.int
int
Definition: DogLegOptimizerExample.py:111
Eigen::internal::variable_if_dynamic< Index, Rows >
Eigen::internal::ReshapedImpl_dense
Definition: Reshaped.h:90
EIGEN_DEVICE_FUNC
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:976
Eigen
Namespace containing all symbols from the Eigen library.
Definition: jet.h:637
Eigen::internal::reshaped_evaluator< ArgType, Rows, Cols, Order, true >::XprType
Reshaped< ArgType, Rows, Cols, Order > XprType
Definition: Reshaped.h:439
Eigen::Reshaped::Impl
ReshapedImpl< XprType, Rows, Cols, Order, typename internal::traits< XprType >::StorageKind > Impl
Definition: Reshaped.h:99
Eigen::internal::reshaped_evaluator< ArgType, Rows, Cols, Order, false >::coeff
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE CoeffReturnType coeff(Index rowId, Index colId) const
Definition: Reshaped.h:359
Eigen::ReshapedImpl
Definition: Reshaped.h:94
Eigen::internal::ReshapedImpl_dense< XprType, Rows, Cols, Order, false >::ReshapedType
Reshaped< XprType, Rows, Cols, Order > ReshapedType
Definition: Reshaped.h:151
Eigen::internal::UIntPtr
std::size_t UIntPtr
Definition: Meta.h:92
Eigen::CwiseBinaryOp
Generic expression where a coefficient-wise binary operator is applied to two expressions.
Definition: CwiseBinaryOp.h:77
Eigen::Reshaped::Reshaped
EIGEN_DEVICE_FUNC Reshaped(XprType &xpr)
Definition: Reshaped.h:109
Eigen::internal::remove_all
Definition: Meta.h:126
Eigen::internal::reshaped_evaluator< ArgType, Rows, Cols, Order, false >::coeffRef
const EIGEN_DEVICE_FUNC Scalar & coeffRef(Index rowId, Index colId) const
Definition: Reshaped.h:352
Eigen::internal::reshaped_evaluator< ArgType, Rows, Cols, Order, false >::RowCol
std::pair< Index, Index > RowCol
Definition: Reshaped.h:325
Eigen::internal::dense_xpr_base
Definition: XprHelper.h:483
eigen_assert
#define eigen_assert(x)
Definition: Macros.h:1037
Eigen::Reshaped::Base
Impl Base
Definition: Reshaped.h:102
Eigen::internal::ReshapedImpl_dense< XprType, Rows, Cols, Order, false >::rows
EIGEN_DEVICE_FUNC Index rows() const
Definition: Reshaped.h:177
Eigen::internal::ReshapedImpl_dense< XprType, Rows, Cols, Order, false >::nestedExpression
EIGEN_DEVICE_FUNC internal::remove_reference< XprType >::type & nestedExpression()
Definition: Reshaped.h:195
Eigen::internal::is_lvalue
Definition: XprHelper.h:659
Eigen::RowMajorBit
const unsigned int RowMajorBit
Definition: Constants.h:66
Eigen::ReshapedImpl< XprType, Rows, Cols, Order, Dense >::Base
Impl Base
Definition: Reshaped.h:137
Eigen::internal::reshaped_evaluator< ArgType, Rows, Cols, Order, false >::coeffRef
EIGEN_DEVICE_FUNC Scalar & coeffRef(Index rowId, Index colId)
Definition: Reshaped.h:344
ret
DenseIndex ret
Definition: level1_cplx_impl.h:44
Eigen::internal::packet_traits
Definition: GenericPacketMath.h:106
EIGEN_CONSTEXPR
#define EIGEN_CONSTEXPR
Definition: Macros.h:787
Eigen::internal::ReshapedImpl_dense< XprType, Rows, Cols, Order, false >::nestedExpression
const EIGEN_DEVICE_FUNC internal::remove_all< XprType >::type & nestedExpression() const
Definition: Reshaped.h:190
Eigen::internal::reshaped_evaluator< ArgType, Rows, Cols, Order, false >::coeffRef
const EIGEN_DEVICE_FUNC Scalar & coeffRef(Index index) const
Definition: Reshaped.h:376
type
Definition: pytypes.h:1491
Eigen::internal::ReshapedImpl_dense< XprType, Rows, Cols, Order, false >::ReshapedImpl_dense
EIGEN_DEVICE_FUNC ReshapedImpl_dense(XprType &xpr, Index nRows, Index nCols)
Definition: Reshaped.h:173
Eigen::internal::traits< Reshaped< XprType, Rows, Cols, Order > >::Scalar
traits< XprType >::Scalar Scalar
Definition: Reshaped.h:51
EIGEN_DENSE_PUBLIC_INTERFACE
#define EIGEN_DENSE_PUBLIC_INTERFACE(Derived)
Definition: Macros.h:1283
Eigen::internal::ReshapedImpl_dense< XprType, Rows, Cols, Order, true >::outerStride
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index outerStride() const
Definition: Reshaped.h:251
Eigen::internal::evaluator< Reshaped< ArgType, Rows, Cols, Order > >::Scalar
XprType::Scalar Scalar
Definition: Reshaped.h:269
Eigen::internal::ReshapedImpl_dense< XprType, Rows, Cols, Order, false >::m_cols
const internal::variable_if_dynamic< Index, Cols > m_cols
Definition: Reshaped.h:201
Eigen::internal::reshaped_evaluator< ArgType, Rows, Cols, Order, false >::coeff
const EIGEN_DEVICE_FUNC CoeffReturnType coeff(Index index) const
Definition: Reshaped.h:384
Eigen::RowMajor
@ RowMajor
Definition: Constants.h:321
Eigen::internal::evaluator_base
Definition: CoreEvaluators.h:110
rows
int rows
Definition: Tutorial_commainit_02.cpp:1
Eigen::DirectAccessBit
const unsigned int DirectAccessBit
Definition: Constants.h:155
Eigen::PacketAccessBit
const unsigned int PacketAccessBit
Definition: Constants.h:94
Eigen::internal::reshaped_evaluator< ArgType, Rows, Cols, Order, false >::coeffRef
EIGEN_DEVICE_FUNC Scalar & coeffRef(Index index)
Definition: Reshaped.h:366
Eigen::Reshaped::Reshaped
EIGEN_DEVICE_FUNC Reshaped(XprType &xpr, Index reshapeRows, Index reshapeCols)
Definition: Reshaped.h:119
Eigen::internal::ReshapedImpl_dense< XprType, Rows, Cols, Order, true >::ReshapedImpl_dense
EIGEN_DEVICE_FUNC ReshapedImpl_dense(XprType &xpr)
Definition: Reshaped.h:221
Eigen::internal::true_type
Definition: Meta.h:96
Eigen::internal::reshaped_evaluator< ArgType, Rows, Cols, Order, false >::index_remap
RowCol index_remap(Index rowId, Index colId) const
Definition: Reshaped.h:327
Eigen::internal::ReshapedImpl_dense< XprType, Rows, Cols, Order, true >::nestedExpression
const EIGEN_DEVICE_FUNC internal::remove_all< XprTypeNested >::type & nestedExpression() const
Definition: Reshaped.h:234
EIGEN_GENERIC_PUBLIC_INTERFACE
#define EIGEN_GENERIC_PUBLIC_INTERFACE(Derived)
Definition: Macros.h:1264
Eigen::internal::evaluator< Reshaped< ArgType, Rows, Cols, Order > >::XprType
Reshaped< ArgType, Rows, Cols, Order > XprType
Definition: Reshaped.h:268
Eigen::internal::reshaped_evaluator< ArgType, Rows, Cols, Order, false >::XprType
Reshaped< ArgType, Rows, Cols, Order > XprType
Definition: Reshaped.h:307
data
int data[]
Definition: Map_placement_new.cpp:1
Eigen::internal::reshaped_evaluator< ArgType, Rows, Cols, Order, false >::m_argImpl
evaluator< ArgType > m_argImpl
Definition: Reshaped.h:429
Eigen::internal::reshaped_evaluator< ArgType, Rows, Cols, Order, false >::m_xpr
const XprType & m_xpr
Definition: Reshaped.h:430
Eigen::internal::ReshapedImpl_dense< XprType, Rows, Cols, Order, true >::m_xpr
XprTypeNested m_xpr
Definition: Reshaped.h:258
Eigen::LvalueBit
const unsigned int LvalueBit
Definition: Constants.h:144
Eigen::MapBase
Definition: ForwardDeclarations.h:112
Eigen::Dynamic
const int Dynamic
Definition: Constants.h:22
Eigen::internal::unpacket_traits
Definition: GenericPacketMath.h:132
EIGEN_STRONG_INLINE
#define EIGEN_STRONG_INLINE
Definition: Macros.h:917
Eigen::internal::evaluator< Reshaped< ArgType, Rows, Cols, Order > >::PacketScalar
packet_traits< Scalar >::type PacketScalar
Definition: Reshaped.h:271
Eigen::internal::ReshapedImpl_dense< XprType, Rows, Cols, Order, false >::Base
internal::dense_xpr_base< ReshapedType >::type Base
Definition: Reshaped.h:154
Eigen::internal::ReshapedImpl_dense< XprType, Rows, Cols, Order, true >::ReshapedType
Reshaped< XprType, Rows, Cols, Order > ReshapedType
Definition: Reshaped.h:210
Eigen::internal::traits< Reshaped< XprType, Rows, Cols, Order > >::StorageKind
traits< XprType >::StorageKind StorageKind
Definition: Reshaped.h:52
Eigen::Triplet< double >
Eigen::internal::ReshapedImpl_dense< XprType, Rows, Cols, Order, false >::m_xpr
MatrixTypeNested m_xpr
Definition: Reshaped.h:199
Eigen::internal::evaluator
Definition: CoreEvaluators.h:90
Eigen::InnerIterator
An InnerIterator allows to loop over the element of any matrix expression.
Definition: CoreIterators.h:33
Eigen::internal::ref_selector
Definition: XprHelper.h:416
Eigen::internal::reshaped_evaluator< ArgType, Rows, Cols, Order, false >::reshaped_evaluator
EIGEN_DEVICE_FUNC reshaped_evaluator(const XprType &xpr)
Definition: Reshaped.h:317
Eigen::internal::ReshapedImpl_dense< XprType, Rows, Cols, Order, true >::XprTypeNested
internal::ref_selector< XprType >::non_const_type XprTypeNested
Definition: Reshaped.h:211
Eigen::internal::inner_stride_at_compile_time
Definition: DenseCoeffsBase.h:658
Eigen::LinearAccessBit
const unsigned int LinearAccessBit
Definition: Constants.h:130
Eigen::CwiseBinaryOp::cols
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
Definition: CwiseBinaryOp.h:125
Eigen::internal::traits
Definition: ForwardDeclarations.h:17
Eigen::internal::evaluator< Reshaped< ArgType, Rows, Cols, Order > >::reshaped_evaluator_type
reshaped_evaluator< ArgType, Rows, Cols, Order, HasDirectAccess > reshaped_evaluator_type
Definition: Reshaped.h:296
Eigen::internal::reshaped_evaluator< ArgType, Rows, Cols, Order, true >::reshaped_evaluator
EIGEN_DEVICE_FUNC reshaped_evaluator(const XprType &xpr)
Definition: Reshaped.h:442
EIGEN_STATIC_ASSERT
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
Definition: StaticAssert.h:127
Eigen::internal::traits< Reshaped< XprType, Rows, Cols, Order > >::XprKind
traits< XprType >::XprKind XprKind
Definition: Reshaped.h:53
Eigen::internal::ReshapedImpl_dense< XprType, Rows, Cols, Order, false >::m_rows
const internal::variable_if_dynamic< Index, Rows > m_rows
Definition: Reshaped.h:200
Eigen::internal::ReshapedImpl_dense< XprType, Rows, Cols, Order, true >::nestedExpression
EIGEN_DEVICE_FUNC XprType & nestedExpression()
Definition: Reshaped.h:240
Eigen::internal::reshaped_evaluator
Definition: Reshaped.h:262
Eigen::internal::reshaped_evaluator< ArgType, Rows, Cols, Order, true >::Scalar
XprType::Scalar Scalar
Definition: Reshaped.h:440
EIGEN_PLAIN_ENUM_MAX
#define EIGEN_PLAIN_ENUM_MAX(a, b)
Definition: Macros.h:1289
Eigen::internal::ReshapedImpl_dense< XprType, Rows, Cols, Order, false >::cols
EIGEN_DEVICE_FUNC Index cols() const
Definition: Reshaped.h:178
Eigen::ReshapedImpl< XprType, Rows, Cols, Order, Dense >::Impl
internal::ReshapedImpl_dense< XprType, Rows, Cols, Order, internal::traits< Reshaped< XprType, Rows, Cols, Order > >::HasDirectAccess > Impl
Definition: Reshaped.h:135
internal
Definition: BandTriangularSolver.h:13
Eigen::internal::ReshapedImpl_dense< XprType, Rows, Cols, Order, true >::ReshapedImpl_dense
EIGEN_DEVICE_FUNC ReshapedImpl_dense(XprType &xpr, Index nRows, Index nCols)
Definition: Reshaped.h:228
Eigen::internal::reshaped_evaluator< ArgType, Rows, Cols, Order, false >::CoeffReturnType
XprType::CoeffReturnType CoeffReturnType
Definition: Reshaped.h:323
Eigen::ColMajor
@ ColMajor
Definition: Constants.h:319
EIGEN_STATIC_ASSERT_LVALUE
#define EIGEN_STATIC_ASSERT_LVALUE(Derived)
Definition: StaticAssert.h:202
Eigen::internal::reshaped_evaluator< ArgType, Rows, Cols, Order, false >::Scalar
XprType::Scalar Scalar
Definition: Reshaped.h:322
Eigen::internal::size
EIGEN_CONSTEXPR Index size(const T &x)
Definition: Meta.h:479
cols
int cols
Definition: Tutorial_commainit_02.cpp:1
EIGEN_INTERNAL_CHECK_COST_VALUE
#define EIGEN_INTERNAL_CHECK_COST_VALUE(C)
Definition: StaticAssert.h:218
Eigen::Reshaped
Expression of a fixed-size or dynamic-size reshape.
Definition: Reshaped.h:96
Eigen::internal::ReshapedImpl_dense< XprType, Rows, Cols, Order, true >::innerStride
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index innerStride() const
Definition: Reshaped.h:244
Eigen::HereditaryBits
const unsigned int HereditaryBits
Definition: Constants.h:195
EIGEN_INHERIT_ASSIGNMENT_OPERATORS
#define EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Derived)
Definition: Macros.h:1231
Eigen::internal::evaluator< Reshaped< ArgType, Rows, Cols, Order > >::evaluator
EIGEN_DEVICE_FUNC evaluator(const XprType &xpr)
Definition: Reshaped.h:297
test_callbacks.value
value
Definition: test_callbacks.py:158
Eigen::ReshapedImpl< XprType, Rows, Cols, Order, Dense >::ReshapedImpl
EIGEN_DEVICE_FUNC ReshapedImpl(XprType &xpr, Index reshapeRows, Index reshapeCols)
Definition: Reshaped.h:140
Eigen::internal::has_direct_access
Definition: ForwardDeclarations.h:25
Eigen::CwiseBinaryOp::rows
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
Definition: CwiseBinaryOp.h:120
Scalar
SCALAR Scalar
Definition: bench_gemm.cpp:46
Eigen::internal::ReshapedImpl_dense< XprType, Rows, Cols, Order, true >::Base
MapBase< ReshapedType > Base
Definition: Reshaped.h:214
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
Cols
static const int Cols
Definition: testCallRecord.cpp:32


gtsam
Author(s):
autogenerated on Thu Jun 13 2024 03:04:56