ProductEvaluators.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) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>
5 // Copyright (C) 2008-2010 Gael Guennebaud <gael.guennebaud@inria.fr>
6 // Copyright (C) 2011 Jitse Niesen <jitse@maths.leeds.ac.uk>
7 //
8 // This Source Code Form is subject to the terms of the Mozilla
9 // Public License v. 2.0. If a copy of the MPL was not distributed
10 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
11 
12 
13 #ifndef EIGEN_PRODUCTEVALUATORS_H
14 #define EIGEN_PRODUCTEVALUATORS_H
15 
16 namespace Eigen {
17 
18 namespace internal {
19 
28 template<typename Lhs, typename Rhs, int Options>
29 struct evaluator<Product<Lhs, Rhs, Options> >
30  : public product_evaluator<Product<Lhs, Rhs, Options> >
31 {
34 
36 };
37 
38 // Catch "scalar * ( A * B )" and transform it to "(A*scalar) * B"
39 // TODO we should apply that rule only if that's really helpful
40 template<typename Lhs, typename Rhs, typename Scalar1, typename Scalar2, typename Plain1>
42  const CwiseNullaryOp<internal::scalar_constant_op<Scalar1>, Plain1>,
43  const Product<Lhs, Rhs, DefaultProduct> > >
44 {
45  static const bool value = true;
46 };
47 template<typename Lhs, typename Rhs, typename Scalar1, typename Scalar2, typename Plain1>
49  const CwiseNullaryOp<internal::scalar_constant_op<Scalar1>, Plain1>,
50  const Product<Lhs, Rhs, DefaultProduct> > >
51  : public evaluator<Product<EIGEN_SCALAR_BINARYOP_EXPR_RETURN_TYPE(Scalar1,Lhs,product), Rhs, DefaultProduct> >
52 {
57 
59  : Base(xpr.lhs().functor().m_other * xpr.rhs().lhs() * xpr.rhs().rhs())
60  {}
61 };
62 
63 
64 template<typename Lhs, typename Rhs, int DiagIndex>
65 struct evaluator<Diagonal<const Product<Lhs, Rhs, DefaultProduct>, DiagIndex> >
66  : public evaluator<Diagonal<const Product<Lhs, Rhs, LazyProduct>, DiagIndex> >
67 {
70 
72  : Base(Diagonal<const Product<Lhs, Rhs, LazyProduct>, DiagIndex>(
73  Product<Lhs, Rhs, LazyProduct>(xpr.nestedExpression().lhs(), xpr.nestedExpression().rhs()),
74  xpr.index() ))
75  {}
76 };
77 
78 
79 // Helper class to perform a matrix product with the destination at hand.
80 // Depending on the sizes of the factors, there are different evaluation strategies
81 // as controlled by internal::product_type.
82 template< typename Lhs, typename Rhs,
83  typename LhsShape = typename evaluator_traits<Lhs>::Shape,
84  typename RhsShape = typename evaluator_traits<Rhs>::Shape,
87 
88 template<typename Lhs, typename Rhs>
90  static const bool value = true;
91 };
92 
93 // This is the default evaluator implementation for products:
94 // It creates a temporary and call generic_product_impl
95 template<typename Lhs, typename Rhs, int Options, int ProductTag, typename LhsShape, typename RhsShape>
96 struct product_evaluator<Product<Lhs, Rhs, Options>, ProductTag, LhsShape, RhsShape>
97  : public evaluator<typename Product<Lhs, Rhs, Options>::PlainObject>
98 {
100  typedef typename XprType::PlainObject PlainObject;
102  enum {
103  Flags = Base::Flags | EvalBeforeNestingBit
104  };
105 
107  explicit product_evaluator(const XprType& xpr)
108  : m_result(xpr.rows(), xpr.cols())
109  {
110  ::new (static_cast<Base*>(this)) Base(m_result);
111 
112 // FIXME shall we handle nested_eval here?,
113 // if so, then we must take care at removing the call to nested_eval in the specializations (e.g., in permutation_matrix_product, transposition_matrix_product, etc.)
114 // typedef typename internal::nested_eval<Lhs,Rhs::ColsAtCompileTime>::type LhsNested;
115 // typedef typename internal::nested_eval<Rhs,Lhs::RowsAtCompileTime>::type RhsNested;
116 // typedef typename internal::remove_all<LhsNested>::type LhsNestedCleaned;
117 // typedef typename internal::remove_all<RhsNested>::type RhsNestedCleaned;
118 //
119 // const LhsNested lhs(xpr.lhs());
120 // const RhsNested rhs(xpr.rhs());
121 //
122 // generic_product_impl<LhsNestedCleaned, RhsNestedCleaned>::evalTo(m_result, lhs, rhs);
123 
125  }
126 
127 protected:
129 };
130 
131 // The following three shortcuts are enabled only if the scalar types match exactly.
132 // TODO: we could enable them for different scalar types when the product is not vectorized.
133 
134 // Dense = Product
135 template< typename DstXprType, typename Lhs, typename Rhs, int Options, typename Scalar>
136 struct Assignment<DstXprType, Product<Lhs,Rhs,Options>, internal::assign_op<Scalar,Scalar>, Dense2Dense,
137  typename enable_if<(Options==DefaultProduct || Options==AliasFreeProduct)>::type>
138 {
141  void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op<Scalar,Scalar> &)
142  {
143  Index dstRows = src.rows();
144  Index dstCols = src.cols();
145  if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))
146  dst.resize(dstRows, dstCols);
147  // FIXME shall we handle nested_eval here?
149  }
150 };
151 
152 // Dense += Product
153 template< typename DstXprType, typename Lhs, typename Rhs, int Options, typename Scalar>
154 struct Assignment<DstXprType, Product<Lhs,Rhs,Options>, internal::add_assign_op<Scalar,Scalar>, Dense2Dense,
155  typename enable_if<(Options==DefaultProduct || Options==AliasFreeProduct)>::type>
156 {
159  void run(DstXprType &dst, const SrcXprType &src, const internal::add_assign_op<Scalar,Scalar> &)
160  {
161  eigen_assert(dst.rows() == src.rows() && dst.cols() == src.cols());
162  // FIXME shall we handle nested_eval here?
163  generic_product_impl<Lhs, Rhs>::addTo(dst, src.lhs(), src.rhs());
164  }
165 };
166 
167 // Dense -= Product
168 template< typename DstXprType, typename Lhs, typename Rhs, int Options, typename Scalar>
169 struct Assignment<DstXprType, Product<Lhs,Rhs,Options>, internal::sub_assign_op<Scalar,Scalar>, Dense2Dense,
170  typename enable_if<(Options==DefaultProduct || Options==AliasFreeProduct)>::type>
171 {
174  void run(DstXprType &dst, const SrcXprType &src, const internal::sub_assign_op<Scalar,Scalar> &)
175  {
176  eigen_assert(dst.rows() == src.rows() && dst.cols() == src.cols());
177  // FIXME shall we handle nested_eval here?
178  generic_product_impl<Lhs, Rhs>::subTo(dst, src.lhs(), src.rhs());
179  }
180 };
181 
182 
183 // Dense ?= scalar * Product
184 // TODO we should apply that rule if that's really helpful
185 // for instance, this is not good for inner products
186 template< typename DstXprType, typename Lhs, typename Rhs, typename AssignFunc, typename Scalar, typename ScalarBis, typename Plain>
187 struct Assignment<DstXprType, CwiseBinaryOp<internal::scalar_product_op<ScalarBis,Scalar>, const CwiseNullaryOp<internal::scalar_constant_op<ScalarBis>,Plain>,
188  const Product<Lhs,Rhs,DefaultProduct> >, AssignFunc, Dense2Dense>
189 {
194  void run(DstXprType &dst, const SrcXprType &src, const AssignFunc& func)
195  {
196  call_assignment_no_alias(dst, (src.lhs().functor().m_other * src.rhs().lhs())*src.rhs().rhs(), func);
197  }
198 };
199 
200 //----------------------------------------
201 // Catch "Dense ?= xpr + Product<>" expression to save one temporary
202 // FIXME we could probably enable these rules for any product, i.e., not only Dense and DefaultProduct
203 
204 template<typename OtherXpr, typename Lhs, typename Rhs>
205 struct evaluator_assume_aliasing<CwiseBinaryOp<internal::scalar_sum_op<typename OtherXpr::Scalar,typename Product<Lhs,Rhs,DefaultProduct>::Scalar>, const OtherXpr,
206  const Product<Lhs,Rhs,DefaultProduct> >, DenseShape > {
207  static const bool value = true;
208 };
209 
210 template<typename OtherXpr, typename Lhs, typename Rhs>
211 struct evaluator_assume_aliasing<CwiseBinaryOp<internal::scalar_difference_op<typename OtherXpr::Scalar,typename Product<Lhs,Rhs,DefaultProduct>::Scalar>, const OtherXpr,
212  const Product<Lhs,Rhs,DefaultProduct> >, DenseShape > {
213  static const bool value = true;
214 };
215 
216 template<typename DstXprType, typename OtherXpr, typename ProductType, typename Func1, typename Func2>
218 {
219  template<typename SrcXprType, typename InitialFunc>
221  void run(DstXprType &dst, const SrcXprType &src, const InitialFunc& /*func*/)
222  {
223  call_assignment_no_alias(dst, src.lhs(), Func1());
224  call_assignment_no_alias(dst, src.rhs(), Func2());
225  }
226 };
227 
228 #define EIGEN_CATCH_ASSIGN_XPR_OP_PRODUCT(ASSIGN_OP,BINOP,ASSIGN_OP2) \
229  template< typename DstXprType, typename OtherXpr, typename Lhs, typename Rhs, typename DstScalar, typename SrcScalar, typename OtherScalar,typename ProdScalar> \
230  struct Assignment<DstXprType, CwiseBinaryOp<internal::BINOP<OtherScalar,ProdScalar>, const OtherXpr, \
231  const Product<Lhs,Rhs,DefaultProduct> >, internal::ASSIGN_OP<DstScalar,SrcScalar>, Dense2Dense> \
232  : assignment_from_xpr_op_product<DstXprType, OtherXpr, Product<Lhs,Rhs,DefaultProduct>, internal::ASSIGN_OP<DstScalar,OtherScalar>, internal::ASSIGN_OP2<DstScalar,ProdScalar> > \
233  {}
234 
235 EIGEN_CATCH_ASSIGN_XPR_OP_PRODUCT(assign_op, scalar_sum_op,add_assign_op);
236 EIGEN_CATCH_ASSIGN_XPR_OP_PRODUCT(add_assign_op,scalar_sum_op,add_assign_op);
237 EIGEN_CATCH_ASSIGN_XPR_OP_PRODUCT(sub_assign_op,scalar_sum_op,sub_assign_op);
238 
239 EIGEN_CATCH_ASSIGN_XPR_OP_PRODUCT(assign_op, scalar_difference_op,sub_assign_op);
240 EIGEN_CATCH_ASSIGN_XPR_OP_PRODUCT(add_assign_op,scalar_difference_op,sub_assign_op);
241 EIGEN_CATCH_ASSIGN_XPR_OP_PRODUCT(sub_assign_op,scalar_difference_op,add_assign_op);
242 
243 //----------------------------------------
244 
245 template<typename Lhs, typename Rhs>
247 {
248  template<typename Dst>
249  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)
250  {
251  dst.coeffRef(0,0) = (lhs.transpose().cwiseProduct(rhs)).sum();
252  }
253 
254  template<typename Dst>
255  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void addTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)
256  {
257  dst.coeffRef(0,0) += (lhs.transpose().cwiseProduct(rhs)).sum();
258  }
259 
260  template<typename Dst>
261  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void subTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)
262  { dst.coeffRef(0,0) -= (lhs.transpose().cwiseProduct(rhs)).sum(); }
263 };
264 
265 
266 /***********************************************************************
267 * Implementation of outer dense * dense vector product
268 ***********************************************************************/
269 
270 // Column major result
271 template<typename Dst, typename Lhs, typename Rhs, typename Func>
272 void EIGEN_DEVICE_FUNC outer_product_selector_run(Dst& dst, const Lhs &lhs, const Rhs &rhs, const Func& func, const false_type&)
273 {
274  evaluator<Rhs> rhsEval(rhs);
275  ei_declare_local_nested_eval(Lhs,lhs,Rhs::SizeAtCompileTime,actual_lhs);
276  // FIXME if cols is large enough, then it might be useful to make sure that lhs is sequentially stored
277  // FIXME not very good if rhs is real and lhs complex while alpha is real too
278  const Index cols = dst.cols();
279  for (Index j=0; j<cols; ++j)
280  func(dst.col(j), rhsEval.coeff(Index(0),j) * actual_lhs);
281 }
282 
283 // Row major result
284 template<typename Dst, typename Lhs, typename Rhs, typename Func>
285 void EIGEN_DEVICE_FUNC outer_product_selector_run(Dst& dst, const Lhs &lhs, const Rhs &rhs, const Func& func, const true_type&)
286 {
287  evaluator<Lhs> lhsEval(lhs);
288  ei_declare_local_nested_eval(Rhs,rhs,Lhs::SizeAtCompileTime,actual_rhs);
289  // FIXME if rows is large enough, then it might be useful to make sure that rhs is sequentially stored
290  // FIXME not very good if lhs is real and rhs complex while alpha is real too
291  const Index rows = dst.rows();
292  for (Index i=0; i<rows; ++i)
293  func(dst.row(i), lhsEval.coeff(i,Index(0)) * actual_rhs);
294 }
295 
296 template<typename Lhs, typename Rhs>
298 {
299  template<typename T> struct is_row_major : internal::conditional<(int(T::Flags)&RowMajorBit), internal::true_type, internal::false_type>::type {};
301 
302  // TODO it would be nice to be able to exploit our *_assign_op functors for that purpose
303  struct set { template<typename Dst, typename Src> EIGEN_DEVICE_FUNC void operator()(const Dst& dst, const Src& src) const { dst.const_cast_derived() = src; } };
304  struct add { template<typename Dst, typename Src> EIGEN_DEVICE_FUNC void operator()(const Dst& dst, const Src& src) const { dst.const_cast_derived() += src; } };
305  struct sub { template<typename Dst, typename Src> EIGEN_DEVICE_FUNC void operator()(const Dst& dst, const Src& src) const { dst.const_cast_derived() -= src; } };
306  struct adds {
308  explicit adds(const Scalar& s) : m_scale(s) {}
309  template<typename Dst, typename Src> void EIGEN_DEVICE_FUNC operator()(const Dst& dst, const Src& src) const {
310  dst.const_cast_derived() += m_scale * src;
311  }
312  };
313 
314  template<typename Dst>
315  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)
316  {
317  internal::outer_product_selector_run(dst, lhs, rhs, set(), is_row_major<Dst>());
318  }
319 
320  template<typename Dst>
321  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void addTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)
322  {
323  internal::outer_product_selector_run(dst, lhs, rhs, add(), is_row_major<Dst>());
324  }
325 
326  template<typename Dst>
327  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void subTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)
328  {
329  internal::outer_product_selector_run(dst, lhs, rhs, sub(), is_row_major<Dst>());
330  }
331 
332  template<typename Dst>
333  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void scaleAndAddTo(Dst& dst, const Lhs& lhs, const Rhs& rhs, const Scalar& alpha)
334  {
335  internal::outer_product_selector_run(dst, lhs, rhs, adds(alpha), is_row_major<Dst>());
336  }
337 
338 };
339 
340 
341 // This base class provides default implementations for evalTo, addTo, subTo, in terms of scaleAndAddTo
342 template<typename Lhs, typename Rhs, typename Derived>
344 {
346 
347  template<typename Dst>
348  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)
349  { dst.setZero(); scaleAndAddTo(dst, lhs, rhs, Scalar(1)); }
350 
351  template<typename Dst>
352  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void addTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)
353  { scaleAndAddTo(dst,lhs, rhs, Scalar(1)); }
354 
355  template<typename Dst>
356  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void subTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)
357  { scaleAndAddTo(dst, lhs, rhs, Scalar(-1)); }
358 
359  template<typename Dst>
360  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void scaleAndAddTo(Dst& dst, const Lhs& lhs, const Rhs& rhs, const Scalar& alpha)
361  { Derived::scaleAndAddTo(dst,lhs,rhs,alpha); }
362 
363 };
364 
365 template<typename Lhs, typename Rhs>
367  : generic_product_impl_base<Lhs,Rhs,generic_product_impl<Lhs,Rhs,DenseShape,DenseShape,GemvProduct> >
368 {
372  enum { Side = Lhs::IsVectorAtCompileTime ? OnTheLeft : OnTheRight };
374 
375  template<typename Dest>
376  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void scaleAndAddTo(Dest& dst, const Lhs& lhs, const Rhs& rhs, const Scalar& alpha)
377  {
378  // Fallback to inner product if both the lhs and rhs is a runtime vector.
379  if (lhs.rows() == 1 && rhs.cols() == 1) {
380  dst.coeffRef(0,0) += alpha * lhs.row(0).conjugate().dot(rhs.col(0));
381  return;
382  }
383  LhsNested actual_lhs(lhs);
384  RhsNested actual_rhs(rhs);
386  (int(MatrixType::Flags)&RowMajorBit) ? RowMajor : ColMajor,
388  >::run(actual_lhs, actual_rhs, dst, alpha);
389  }
390 };
391 
392 template<typename Lhs, typename Rhs>
394 {
396 
397  template<typename Dst>
398  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)
399  {
400  // Same as: dst.noalias() = lhs.lazyProduct(rhs);
401  // but easier on the compiler side
403  }
404 
405  template<typename Dst>
406  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void addTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)
407  {
408  // dst.noalias() += lhs.lazyProduct(rhs);
410  }
411 
412  template<typename Dst>
413  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void subTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)
414  {
415  // dst.noalias() -= lhs.lazyProduct(rhs);
417  }
418 
419  // This is a special evaluation path called from generic_product_impl<...,GemmProduct> in file GeneralMatrixMatrix.h
420  // This variant tries to extract scalar multiples from both the LHS and RHS and factor them out. For instance:
421  // dst {,+,-}= (s1*A)*(B*s2)
422  // will be rewritten as:
423  // dst {,+,-}= (s1*s2) * (A.lazyProduct(B))
424  // There are at least four benefits of doing so:
425  // 1 - huge performance gain for heap-allocated matrix types as it save costly allocations.
426  // 2 - it is faster than simply by-passing the heap allocation through stack allocation.
427  // 3 - it makes this fallback consistent with the heavy GEMM routine.
428  // 4 - it fully by-passes huge stack allocation attempts when multiplying huge fixed-size matrices.
429  // (see https://stackoverflow.com/questions/54738495)
430  // For small fixed sizes matrices, howver, the gains are less obvious, it is sometimes x2 faster, but sometimes x3 slower,
431  // and the behavior depends also a lot on the compiler... This is why this re-writting strategy is currently
432  // enabled only when falling back from the main GEMM.
433  template<typename Dst, typename Func>
435  void eval_dynamic(Dst& dst, const Lhs& lhs, const Rhs& rhs, const Func &func)
436  {
437  enum {
441  };
442  // FIXME: in c++11 this should be auto, and extractScalarFactor should also return auto
443  // this is important for real*complex_mat
444  Scalar actualAlpha = combine_scalar_factors<Scalar>(lhs, rhs);
445 
446  eval_dynamic_impl(dst,
447  blas_traits<Lhs>::extract(lhs).template conjugateIf<ConjLhs>(),
448  blas_traits<Rhs>::extract(rhs).template conjugateIf<ConjRhs>(),
449  func,
450  actualAlpha,
452  }
453 
454 protected:
455 
456  template<typename Dst, typename LhsT, typename RhsT, typename Func, typename Scalar>
458  void eval_dynamic_impl(Dst& dst, const LhsT& lhs, const RhsT& rhs, const Func &func, const Scalar& s /* == 1 */, false_type)
459  {
462  call_restricted_packet_assignment_no_alias(dst, lhs.lazyProduct(rhs), func);
463  }
464 
465  template<typename Dst, typename LhsT, typename RhsT, typename Func, typename Scalar>
467  void eval_dynamic_impl(Dst& dst, const LhsT& lhs, const RhsT& rhs, const Func &func, const Scalar& s, true_type)
468  {
469  call_restricted_packet_assignment_no_alias(dst, s * lhs.lazyProduct(rhs), func);
470  }
471 };
472 
473 // This specialization enforces the use of a coefficient-based evaluation strategy
474 template<typename Lhs, typename Rhs>
476  : generic_product_impl<Lhs,Rhs,DenseShape,DenseShape,CoeffBasedProductMode> {};
477 
478 // Case 2: Evaluate coeff by coeff
479 //
480 // This is mostly taken from CoeffBasedProduct.h
481 // The main difference is that we add an extra argument to the etor_product_*_impl::run() function
482 // for the inner dimension of the product, because evaluator object do not know their size.
483 
484 template<int Traversal, int UnrollingIndex, typename Lhs, typename Rhs, typename RetScalar>
486 
487 template<int StorageOrder, int UnrollingIndex, typename Lhs, typename Rhs, typename Packet, int LoadMode>
489 
490 template<typename Lhs, typename Rhs, int ProductTag>
492  : evaluator_base<Product<Lhs, Rhs, LazyProduct> >
493 {
495  typedef typename XprType::Scalar Scalar;
496  typedef typename XprType::CoeffReturnType CoeffReturnType;
497 
499  explicit product_evaluator(const XprType& xpr)
500  : m_lhs(xpr.lhs()),
501  m_rhs(xpr.rhs()),
502  m_lhsImpl(m_lhs), // FIXME the creation of the evaluator objects should result in a no-op, but check that!
503  m_rhsImpl(m_rhs), // Moreover, they are only useful for the packet path, so we could completely disable them when not needed,
504  // or perhaps declare them on the fly on the packet method... We have experiment to check what's best.
505  m_innerDim(xpr.lhs().cols())
506  {
509  EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);
510 #if 0
511  std::cerr << "LhsOuterStrideBytes= " << LhsOuterStrideBytes << "\n";
512  std::cerr << "RhsOuterStrideBytes= " << RhsOuterStrideBytes << "\n";
513  std::cerr << "LhsAlignment= " << LhsAlignment << "\n";
514  std::cerr << "RhsAlignment= " << RhsAlignment << "\n";
515  std::cerr << "CanVectorizeLhs= " << CanVectorizeLhs << "\n";
516  std::cerr << "CanVectorizeRhs= " << CanVectorizeRhs << "\n";
517  std::cerr << "CanVectorizeInner= " << CanVectorizeInner << "\n";
518  std::cerr << "EvalToRowMajor= " << EvalToRowMajor << "\n";
519  std::cerr << "Alignment= " << Alignment << "\n";
520  std::cerr << "Flags= " << Flags << "\n";
521 #endif
522  }
523 
524  // Everything below here is taken from CoeffBasedProduct.h
525 
528 
531 
534 
535  enum {
536  RowsAtCompileTime = LhsNestedCleaned::RowsAtCompileTime,
537  ColsAtCompileTime = RhsNestedCleaned::ColsAtCompileTime,
538  InnerSize = EIGEN_SIZE_MIN_PREFER_FIXED(LhsNestedCleaned::ColsAtCompileTime, RhsNestedCleaned::RowsAtCompileTime),
539  MaxRowsAtCompileTime = LhsNestedCleaned::MaxRowsAtCompileTime,
540  MaxColsAtCompileTime = RhsNestedCleaned::MaxColsAtCompileTime
541  };
542 
545 
546  enum {
547 
548  LhsCoeffReadCost = LhsEtorType::CoeffReadCost,
549  RhsCoeffReadCost = RhsEtorType::CoeffReadCost,
550  CoeffReadCost = InnerSize==0 ? NumTraits<Scalar>::ReadCost
551  : InnerSize == Dynamic ? HugeCost
552  : InnerSize * (NumTraits<Scalar>::MulCost + int(LhsCoeffReadCost) + int(RhsCoeffReadCost))
553  + (InnerSize - 1) * NumTraits<Scalar>::AddCost,
554 
555  Unroll = CoeffReadCost <= EIGEN_UNROLLING_LIMIT,
556 
557  LhsFlags = LhsEtorType::Flags,
558  RhsFlags = RhsEtorType::Flags,
559 
560  LhsRowMajor = LhsFlags & RowMajorBit,
561  RhsRowMajor = RhsFlags & RowMajorBit,
562 
563  LhsVecPacketSize = unpacket_traits<LhsVecPacketType>::size,
564  RhsVecPacketSize = unpacket_traits<RhsVecPacketType>::size,
565 
566  // Here, we don't care about alignment larger than the usable packet size.
567  LhsAlignment = EIGEN_PLAIN_ENUM_MIN(LhsEtorType::Alignment,LhsVecPacketSize*int(sizeof(typename LhsNestedCleaned::Scalar))),
568  RhsAlignment = EIGEN_PLAIN_ENUM_MIN(RhsEtorType::Alignment,RhsVecPacketSize*int(sizeof(typename RhsNestedCleaned::Scalar))),
569 
571 
572  CanVectorizeRhs = bool(RhsRowMajor) && (RhsFlags & PacketAccessBit) && (ColsAtCompileTime!=1),
573  CanVectorizeLhs = (!LhsRowMajor) && (LhsFlags & PacketAccessBit) && (RowsAtCompileTime!=1),
574 
575  EvalToRowMajor = (MaxRowsAtCompileTime==1&&MaxColsAtCompileTime!=1) ? 1
576  : (MaxColsAtCompileTime==1&&MaxRowsAtCompileTime!=1) ? 0
577  : (bool(RhsRowMajor) && !CanVectorizeLhs),
578 
579  Flags = ((int(LhsFlags) | int(RhsFlags)) & HereditaryBits & ~RowMajorBit)
580  | (EvalToRowMajor ? RowMajorBit : 0)
581  // TODO enable vectorization for mixed types
582  | (SameType && (CanVectorizeLhs || CanVectorizeRhs) ? PacketAccessBit : 0)
583  | (XprType::IsVectorAtCompileTime ? LinearAccessBit : 0),
584 
585  LhsOuterStrideBytes = int(LhsNestedCleaned::OuterStrideAtCompileTime) * int(sizeof(typename LhsNestedCleaned::Scalar)),
586  RhsOuterStrideBytes = int(RhsNestedCleaned::OuterStrideAtCompileTime) * int(sizeof(typename RhsNestedCleaned::Scalar)),
587 
588  Alignment = bool(CanVectorizeLhs) ? (LhsOuterStrideBytes<=0 || (int(LhsOuterStrideBytes) % EIGEN_PLAIN_ENUM_MAX(1,LhsAlignment))!=0 ? 0 : LhsAlignment)
589  : bool(CanVectorizeRhs) ? (RhsOuterStrideBytes<=0 || (int(RhsOuterStrideBytes) % EIGEN_PLAIN_ENUM_MAX(1,RhsAlignment))!=0 ? 0 : RhsAlignment)
590  : 0,
591 
592  /* CanVectorizeInner deserves special explanation. It does not affect the product flags. It is not used outside
593  * of Product. If the Product itself is not a packet-access expression, there is still a chance that the inner
594  * loop of the product might be vectorized. This is the meaning of CanVectorizeInner. Since it doesn't affect
595  * the Flags, it is safe to make this value depend on ActualPacketAccessBit, that doesn't affect the ABI.
596  */
597  CanVectorizeInner = SameType
598  && LhsRowMajor
599  && (!RhsRowMajor)
600  && (int(LhsFlags) & int(RhsFlags) & ActualPacketAccessBit)
601  && (int(InnerSize) % packet_traits<Scalar>::size == 0)
602  };
603 
605  {
606  return (m_lhs.row(row).transpose().cwiseProduct( m_rhs.col(col) )).sum();
607  }
608 
609  /* Allow index-based non-packet access. It is impossible though to allow index-based packed access,
610  * which is why we don't set the LinearAccessBit.
611  * TODO: this seems possible when the result is a vector
612  */
614  const CoeffReturnType coeff(Index index) const
615  {
616  const Index row = (RowsAtCompileTime == 1 || MaxRowsAtCompileTime==1) ? 0 : index;
617  const Index col = (RowsAtCompileTime == 1 || MaxRowsAtCompileTime==1) ? index : 0;
618  return (m_lhs.row(row).transpose().cwiseProduct( m_rhs.col(col) )).sum();
619  }
620 
621  template<int LoadMode, typename PacketType>
624  {
625  PacketType res;
626  typedef etor_product_packet_impl<bool(int(Flags)&RowMajorBit) ? RowMajor : ColMajor,
627  Unroll ? int(InnerSize) : Dynamic,
628  LhsEtorType, RhsEtorType, PacketType, LoadMode> PacketImpl;
629  PacketImpl::run(row, col, m_lhsImpl, m_rhsImpl, m_innerDim, res);
630  return res;
631  }
632 
633  template<int LoadMode, typename PacketType>
635  const PacketType packet(Index index) const
636  {
637  const Index row = (RowsAtCompileTime == 1 || MaxRowsAtCompileTime==1) ? 0 : index;
638  const Index col = (RowsAtCompileTime == 1 || MaxRowsAtCompileTime==1) ? index : 0;
639  return packet<LoadMode,PacketType>(row,col);
640  }
641 
642 protected:
645 
648 
649  // TODO: Get rid of m_innerDim if known at compile time
651 };
652 
653 template<typename Lhs, typename Rhs>
655  : product_evaluator<Product<Lhs, Rhs, LazyProduct>, CoeffBasedProductMode, DenseShape, DenseShape>
656 {
660  enum {
661  Flags = Base::Flags | EvalBeforeNestingBit
662  };
664  explicit product_evaluator(const XprType& xpr)
665  : Base(BaseProduct(xpr.lhs(),xpr.rhs()))
666  {}
667 };
668 
669 /****************************************
670 *** Coeff based product, Packet path ***
671 ****************************************/
672 
673 template<int UnrollingIndex, typename Lhs, typename Rhs, typename Packet, int LoadMode>
674 struct etor_product_packet_impl<RowMajor, UnrollingIndex, Lhs, Rhs, Packet, LoadMode>
675 {
676  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(Index row, Index col, const Lhs& lhs, const Rhs& rhs, Index innerDim, Packet &res)
677  {
679  res = pmadd(pset1<Packet>(lhs.coeff(row, Index(UnrollingIndex-1))), rhs.template packet<LoadMode,Packet>(Index(UnrollingIndex-1), col), res);
680  }
681 };
682 
683 template<int UnrollingIndex, typename Lhs, typename Rhs, typename Packet, int LoadMode>
684 struct etor_product_packet_impl<ColMajor, UnrollingIndex, Lhs, Rhs, Packet, LoadMode>
685 {
686  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(Index row, Index col, const Lhs& lhs, const Rhs& rhs, Index innerDim, Packet &res)
687  {
689  res = pmadd(lhs.template packet<LoadMode,Packet>(row, Index(UnrollingIndex-1)), pset1<Packet>(rhs.coeff(Index(UnrollingIndex-1), col)), res);
690  }
691 };
692 
693 template<typename Lhs, typename Rhs, typename Packet, int LoadMode>
695 {
696  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(Index row, Index col, const Lhs& lhs, const Rhs& rhs, Index /*innerDim*/, Packet &res)
697  {
698  res = pmul(pset1<Packet>(lhs.coeff(row, Index(0))),rhs.template packet<LoadMode,Packet>(Index(0), col));
699  }
700 };
701 
702 template<typename Lhs, typename Rhs, typename Packet, int LoadMode>
704 {
705  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(Index row, Index col, const Lhs& lhs, const Rhs& rhs, Index /*innerDim*/, Packet &res)
706  {
707  res = pmul(lhs.template packet<LoadMode,Packet>(row, Index(0)), pset1<Packet>(rhs.coeff(Index(0), col)));
708  }
709 };
710 
711 template<typename Lhs, typename Rhs, typename Packet, int LoadMode>
713 {
714  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(Index /*row*/, Index /*col*/, const Lhs& /*lhs*/, const Rhs& /*rhs*/, Index /*innerDim*/, Packet &res)
715  {
716  res = pset1<Packet>(typename unpacket_traits<Packet>::type(0));
717  }
718 };
719 
720 template<typename Lhs, typename Rhs, typename Packet, int LoadMode>
722 {
723  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(Index /*row*/, Index /*col*/, const Lhs& /*lhs*/, const Rhs& /*rhs*/, Index /*innerDim*/, Packet &res)
724  {
725  res = pset1<Packet>(typename unpacket_traits<Packet>::type(0));
726  }
727 };
728 
729 template<typename Lhs, typename Rhs, typename Packet, int LoadMode>
731 {
732  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(Index row, Index col, const Lhs& lhs, const Rhs& rhs, Index innerDim, Packet& res)
733  {
734  res = pset1<Packet>(typename unpacket_traits<Packet>::type(0));
735  for(Index i = 0; i < innerDim; ++i)
736  res = pmadd(pset1<Packet>(lhs.coeff(row, i)), rhs.template packet<LoadMode,Packet>(i, col), res);
737  }
738 };
739 
740 template<typename Lhs, typename Rhs, typename Packet, int LoadMode>
742 {
743  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(Index row, Index col, const Lhs& lhs, const Rhs& rhs, Index innerDim, Packet& res)
744  {
745  res = pset1<Packet>(typename unpacket_traits<Packet>::type(0));
746  for(Index i = 0; i < innerDim; ++i)
747  res = pmadd(lhs.template packet<LoadMode,Packet>(row, i), pset1<Packet>(rhs.coeff(i, col)), res);
748  }
749 };
750 
751 
752 /***************************************************************************
753 * Triangular products
754 ***************************************************************************/
755 template<int Mode, bool LhsIsTriangular,
756  typename Lhs, bool LhsIsVector,
757  typename Rhs, bool RhsIsVector>
759 
760 template<typename Lhs, typename Rhs, int ProductTag>
762  : generic_product_impl_base<Lhs,Rhs,generic_product_impl<Lhs,Rhs,TriangularShape,DenseShape,ProductTag> >
763 {
765 
766  template<typename Dest>
767  static void scaleAndAddTo(Dest& dst, const Lhs& lhs, const Rhs& rhs, const Scalar& alpha)
768  {
770  ::run(dst, lhs.nestedExpression(), rhs, alpha);
771  }
772 };
773 
774 template<typename Lhs, typename Rhs, int ProductTag>
776 : generic_product_impl_base<Lhs,Rhs,generic_product_impl<Lhs,Rhs,DenseShape,TriangularShape,ProductTag> >
777 {
779 
780  template<typename Dest>
781  static void scaleAndAddTo(Dest& dst, const Lhs& lhs, const Rhs& rhs, const Scalar& alpha)
782  {
784  }
785 };
786 
787 
788 /***************************************************************************
789 * SelfAdjoint products
790 ***************************************************************************/
791 template <typename Lhs, int LhsMode, bool LhsIsVector,
792  typename Rhs, int RhsMode, bool RhsIsVector>
794 
795 template<typename Lhs, typename Rhs, int ProductTag>
797  : generic_product_impl_base<Lhs,Rhs,generic_product_impl<Lhs,Rhs,SelfAdjointShape,DenseShape,ProductTag> >
798 {
800 
801  template<typename Dest>
802  static EIGEN_DEVICE_FUNC
803  void scaleAndAddTo(Dest& dst, const Lhs& lhs, const Rhs& rhs, const Scalar& alpha)
804  {
806  }
807 };
808 
809 template<typename Lhs, typename Rhs, int ProductTag>
811 : generic_product_impl_base<Lhs,Rhs,generic_product_impl<Lhs,Rhs,DenseShape,SelfAdjointShape,ProductTag> >
812 {
814 
815  template<typename Dest>
816  static void scaleAndAddTo(Dest& dst, const Lhs& lhs, const Rhs& rhs, const Scalar& alpha)
817  {
819  }
820 };
821 
822 
823 /***************************************************************************
824 * Diagonal products
825 ***************************************************************************/
826 
827 template<typename MatrixType, typename DiagonalType, typename Derived, int ProductOrder>
829  : evaluator_base<Derived>
830 {
832 public:
833  enum {
835 
838 
839  _StorageOrder = (Derived::MaxRowsAtCompileTime==1 && Derived::MaxColsAtCompileTime!=1) ? RowMajor
840  : (Derived::MaxColsAtCompileTime==1 && Derived::MaxRowsAtCompileTime!=1) ? ColMajor
843 
844  _ScalarAccessOnDiag = !((int(_StorageOrder) == ColMajor && int(ProductOrder) == OnTheLeft)
845  ||(int(_StorageOrder) == RowMajor && int(ProductOrder) == OnTheRight)),
847  // FIXME currently we need same types, but in the future the next rule should be the one
848  //_Vectorizable = bool(int(MatrixFlags)&PacketAccessBit) && ((!_PacketOnDiag) || (_SameTypes && bool(int(DiagFlags)&PacketAccessBit))),
850  && _SameTypes
852  && (_ScalarAccessOnDiag || (bool(int(DiagFlags)&PacketAccessBit))),
853  _LinearAccessMask = (MatrixType::RowsAtCompileTime==1 || MatrixType::ColsAtCompileTime==1) ? LinearAccessBit : 0,
856 
857  AsScalarProduct = (DiagonalType::SizeAtCompileTime==1)
858  || (DiagonalType::SizeAtCompileTime==Dynamic && MatrixType::RowsAtCompileTime==1 && ProductOrder==OnTheLeft)
859  || (DiagonalType::SizeAtCompileTime==Dynamic && MatrixType::ColsAtCompileTime==1 && ProductOrder==OnTheRight)
860  };
861 
864  {
867  }
868 
870  {
872  return m_diagImpl.coeff(0) * m_matImpl.coeff(idx);
873  else
874  return m_diagImpl.coeff(idx) * m_matImpl.coeff(idx);
875  }
876 
877 protected:
878  template<int LoadMode,typename PacketType>
880  {
881  return internal::pmul(m_matImpl.template packet<LoadMode,PacketType>(row, col),
882  internal::pset1<PacketType>(m_diagImpl.coeff(id)));
883  }
884 
885  template<int LoadMode,typename PacketType>
887  {
888  enum {
889  InnerSize = (MatrixType::Flags & RowMajorBit) ? MatrixType::ColsAtCompileTime : MatrixType::RowsAtCompileTime,
890  DiagonalPacketLoadMode = EIGEN_PLAIN_ENUM_MIN(LoadMode,((InnerSize%16) == 0) ? int(Aligned16) : int(evaluator<DiagonalType>::Alignment)) // FIXME hardcoded 16!!
891  };
892  return internal::pmul(m_matImpl.template packet<LoadMode,PacketType>(row, col),
893  m_diagImpl.template packet<DiagonalPacketLoadMode,PacketType>(id));
894  }
895 
896  evaluator<DiagonalType> m_diagImpl;
897  evaluator<MatrixType> m_matImpl;
898 };
899 
900 // diagonal * dense
901 template<typename Lhs, typename Rhs, int ProductKind, int ProductTag>
902 struct product_evaluator<Product<Lhs, Rhs, ProductKind>, ProductTag, DiagonalShape, DenseShape>
903  : diagonal_product_evaluator_base<Rhs, typename Lhs::DiagonalVectorType, Product<Lhs, Rhs, LazyProduct>, OnTheLeft>
904 {
906  using Base::m_diagImpl;
907  using Base::m_matImpl;
908  using Base::coeff;
909  typedef typename Base::Scalar Scalar;
910 
912  typedef typename XprType::PlainObject PlainObject;
913  typedef typename Lhs::DiagonalVectorType DiagonalType;
914 
915 
916  enum { StorageOrder = Base::_StorageOrder };
917 
919  : Base(xpr.rhs(), xpr.lhs().diagonal())
920  {
921  }
922 
924  {
925  return m_diagImpl.coeff(row) * m_matImpl.coeff(row, col);
926  }
927 
928 #ifndef EIGEN_GPUCC
929  template<int LoadMode,typename PacketType>
931  {
932  // FIXME: NVCC used to complain about the template keyword, but we have to check whether this is still the case.
933  // See also similar calls below.
934  return this->template packet_impl<LoadMode,PacketType>(row,col, row,
936  }
937 
938  template<int LoadMode,typename PacketType>
940  {
941  return packet<LoadMode,PacketType>(int(StorageOrder)==ColMajor?idx:0,int(StorageOrder)==ColMajor?0:idx);
942  }
943 #endif
944 };
945 
946 // dense * diagonal
947 template<typename Lhs, typename Rhs, int ProductKind, int ProductTag>
950 {
952  using Base::m_diagImpl;
953  using Base::m_matImpl;
954  using Base::coeff;
955  typedef typename Base::Scalar Scalar;
956 
958  typedef typename XprType::PlainObject PlainObject;
959 
960  enum { StorageOrder = Base::_StorageOrder };
961 
963  : Base(xpr.lhs(), xpr.rhs().diagonal())
964  {
965  }
966 
968  {
969  return m_matImpl.coeff(row, col) * m_diagImpl.coeff(col);
970  }
971 
972 #ifndef EIGEN_GPUCC
973  template<int LoadMode,typename PacketType>
975  {
976  return this->template packet_impl<LoadMode,PacketType>(row,col, col,
978  }
979 
980  template<int LoadMode,typename PacketType>
982  {
983  return packet<LoadMode,PacketType>(int(StorageOrder)==ColMajor?idx:0,int(StorageOrder)==ColMajor?0:idx);
984  }
985 #endif
986 };
987 
988 /***************************************************************************
989 * Products with permutation matrices
990 ***************************************************************************/
991 
997 template<typename ExpressionType, int Side, bool Transposed, typename ExpressionShape>
999 
1000 template<typename ExpressionType, int Side, bool Transposed>
1002 {
1005 
1006  template<typename Dest, typename PermutationType>
1007  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(Dest& dst, const PermutationType& perm, const ExpressionType& xpr)
1008  {
1009  MatrixType mat(xpr);
1010  const Index n = Side==OnTheLeft ? mat.rows() : mat.cols();
1011  // FIXME we need an is_same for expression that is not sensitive to constness. For instance
1012  // is_same_xpr<Block<const Matrix>, Block<Matrix> >::value should be true.
1013  //if(is_same<MatrixTypeCleaned,Dest>::value && extract_data(dst) == extract_data(mat))
1014  if(is_same_dense(dst, mat))
1015  {
1016  // apply the permutation inplace
1018  mask.fill(false);
1019  Index r = 0;
1020  while(r < perm.size())
1021  {
1022  // search for the next seed
1023  while(r<perm.size() && mask[r]) r++;
1024  if(r>=perm.size())
1025  break;
1026  // we got one, let's follow it until we are back to the seed
1027  Index k0 = r++;
1028  Index kPrev = k0;
1029  mask.coeffRef(k0) = true;
1030  for(Index k=perm.indices().coeff(k0); k!=k0; k=perm.indices().coeff(k))
1031  {
1034  (dst,((Side==OnTheLeft) ^ Transposed) ? k0 : kPrev));
1035 
1036  mask.coeffRef(k) = true;
1037  kPrev = k;
1038  }
1039  }
1040  }
1041  else
1042  {
1043  for(Index i = 0; i < n; ++i)
1044  {
1046  (dst, ((Side==OnTheLeft) ^ Transposed) ? perm.indices().coeff(i) : i)
1047 
1048  =
1049 
1051  (mat, ((Side==OnTheRight) ^ Transposed) ? perm.indices().coeff(i) : i);
1052  }
1053  }
1054  }
1055 };
1056 
1057 template<typename Lhs, typename Rhs, int ProductTag, typename MatrixShape>
1059 {
1060  template<typename Dest>
1061  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dest& dst, const Lhs& lhs, const Rhs& rhs)
1062  {
1064  }
1065 };
1066 
1067 template<typename Lhs, typename Rhs, int ProductTag, typename MatrixShape>
1069 {
1070  template<typename Dest>
1071  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dest& dst, const Lhs& lhs, const Rhs& rhs)
1072  {
1074  }
1075 };
1076 
1077 template<typename Lhs, typename Rhs, int ProductTag, typename MatrixShape>
1078 struct generic_product_impl<Inverse<Lhs>, Rhs, PermutationShape, MatrixShape, ProductTag>
1079 {
1080  template<typename Dest>
1081  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dest& dst, const Inverse<Lhs>& lhs, const Rhs& rhs)
1082  {
1084  }
1085 };
1086 
1087 template<typename Lhs, typename Rhs, int ProductTag, typename MatrixShape>
1088 struct generic_product_impl<Lhs, Inverse<Rhs>, MatrixShape, PermutationShape, ProductTag>
1089 {
1090  template<typename Dest>
1091  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dest& dst, const Lhs& lhs, const Inverse<Rhs>& rhs)
1092  {
1094  }
1095 };
1096 
1097 
1098 /***************************************************************************
1099 * Products with transpositions matrices
1100 ***************************************************************************/
1101 
1102 // FIXME could we unify Transpositions and Permutation into a single "shape"??
1103 
1108 template<typename ExpressionType, int Side, bool Transposed, typename ExpressionShape>
1110 {
1114  template<typename Dest, typename TranspositionType>
1115  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(Dest& dst, const TranspositionType& tr, const ExpressionType& xpr)
1116  {
1118  typedef typename TranspositionType::StorageIndex StorageIndex;
1119  const Index size = tr.size();
1120  StorageIndex j = 0;
1121 
1122  if(!is_same_dense(dst,mat))
1123  dst = mat;
1124 
1125  for(Index k=(Transposed?size-1:0) ; Transposed?k>=0:k<size ; Transposed?--k:++k)
1126  if(Index(j=tr.coeff(k))!=k)
1127  {
1128  if(Side==OnTheLeft) dst.row(k).swap(dst.row(j));
1129  else if(Side==OnTheRight) dst.col(k).swap(dst.col(j));
1130  }
1131  }
1132 };
1133 
1134 template<typename Lhs, typename Rhs, int ProductTag, typename MatrixShape>
1135 struct generic_product_impl<Lhs, Rhs, TranspositionsShape, MatrixShape, ProductTag>
1136 {
1137  template<typename Dest>
1138  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dest& dst, const Lhs& lhs, const Rhs& rhs)
1139  {
1141  }
1142 };
1143 
1144 template<typename Lhs, typename Rhs, int ProductTag, typename MatrixShape>
1145 struct generic_product_impl<Lhs, Rhs, MatrixShape, TranspositionsShape, ProductTag>
1146 {
1147  template<typename Dest>
1148  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dest& dst, const Lhs& lhs, const Rhs& rhs)
1149  {
1151  }
1152 };
1153 
1154 
1155 template<typename Lhs, typename Rhs, int ProductTag, typename MatrixShape>
1156 struct generic_product_impl<Transpose<Lhs>, Rhs, TranspositionsShape, MatrixShape, ProductTag>
1157 {
1158  template<typename Dest>
1159  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dest& dst, const Transpose<Lhs>& lhs, const Rhs& rhs)
1160  {
1162  }
1163 };
1164 
1165 template<typename Lhs, typename Rhs, int ProductTag, typename MatrixShape>
1166 struct generic_product_impl<Lhs, Transpose<Rhs>, MatrixShape, TranspositionsShape, ProductTag>
1167 {
1168  template<typename Dest>
1169  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dest& dst, const Lhs& lhs, const Transpose<Rhs>& rhs)
1170  {
1172  }
1173 };
1174 
1175 } // end namespace internal
1176 
1177 } // end namespace Eigen
1178 
1179 #endif // EIGEN_PRODUCT_EVALUATORS_H
Eigen::Inverse
Expression of the inverse of another expression.
Definition: Inverse.h:43
gtsam.examples.DogLegOptimizerExample.int
int
Definition: DogLegOptimizerExample.py:111
Eigen::internal::diagonal_product_evaluator_base::_LinearAccessMask
@ _LinearAccessMask
Definition: ProductEvaluators.h:855
Eigen::DefaultProduct
@ DefaultProduct
Definition: Constants.h:500
Eigen::internal::Assignment< DstXprType, CwiseBinaryOp< internal::scalar_product_op< ScalarBis, Scalar >, const CwiseNullaryOp< internal::scalar_constant_op< ScalarBis >, Plain >, const Product< Lhs, Rhs, DefaultProduct > >, AssignFunc, Dense2Dense >::run
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(DstXprType &dst, const SrcXprType &src, const AssignFunc &func)
Definition: ProductEvaluators.h:194
Eigen::internal::diagonal_product_evaluator_base::AsScalarProduct
@ AsScalarProduct
Definition: ProductEvaluators.h:859
Eigen::internal::Lhs
@ Lhs
Definition: TensorContractionMapper.h:19
Eigen::internal::generic_product_impl< Lhs, Transpose< Rhs >, MatrixShape, TranspositionsShape, ProductTag >::evalTo
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dest &dst, const Lhs &lhs, const Transpose< Rhs > &rhs)
Definition: ProductEvaluators.h:1169
perm
idx_t idx_t idx_t idx_t idx_t * perm
Definition: include/metis.h:223
Eigen::internal::product_evaluator< Product< Lhs, Rhs, LazyProduct >, ProductTag, DenseShape, DenseShape >::LhsVecPacketType
find_best_packet< Scalar, RowsAtCompileTime >::type LhsVecPacketType
Definition: ProductEvaluators.h:543
Eigen::internal::generic_product_impl< Lhs, Rhs, MatrixShape, PermutationShape, ProductTag >
Definition: ProductEvaluators.h:1068
Eigen::HugeCost
const int HugeCost
Definition: Constants.h:44
Eigen::internal::find_best_packet::type
find_best_packet_helper< Size, typename packet_traits< T >::type >::type type
Definition: XprHelper.h:208
EIGEN_DEVICE_FUNC
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:976
Eigen::internal::product_evaluator< Product< Lhs, Rhs, LazyProduct >, ProductTag, DenseShape, DenseShape >::RhsNested
internal::nested_eval< Rhs, Lhs::RowsAtCompileTime >::type RhsNested
Definition: ProductEvaluators.h:527
Eigen
Namespace containing all symbols from the Eigen library.
Definition: jet.h:637
Eigen::internal::generic_product_impl< Lhs, Rhs, DenseShape, DenseShape, OuterProduct >::sub::operator()
EIGEN_DEVICE_FUNC void operator()(const Dst &dst, const Src &src) const
Definition: ProductEvaluators.h:305
Eigen::internal::evaluator< Diagonal< const Product< Lhs, Rhs, DefaultProduct >, DiagIndex > >::Base
evaluator< Diagonal< const Product< Lhs, Rhs, LazyProduct >, DiagIndex > > Base
Definition: ProductEvaluators.h:69
Eigen::CoeffBasedProductMode
@ CoeffBasedProductMode
Definition: Constants.h:500
Eigen::internal::generic_product_impl< Lhs, Rhs, TranspositionsShape, MatrixShape, ProductTag >::evalTo
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dest &dst, const Lhs &lhs, const Rhs &rhs)
Definition: ProductEvaluators.h:1138
Eigen::internal::generic_product_impl< Lhs, Rhs, DenseShape, DenseShape, CoeffBasedProductMode >::addTo
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void addTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
Definition: ProductEvaluators.h:406
EIGEN_UNROLLING_LIMIT
#define EIGEN_UNROLLING_LIMIT
Definition: Settings.h:24
col
m col(1)
Eigen::GemvProduct
@ GemvProduct
Definition: Constants.h:500
Eigen::internal::diagonal_product_evaluator_base::m_matImpl
evaluator< MatrixType > m_matImpl
Definition: ProductEvaluators.h:899
Eigen::Block
Expression of a fixed-size or dynamic-size block.
Definition: Block.h:103
set
Definition: pytypes.h:2185
Eigen::internal::diagonal_product_evaluator_base::_SameStorageOrder
@ _SameStorageOrder
Definition: ProductEvaluators.h:844
Eigen::internal::permutation_matrix_product< ExpressionType, Side, Transposed, DenseShape >
Definition: ProductEvaluators.h:1001
Eigen::internal::generic_product_impl< Lhs, Rhs, DenseShape, DenseShape, CoeffBasedProductMode >::eval_dynamic_impl
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void eval_dynamic_impl(Dst &dst, const LhsT &lhs, const RhsT &rhs, const Func &func, const Scalar &s, true_type)
Definition: ProductEvaluators.h:467
Eigen::internal::generic_product_impl< Lhs, Rhs, DenseShape, DenseShape, CoeffBasedProductMode >::subTo
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void subTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
Definition: ProductEvaluators.h:413
gtsam.examples.DogLegOptimizerExample.type
type
Definition: DogLegOptimizerExample.py:111
Eigen::internal::EIGEN_CATCH_ASSIGN_XPR_OP_PRODUCT
EIGEN_CATCH_ASSIGN_XPR_OP_PRODUCT(assign_op, scalar_sum_op, add_assign_op)
Eigen::internal::permutation_matrix_product< ExpressionType, Side, Transposed, DenseShape >::MatrixType
nested_eval< ExpressionType, 1 >::type MatrixType
Definition: ProductEvaluators.h:1003
alpha
RealScalar alpha
Definition: level1_cplx_impl.h:147
Eigen::internal::product_evaluator< Product< Lhs, Rhs, LazyProduct >, ProductTag, DenseShape, DenseShape >::XprType
Product< Lhs, Rhs, LazyProduct > XprType
Definition: ProductEvaluators.h:494
Eigen::internal::product_evaluator< Product< Lhs, Rhs, DefaultProduct >, LazyCoeffBasedProductMode, DenseShape, DenseShape >::product_evaluator
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE product_evaluator(const XprType &xpr)
Definition: ProductEvaluators.h:664
s
RealScalar s
Definition: level1_cplx_impl.h:126
Eigen::CwiseBinaryOp
Generic expression where a coefficient-wise binary operator is applied to two expressions.
Definition: CwiseBinaryOp.h:77
Eigen::internal::generic_product_impl< Lhs, Rhs, DenseShape, DenseShape, OuterProduct >::addTo
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void addTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
Definition: ProductEvaluators.h:321
Eigen::DenseShape
Definition: Constants.h:528
Eigen::internal::product_evaluator< Product< Lhs, Rhs, LazyProduct >, ProductTag, DenseShape, DenseShape >::m_rhs
internal::add_const_on_value_type< RhsNested >::type m_rhs
Definition: ProductEvaluators.h:644
Eigen::internal::product_evaluator< Product< Lhs, Rhs, Options >, ProductTag, LhsShape, RhsShape >::product_evaluator
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE product_evaluator(const XprType &xpr)
Definition: ProductEvaluators.h:107
MatrixType
MatrixXf MatrixType
Definition: benchmark-blocking-sizes.cpp:52
Eigen::internal::product_evaluator< Product< Lhs, Rhs, LazyProduct >, ProductTag, DenseShape, DenseShape >::CoeffReturnType
XprType::CoeffReturnType CoeffReturnType
Definition: ProductEvaluators.h:496
Eigen::internal::generic_product_impl< Lhs, Rhs, PermutationShape, MatrixShape, ProductTag >::evalTo
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dest &dst, const Lhs &lhs, const Rhs &rhs)
Definition: ProductEvaluators.h:1061
Eigen::internal::remove_all
Definition: Meta.h:126
Eigen::internal::evaluator_assume_aliasing
Definition: CoreEvaluators.h:84
Eigen::internal::triangular_product_impl
Definition: ProductEvaluators.h:758
Eigen::internal::generic_product_impl< Transpose< Lhs >, Rhs, TranspositionsShape, MatrixShape, ProductTag >::evalTo
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dest &dst, const Transpose< Lhs > &lhs, const Rhs &rhs)
Definition: ProductEvaluators.h:1159
Eigen::internal::product_evaluator< Product< Lhs, Rhs, Options >, ProductTag, LhsShape, RhsShape >::PlainObject
XprType::PlainObject PlainObject
Definition: ProductEvaluators.h:100
Eigen::internal::generic_product_impl< Lhs, Rhs, DenseShape, DenseShape, CoeffBasedProductMode >::eval_dynamic
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void eval_dynamic(Dst &dst, const Lhs &lhs, const Rhs &rhs, const Func &func)
Definition: ProductEvaluators.h:435
eigen_assert
#define eigen_assert(x)
Definition: Macros.h:1037
Eigen::internal::selfadjoint_product_impl
Definition: ProductEvaluators.h:793
gtsam::diag
Matrix diag(const std::vector< Matrix > &Hs)
Definition: Matrix.cpp:206
Eigen::internal::product_evaluator< Product< Lhs, Rhs, ProductKind >, ProductTag, DiagonalShape, DenseShape >::coeff
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalar coeff(Index row, Index col) const
Definition: ProductEvaluators.h:923
Eigen::internal::permutation_matrix_product
Definition: ProductEvaluators.h:998
Eigen::internal::diagonal_product_evaluator_base::_StorageOrder
@ _StorageOrder
Definition: ProductEvaluators.h:841
Eigen::RowMajorBit
const unsigned int RowMajorBit
Definition: Constants.h:66
Eigen::internal::false_type
Definition: Meta.h:97
Eigen::internal::product_evaluator< Product< Lhs, Rhs, Options >, ProductTag, LhsShape, RhsShape >::XprType
Product< Lhs, Rhs, Options > XprType
Definition: ProductEvaluators.h:99
Eigen::internal::product_evaluator< Product< Lhs, Rhs, ProductKind >, ProductTag, DenseShape, DiagonalShape >::coeff
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalar coeff(Index row, Index col) const
Definition: ProductEvaluators.h:967
Eigen::internal::packet_traits
Definition: GenericPacketMath.h:106
Eigen::internal::diagonal_product_evaluator_base
Definition: ProductEvaluators.h:828
Eigen::internal::generic_product_impl< Lhs, Inverse< Rhs >, MatrixShape, PermutationShape, ProductTag >::evalTo
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dest &dst, const Lhs &lhs, const Inverse< Rhs > &rhs)
Definition: ProductEvaluators.h:1091
Eigen::internal::product_evaluator< Product< Lhs, Rhs, LazyProduct >, ProductTag, DenseShape, DenseShape >::product_evaluator
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE product_evaluator(const XprType &xpr)
Definition: ProductEvaluators.h:499
Eigen::internal::Dense2Dense
Definition: AssignEvaluator.h:814
Eigen::internal::product_evaluator< Product< Lhs, Rhs, DefaultProduct >, LazyCoeffBasedProductMode, DenseShape, DenseShape >::BaseProduct
Product< Lhs, Rhs, LazyProduct > BaseProduct
Definition: ProductEvaluators.h:658
type
Definition: pytypes.h:1491
Eigen::internal::permutation_matrix_product< ExpressionType, Side, Transposed, DenseShape >::run
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(Dest &dst, const PermutationType &perm, const ExpressionType &xpr)
Definition: ProductEvaluators.h:1007
Eigen::LazyCoeffBasedProductMode
@ LazyCoeffBasedProductMode
Definition: Constants.h:500
Eigen::internal::generic_product_impl_base
Definition: ProductEvaluators.h:343
Eigen::internal::diagonal_product_evaluator_base::diagonal_product_evaluator_base
EIGEN_DEVICE_FUNC diagonal_product_evaluator_base(const MatrixType &mat, const DiagonalType &diag)
Definition: ProductEvaluators.h:864
Eigen::internal::product_evaluator< Product< Lhs, Rhs, DefaultProduct >, LazyCoeffBasedProductMode, DenseShape, DenseShape >::Base
product_evaluator< BaseProduct, CoeffBasedProductMode, DenseShape, DenseShape > Base
Definition: ProductEvaluators.h:659
Eigen::internal::diagonal_product_evaluator_base::Flags
@ Flags
Definition: ProductEvaluators.h:856
Eigen::ScalarBinaryOpTraits
Determines whether the given binary operation of two numeric types is allowed and what the scalar ret...
Definition: XprHelper.h:801
Eigen::RowMajor
@ RowMajor
Definition: Constants.h:321
Eigen::internal::product_evaluator< Product< Lhs, Rhs, ProductKind >, ProductTag, DiagonalShape, DenseShape >::XprType
Product< Lhs, Rhs, ProductKind > XprType
Definition: ProductEvaluators.h:911
mat
MatrixXf mat
Definition: Tutorial_AdvancedInitialization_CommaTemporary.cpp:1
res
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
Definition: PartialRedux_count.cpp:3
Eigen::internal::call_assignment_no_alias
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void call_assignment_no_alias(Dst &dst, const Src &src, const Func &func)
Definition: AssignEvaluator.h:873
Eigen::internal::product_evaluator< Product< Lhs, Rhs, ProductKind >, ProductTag, DiagonalShape, DenseShape >::DiagonalType
Lhs::DiagonalVectorType DiagonalType
Definition: ProductEvaluators.h:913
Eigen::internal::evaluator_base
Definition: CoreEvaluators.h:110
Eigen::internal::generic_product_impl< Lhs, Rhs, DenseShape, DenseShape, OuterProduct >::adds::operator()
void EIGEN_DEVICE_FUNC operator()(const Dst &dst, const Src &src) const
Definition: ProductEvaluators.h:309
Eigen::internal::etor_product_packet_impl< ColMajor, Dynamic, Lhs, Rhs, Packet, LoadMode >::run
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(Index row, Index col, const Lhs &lhs, const Rhs &rhs, Index innerDim, Packet &res)
Definition: ProductEvaluators.h:743
Eigen::internal::product_evaluator< Product< Lhs, Rhs, ProductKind >, ProductTag, DenseShape, DiagonalShape >::packet
EIGEN_STRONG_INLINE PacketType packet(Index row, Index col) const
Definition: ProductEvaluators.h:974
Eigen::internal::evaluator< Product< Lhs, Rhs, Options > >::evaluator
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE evaluator(const XprType &xpr)
Definition: ProductEvaluators.h:35
diagonal
void diagonal(const MatrixType &m)
Definition: diagonal.cpp:12
rows
int rows
Definition: Tutorial_commainit_02.cpp:1
Eigen::internal::scalar_product_op
Definition: BinaryFunctors.h:70
Eigen::internal::product_evaluator< Product< Lhs, Rhs, Options >, ProductTag, LhsShape, RhsShape >::m_result
PlainObject m_result
Definition: ProductEvaluators.h:128
Eigen::internal::generic_product_impl< Lhs, Rhs, DenseShape, DenseShape, OuterProduct >::subTo
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void subTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
Definition: ProductEvaluators.h:327
Eigen::internal::diagonal_product_evaluator_base::_Vectorizable
@ _Vectorizable
Definition: ProductEvaluators.h:851
eigen_internal_assert
#define eigen_internal_assert(x)
Definition: Macros.h:1043
Eigen::Transpose
Expression of the transpose of a matrix.
Definition: Transpose.h:52
k0
double k0(double x)
Definition: k0.c:131
Eigen::internal::etor_product_packet_impl< RowMajor, 0, Lhs, Rhs, Packet, LoadMode >::run
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(Index, Index, const Lhs &, const Rhs &, Index, Packet &res)
Definition: ProductEvaluators.h:714
Eigen::internal::assignment_from_xpr_op_product::run
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(DstXprType &dst, const SrcXprType &src, const InitialFunc &)
Definition: ProductEvaluators.h:221
Eigen::CwiseNullaryOp
Generic expression of a matrix where all coefficients are defined by a functor.
Definition: CwiseNullaryOp.h:60
Eigen::PacketAccessBit
const unsigned int PacketAccessBit
Definition: Constants.h:94
Eigen::internal::generic_product_impl< Lhs, Rhs, DenseShape, DenseShape, GemvProduct >::MatrixType
internal::remove_all< typename internal::conditional< int(Side)==OnTheRight, LhsNested, RhsNested >::type >::type MatrixType
Definition: ProductEvaluators.h:373
Eigen::OnTheLeft
@ OnTheLeft
Definition: Constants.h:332
Eigen::internal::product_evaluator< Product< Lhs, Rhs, LazyProduct >, ProductTag, DenseShape, DenseShape >::LhsNestedCleaned
internal::remove_all< LhsNested >::type LhsNestedCleaned
Definition: ProductEvaluators.h:529
n
int n
Definition: BiCGSTAB_simple.cpp:1
Eigen::internal::generic_product_impl
Definition: ProductEvaluators.h:86
Eigen::PacketType
Definition: TensorMeta.h:50
Eigen::internal::generic_product_impl< Lhs, Rhs, SelfAdjointShape, DenseShape, ProductTag >::Scalar
Product< Lhs, Rhs >::Scalar Scalar
Definition: ProductEvaluators.h:799
EIGEN_PLAIN_ENUM_MIN
#define EIGEN_PLAIN_ENUM_MIN(a, b)
Definition: Macros.h:1288
Eigen::internal::true_type
Definition: Meta.h:96
Eigen::internal::call_restricted_packet_assignment_no_alias
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void call_restricted_packet_assignment_no_alias(Dst &dst, const Src &src, const Func &func)
Definition: AssignEvaluator.h:895
Eigen::internal::generic_product_impl< Lhs, Rhs, DenseShape, SelfAdjointShape, ProductTag >::scaleAndAddTo
static void scaleAndAddTo(Dest &dst, const Lhs &lhs, const Rhs &rhs, const Scalar &alpha)
Definition: ProductEvaluators.h:816
Eigen::internal::etor_product_coeff_impl
Definition: ProductEvaluators.h:485
Eigen::internal::diagonal_product_evaluator_base::Alignment
@ Alignment
Definition: ProductEvaluators.h:857
Eigen::internal::generic_product_impl< Lhs, Rhs, DenseShape, DenseShape, OuterProduct >::scaleAndAddTo
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void scaleAndAddTo(Dst &dst, const Lhs &lhs, const Rhs &rhs, const Scalar &alpha)
Definition: ProductEvaluators.h:333
Eigen::internal::generic_product_impl< Lhs, Rhs, DenseShape, DenseShape, InnerProduct >::evalTo
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
Definition: ProductEvaluators.h:249
EIGEN_UNUSED_VARIABLE
#define EIGEN_UNUSED_VARIABLE(var)
Definition: Macros.h:1076
Plain
Definition: timeVirtual.cpp:28
Eigen::internal::etor_product_packet_impl< ColMajor, 0, Lhs, Rhs, Packet, LoadMode >::run
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(Index, Index, const Lhs &, const Rhs &, Index, Packet &res)
Definition: ProductEvaluators.h:723
Eigen::ActualPacketAccessBit
const unsigned int ActualPacketAccessBit
Definition: Constants.h:107
j
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2
Eigen::internal::transposition_matrix_product::MatrixType
nested_eval< ExpressionType, 1 >::type MatrixType
Definition: ProductEvaluators.h:1113
Eigen::internal::diagonal_product_evaluator_base::MatrixFlags
@ MatrixFlags
Definition: ProductEvaluators.h:838
Eigen::internal::product_evaluator< Product< Lhs, Rhs, LazyProduct >, ProductTag, DenseShape, DenseShape >::m_rhsImpl
RhsEtorType m_rhsImpl
Definition: ProductEvaluators.h:647
Eigen::internal::generic_product_impl< Lhs, Rhs, DenseShape, SelfAdjointShape, ProductTag >::Scalar
Product< Lhs, Rhs >::Scalar Scalar
Definition: ProductEvaluators.h:813
Eigen::internal::product_evaluator< Product< Lhs, Rhs, LazyProduct >, ProductTag, DenseShape, DenseShape >::Scalar
XprType::Scalar Scalar
Definition: ProductEvaluators.h:495
Eigen::internal::product_evaluator< Product< Lhs, Rhs, ProductKind >, ProductTag, DiagonalShape, DenseShape >::product_evaluator
EIGEN_DEVICE_FUNC product_evaluator(const XprType &xpr)
Definition: ProductEvaluators.h:918
Eigen::Dynamic
const int Dynamic
Definition: Constants.h:22
Eigen::internal::diagonal_product_evaluator_base::coeff
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalar coeff(Index idx) const
Definition: ProductEvaluators.h:871
Eigen::internal::product_evaluator< Product< Lhs, Rhs, LazyProduct >, ProductTag, DenseShape, DenseShape >::m_lhs
internal::add_const_on_value_type< LhsNested >::type m_lhs
Definition: ProductEvaluators.h:643
Eigen::internal::product_evaluator< Product< Lhs, Rhs, LazyProduct >, ProductTag, DenseShape, DenseShape >::coeff
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
Definition: ProductEvaluators.h:614
Eigen::internal::unpacket_traits
Definition: GenericPacketMath.h:132
Eigen::internal::diagonal_product_evaluator_base::CoeffReadCost
@ CoeffReadCost
Definition: ProductEvaluators.h:836
add
graph add(PriorFactor< Pose2 >(1, priorMean, priorNoise))
Eigen::internal::product_evaluator< Product< Lhs, Rhs, ProductKind >, ProductTag, DiagonalShape, DenseShape >::Scalar
Base::Scalar Scalar
Definition: ProductEvaluators.h:909
func
int func(const int &a)
Definition: testDSF.cpp:221
Eigen::internal::product_evaluator< Product< Lhs, Rhs, LazyProduct >, ProductTag, DenseShape, DenseShape >::LhsNested
internal::nested_eval< Lhs, Rhs::ColsAtCompileTime >::type LhsNested
Definition: ProductEvaluators.h:526
Eigen::internal::etor_product_packet_impl< RowMajor, 1, Lhs, Rhs, Packet, LoadMode >::run
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(Index row, Index col, const Lhs &lhs, const Rhs &rhs, Index, Packet &res)
Definition: ProductEvaluators.h:696
Eigen::internal::product_evaluator< Product< Lhs, Rhs, ProductKind >, ProductTag, DiagonalShape, DenseShape >::PlainObject
XprType::PlainObject PlainObject
Definition: ProductEvaluators.h:912
Eigen::internal::generic_product_impl< Lhs, Rhs, DenseShape, DenseShape, OuterProduct >::adds::adds
adds(const Scalar &s)
Definition: ProductEvaluators.h:308
Eigen::internal::scalar_difference_op
Definition: BinaryFunctors.h:349
ei_declare_local_nested_eval
#define ei_declare_local_nested_eval(XPR_T, XPR, N, NAME)
Definition: Memory.h:774
Eigen::Diagonal
Expression of a diagonal/subdiagonal/superdiagonal in a matrix.
Definition: Diagonal.h:63
EIGEN_SCALAR_BINARYOP_EXPR_RETURN_TYPE
#define EIGEN_SCALAR_BINARYOP_EXPR_RETURN_TYPE(SCALAR, EXPR, OPNAME)
Definition: Macros.h:1351
EIGEN_STRONG_INLINE
#define EIGEN_STRONG_INLINE
Definition: Macros.h:917
Eigen::internal::evaluator< Diagonal< const Product< Lhs, Rhs, DefaultProduct >, DiagIndex > >::XprType
Diagonal< const Product< Lhs, Rhs, DefaultProduct >, DiagIndex > XprType
Definition: ProductEvaluators.h:68
Eigen::internal::product_evaluator< Product< Lhs, Rhs, ProductKind >, ProductTag, DiagonalShape, DenseShape >::packet
EIGEN_STRONG_INLINE PacketType packet(Index idx) const
Definition: ProductEvaluators.h:939
Eigen::Inverse::nestedExpression
const EIGEN_DEVICE_FUNC XprTypeNestedCleaned & nestedExpression() const
Definition: Inverse.h:60
Eigen::internal::product_evaluator
Definition: ForwardDeclarations.h:164
Eigen::internal::evaluator_traits_base::Shape
storage_kind_to_shape< typename traits< T >::StorageKind >::Shape Shape
Definition: CoreEvaluators.h:74
Eigen::internal::evaluator< Product< Lhs, Rhs, Options > >::Base
product_evaluator< XprType > Base
Definition: ProductEvaluators.h:33
Eigen::internal::product_evaluator< Product< Lhs, Rhs, LazyProduct >, ProductTag, DenseShape, DenseShape >::RhsEtorType
evaluator< RhsNestedCleaned > RhsEtorType
Definition: ProductEvaluators.h:533
Eigen::Product
Expression of the product of two arbitrary matrices or vectors.
Definition: Product.h:71
gtsam.examples.DogLegOptimizerExample.run
def run(args)
Definition: DogLegOptimizerExample.py:21
Eigen::internal::evaluator_assume_aliasing::value
static const bool value
Definition: CoreEvaluators.h:85
Eigen::Matrix::coeffRef
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index rowId, Index colId)
Definition: PlainObjectBase.h:175
Eigen::internal::Packet
Definition: ZVector/PacketMath.h:47
Eigen::internal::product_evaluator< Product< Lhs, Rhs, LazyProduct >, ProductTag, DenseShape, DenseShape >::RhsVecPacketType
find_best_packet< Scalar, ColsAtCompileTime >::type RhsVecPacketType
Definition: ProductEvaluators.h:544
Eigen::internal::generic_product_impl< Lhs, Rhs, DenseShape, DenseShape, CoeffBasedProductMode >::eval_dynamic_impl
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void eval_dynamic_impl(Dst &dst, const LhsT &lhs, const RhsT &rhs, const Func &func, const Scalar &s, false_type)
Definition: ProductEvaluators.h:458
Eigen::internal::generic_product_impl_base::addTo
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void addTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
Definition: ProductEvaluators.h:352
Eigen::Product::cols
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
Definition: Product.h:104
Eigen::internal::generic_product_impl< Lhs, Rhs, DenseShape, DenseShape, CoeffBasedProductMode >::evalTo
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
Definition: ProductEvaluators.h:398
Eigen::Triplet< double >
Eigen::internal::etor_product_packet_impl
Definition: ProductEvaluators.h:488
Eigen::internal::generic_product_impl< Lhs, Rhs, DenseShape, DenseShape, GemvProduct >::LhsNested
nested_eval< Lhs, 1 >::type LhsNested
Definition: ProductEvaluators.h:369
Eigen::internal::generic_product_impl< Lhs, Rhs, PermutationShape, MatrixShape, ProductTag >
Definition: ProductEvaluators.h:1058
Eigen::internal::evaluator< CwiseBinaryOp< internal::scalar_product_op< Scalar1, Scalar2 >, const CwiseNullaryOp< internal::scalar_constant_op< Scalar1 >, Plain1 >, const Product< Lhs, Rhs, DefaultProduct > > >::XprType
CwiseBinaryOp< internal::scalar_product_op< Scalar1, Scalar2 >, const CwiseNullaryOp< internal::scalar_constant_op< Scalar1 >, Plain1 >, const Product< Lhs, Rhs, DefaultProduct > > XprType
Definition: ProductEvaluators.h:55
Eigen::internal::evaluator
Definition: CoreEvaluators.h:90
Eigen::internal::generic_product_impl< Lhs, Rhs, DenseShape, TriangularShape, ProductTag >::Scalar
Product< Lhs, Rhs >::Scalar Scalar
Definition: ProductEvaluators.h:778
Eigen::internal::generic_product_impl< Lhs, Rhs, DenseShape, DenseShape, OuterProduct >::Scalar
Product< Lhs, Rhs >::Scalar Scalar
Definition: ProductEvaluators.h:300
Eigen::Product::lhs
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE LhsNestedCleaned & lhs() const
Definition: Product.h:107
Eigen::internal::product_evaluator< Product< Lhs, Rhs, LazyProduct >, ProductTag, DenseShape, DenseShape >::m_lhsImpl
LhsEtorType m_lhsImpl
Definition: ProductEvaluators.h:646
Eigen::internal::generic_product_impl< Lhs, Rhs, DenseShape, DenseShape, InnerProduct >::addTo
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void addTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
Definition: ProductEvaluators.h:255
Eigen::internal::generic_product_impl< Lhs, Rhs, MatrixShape, PermutationShape, ProductTag >::evalTo
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dest &dst, const Lhs &lhs, const Rhs &rhs)
Definition: ProductEvaluators.h:1071
Eigen::internal::product_evaluator< Product< Lhs, Rhs, ProductKind >, ProductTag, DiagonalShape, DenseShape >::packet
EIGEN_STRONG_INLINE PacketType packet(Index row, Index col) const
Definition: ProductEvaluators.h:930
Eigen::internal::generic_product_impl< Lhs, Rhs, SelfAdjointShape, DenseShape, ProductTag >::scaleAndAddTo
static EIGEN_DEVICE_FUNC void scaleAndAddTo(Dest &dst, const Lhs &lhs, const Rhs &rhs, const Scalar &alpha)
Definition: ProductEvaluators.h:803
Eigen::internal::generic_product_impl< Lhs, Rhs, DenseShape, DenseShape, GemvProduct >::RhsNested
nested_eval< Rhs, 1 >::type RhsNested
Definition: ProductEvaluators.h:370
Eigen::OnTheRight
@ OnTheRight
Definition: Constants.h:334
Eigen::internal::generic_product_impl_base::scaleAndAddTo
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void scaleAndAddTo(Dst &dst, const Lhs &lhs, const Rhs &rhs, const Scalar &alpha)
Definition: ProductEvaluators.h:360
Eigen::Product::rows
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
Definition: Product.h:102
Eigen::CwiseBinaryOp::rhs
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE _RhsNested & rhs() const
Definition: CwiseBinaryOp.h:135
Eigen::internal::transposition_matrix_product::MatrixTypeCleaned
remove_all< MatrixType >::type MatrixTypeCleaned
Definition: ProductEvaluators.h:1114
Eigen::internal::etor_product_packet_impl< ColMajor, UnrollingIndex, Lhs, Rhs, Packet, LoadMode >::run
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(Index row, Index col, const Lhs &lhs, const Rhs &rhs, Index innerDim, Packet &res)
Definition: ProductEvaluators.h:686
Eigen::internal::Assignment< DstXprType, Product< Lhs, Rhs, Options >, internal::add_assign_op< Scalar, Scalar >, Dense2Dense, typename enable_if<(Options==DefaultProduct||Options==AliasFreeProduct)>::type >::run
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(DstXprType &dst, const SrcXprType &src, const internal::add_assign_op< Scalar, Scalar > &)
Definition: ProductEvaluators.h:159
Eigen::InnerProduct
@ InnerProduct
Definition: Constants.h:500
Eigen::internal::Assignment< DstXprType, Product< Lhs, Rhs, Options >, internal::assign_op< Scalar, Scalar >, Dense2Dense, typename enable_if<(Options==DefaultProduct||Options==AliasFreeProduct)>::type >::run
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op< Scalar, Scalar > &)
Definition: ProductEvaluators.h:141
set
void set(Container &c, Position position, const Value &value)
Definition: stdlist_overload.cpp:37
Eigen::internal::evaluator< CwiseBinaryOp< internal::scalar_product_op< Scalar1, Scalar2 >, const CwiseNullaryOp< internal::scalar_constant_op< Scalar1 >, Plain1 >, const Product< Lhs, Rhs, DefaultProduct > > >::Base
evaluator< Product< EIGEN_SCALAR_BINARYOP_EXPR_RETURN_TYPE(Scalar1, Lhs, product), Rhs, DefaultProduct > > Base
Definition: ProductEvaluators.h:56
Eigen::internal::assign_op
Definition: AssignmentFunctors.h:21
Eigen::internal::product_evaluator< Product< Lhs, Rhs, ProductKind >, ProductTag, DenseShape, DiagonalShape >::Base
diagonal_product_evaluator_base< Lhs, typename Rhs::DiagonalVectorType, Product< Lhs, Rhs, LazyProduct >, OnTheRight > Base
Definition: ProductEvaluators.h:951
Eigen::internal::generic_product_impl< Lhs, Rhs, DenseShape, DenseShape, OuterProduct >::adds::m_scale
Scalar m_scale
Definition: ProductEvaluators.h:307
Eigen::internal::product_evaluator< Product< Lhs, Rhs, LazyProduct >, ProductTag, DenseShape, DenseShape >::m_innerDim
Index m_innerDim
Definition: ProductEvaluators.h:650
Eigen::Aligned16
@ Aligned16
Definition: Constants.h:235
Eigen::internal::generic_product_impl< Lhs, Rhs, TriangularShape, DenseShape, ProductTag >::scaleAndAddTo
static void scaleAndAddTo(Dest &dst, const Lhs &lhs, const Rhs &rhs, const Scalar &alpha)
Definition: ProductEvaluators.h:767
Eigen::LinearAccessBit
const unsigned int LinearAccessBit
Definition: Constants.h:130
Eigen::internal::etor_product_packet_impl< ColMajor, 1, Lhs, Rhs, Packet, LoadMode >::run
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(Index row, Index col, const Lhs &lhs, const Rhs &rhs, Index, Packet &res)
Definition: ProductEvaluators.h:705
Eigen::internal::product_evaluator< Product< Lhs, Rhs, Options >, ProductTag, LhsShape, RhsShape >::Base
evaluator< PlainObject > Base
Definition: ProductEvaluators.h:101
Eigen::internal::product_evaluator< Product< Lhs, Rhs, ProductKind >, ProductTag, DenseShape, DiagonalShape >::PlainObject
XprType::PlainObject PlainObject
Definition: ProductEvaluators.h:958
Eigen::internal::pmul
EIGEN_DEVICE_FUNC Packet pmul(const Packet &a, const Packet &b)
Definition: GenericPacketMath.h:237
Eigen::internal::generic_product_impl< Lhs, Rhs, DenseShape, DenseShape, InnerProduct >::subTo
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void subTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
Definition: ProductEvaluators.h:261
Eigen::internal::product_type
Definition: GeneralProduct.h:51
Eigen::internal::diagonal_product_evaluator_base::Scalar
ScalarBinaryOpTraits< typename MatrixType::Scalar, typename DiagonalType::Scalar >::ReturnType Scalar
Definition: ProductEvaluators.h:833
Eigen::internal::Rhs
@ Rhs
Definition: TensorContractionMapper.h:18
Eigen::internal::transposition_matrix_product::run
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(Dest &dst, const TranspositionType &tr, const ExpressionType &xpr)
Definition: ProductEvaluators.h:1117
Eigen::internal::Assignment< DstXprType, Product< Lhs, Rhs, Options >, internal::sub_assign_op< Scalar, Scalar >, Dense2Dense, typename enable_if<(Options==DefaultProduct||Options==AliasFreeProduct)>::type >::SrcXprType
Product< Lhs, Rhs, Options > SrcXprType
Definition: ProductEvaluators.h:172
row
m row(1)
Eigen::TriangularShape
Definition: Constants.h:533
Eigen::Product::rhs
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE RhsNestedCleaned & rhs() const
Definition: Product.h:109
Eigen::internal::conditional
Definition: Meta.h:109
Eigen::internal::pmadd
EIGEN_STRONG_INLINE Packet4f pmadd(const Packet4f &a, const Packet4f &b, const Packet4f &c)
Definition: AltiVec/PacketMath.h:827
EIGEN_PLAIN_ENUM_MAX
#define EIGEN_PLAIN_ENUM_MAX(a, b)
Definition: Macros.h:1289
Eigen::internal::Assignment< DstXprType, Product< Lhs, Rhs, Options >, internal::sub_assign_op< Scalar, Scalar >, Dense2Dense, typename enable_if<(Options==DefaultProduct||Options==AliasFreeProduct)>::type >::run
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(DstXprType &dst, const SrcXprType &src, const internal::sub_assign_op< Scalar, Scalar > &)
Definition: ProductEvaluators.h:174
Eigen::internal::sub_assign_op
Definition: AssignmentFunctors.h:67
Eigen::internal::generic_product_impl_base::Scalar
Product< Lhs, Rhs >::Scalar Scalar
Definition: ProductEvaluators.h:345
Eigen::internal::is_same_dense
EIGEN_DEVICE_FUNC bool is_same_dense(const T1 &mat1, const T2 &mat2, typename enable_if< possibly_same_dense< T1, T2 >::value >::type *=0)
Definition: XprHelper.h:695
Eigen::internal::generic_product_impl< Inverse< Lhs >, Rhs, PermutationShape, MatrixShape, ProductTag >::evalTo
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dest &dst, const Inverse< Lhs > &lhs, const Rhs &rhs)
Definition: ProductEvaluators.h:1081
Eigen::SelfAdjointShape
Definition: Constants.h:534
Eigen::internal::Assignment
Definition: AssignEvaluator.h:824
Eigen::internal::etor_product_packet_impl< RowMajor, Dynamic, Lhs, Rhs, Packet, LoadMode >::run
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(Index row, Index col, const Lhs &lhs, const Rhs &rhs, Index innerDim, Packet &res)
Definition: ProductEvaluators.h:732
Eigen::internal::generic_product_impl< Lhs, Rhs, TriangularShape, DenseShape, ProductTag >::Scalar
Product< Lhs, Rhs >::Scalar Scalar
Definition: ProductEvaluators.h:764
Eigen::internal::generic_product_impl< Lhs, Rhs, DenseShape, DenseShape, CoeffBasedProductMode >::Scalar
Product< Lhs, Rhs >::Scalar Scalar
Definition: ProductEvaluators.h:395
Eigen::internal::generic_product_impl_base::subTo
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void subTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
Definition: ProductEvaluators.h:356
Eigen::internal::evaluator< CwiseBinaryOp< internal::scalar_product_op< Scalar1, Scalar2 >, const CwiseNullaryOp< internal::scalar_constant_op< Scalar1 >, Plain1 >, const Product< Lhs, Rhs, DefaultProduct > > >::evaluator
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE evaluator(const XprType &xpr)
Definition: ProductEvaluators.h:58
Eigen::internal::product_evaluator< Product< Lhs, Rhs, ProductKind >, ProductTag, DiagonalShape, DenseShape >::Base
diagonal_product_evaluator_base< Rhs, typename Lhs::DiagonalVectorType, Product< Lhs, Rhs, LazyProduct >, OnTheLeft > Base
Definition: ProductEvaluators.h:905
Eigen::internal::generic_product_impl< Lhs, Rhs, MatrixShape, TranspositionsShape, ProductTag >::evalTo
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dest &dst, const Lhs &lhs, const Rhs &rhs)
Definition: ProductEvaluators.h:1148
Eigen::internal::product_evaluator< Product< Lhs, Rhs, LazyProduct >, ProductTag, DenseShape, DenseShape >::packet
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE PacketType packet(Index index) const
Definition: ProductEvaluators.h:635
product
void product(const MatrixType &m)
Definition: product.h:20
Eigen::internal::permutation_matrix_product< ExpressionType, Side, Transposed, DenseShape >::MatrixTypeCleaned
remove_all< MatrixType >::type MatrixTypeCleaned
Definition: ProductEvaluators.h:1004
Eigen::internal::blas_traits
Definition: BlasUtil.h:402
Eigen::internal::product_evaluator< Product< Lhs, Rhs, LazyProduct >, ProductTag, DenseShape, DenseShape >::LhsEtorType
evaluator< LhsNestedCleaned > LhsEtorType
Definition: ProductEvaluators.h:532
Eigen::internal::product_evaluator< Product< Lhs, Rhs, ProductKind >, ProductTag, DenseShape, DiagonalShape >::XprType
Product< Lhs, Rhs, ProductKind > XprType
Definition: ProductEvaluators.h:957
Eigen::internal::product_evaluator< Product< Lhs, Rhs, ProductKind >, ProductTag, DenseShape, DiagonalShape >::Scalar
Base::Scalar Scalar
Definition: ProductEvaluators.h:955
Eigen::internal::diagonal_product_evaluator_base::_SameTypes
@ _SameTypes
Definition: ProductEvaluators.h:848
Eigen::internal::generic_product_impl_base::evalTo
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
Definition: ProductEvaluators.h:348
Eigen::internal::is_same
Definition: Meta.h:148
Eigen::Matrix
The matrix class, also used for vectors and row-vectors.
Definition: 3rdparty/Eigen/Eigen/src/Core/Matrix.h:178
Eigen::internal::evaluator< Diagonal< const Product< Lhs, Rhs, DefaultProduct >, DiagIndex > >::evaluator
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE evaluator(const XprType &xpr)
Definition: ProductEvaluators.h:71
Eigen::internal::generic_product_impl< Lhs, Rhs, DenseShape, DenseShape, GemvProduct >::scaleAndAddTo
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void scaleAndAddTo(Dest &dst, const Lhs &lhs, const Rhs &rhs, const Scalar &alpha)
Definition: ProductEvaluators.h:376
Eigen::internal::add_assign_op
Definition: AssignmentFunctors.h:46
Eigen::internal::scalar_sum_op
Definition: BinaryFunctors.h:32
Eigen::Transpose::nestedExpression
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE internal::remove_all< MatrixTypeNested >::type & nestedExpression() const
Definition: Transpose.h:76
internal
Definition: BandTriangularSolver.h:13
Eigen::internal::transposition_matrix_product
Definition: ProductEvaluators.h:1109
Eigen::internal::Assignment< DstXprType, CwiseBinaryOp< internal::scalar_product_op< ScalarBis, Scalar >, const CwiseNullaryOp< internal::scalar_constant_op< ScalarBis >, Plain >, const Product< Lhs, Rhs, DefaultProduct > >, AssignFunc, Dense2Dense >::SrcXprType
CwiseBinaryOp< internal::scalar_product_op< ScalarBis, Scalar >, const CwiseNullaryOp< internal::scalar_constant_op< ScalarBis >, Plain >, const Product< Lhs, Rhs, DefaultProduct > > SrcXprType
Definition: ProductEvaluators.h:192
Eigen::internal::diagonal_product_evaluator_base::packet_impl
EIGEN_STRONG_INLINE PacketType packet_impl(Index row, Index col, Index id, internal::true_type) const
Definition: ProductEvaluators.h:881
Eigen::internal::enable_if
Definition: Meta.h:273
Eigen::internal::diagonal_product_evaluator_base::m_diagImpl
evaluator< DiagonalType > m_diagImpl
Definition: ProductEvaluators.h:898
Eigen::ColMajor
@ ColMajor
Definition: Constants.h:319
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::EvalBeforeNestingBit
const unsigned int EvalBeforeNestingBit
Definition: Constants.h:70
Eigen::internal::evaluator< Product< Lhs, Rhs, Options > >::XprType
Product< Lhs, Rhs, Options > XprType
Definition: ProductEvaluators.h:32
Eigen::internal::product_evaluator< Product< Lhs, Rhs, ProductKind >, ProductTag, DenseShape, DiagonalShape >::product_evaluator
EIGEN_DEVICE_FUNC product_evaluator(const XprType &xpr)
Definition: ProductEvaluators.h:962
Eigen::internal::diagonal_product_evaluator_base::_ScalarAccessOnDiag
@ _ScalarAccessOnDiag
Definition: ProductEvaluators.h:846
func
Definition: benchGeometry.cpp:23
Eigen::HereditaryBits
const unsigned int HereditaryBits
Definition: Constants.h:195
Eigen::OuterProduct
@ OuterProduct
Definition: Constants.h:500
Eigen::internal::generic_product_impl< Lhs, Rhs, DenseShape, DenseShape, OuterProduct >::evalTo
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
Definition: ProductEvaluators.h:315
Eigen::internal::Assignment< DstXprType, Product< Lhs, Rhs, Options >, internal::assign_op< Scalar, Scalar >, Dense2Dense, typename enable_if<(Options==DefaultProduct||Options==AliasFreeProduct)>::type >::SrcXprType
Product< Lhs, Rhs, Options > SrcXprType
Definition: ProductEvaluators.h:139
Eigen::internal::product_evaluator< Product< Lhs, Rhs, LazyProduct >, ProductTag, DenseShape, DenseShape >::packet
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE PacketType packet(Index row, Index col) const
Definition: ProductEvaluators.h:623
Eigen::LazyProduct
@ LazyProduct
Definition: Constants.h:500
Eigen::internal::generic_product_impl< Lhs, Rhs, DenseShape, DenseShape, OuterProduct >::add::operator()
EIGEN_DEVICE_FUNC void operator()(const Dst &dst, const Src &src) const
Definition: ProductEvaluators.h:304
Eigen::internal::product_evaluator< Product< Lhs, Rhs, LazyProduct >, ProductTag, DenseShape, DenseShape >::RhsNestedCleaned
internal::remove_all< RhsNested >::type RhsNestedCleaned
Definition: ProductEvaluators.h:530
Eigen::NumTraits
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
Definition: NumTraits.h:232
Eigen::internal::gemv_dense_selector
Definition: GeneralProduct.h:161
Eigen::internal::outer_product_selector_run
void EIGEN_DEVICE_FUNC outer_product_selector_run(Dst &dst, const Lhs &lhs, const Rhs &rhs, const Func &func, const false_type &)
Definition: ProductEvaluators.h:272
i
int i
Definition: BiCGSTAB_step_by_step.cpp:9
EIGEN_SIZE_MIN_PREFER_FIXED
#define EIGEN_SIZE_MIN_PREFER_FIXED(a, b)
Definition: Macros.h:1302
adds
size_t adds
Definition: testAlgebraicDecisionTree.cpp:73
Eigen::internal::diagonal_product_evaluator_base::DiagFlags
@ DiagFlags
Definition: ProductEvaluators.h:839
Eigen::internal::generic_product_impl< Lhs, Rhs, DenseShape, TriangularShape, ProductTag >::scaleAndAddTo
static void scaleAndAddTo(Dest &dst, const Lhs &lhs, const Rhs &rhs, const Scalar &alpha)
Definition: ProductEvaluators.h:781
Eigen::internal::generic_product_impl< Lhs, Rhs, DenseShape, DenseShape, GemvProduct >::Scalar
Product< Lhs, Rhs >::Scalar Scalar
Definition: ProductEvaluators.h:371
Eigen::internal::product_evaluator< Product< Lhs, Rhs, LazyProduct >, ProductTag, DenseShape, DenseShape >::coeff
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const
Definition: ProductEvaluators.h:604
Eigen::internal::assignment_from_xpr_op_product
Definition: ProductEvaluators.h:217
Eigen::CwiseBinaryOp::lhs
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE _LhsNested & lhs() const
Definition: CwiseBinaryOp.h:132
Eigen::internal::generic_product_impl< Lhs, Rhs, DenseShape, DenseShape, OuterProduct >::set::operator()
EIGEN_DEVICE_FUNC void operator()(const Dst &dst, const Src &src) const
Definition: ProductEvaluators.h:303
Eigen::internal::Assignment< DstXprType, Product< Lhs, Rhs, Options >, internal::add_assign_op< Scalar, Scalar >, Dense2Dense, typename enable_if<(Options==DefaultProduct||Options==AliasFreeProduct)>::type >::SrcXprType
Product< Lhs, Rhs, Options > SrcXprType
Definition: ProductEvaluators.h:157
Scalar
SCALAR Scalar
Definition: bench_gemm.cpp:46
Eigen::internal::product_evaluator< Product< Lhs, Rhs, ProductKind >, ProductTag, DenseShape, DiagonalShape >::packet
EIGEN_STRONG_INLINE PacketType packet(Index idx) const
Definition: ProductEvaluators.h:981
Eigen::internal::product_evaluator< Product< Lhs, Rhs, DefaultProduct >, LazyCoeffBasedProductMode, DenseShape, DenseShape >::XprType
Product< Lhs, Rhs, DefaultProduct > XprType
Definition: ProductEvaluators.h:657
Eigen::TranspositionsShape
Definition: Constants.h:536
Eigen::Index
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74
sub
EIGEN_DONT_INLINE T sub(T a, T b)
Definition: svd_common.h:299
Eigen::DiagonalShape
Definition: Constants.h:531
Eigen::internal::add_const_on_value_type
Definition: Meta.h:214
Eigen::PermutationShape
Definition: Constants.h:535


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