LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
eigen.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 /*
3  * LSST Data Management System
4  * Copyright 2008, 2009, 2010, 2011 LSST Corporation.
5  *
6  * This product includes software developed by the
7  * LSST Project (http://www.lsst.org/).
8  *
9  * This program is free software: you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation, either version 3 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the LSST License Statement and
20  * the GNU General Public License along with this program. If not,
21  * see <http://www.lsstcorp.org/LegalNotices/>.
22  */
23 #ifndef NDARRAY_eigen_h_INCLUDED
24 #define NDARRAY_eigen_h_INCLUDED
25 
33 #include "Eigen/Core"
34 #include "ndarray.h"
35 #include "ndarray/eigen_fwd.h"
36 
37 namespace ndarray {
38 namespace detail {
39 
40 template <int Rows>
41 struct EigenStrideTraits<1,0,Rows,1> {
42  enum {
43  InnerStride = Eigen::Dynamic,
44  OuterStride = Eigen::Dynamic,
45  IsVector = 1,
46  Flags = Eigen::LinearAccessBit,
47  Options = Eigen::ColMajor | Eigen::AutoAlign
48  };
49  static int getInnerStride(Core<1> const & core) { return core.getStride(); }
50  static int getOuterStride(Core<1> const & core) { return core.getSize() * core.getStride(); }
51  static int getRowStride(Core<1> const & core) { return core.getStride(); }
52  static int getColStride(Core<1> const & core) { return core.getSize() * core.getStride(); }
53  static int getRows(Core<1> const & core) { return core.getSize(); }
54  static int getCols(Core<1> const & core) { return 1; }
55 };
56 
57 template <int Cols>
58 struct EigenStrideTraits<1,0,1,Cols> {
59  enum {
60  InnerStride = Eigen::Dynamic,
61  OuterStride = Eigen::Dynamic,
62  IsVector = 1,
63  Flags = Eigen::LinearAccessBit | Eigen::RowMajorBit,
64  Options = Eigen::RowMajor | Eigen::AutoAlign
65  };
66  static int getInnerStride(Core<1> const & core) { return core.getStride(); }
67  static int getOuterStride(Core<1> const & core) { return core.getSize() * core.getStride(); }
68  static int getRowStride(Core<1> const & core) { return core.getSize() * core.getStride(); }
69  static int getColStride(Core<1> const & core) { return core.getStride(); }
70  static int getRows(Core<1> const & core) { return 1; }
71  static int getCols(Core<1> const & core) { return core.getSize(); }
72 };
73 
74 template <int C>
75 struct EigenStrideTraits<1,C,1,1> {
76  enum {
77  InnerStride = Eigen::Dynamic,
78  OuterStride = Eigen::Dynamic,
79  IsVector = 1,
80  Flags = Eigen::LinearAccessBit,
81  Options = Eigen::ColMajor | Eigen::AutoAlign
82  };
83  static int getInnerStride(Core<1> const & core) { return core.getStride(); }
84  static int getOuterStride(Core<1> const & core) { return core.getStride(); }
85  static int getRowStride(Core<1> const & core) { return core.getStride(); }
86  static int getColStride(Core<1> const & core) { return core.getStride(); }
87  static int getRows(Core<1> const & core) { return 1; }
88  static int getCols(Core<1> const & core) { return 1; }
89 };
90 
91 template <int C, int Rows>
92 struct EigenStrideTraits<1,C,Rows,1> {
93  enum {
94  InnerStride = 1,
95  OuterStride = Eigen::Dynamic,
96  IsVector = 1,
97  Flags = Eigen::LinearAccessBit | Eigen::PacketAccessBit,
98  Options = Eigen::ColMajor | Eigen::AutoAlign
99  };
100  static int getInnerStride(Core<1> const & core) { return 1; }
101  static int getOuterStride(Core<1> const & core) { return core.getSize(); }
102  static int getRowStride(Core<1> const & core) { return 1; }
103  static int getColStride(Core<1> const & core) { return core.getSize(); }
104  static int getRows(Core<1> const & core) { return core.getSize(); }
105  static int getCols(Core<1> const & core) { return 1;}
106 };
107 
108 template <int C, int Cols>
109 struct EigenStrideTraits<1,C,1,Cols> {
110  enum {
111  InnerStride = 1,
112  OuterStride = Eigen::Dynamic,
113  IsVector = 1,
114  Flags = Eigen::LinearAccessBit | Eigen::RowMajorBit | Eigen::PacketAccessBit,
115  Options = Eigen::RowMajor | Eigen::AutoAlign
116  };
117  static int getInnerStride(Core<1> const & core) { return 1; }
118  static int getOuterStride(Core<1> const & core) { return core.getSize(); }
119  static int getRowStride(Core<1> const & core) { return core.getSize(); }
120  static int getColStride(Core<1> const & core) { return 1; }
121  static int getRows(Core<1> const & core) { return 1; }
122  static int getCols(Core<1> const & core) { return core.getSize(); }
123 };
124 
125 template <int Rows, int Cols>
126 struct EigenStrideTraits<2,0,Rows,Cols> {
127  enum {
128  InnerStride = Eigen::Dynamic,
129  OuterStride = Eigen::Dynamic,
130  IsVector = 0,
131  Flags = 0,
132  Options = Eigen::ColMajor | Eigen::AutoAlign
133  };
134  static int getInnerStride(Core<2> const & core) { return core.getStride(); }
135  static int getOuterStride(Core<1> const & core) { return core.getStride(); }
136  static int getRowStride(Core<2> const & core) { return core.getStride(); }
137  static int getColStride(Core<1> const & core) { return core.getStride(); }
138  static int getRows(Core<2> const & core) { return core.getSize(); }
139  static int getCols(Core<1> const & core) { return core.getSize(); }
140 };
141 
142 template <int Rows, int Cols>
143 struct EigenStrideTraits<2,1,Rows,Cols> {
144  enum {
145  InnerStride = 1,
146  OuterStride = Eigen::Dynamic,
147  IsVector = 0,
148  Flags = Eigen::RowMajorBit | Eigen::PacketAccessBit,
149  Options = Eigen::RowMajor | Eigen::AutoAlign
150  };
151  static int getInnerStride(Core<1> const & core) { return 1; }
152  static int getOuterStride(Core<2> const & core) { return core.getStride(); }
153  static int getRowStride(Core<2> const & core) { return core.getStride(); }
154  static int getColStride(Core<1> const & core) { return 1; }
155  static int getRows(Core<2> const & core) { return core.getSize(); }
156  static int getCols(Core<1> const & core) { return core.getSize(); }
157 };
158 
159 template <int Rows, int Cols>
160 struct EigenStrideTraits<2,2,Rows,Cols> : public EigenStrideTraits<2,1,Rows,Cols> {};
161 
162 template <int Rows, int Cols>
163 struct EigenStrideTraits<2,-1,Rows,Cols> {
164  enum {
165  InnerStride = 1,
166  OuterStride = Eigen::Dynamic,
167  IsVector = 0,
168  Flags = Eigen::PacketAccessBit,
169  Options = Eigen::ColMajor | Eigen::AutoAlign
170  };
171  static int getInnerStride(Core<2> const & core) { return 1; }
172  static int getOuterStride(Core<1> const & core) { return core.getStride(); }
173  static int getRowStride(Core<2> const & core) { return 1; }
174  static int getColStride(Core<1> const & core) { return core.getStride(); }
175  static int getRows(Core<2> const & core) { return core.getSize(); }
176  static int getCols(Core<1> const & core) { return core.getSize(); }
177 };
178 
179 template <int Rows, int Cols>
180 struct EigenStrideTraits<2,-2,Rows,Cols> : public EigenStrideTraits<2,-1,Rows,Cols> {};
181 
182 } // namespace detail
183 } // namespace ndarray
184 
185 
186 namespace Eigen {
187 namespace internal {
188 
189 template <typename T, int N, int C, typename XprKind_, int Rows, int Cols>
190 struct traits< ndarray::EigenView<T,N,C,XprKind_,Rows,Cols> > {
191  typedef DenseIndex Index;
192  typedef Dense StorageKind;
193  typedef XprKind_ XprKind;
194  typedef typename boost::remove_const<T>::type Scalar;
195  enum {
196  RowsAtCompileTime = Rows,
197  ColsAtCompileTime = Cols,
198  MaxRowsAtCompileTime = Rows,
199  MaxColsAtCompileTime = Cols,
204  | Eigen::NestByRefBit | Eigen::DirectAccessBit
205  | (boost::is_const<T>::value ? 0 : Eigen::LvalueBit),
206  CoeffReadCost = NumTraits<Scalar>::ReadCost
207  };
208 };
209 
210 } // namespace internal
211 } // namespace Eigen
212 
213 namespace ndarray {
214 
231 template <typename T, int N, int C, typename XprKind_, int Rows_, int Cols_>
233  : public Eigen::internal::dense_xpr_base< EigenView<T,N,C,XprKind_,Rows_,Cols_> >::type
234 {
237 
239  NDARRAY_ASSERT( Rows_ == Eigen::Dynamic || Rows_ == rows() );
240  NDARRAY_ASSERT( Cols_ == Eigen::Dynamic || Cols_ == cols() );
241  }
242 
243 public:
244 
245  typedef typename Eigen::internal::dense_xpr_base< EigenView<T,N,C,XprKind_,Rows_,Cols_> >::type Base;
246 
247  EIGEN_DENSE_PUBLIC_INTERFACE(EigenView)
248 
249  enum { Options = ST::Options };
250 
251  typedef typename boost::mpl::if_<
252  boost::is_same<XprKind_,Eigen::MatrixXpr>,
253  Eigen::Matrix<Scalar,Rows_,Cols_,Options,Rows_,Cols_>,
254  Eigen::Array<Scalar,Rows_,Cols_,Options,Rows_,Cols_>
255  >::type PlainEigenType;
256 
257  typedef T * PointerType;
258 
259  EigenView() : _array() {}
260 
261  EigenView(EigenView const & other) : _array(other._array) {}
262 
263  explicit EigenView(Array<T,N,C> const & array) : _array(array) { checkDimensions(); }
264 
265  EigenView & operator=(EigenView const & other) {
266  // Weird behavior to please SWIG: if we're default-constructed, and it's an exact match,
267  // do shallow assignment; otherwise all assignment is deep.
268  if (_array.getData() == 0) {
269  _array = other._array;
270  } else {
271  Base::operator=(other);
272  }
273  return *this;
274  }
275 
276  template <typename Other>
277  EigenView & operator=(Eigen::DenseBase<Other> const & other) {
278  return Base::operator=(other);
279  }
280 
281  template <typename Other>
282  EigenView & operator=(Eigen::EigenBase<Other> const & other) {
283  return Base::operator=(other);
284  }
285 
286  template <typename Other>
287  EigenView & operator=(Eigen::ReturnByValue<Other> const & other) {
288  return Base::operator=(other);
289  }
290 
291  inline Index innerStride() const { return ST::getInnerStride(*Access::getCore(_array)); }
292  inline Index outerStride() const { return ST::getOuterStride(*Access::getCore(_array)); }
293 
294  inline Index rowStride() const { return ST::getRowStride(*Access::getCore(_array)); }
295  inline Index colStride() const { return ST::getColStride(*Access::getCore(_array)); }
296 
297  inline Index rows() const { return ST::getRows(*Access::getCore(_array)); }
298  inline Index cols() const { return ST::getCols(*Access::getCore(_array)); }
299 
300  inline T* data() const { return _array.getData(); }
301 
302  inline T* data() { return _array.getData(); }
303 
304  inline T& coeff(Index row, Index col) const {
305  return _array.getData()[row * rowStride() + col * colStride()];
306  }
307 
308  inline T& coeff(Index index) const {
309  return _array.getData()[index * innerStride()];
310  }
311 
312  inline T& coeffRef(Index row, Index col) const {
313  return _array.getData()[row * rowStride() + col * colStride()];
314  }
315 
316  inline T& coeffRef(Index row, Index col) {
317  return _array.getData()[row * rowStride() + col * colStride()];
318  }
319 
320  inline T& coeffRef(Index index) const {
321  return _array.getData()[index * innerStride()];
322  }
323 
324  inline T& coeffRef(Index index) {
325  return _array.getData()[index * innerStride()];
326  }
327 
328  template <int LoadMode>
329  inline PacketScalar packet(Index row, Index col) const {
330  return Eigen::internal::ploadt<PacketScalar, LoadMode>(
331  _array.getData() + (col * colStride() + row * rowStride())
332  );
333  }
334 
335  template<int LoadMode>
336  inline PacketScalar packet(Index index) const {
337  BOOST_STATIC_ASSERT( N == 1 );
338  return Eigen::internal::ploadt<PacketScalar, LoadMode>(
339  _array.getData() + index * innerStride()
340  );
341  }
342 
343  template<int StoreMode>
344  inline void writePacket(Index row, Index col, const PacketScalar& x) {
345  BOOST_STATIC_ASSERT( !boost::is_const<T>::value );
346  Eigen::internal::pstoret<Scalar, PacketScalar, StoreMode>(
347  _array.getData() + (col * colStride() + row * rowStride()), x
348  );
349  }
350 
351  template<int StoreMode>
352  inline void writePacket(Index index, const PacketScalar& x) {
353  BOOST_STATIC_ASSERT( !boost::is_const<T>::value );
354  BOOST_STATIC_ASSERT( N == 1 );
355  Eigen::internal::pstoret<Scalar, PacketScalar, StoreMode>(
356  _array.getData() + index * innerStride(), x
357  );
358  }
359 
360  Array<T,N,C> const & shallow() const { return _array; }
361  ArrayRef<T,N,C> deep() const { return _array.deep(); }
362 
363  void reset(Array<T,N,C> const & array) { _array = array; checkDimensions(); }
364  void reset(ArrayRef<T,N,C> const & array) { reset(array.shallow()); }
365 
366 private:
368 };
369 
371 template <typename T, bool contiguous=true>
373  typedef Eigen::internal::traits<T> Traits;
374  typedef typename Traits::Scalar Scalar;
375  typedef typename boost::mpl::if_< boost::is_const<T>, Scalar const, Scalar >::type Element;
376  typedef typename Traits::XprKind XprKind;
377  enum {
378  N = 2,
379  C = ((contiguous) ? ((Traits::Flags & Eigen::RowMajorBit) ? 2 : -2) : 0),
380  Rows = Traits::RowsAtCompileTime,
381  Cols = Traits::ColsAtCompileTime
382  };
386 };
387 
389 template <typename T>
390 inline typename SelectEigenView<T>::Type copy(Eigen::EigenBase<T> const & other) {
391  typename SelectEigenView<T>::Type result(
392  typename SelectEigenView<T>::Shallow(allocate(other.rows(), other.cols()))
393  );
394  result = other.derived();
395  return result;
396 }
397 
398 template <typename Derived>
399 template <typename XprKind, int Rows, int Cols>
400 inline EigenView<typename ArrayBase<Derived>::Element, ArrayBase<Derived>::ND::value,
401  ArrayBase<Derived>::RMC::value, XprKind, Rows, Cols
402  >
405  ArrayBase<Derived>::RMC::value, XprKind, Rows, Cols>(this->getSelf());
406 }
407 
408 template <typename Derived>
409 template <typename XprKind>
414  ArrayBase<Derived>::RMC::value, XprKind>(this->getSelf());
415 }
416 
417 template <typename Derived>
418 template <int Rows, int Cols>
419 inline EigenView<typename ArrayBase<Derived>::Element, ArrayBase<Derived>::ND::value,
420  ArrayBase<Derived>::RMC::value, Eigen::MatrixXpr, Rows, Cols>
421 ArrayBase<Derived>::asEigen() const {
422  return EigenView<typename ArrayBase<Derived>::Element, ArrayBase<Derived>::ND::value,
423  ArrayBase<Derived>::RMC::value, Eigen::MatrixXpr, Rows, Cols>(this->getSelf());
424 }
425 
426 template <typename Derived>
427 inline EigenView<typename ArrayBase<Derived>::Element, ArrayBase<Derived>::ND::value,
428  ArrayBase<Derived>::RMC::value, Eigen::MatrixXpr>
429 ArrayBase<Derived>::asEigen() const {
430  return EigenView<typename ArrayBase<Derived>::Element, ArrayBase<Derived>::ND::value,
431  ArrayBase<Derived>::RMC::value>(this->getSelf());
432 }
433 
434 } // namespace ndarray
435 
436 #endif // !NDARRAY_eigen_h_INCLUDED
static int getCols(Core< 1 > const &core)
Definition: eigen.h:122
A proxy class for Array with deep assignment operators.
Definition: ArrayRef.h:46
static int getCols(Core< 1 > const &core)
Definition: eigen.h:139
Array< T, N, C > _array
Definition: eigen.h:367
static int getRowStride(Core< 1 > const &core)
Definition: eigen.h:68
void reset(ArrayRef< T, N, C > const &array)
Definition: eigen.h:364
Index rows() const
Definition: eigen.h:297
int getStride() const
Return the stride of the Nth dimension.
Definition: Core.h:103
int getSize() const
Return the size of the Nth dimension.
Definition: Core.h:100
static int getRowStride(Core< 2 > const &core)
Definition: eigen.h:136
static int getRowStride(Core< 1 > const &core)
Definition: eigen.h:51
static int getOuterStride(Core< 1 > const &core)
Definition: eigen.h:84
Array< Element, N, C > Shallow
Definition: eigen.h:383
static int getInnerStride(Core< 1 > const &core)
Definition: eigen.h:117
void writePacket(Index row, Index col, const PacketScalar &x)
Definition: eigen.h:344
Eigen3 view into an ndarray::Array.
Definition: eigen.h:232
T & coeff(Index index) const
Definition: eigen.h:308
static int getCols(Core< 1 > const &core)
Definition: eigen.h:105
Eigen::internal::dense_xpr_base< EigenView< T, N, C, XprKind_, Rows_, Cols_ > >::type Base
Definition: eigen.h:245
static int getColStride(Core< 1 > const &core)
Definition: eigen.h:154
T & coeff(Index row, Index col) const
Definition: eigen.h:304
T & coeffRef(Index index) const
Definition: eigen.h:320
Index rowStride() const
Definition: eigen.h:294
T & coeffRef(Index row, Index col) const
Definition: eigen.h:312
static int getColStride(Core< 1 > const &core)
Definition: eigen.h:69
SelectEigenView< T >::Type copy(Eigen::EigenBase< T > const &other)
Copy an arbitrary Eigen expression into a new EigenView.
Definition: eigen.h:390
EigenView(Array< T, N, C > const &array)
Definition: eigen.h:263
boost::mpl::if_< boost::is_same< XprKind_, Eigen::MatrixXpr >, Eigen::Matrix< Scalar, Rows_, Cols_, Options, Rows_, Cols_ >, Eigen::Array< Scalar, Rows_, Cols_, Options, Rows_, Cols_ > >::type PlainEigenType
Definition: eigen.h:255
void reset(Array< T, N, C > const &array)
Definition: eigen.h:363
T * data() const
Definition: eigen.h:300
detail::ArrayAccess< Array< T, N, C > > Access
Definition: eigen.h:236
static int getRowStride(Core< 1 > const &core)
Definition: eigen.h:119
T & coeffRef(Index row, Index col)
Definition: eigen.h:316
static int getCols(Core< 1 > const &core)
Definition: eigen.h:176
A metafunction that computes the EigenView instantiation that most closely matches an Eigen type...
Definition: eigen.h:372
boost::mpl::if_< boost::is_const< T >, Scalar const, Scalar >::type Element
Definition: eigen.h:375
ArrayRef< Element, N, C > Deep
Definition: eigen.h:384
static int getRows(Core< 1 > const &core)
Definition: eigen.h:87
static int getCols(Core< 1 > const &core)
Definition: eigen.h:54
#define NDARRAY_ASSERT(ARG)
Definition: ndarray_fwd.h:51
static int getOuterStride(Core< 1 > const &core)
Definition: eigen.h:101
static int getRows(Core< 1 > const &core)
Definition: eigen.h:104
T & coeffRef(Index index)
Definition: eigen.h:324
static int getRowStride(Core< 2 > const &core)
Definition: eigen.h:173
Index colStride() const
Definition: eigen.h:295
Index outerStride() const
Definition: eigen.h:292
EigenView & operator=(EigenView const &other)
Definition: eigen.h:265
EigenView & operator=(Eigen::DenseBase< Other > const &other)
Definition: eigen.h:277
static int getColStride(Core< 1 > const &core)
Definition: eigen.h:103
static int getRowStride(Core< 1 > const &core)
Definition: eigen.h:102
detail::EigenStrideTraits< N, C, Rows_, Cols_ > ST
Definition: eigen.h:235
void checkDimensions()
Definition: eigen.h:238
static int getOuterStride(Core< 1 > const &core)
Definition: eigen.h:50
Forward declarations for ndarray/eigen interface.
static int getInnerStride(Core< 2 > const &core)
Definition: eigen.h:134
double x
static int getColStride(Core< 1 > const &core)
Definition: eigen.h:137
CRTP implementation for Array and ArrayRef.
Definition: ArrayBase.h:56
static int getCols(Core< 1 > const &core)
Definition: eigen.h:71
static int getOuterStride(Core< 1 > const &core)
Definition: eigen.h:172
static int getRows(Core< 1 > const &core)
Definition: eigen.h:53
EigenView(EigenView const &other)
Definition: eigen.h:261
detail::SimpleInitializer< N > allocate(Vector< int, N > const &shape)
Create an expression that allocates uninitialized memory for an array.
int row
Definition: CR.cc:153
EigenView & operator=(Eigen::ReturnByValue< Other > const &other)
Definition: eigen.h:287
EigenView & operator=(Eigen::EigenBase< Other > const &other)
Definition: eigen.h:282
static int getCols(Core< 1 > const &core)
Definition: eigen.h:156
static int getRows(Core< 2 > const &core)
Definition: eigen.h:138
A multidimensional strided array.
Definition: Array.h:47
ArrayRef< T, N, C > deep() const
Definition: eigen.h:361
static int getColStride(Core< 1 > const &core)
Definition: eigen.h:120
static int getRowStride(Core< 1 > const &core)
Definition: eigen.h:85
static int getColStride(Core< 1 > const &core)
Definition: eigen.h:86
ndarray::Array< typename ImageT::Pixel, 2, 2 > & _array
Definition: fits_io_mpl.h:77
static int getInnerStride(Core< 1 > const &core)
Definition: eigen.h:83
static int getOuterStride(Core< 1 > const &core)
Definition: eigen.h:118
Index innerStride() const
Definition: eigen.h:291
PacketScalar packet(Index row, Index col) const
Definition: eigen.h:329
Shallow const shallow() const
Return a Array view to this.
Definition: ArrayBase.h:175
Eigen::internal::traits< T > Traits
Definition: eigen.h:373
static int getColStride(Core< 1 > const &core)
Definition: eigen.h:174
static int getRows(Core< 1 > const &core)
Definition: eigen.h:70
static int getRows(Core< 1 > const &core)
Definition: eigen.h:121
static int getInnerStride(Core< 1 > const &core)
Definition: eigen.h:151
static int getRows(Core< 2 > const &core)
Definition: eigen.h:155
Traits::Scalar Scalar
Definition: eigen.h:374
Traits::XprKind XprKind
Definition: eigen.h:376
static int getOuterStride(Core< 1 > const &core)
Definition: eigen.h:67
static int getInnerStride(Core< 1 > const &core)
Definition: eigen.h:49
static int getOuterStride(Core< 1 > const &core)
Definition: eigen.h:135
static int getCols(Core< 1 > const &core)
Definition: eigen.h:88
static int getOuterStride(Core< 2 > const &core)
Definition: eigen.h:152
static int getRows(Core< 2 > const &core)
Definition: eigen.h:175
static int getRowStride(Core< 2 > const &core)
Definition: eigen.h:153
static int getColStride(Core< 1 > const &core)
Definition: eigen.h:52
int col
Definition: CR.cc:152
static int getInnerStride(Core< 2 > const &core)
Definition: eigen.h:171
void writePacket(Index index, const PacketScalar &x)
Definition: eigen.h:352
static int getInnerStride(Core< 1 > const &core)
Definition: eigen.h:100
static int getInnerStride(Core< 1 > const &core)
Definition: eigen.h:66
EigenView< Element, N, C, XprKind, Rows, Cols > Type
Definition: eigen.h:385
Index cols() const
Definition: eigen.h:298
Array< T, N, C > const & shallow() const
Definition: eigen.h:360
PacketScalar packet(Index index) const
Definition: eigen.h:336