BlasUtil.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) 2009-2010 Gael Guennebaud <gael.guennebaud@inria.fr>
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_BLASUTIL_H
11 #define EIGEN_BLASUTIL_H
12 
13 // This file contains many lightweight helper classes used to
14 // implement and control fast level 2 and level 3 BLAS-like routines.
15 
16 namespace Eigen {
17 
18 namespace internal {
19 
20 // forward declarations
21 template<typename LhsScalar, typename RhsScalar, typename Index, typename DataMapper, int mr, int nr, bool ConjugateLhs=false, bool ConjugateRhs=false>
22 struct gebp_kernel;
23 
24 template<typename Scalar, typename Index, typename DataMapper, int nr, int StorageOrder, bool Conjugate = false, bool PanelMode=false>
26 
27 template<typename Scalar, typename Index, typename DataMapper, int Pack1, int Pack2, int StorageOrder, bool Conjugate = false, bool PanelMode = false>
29 
30 template<
31  typename Index,
32  typename LhsScalar, int LhsStorageOrder, bool ConjugateLhs,
33  typename RhsScalar, int RhsStorageOrder, bool ConjugateRhs,
34  int ResStorageOrder>
36 
37 template<typename Index,
38  typename LhsScalar, typename LhsMapper, int LhsStorageOrder, bool ConjugateLhs,
39  typename RhsScalar, typename RhsMapper, bool ConjugateRhs, int Version=Specialized>
41 
42 
43 template<bool Conjugate> struct conj_if;
44 
45 template<> struct conj_if<true> {
46  template<typename T>
47  inline T operator()(const T& x) const { return numext::conj(x); }
48  template<typename T>
49  inline T pconj(const T& x) const { return internal::pconj(x); }
50 };
51 
52 template<> struct conj_if<false> {
53  template<typename T>
54  inline const T& operator()(const T& x) const { return x; }
55  template<typename T>
56  inline const T& pconj(const T& x) const { return x; }
57 };
58 
59 // Generic implementation for custom complex types.
60 template<typename LhsScalar, typename RhsScalar, bool ConjLhs, bool ConjRhs>
62 {
64 
65  EIGEN_STRONG_INLINE Scalar pmadd(const LhsScalar& x, const RhsScalar& y, const Scalar& c) const
66  { return padd(c, pmul(x,y)); }
67 
68  EIGEN_STRONG_INLINE Scalar pmul(const LhsScalar& x, const RhsScalar& y) const
69  { return conj_if<ConjLhs>()(x) * conj_if<ConjRhs>()(y); }
70 };
71 
72 template<typename Scalar> struct conj_helper<Scalar,Scalar,false,false>
73 {
74  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar pmadd(const Scalar& x, const Scalar& y, const Scalar& c) const { return internal::pmadd(x,y,c); }
75  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar pmul(const Scalar& x, const Scalar& y) const { return internal::pmul(x,y); }
76 };
77 
78 template<typename RealScalar> struct conj_helper<std::complex<RealScalar>, std::complex<RealScalar>, false,true>
79 {
80  typedef std::complex<RealScalar> Scalar;
81  EIGEN_STRONG_INLINE Scalar pmadd(const Scalar& x, const Scalar& y, const Scalar& c) const
82  { return c + pmul(x,y); }
83 
84  EIGEN_STRONG_INLINE Scalar pmul(const Scalar& x, const Scalar& y) const
86 };
87 
88 template<typename RealScalar> struct conj_helper<std::complex<RealScalar>, std::complex<RealScalar>, true,false>
89 {
90  typedef std::complex<RealScalar> Scalar;
91  EIGEN_STRONG_INLINE Scalar pmadd(const Scalar& x, const Scalar& y, const Scalar& c) const
92  { return c + pmul(x,y); }
93 
94  EIGEN_STRONG_INLINE Scalar pmul(const Scalar& x, const Scalar& y) const
96 };
97 
98 template<typename RealScalar> struct conj_helper<std::complex<RealScalar>, std::complex<RealScalar>, true,true>
99 {
100  typedef std::complex<RealScalar> Scalar;
101  EIGEN_STRONG_INLINE Scalar pmadd(const Scalar& x, const Scalar& y, const Scalar& c) const
102  { return c + pmul(x,y); }
103 
106 };
107 
108 template<typename RealScalar,bool Conj> struct conj_helper<std::complex<RealScalar>, RealScalar, Conj,false>
109 {
110  typedef std::complex<RealScalar> Scalar;
111  EIGEN_STRONG_INLINE Scalar pmadd(const Scalar& x, const RealScalar& y, const Scalar& c) const
112  { return padd(c, pmul(x,y)); }
114  { return conj_if<Conj>()(x)*y; }
115 };
116 
117 template<typename RealScalar,bool Conj> struct conj_helper<RealScalar, std::complex<RealScalar>, false,Conj>
118 {
119  typedef std::complex<RealScalar> Scalar;
120  EIGEN_STRONG_INLINE Scalar pmadd(const RealScalar& x, const Scalar& y, const Scalar& c) const
121  { return padd(c, pmul(x,y)); }
123  { return x*conj_if<Conj>()(y); }
124 };
125 
126 template<typename From,typename To> struct get_factor {
127  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE To run(const From& x) { return To(x); }
128 };
129 
130 template<typename Scalar> struct get_factor<Scalar,typename NumTraits<Scalar>::Real> {
131  EIGEN_DEVICE_FUNC
132  static EIGEN_STRONG_INLINE typename NumTraits<Scalar>::Real run(const Scalar& x) { return numext::real(x); }
133 };
134 
135 
136 template<typename Scalar, typename Index>
138  public:
139  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE BlasVectorMapper(Scalar *data) : m_data(data) {}
140 
141  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Scalar operator()(Index i) const {
142  return m_data[i];
143  }
144  template <typename Packet, int AlignmentType>
145  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Packet load(Index i) const {
146  return ploadt<Packet, AlignmentType>(m_data + i);
147  }
148 
149  template <typename Packet>
150  EIGEN_DEVICE_FUNC bool aligned(Index i) const {
151  return (UIntPtr(m_data+i)%sizeof(Packet))==0;
152  }
153 
154  protected:
156 };
157 
158 template<typename Scalar, typename Index, int AlignmentType>
160  public:
163 
164  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE BlasLinearMapper(Scalar *data) : m_data(data) {}
165 
166  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void prefetch(int i) const {
167  internal::prefetch(&operator()(i));
168  }
169 
170  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Scalar& operator()(Index i) const {
171  return m_data[i];
172  }
173 
174  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Packet loadPacket(Index i) const {
175  return ploadt<Packet, AlignmentType>(m_data + i);
176  }
177 
178  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE HalfPacket loadHalfPacket(Index i) const {
179  return ploadt<HalfPacket, AlignmentType>(m_data + i);
180  }
181 
182  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void storePacket(Index i, const Packet &p) const {
183  pstoret<Scalar, Packet, AlignmentType>(m_data + i, p);
184  }
185 
186  protected:
188 };
189 
190 // Lightweight helper class to access matrix coefficients.
191 template<typename Scalar, typename Index, int StorageOrder, int AlignmentType = Unaligned>
193  public:
196 
199 
201 
203  getSubMapper(Index i, Index j) const {
205  }
206 
208  return LinearMapper(&operator()(i, j));
209  }
210 
212  return VectorMapper(&operator()(i, j));
213  }
214 
215 
216  EIGEN_DEVICE_FUNC
218  return m_data[StorageOrder==RowMajor ? j + i*m_stride : i + j*m_stride];
219  }
220 
221  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Packet loadPacket(Index i, Index j) const {
222  return ploadt<Packet, AlignmentType>(&operator()(i, j));
223  }
224 
225  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE HalfPacket loadHalfPacket(Index i, Index j) const {
226  return ploadt<HalfPacket, AlignmentType>(&operator()(i, j));
227  }
228 
229  template<typename SubPacket>
230  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void scatterPacket(Index i, Index j, const SubPacket &p) const {
231  pscatter<Scalar, SubPacket>(&operator()(i, j), p, m_stride);
232  }
233 
234  template<typename SubPacket>
235  EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE SubPacket gatherPacket(Index i, Index j) const {
236  return pgather<Scalar, SubPacket>(&operator()(i, j), m_stride);
237  }
238 
239  EIGEN_DEVICE_FUNC const Index stride() const { return m_stride; }
240  EIGEN_DEVICE_FUNC const Scalar* data() const { return m_data; }
241 
242  EIGEN_DEVICE_FUNC Index firstAligned(Index size) const {
243  if (UIntPtr(m_data)%sizeof(Scalar)) {
244  return -1;
245  }
247  }
248 
249  protected:
252 };
253 
254 // lightweight helper class to access matrix coefficients (const version)
255 template<typename Scalar, typename Index, int StorageOrder>
256 class const_blas_data_mapper : public blas_data_mapper<const Scalar, Index, StorageOrder> {
257  public:
259 
261  return const_blas_data_mapper<Scalar, Index, StorageOrder>(&(this->operator()(i, j)), this->m_stride);
262  }
263 };
264 
265 
266 /* Helper class to analyze the factors of a Product expression.
267  * In particular it allows to pop out operator-, scalar multiples,
268  * and conjugate */
269 template<typename XprType> struct blas_traits
270 {
271  typedef typename traits<XprType>::Scalar Scalar;
272  typedef const XprType& ExtractType;
273  typedef XprType _ExtractType;
274  enum {
276  IsTransposed = false,
279  && ( bool(XprType::IsVectorAtCompileTime)
281  ) ? 1 : 0
282  };
283  typedef typename conditional<bool(HasUsableDirectAccess),
284  ExtractType,
285  typename _ExtractType::PlainObject
287  static inline ExtractType extract(const XprType& x) { return x; }
288  static inline const Scalar extractScalarFactor(const XprType&) { return Scalar(1); }
289 };
290 
291 // pop conjugate
292 template<typename Scalar, typename NestedXpr>
294  : blas_traits<NestedXpr>
295 {
298  typedef typename Base::ExtractType ExtractType;
299 
300  enum {
302  NeedToConjugate = Base::NeedToConjugate ? 0 : IsComplex
303  };
304  static inline ExtractType extract(const XprType& x) { return Base::extract(x.nestedExpression()); }
305  static inline Scalar extractScalarFactor(const XprType& x) { return conj(Base::extractScalarFactor(x.nestedExpression())); }
306 };
307 
308 // pop scalar multiple
309 template<typename Scalar, typename NestedXpr, typename Plain>
311  : blas_traits<NestedXpr>
312 {
315  typedef typename Base::ExtractType ExtractType;
316  static inline ExtractType extract(const XprType& x) { return Base::extract(x.rhs()); }
317  static inline Scalar extractScalarFactor(const XprType& x)
318  { return x.lhs().functor().m_other * Base::extractScalarFactor(x.rhs()); }
319 };
320 template<typename Scalar, typename NestedXpr, typename Plain>
322  : blas_traits<NestedXpr>
323 {
326  typedef typename Base::ExtractType ExtractType;
327  static inline ExtractType extract(const XprType& x) { return Base::extract(x.lhs()); }
328  static inline Scalar extractScalarFactor(const XprType& x)
329  { return Base::extractScalarFactor(x.lhs()) * x.rhs().functor().m_other; }
330 };
331 template<typename Scalar, typename Plain1, typename Plain2>
333  const CwiseNullaryOp<scalar_constant_op<Scalar>,Plain2> > >
334  : blas_traits<CwiseNullaryOp<scalar_constant_op<Scalar>,Plain1> >
335 {};
336 
337 // pop opposite
338 template<typename Scalar, typename NestedXpr>
340  : blas_traits<NestedXpr>
341 {
344  typedef typename Base::ExtractType ExtractType;
345  static inline ExtractType extract(const XprType& x) { return Base::extract(x.nestedExpression()); }
346  static inline Scalar extractScalarFactor(const XprType& x)
347  { return - Base::extractScalarFactor(x.nestedExpression()); }
348 };
349 
350 // pop/push transpose
351 template<typename NestedXpr>
352 struct blas_traits<Transpose<NestedXpr> >
353  : blas_traits<NestedXpr>
354 {
355  typedef typename NestedXpr::Scalar Scalar;
358  typedef Transpose<const typename Base::_ExtractType> ExtractType; // const to get rid of a compile error; anyway blas traits are only used on the RHS
360  typedef typename conditional<bool(Base::HasUsableDirectAccess),
361  ExtractType,
362  typename ExtractType::PlainObject
364  enum {
365  IsTransposed = Base::IsTransposed ? 0 : 1
366  };
367  static inline ExtractType extract(const XprType& x) { return ExtractType(Base::extract(x.nestedExpression())); }
368  static inline Scalar extractScalarFactor(const XprType& x) { return Base::extractScalarFactor(x.nestedExpression()); }
369 };
370 
371 template<typename T>
372 struct blas_traits<const T>
373  : blas_traits<T>
374 {};
375 
376 template<typename T, bool HasUsableDirectAccess=blas_traits<T>::HasUsableDirectAccess>
378  static const typename T::Scalar* run(const T& m)
379  {
380  return blas_traits<T>::extract(m).data();
381  }
382 };
383 
384 template<typename T>
385 struct extract_data_selector<T,false> {
386  static typename T::Scalar* run(const T&) { return 0; }
387 };
388 
389 template<typename T> const typename T::Scalar* extract_data(const T& m)
390 {
392 }
393 
394 } // end namespace internal
395 
396 } // end namespace Eigen
397 
398 #endif // EIGEN_BLASUTIL_H
Eigen::internal::blas_traits::_ExtractType
XprType _ExtractType
Definition: BlasUtil.h:273
Eigen::internal::blas_traits< CwiseBinaryOp< scalar_product_op< Scalar >, NestedXpr, const CwiseNullaryOp< scalar_constant_op< Scalar >, Plain > > >::ExtractType
Base::ExtractType ExtractType
Definition: BlasUtil.h:326
Eigen::internal::const_blas_data_mapper::getSubMapper
EIGEN_ALWAYS_INLINE const_blas_data_mapper< Scalar, Index, StorageOrder > getSubMapper(Index i, Index j) const
Definition: BlasUtil.h:260
Eigen::conj
const AutoDiffScalar< DerType > & conj(const AutoDiffScalar< DerType > &x)
Definition: AutoDiffScalar.h:543
Eigen::internal::BlasVectorMapper::load
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Packet load(Index i) const
Definition: BlasUtil.h:145
Eigen::internal::conj_helper< std::complex< RealScalar >, std::complex< RealScalar >, false, true >::pmul
EIGEN_STRONG_INLINE Scalar pmul(const Scalar &x, const Scalar &y) const
Definition: BlasUtil.h:84
Eigen::internal::conj_helper< RealScalar, std::complex< RealScalar >, false, Conj >::pmadd
EIGEN_STRONG_INLINE Scalar pmadd(const RealScalar &x, const Scalar &y, const Scalar &c) const
Definition: BlasUtil.h:120
Eigen::internal::blas_data_mapper::firstAligned
EIGEN_DEVICE_FUNC Index firstAligned(Index size) const
Definition: BlasUtil.h:242
Eigen
Definition: common.h:73
EIGEN_RESTRICT
#define EIGEN_RESTRICT
Definition: Macros.h:796
Eigen::internal::blas_data_mapper::gatherPacket
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE SubPacket gatherPacket(Index i, Index j) const
Definition: BlasUtil.h:235
Eigen::internal::conj_if< true >::pconj
T pconj(const T &x) const
Definition: BlasUtil.h:49
Eigen::internal::UIntPtr
std::size_t UIntPtr
Definition: Meta.h:51
Eigen::internal::extract_data
const T::Scalar * extract_data(const T &m)
Definition: BlasUtil.h:389
Eigen::internal::conj_helper< std::complex< RealScalar >, std::complex< RealScalar >, false, true >::pmadd
EIGEN_STRONG_INLINE Scalar pmadd(const Scalar &x, const Scalar &y, const Scalar &c) const
Definition: BlasUtil.h:81
Eigen::internal::extract_data_selector::run
static const T::Scalar * run(const T &m)
Definition: BlasUtil.h:378
Eigen::internal::blas_data_mapper::getVectorMapper
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE VectorMapper getVectorMapper(Index i, Index j) const
Definition: BlasUtil.h:211
Eigen::CwiseBinaryOp
Generic expression where a coefficient-wise binary operator is applied to two expressions.
Definition: CwiseBinaryOp.h:77
Eigen::internal::conj_helper< std::complex< RealScalar >, std::complex< RealScalar >, true, true >::pmadd
EIGEN_STRONG_INLINE Scalar pmadd(const Scalar &x, const Scalar &y, const Scalar &c) const
Definition: BlasUtil.h:101
Eigen::internal::general_matrix_vector_product
Definition: BlasUtil.h:40
Conj
@ Conj
Definition: common.h:91
Eigen::internal::blas_data_mapper::stride
const EIGEN_DEVICE_FUNC Index stride() const
Definition: BlasUtil.h:239
Eigen::internal::blas_traits< Transpose< NestedXpr > >::_ExtractType
Transpose< const typename Base::_ExtractType > _ExtractType
Definition: BlasUtil.h:359
RealScalar
NumTraits< Scalar >::Real RealScalar
Definition: common.h:85
Eigen::internal::conj_helper< std::complex< RealScalar >, RealScalar, Conj, false >::pmadd
EIGEN_STRONG_INLINE Scalar pmadd(const Scalar &x, const RealScalar &y, const Scalar &c) const
Definition: BlasUtil.h:111
Eigen::internal::conj_if< false >::operator()
const T & operator()(const T &x) const
Definition: BlasUtil.h:54
Eigen::internal::BlasVectorMapper
Definition: BlasUtil.h:137
Eigen::internal::blas_traits< Transpose< NestedXpr > >::ExtractType
Transpose< const typename Base::_ExtractType > ExtractType
Definition: BlasUtil.h:358
Eigen::internal::blas_traits::ExtractType
const typedef XprType & ExtractType
Definition: BlasUtil.h:272
Eigen::internal::blas_traits< CwiseUnaryOp< scalar_conjugate_op< Scalar >, NestedXpr > >::Base
blas_traits< NestedXpr > Base
Definition: BlasUtil.h:296
Eigen::internal::conj_if< false >::pconj
const T & pconj(const T &x) const
Definition: BlasUtil.h:56
Eigen::internal::packet_traits
Definition: GenericPacketMath.h:96
Eigen::internal::blas_data_mapper::m_data
Scalar *EIGEN_RESTRICT m_data
Definition: BlasUtil.h:250
Eigen::internal::conj_helper< std::complex< RealScalar >, RealScalar, Conj, false >::Scalar
std::complex< RealScalar > Scalar
Definition: BlasUtil.h:110
Eigen::internal::conj_helper< std::complex< RealScalar >, std::complex< RealScalar >, true, false >::Scalar
std::complex< RealScalar > Scalar
Definition: BlasUtil.h:90
real
float real
Definition: datatypes.h:10
Eigen::internal::blas_traits::extract
static ExtractType extract(const XprType &x)
Definition: BlasUtil.h:287
Eigen::internal::conj_helper< std::complex< RealScalar >, std::complex< RealScalar >, true, true >::pmul
EIGEN_STRONG_INLINE Scalar pmul(const Scalar &x, const Scalar &y) const
Definition: BlasUtil.h:104
Eigen::internal::blas_traits::DirectLinearAccessType
conditional< bool(HasUsableDirectAccess), ExtractType, typename _ExtractType::PlainObject >::type DirectLinearAccessType
Definition: BlasUtil.h:286
Eigen::internal::blas_traits< CwiseBinaryOp< scalar_product_op< Scalar >, NestedXpr, const CwiseNullaryOp< scalar_constant_op< Scalar >, Plain > > >::extract
static ExtractType extract(const XprType &x)
Definition: BlasUtil.h:327
Eigen::internal::blas_traits< Transpose< NestedXpr > >::extract
static ExtractType extract(const XprType &x)
Definition: BlasUtil.h:367
Eigen::internal::BlasVectorMapper::m_data
Scalar * m_data
Definition: BlasUtil.h:155
Eigen::ScalarBinaryOpTraits
Determines whether the given binary operation of two numeric types is allowed and what the scalar ret...
Definition: XprHelper.h:766
Eigen::internal::pconj
EIGEN_STRONG_INLINE Packet2cf pconj(const Packet2cf &a)
Definition: AltiVec/Complex.h:101
Eigen::internal::blas_traits< CwiseBinaryOp< scalar_product_op< Scalar >, const CwiseNullaryOp< scalar_constant_op< Scalar >, Plain >, NestedXpr > >::extract
static ExtractType extract(const XprType &x)
Definition: BlasUtil.h:316
Scalar
SCALAR Scalar
Definition: common.h:84
Eigen::RowMajor
@ RowMajor
Definition: Constants.h:322
Eigen::internal::blas_data_mapper::loadHalfPacket
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE HalfPacket loadHalfPacket(Index i, Index j) const
Definition: BlasUtil.h:225
Eigen::internal::blas_traits< Transpose< NestedXpr > >::Base
blas_traits< NestedXpr > Base
Definition: BlasUtil.h:356
Eigen::internal::conj_helper< Scalar, Scalar, false, false >::pmadd
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar pmadd(const Scalar &x, const Scalar &y, const Scalar &c) const
Definition: BlasUtil.h:74
Eigen::internal::scalar_product_op
Definition: BinaryFunctors.h:76
Eigen::Transpose
Expression of the transpose of a matrix.
Definition: Transpose.h:52
Eigen::DirectAccessBit
const unsigned int DirectAccessBit
Definition: Constants.h:150
Eigen::CwiseNullaryOp
Generic expression of a matrix where all coefficients are defined by a functor.
Definition: CwiseNullaryOp.h:60
Eigen::internal::blas_traits< CwiseUnaryOp< scalar_conjugate_op< Scalar >, NestedXpr > >::ExtractType
Base::ExtractType ExtractType
Definition: BlasUtil.h:298
Eigen::internal::blas_data_mapper::HalfPacket
packet_traits< Scalar >::half HalfPacket
Definition: BlasUtil.h:195
Eigen::internal::blas_traits< CwiseUnaryOp< scalar_opposite_op< Scalar >, NestedXpr > >::extractScalarFactor
static Scalar extractScalarFactor(const XprType &x)
Definition: BlasUtil.h:346
Eigen::internal::blas_traits::NeedToConjugate
@ NeedToConjugate
Definition: BlasUtil.h:277
Eigen::internal::blas_data_mapper::m_stride
const Index m_stride
Definition: BlasUtil.h:251
Eigen::internal::conj_helper< std::complex< RealScalar >, std::complex< RealScalar >, true, true >::Scalar
std::complex< RealScalar > Scalar
Definition: BlasUtil.h:100
Eigen::internal::blas_data_mapper::data
const EIGEN_DEVICE_FUNC Scalar * data() const
Definition: BlasUtil.h:240
Eigen::internal::blas_data_mapper::getSubMapper
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE blas_data_mapper< Scalar, Index, StorageOrder, AlignmentType > getSubMapper(Index i, Index j) const
Definition: BlasUtil.h:203
Eigen::internal::blas_traits< CwiseBinaryOp< scalar_product_op< Scalar >, NestedXpr, const CwiseNullaryOp< scalar_constant_op< Scalar >, Plain > > >::XprType
CwiseBinaryOp< scalar_product_op< Scalar >, NestedXpr, const CwiseNullaryOp< scalar_constant_op< Scalar >, Plain > > XprType
Definition: BlasUtil.h:325
Eigen::internal::scalar_constant_op
Definition: NullaryFunctors.h:18
Eigen::internal::blas_traits< CwiseUnaryOp< scalar_opposite_op< Scalar >, NestedXpr > >::Base
blas_traits< NestedXpr > Base
Definition: BlasUtil.h:342
Eigen::internal::BlasLinearMapper::prefetch
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void prefetch(int i) const
Definition: BlasUtil.h:166
Eigen::internal::blas_traits< Transpose< NestedXpr > >::DirectLinearAccessType
conditional< bool(Base::HasUsableDirectAccess), ExtractType, typename ExtractType::PlainObject >::type DirectLinearAccessType
Definition: BlasUtil.h:363
Eigen::internal::BlasVectorMapper::aligned
EIGEN_DEVICE_FUNC bool aligned(Index i) const
Definition: BlasUtil.h:150
Eigen::internal::BlasLinearMapper::m_data
Scalar * m_data
Definition: BlasUtil.h:187
Eigen::internal::blas_traits::extractScalarFactor
static const Scalar extractScalarFactor(const XprType &)
Definition: BlasUtil.h:288
Eigen::internal::blas_data_mapper::LinearMapper
BlasLinearMapper< Scalar, Index, AlignmentType > LinearMapper
Definition: BlasUtil.h:197
x
Scalar * x
Definition: level1_cplx_impl.h:89
EIGEN_STRONG_INLINE
#define EIGEN_STRONG_INLINE
Definition: Macros.h:494
Eigen::internal::get_factor::run
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE To run(const From &x)
Definition: BlasUtil.h:127
Eigen::internal::blas_traits< CwiseBinaryOp< scalar_product_op< Scalar >, const CwiseNullaryOp< scalar_constant_op< Scalar >, Plain >, NestedXpr > >::ExtractType
Base::ExtractType ExtractType
Definition: BlasUtil.h:315
Eigen::internal::extract_data_selector
Definition: BlasUtil.h:377
Eigen::internal::const_blas_data_mapper::const_blas_data_mapper
EIGEN_ALWAYS_INLINE const_blas_data_mapper(const Scalar *data, Index stride)
Definition: BlasUtil.h:258
Eigen::internal::blas_traits< CwiseBinaryOp< scalar_product_op< Scalar >, const CwiseNullaryOp< scalar_constant_op< Scalar >, Plain >, NestedXpr > >::Base
blas_traits< NestedXpr > Base
Definition: BlasUtil.h:313
Eigen::internal::blas_data_mapper::Packet
packet_traits< Scalar >::type Packet
Definition: BlasUtil.h:194
Eigen::Specialized
@ Specialized
Definition: Constants.h:311
Eigen::internal::blas_traits< CwiseUnaryOp< scalar_opposite_op< Scalar >, NestedXpr > >::extract
static ExtractType extract(const XprType &x)
Definition: BlasUtil.h:345
Eigen::internal::conj_if
Definition: BlasUtil.h:43
imag
const EIGEN_DEVICE_FUNC ImagReturnType imag() const
Definition: CommonCwiseUnaryOps.h:95
Eigen::internal::Packet
Definition: ZVector/PacketMath.h:48
Eigen::internal::blas_traits< CwiseUnaryOp< scalar_conjugate_op< Scalar >, NestedXpr > >::extractScalarFactor
static Scalar extractScalarFactor(const XprType &x)
Definition: BlasUtil.h:305
EIGEN_ALWAYS_INLINE
#define EIGEN_ALWAYS_INLINE
Definition: Macros.h:509
Eigen::internal::get_factor
Definition: BlasUtil.h:126
Eigen::internal::blas_traits::IsTransposed
@ IsTransposed
Definition: BlasUtil.h:276
Eigen::internal::BlasVectorMapper::BlasVectorMapper
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE BlasVectorMapper(Scalar *data)
Definition: BlasUtil.h:139
int
return int(ret)+1
Eigen::internal::conj_helper< std::complex< RealScalar >, std::complex< RealScalar >, true, false >::pmul
EIGEN_STRONG_INLINE Scalar pmul(const Scalar &x, const Scalar &y) const
Definition: BlasUtil.h:94
Eigen::internal::gemm_pack_rhs
Definition: BlasUtil.h:25
Eigen::internal::blas_traits::Scalar
traits< XprType >::Scalar Scalar
Definition: BlasUtil.h:271
Eigen::internal::conj_helper::pmadd
EIGEN_STRONG_INLINE Scalar pmadd(const LhsScalar &x, const RhsScalar &y, const Scalar &c) const
Definition: BlasUtil.h:65
Eigen::internal::BlasLinearMapper::loadPacket
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Packet loadPacket(Index i) const
Definition: BlasUtil.h:174
Eigen::internal::inner_stride_at_compile_time
Definition: DenseCoeffsBase.h:654
Eigen::internal::blas_traits< CwiseUnaryOp< scalar_opposite_op< Scalar >, NestedXpr > >::XprType
CwiseUnaryOp< scalar_opposite_op< Scalar >, NestedXpr > XprType
Definition: BlasUtil.h:343
Eigen::internal::prefetch
EIGEN_DEVICE_FUNC void prefetch(const Scalar *addr)
Definition: GenericPacketMath.h:299
Eigen::internal::blas_data_mapper::loadPacket
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Packet loadPacket(Index i, Index j) const
Definition: BlasUtil.h:221
Eigen::internal::conj_if< true >::operator()
T operator()(const T &x) const
Definition: BlasUtil.h:47
Eigen::internal::blas_traits< CwiseBinaryOp< scalar_product_op< Scalar >, NestedXpr, const CwiseNullaryOp< scalar_constant_op< Scalar >, Plain > > >::Base
blas_traits< NestedXpr > Base
Definition: BlasUtil.h:324
c
RealScalar c
Definition: level1_cplx_impl.h:103
Eigen::internal::blas_data_mapper
Definition: BlasUtil.h:192
Eigen::internal::pmul
EIGEN_DEVICE_FUNC Packet pmul(const Packet &a, const Packet &b)
Definition: GenericPacketMath.h:170
Eigen::internal::traits
Definition: ForwardDeclarations.h:17
Eigen::internal::gemm_pack_lhs
Definition: BlasUtil.h:28
Eigen::internal::blas_traits< CwiseUnaryOp< scalar_opposite_op< Scalar >, NestedXpr > >::ExtractType
Base::ExtractType ExtractType
Definition: BlasUtil.h:344
Eigen::internal::blas_traits< Transpose< NestedXpr > >::Scalar
NestedXpr::Scalar Scalar
Definition: BlasUtil.h:355
Eigen::internal::get_factor< Scalar, typename NumTraits< Scalar >::Real >::run
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE NumTraits< Scalar >::Real run(const Scalar &x)
Definition: BlasUtil.h:132
Eigen::internal::BlasLinearMapper::operator()
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Scalar & operator()(Index i) const
Definition: BlasUtil.h:170
Eigen::internal::const_blas_data_mapper
Definition: BlasUtil.h:256
Eigen::internal::scalar_opposite_op
Definition: UnaryFunctors.h:22
Eigen::internal::conj_helper
Definition: BlasUtil.h:61
Eigen::CwiseUnaryOp
Generic expression where a coefficient-wise unary operator is applied to an expression.
Definition: CwiseUnaryOp.h:55
Eigen::internal::y
const Scalar & y
Definition: Eigen/src/Core/MathFunctions.h:552
std
Definition: Half.h:150
Eigen::internal::blas_traits< Transpose< NestedXpr > >::extractScalarFactor
static Scalar extractScalarFactor(const XprType &x)
Definition: BlasUtil.h:368
Eigen::internal::blas_traits::IsComplex
@ IsComplex
Definition: BlasUtil.h:275
Eigen::internal::conditional
Definition: Meta.h:58
Eigen::internal::pmadd
EIGEN_STRONG_INLINE Packet4f pmadd(const Packet4f &a, const Packet4f &b, const Packet4f &c)
Definition: AltiVec/PacketMath.h:388
Eigen::internal::blas_traits::HasUsableDirectAccess
@ HasUsableDirectAccess
Definition: BlasUtil.h:278
Eigen::internal::BlasLinearMapper::storePacket
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void storePacket(Index i, const Packet &p) const
Definition: BlasUtil.h:182
Eigen::internal::conj_helper< RealScalar, std::complex< RealScalar >, false, Conj >::pmul
EIGEN_STRONG_INLINE Scalar pmul(const RealScalar &x, const Scalar &y) const
Definition: BlasUtil.h:122
Eigen::internal::blas_traits< CwiseUnaryOp< scalar_conjugate_op< Scalar >, NestedXpr > >::extract
static ExtractType extract(const XprType &x)
Definition: BlasUtil.h:304
Eigen::internal::padd
EIGEN_DEVICE_FUNC Packet padd(const Packet &a, const Packet &b)
Definition: GenericPacketMath.h:151
utility::tuple::size
static constexpr size_t size(Tuple< Args... > &)
Provides access to the number of elements in a tuple as a compile-time constant expression.
Definition: TensorSyclTuple.h:143
Eigen::internal::blas_traits
Definition: BlasUtil.h:269
Eigen::internal::blas_data_mapper::VectorMapper
BlasVectorMapper< Scalar, Index > VectorMapper
Definition: BlasUtil.h:198
Eigen::internal::first_default_aligned
static Index first_default_aligned(const DenseBase< Derived > &m)
Definition: DenseCoeffsBase.h:646
Eigen::internal::BlasVectorMapper::operator()
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Scalar operator()(Index i) const
Definition: BlasUtil.h:141
Eigen::internal::conj_helper< RealScalar, std::complex< RealScalar >, false, Conj >::Scalar
std::complex< RealScalar > Scalar
Definition: BlasUtil.h:119
Eigen::internal::conj_helper::Scalar
ScalarBinaryOpTraits< LhsScalar, RhsScalar >::ReturnType Scalar
Definition: BlasUtil.h:63
Eigen::internal::blas_data_mapper::operator()
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Scalar & operator()(Index i, Index j) const
Definition: BlasUtil.h:217
Eigen::internal::blas_data_mapper::getLinearMapper
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE LinearMapper getLinearMapper(Index i, Index j) const
Definition: BlasUtil.h:207
internal
Definition: BandTriangularSolver.h:13
Eigen::internal::conj_helper< std::complex< RealScalar >, std::complex< RealScalar >, false, true >::Scalar
std::complex< RealScalar > Scalar
Definition: BlasUtil.h:80
Eigen::internal::conj_helper< Scalar, Scalar, false, false >::pmul
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar pmul(const Scalar &x, const Scalar &y) const
Definition: BlasUtil.h:75
Eigen::internal::conj_helper< std::complex< RealScalar >, std::complex< RealScalar >, true, false >::pmadd
EIGEN_STRONG_INLINE Scalar pmadd(const Scalar &x, const Scalar &y, const Scalar &c) const
Definition: BlasUtil.h:91
Eigen::internal::conj_helper::pmul
EIGEN_STRONG_INLINE Scalar pmul(const LhsScalar &x, const RhsScalar &y) const
Definition: BlasUtil.h:68
Eigen::internal::blas_traits< CwiseBinaryOp< scalar_product_op< Scalar >, NestedXpr, const CwiseNullaryOp< scalar_constant_op< Scalar >, Plain > > >::extractScalarFactor
static Scalar extractScalarFactor(const XprType &x)
Definition: BlasUtil.h:328
Eigen::internal::extract_data_selector< T, false >::run
static T::Scalar * run(const T &)
Definition: BlasUtil.h:386
Eigen::internal::BlasLinearMapper
Definition: BlasUtil.h:159
Eigen::internal::blas_traits< CwiseBinaryOp< scalar_product_op< Scalar >, const CwiseNullaryOp< scalar_constant_op< Scalar >, Plain >, NestedXpr > >::extractScalarFactor
static Scalar extractScalarFactor(const XprType &x)
Definition: BlasUtil.h:317
Eigen::NumTraits
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
Definition: NumTraits.h:150
Eigen::internal::BlasLinearMapper::BlasLinearMapper
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE BlasLinearMapper(Scalar *data)
Definition: BlasUtil.h:164
Eigen::internal::conj_helper< std::complex< RealScalar >, RealScalar, Conj, false >::pmul
EIGEN_STRONG_INLINE Scalar pmul(const Scalar &x, const RealScalar &y) const
Definition: BlasUtil.h:113
Eigen::internal::scalar_conjugate_op
Definition: UnaryFunctors.h:109
Eigen::internal::general_matrix_matrix_product
Definition: BlasUtil.h:35
Eigen::internal::BlasLinearMapper::loadHalfPacket
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE HalfPacket loadHalfPacket(Index i) const
Definition: BlasUtil.h:178
Eigen::internal::BlasLinearMapper::Packet
packet_traits< Scalar >::type Packet
Definition: BlasUtil.h:161
Eigen::internal::BlasLinearMapper::HalfPacket
packet_traits< Scalar >::half HalfPacket
Definition: BlasUtil.h:162
complex
Definition: datatypes.h:12
Eigen::Index
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:33
Eigen::internal::blas_traits< Transpose< NestedXpr > >::XprType
Transpose< NestedXpr > XprType
Definition: BlasUtil.h:357
Eigen::internal::blas_traits< CwiseBinaryOp< scalar_product_op< Scalar >, const CwiseNullaryOp< scalar_constant_op< Scalar >, Plain >, NestedXpr > >::XprType
CwiseBinaryOp< scalar_product_op< Scalar >, const CwiseNullaryOp< scalar_constant_op< Scalar >, Plain >, NestedXpr > XprType
Definition: BlasUtil.h:314
Eigen::internal::blas_traits< CwiseUnaryOp< scalar_conjugate_op< Scalar >, NestedXpr > >::XprType
CwiseUnaryOp< scalar_conjugate_op< Scalar >, NestedXpr > XprType
Definition: BlasUtil.h:297
Eigen::internal::blas_data_mapper::scatterPacket
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void scatterPacket(Index i, Index j, const SubPacket &p) const
Definition: BlasUtil.h:230
Eigen::internal::blas_data_mapper::blas_data_mapper
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE blas_data_mapper(Scalar *data, Index stride)
Definition: BlasUtil.h:200


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