13 #ifndef EIGEN_PRODUCTEVALUATORS_H 14 #define EIGEN_PRODUCTEVALUATORS_H 28 template<
typename Lhs,
typename Rhs,
int Options>
35 EIGEN_DEVICE_FUNC
explicit evaluator(
const XprType& xpr) : Base(xpr) {}
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> > >
45 static const bool value =
true;
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> >
58 EIGEN_DEVICE_FUNC
explicit evaluator(
const XprType& xpr)
59 : Base(xpr.lhs().functor().m_other * xpr.rhs().lhs() * xpr.rhs().rhs())
64 template<
typename Lhs,
typename Rhs,
int DiagIndex>
66 :
public evaluator<Diagonal<const Product<Lhs, Rhs, LazyProduct>, DiagIndex> >
71 EIGEN_DEVICE_FUNC
explicit evaluator(
const XprType& xpr)
82 template<
typename Lhs,
typename Rhs,
88 template<
typename Lhs,
typename Rhs>
90 static const bool value =
true;
95 template<
typename Lhs,
typename Rhs,
int Options,
int ProductTag,
typename LhsShape,
typename RhsShape>
97 :
public evaluator<typename Product<Lhs, Rhs, Options>::PlainObject>
108 : m_result(xpr.rows(), xpr.cols())
110 ::new (static_cast<Base*>(
this))
Base(m_result);
135 template<
typename DstXprType,
typename Lhs,
typename Rhs,
int Options,
typename Scalar>
137 typename
enable_if<(Options==DefaultProduct || Options==AliasFreeProduct)>::type>
145 if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))
146 dst.resize(dstRows, dstCols);
153 template<
typename DstXprType,
typename Lhs,
typename Rhs,
int Options,
typename Scalar>
155 typename
enable_if<(Options==DefaultProduct || Options==AliasFreeProduct)>::type>
168 template<
typename DstXprType,
typename Lhs,
typename Rhs,
int Options,
typename Scalar>
170 typename
enable_if<(Options==DefaultProduct || Options==AliasFreeProduct)>::type>
186 template<
typename DstXprType,
typename Lhs,
typename Rhs,
typename AssignFunc,
typename Scalar,
typename ScalarBis,
typename Plain>
194 void run(DstXprType &dst,
const SrcXprType &src,
const AssignFunc& func)
204 template<
typename OtherXpr,
typename Lhs,
typename Rhs>
207 static const bool value =
true;
210 template<
typename OtherXpr,
typename Lhs,
typename Rhs>
213 static const bool value =
true;
216 template<
typename DstXprType,
typename OtherXpr,
typename ProductType,
typename Func1,
typename Func2>
219 template<
typename SrcXprType,
typename InitialFunc>
221 void run(DstXprType &dst,
const SrcXprType &src,
const InitialFunc& )
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> > \ 245 template<
typename Lhs,
typename Rhs>
248 template<
typename Dst>
249 static inline void evalTo(Dst& dst,
const Lhs& lhs,
const Rhs& rhs)
251 dst.coeffRef(0,0) = (lhs.transpose().cwiseProduct(rhs)).
sum();
254 template<
typename Dst>
255 static inline void addTo(Dst& dst,
const Lhs& lhs,
const Rhs& rhs)
257 dst.coeffRef(0,0) += (lhs.transpose().cwiseProduct(rhs)).
sum();
260 template<
typename Dst>
261 static void subTo(Dst& dst,
const Lhs& lhs,
const Rhs& rhs)
262 { dst.coeffRef(0,0) -= (lhs.transpose().cwiseProduct(rhs)).
sum(); }
271 template<
typename Dst,
typename Lhs,
typename Rhs,
typename Func>
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);
284 template<
typename Dst,
typename Lhs,
typename Rhs,
typename Func>
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);
296 template<
typename Lhs,
typename Rhs>
299 template<
typename T>
struct is_row_major :
internal::conditional<(int(T::Flags)&RowMajorBit), internal::true_type, internal::false_type>::type {};
303 struct set {
template<
typename Dst,
typename Src>
void operator()(
const Dst& dst,
const Src& src)
const { dst.const_cast_derived() = src; } };
304 struct add {
template<
typename Dst,
typename Src>
void operator()(
const Dst& dst,
const Src& src)
const { dst.const_cast_derived() += src; } };
305 struct sub {
template<
typename Dst,
typename Src>
void operator()(
const Dst& dst,
const Src& src)
const { dst.const_cast_derived() -= src; } };
308 explicit adds(
const Scalar& s) : m_scale(s) {}
309 template<
typename Dst,
typename Src>
void operator()(
const Dst& dst,
const Src& src)
const {
310 dst.const_cast_derived() += m_scale * src;
314 template<
typename Dst>
315 static inline void evalTo(Dst& dst,
const Lhs& lhs,
const Rhs& rhs)
320 template<
typename Dst>
321 static inline void addTo(Dst& dst,
const Lhs& lhs,
const Rhs& rhs)
326 template<
typename Dst>
327 static inline void subTo(Dst& dst,
const Lhs& lhs,
const Rhs& rhs)
332 template<
typename Dst>
333 static inline void scaleAndAddTo(Dst& dst,
const Lhs& lhs,
const Rhs& rhs,
const Scalar& alpha)
342 template<
typename Lhs,
typename Rhs,
typename Derived>
347 template<
typename Dst>
349 { dst.setZero(); scaleAndAddTo(dst, lhs, rhs, Scalar(1)); }
351 template<
typename Dst>
353 { scaleAndAddTo(dst,lhs, rhs, Scalar(1)); }
355 template<
typename Dst>
357 { scaleAndAddTo(dst, lhs, rhs, Scalar(-1)); }
359 template<
typename Dst>
361 { Derived::scaleAndAddTo(dst,lhs,rhs,alpha); }
365 template<
typename Lhs,
typename Rhs>
375 template<
typename Dest>
378 LhsNested actual_lhs(lhs);
379 RhsNested actual_rhs(rhs);
383 >
::run(actual_lhs, actual_rhs, dst, alpha);
387 template<
typename Lhs,
typename Rhs>
392 template<
typename Dst>
400 template<
typename Dst>
407 template<
typename Dst>
420 template<
typename Lhs,
typename Rhs>
430 template<
int Traversal,
int UnrollingIndex,
typename Lhs,
typename Rhs,
typename RetScalar>
433 template<
int StorageOrder,
int UnrollingIndex,
typename Lhs,
typename Rhs,
typename Packet,
int LoadMode>
436 template<
typename Lhs,
typename Rhs,
int ProductTag>
451 m_innerDim(xpr.lhs().cols())
457 std::cerr <<
"LhsOuterStrideBytes= " << LhsOuterStrideBytes <<
"\n";
458 std::cerr <<
"RhsOuterStrideBytes= " << RhsOuterStrideBytes <<
"\n";
459 std::cerr <<
"LhsAlignment= " << LhsAlignment <<
"\n";
460 std::cerr <<
"RhsAlignment= " << RhsAlignment <<
"\n";
461 std::cerr <<
"CanVectorizeLhs= " << CanVectorizeLhs <<
"\n";
462 std::cerr <<
"CanVectorizeRhs= " << CanVectorizeRhs <<
"\n";
463 std::cerr <<
"CanVectorizeInner= " << CanVectorizeInner <<
"\n";
464 std::cerr <<
"EvalToRowMajor= " << EvalToRowMajor <<
"\n";
465 std::cerr <<
"Alignment= " << Alignment <<
"\n";
466 std::cerr <<
"Flags= " << Flags <<
"\n";
482 RowsAtCompileTime = LhsNestedCleaned::RowsAtCompileTime,
483 ColsAtCompileTime = RhsNestedCleaned::ColsAtCompileTime,
485 MaxRowsAtCompileTime = LhsNestedCleaned::MaxRowsAtCompileTime,
486 MaxColsAtCompileTime = RhsNestedCleaned::MaxColsAtCompileTime
494 LhsCoeffReadCost = LhsEtorType::CoeffReadCost,
495 RhsCoeffReadCost = RhsEtorType::CoeffReadCost,
503 LhsFlags = LhsEtorType::Flags,
504 RhsFlags = RhsEtorType::Flags,
513 LhsAlignment =
EIGEN_PLAIN_ENUM_MIN(LhsEtorType::Alignment,LhsVecPacketSize*
int(
sizeof(
typename LhsNestedCleaned::Scalar))),
514 RhsAlignment =
EIGEN_PLAIN_ENUM_MIN(RhsEtorType::Alignment,RhsVecPacketSize*
int(
sizeof(
typename RhsNestedCleaned::Scalar))),
518 CanVectorizeRhs = bool(RhsRowMajor) && (RhsFlags &
PacketAccessBit) && (ColsAtCompileTime!=1),
519 CanVectorizeLhs = (!LhsRowMajor) && (LhsFlags &
PacketAccessBit) && (RowsAtCompileTime!=1),
521 EvalToRowMajor = (MaxRowsAtCompileTime==1&&MaxColsAtCompileTime!=1) ? 1
522 : (MaxColsAtCompileTime==1&&MaxRowsAtCompileTime!=1) ? 0
523 : (
bool(RhsRowMajor) && !CanVectorizeLhs),
525 Flags = ((
unsigned int)(LhsFlags | RhsFlags) &
HereditaryBits & ~RowMajorBit)
526 | (EvalToRowMajor ? RowMajorBit : 0)
528 | (SameType && (CanVectorizeLhs || CanVectorizeRhs) ? PacketAccessBit : 0)
531 LhsOuterStrideBytes = int(LhsNestedCleaned::OuterStrideAtCompileTime) * int(
sizeof(
typename LhsNestedCleaned::Scalar)),
532 RhsOuterStrideBytes = int(RhsNestedCleaned::OuterStrideAtCompileTime) * int(
sizeof(
typename RhsNestedCleaned::Scalar)),
534 Alignment = bool(CanVectorizeLhs) ? (LhsOuterStrideBytes<=0 || (int(LhsOuterStrideBytes) %
EIGEN_PLAIN_ENUM_MAX(1,LhsAlignment))!=0 ? 0 : LhsAlignment)
535 : bool(CanVectorizeRhs) ? (RhsOuterStrideBytes<=0 || (int(RhsOuterStrideBytes) %
EIGEN_PLAIN_ENUM_MAX(1,RhsAlignment))!=0 ? 0 : RhsAlignment)
543 CanVectorizeInner = SameType
552 return (m_lhs.row(row).transpose().cwiseProduct( m_rhs.col(col) )).sum();
559 EIGEN_DEVICE_FUNC
const CoeffReturnType
coeff(
Index index)
const 561 const Index row = (RowsAtCompileTime == 1 || MaxRowsAtCompileTime==1) ? 0 : index;
562 const Index col = (RowsAtCompileTime == 1 || MaxRowsAtCompileTime==1) ? index : 0;
563 return (m_lhs.row(row).transpose().cwiseProduct( m_rhs.col(col) )).sum();
566 template<
int LoadMode,
typename PacketType>
571 Unroll ? int(InnerSize) :
Dynamic,
572 LhsEtorType, RhsEtorType,
PacketType, LoadMode> PacketImpl;
577 template<
int LoadMode,
typename PacketType>
580 const Index row = (RowsAtCompileTime == 1 || MaxRowsAtCompileTime==1) ? 0 : index;
581 const Index col = (RowsAtCompileTime == 1 || MaxRowsAtCompileTime==1) ? index : 0;
582 return packet<LoadMode,PacketType>(
row,
col);
596 template<
typename Lhs,
typename Rhs>
598 :
product_evaluator<Product<Lhs, Rhs, LazyProduct>, CoeffBasedProductMode, DenseShape, DenseShape>
607 : Base(BaseProduct(xpr.lhs(),xpr.rhs()))
615 template<
int UnrollingIndex,
typename Lhs,
typename Rhs,
typename Packet,
int LoadMode>
620 etor_product_packet_impl<RowMajor, UnrollingIndex-1, Lhs, Rhs, Packet, LoadMode>::run(row, col, lhs, rhs, innerDim, res);
621 res =
pmadd(pset1<Packet>(lhs.coeff(row,
Index(UnrollingIndex-1))), rhs.template packet<LoadMode,Packet>(
Index(UnrollingIndex-1),
col), res);
625 template<
int UnrollingIndex,
typename Lhs,
typename Rhs,
typename Packet,
int LoadMode>
630 etor_product_packet_impl<ColMajor, UnrollingIndex-1, Lhs, Rhs, Packet, LoadMode>::run(row, col, lhs, rhs, innerDim, res);
631 res =
pmadd(lhs.template packet<LoadMode,Packet>(row,
Index(UnrollingIndex-1)), pset1<Packet>(rhs.coeff(
Index(UnrollingIndex-1), col)), res);
635 template<
typename Lhs,
typename Rhs,
typename Packet,
int LoadMode>
640 res =
pmul(pset1<Packet>(lhs.coeff(row,
Index(0))),rhs.template packet<LoadMode,Packet>(
Index(0),
col));
644 template<
typename Lhs,
typename Rhs,
typename Packet,
int LoadMode>
649 res =
pmul(lhs.template packet<LoadMode,Packet>(row,
Index(0)), pset1<Packet>(rhs.coeff(
Index(0), col)));
653 template<
typename Lhs,
typename Rhs,
typename Packet,
int LoadMode>
662 template<
typename Lhs,
typename Rhs,
typename Packet,
int LoadMode>
671 template<
typename Lhs,
typename Rhs,
typename Packet,
int LoadMode>
677 for(
Index i = 0; i < innerDim; ++i)
678 res =
pmadd(pset1<Packet>(lhs.coeff(row, i)), rhs.template packet<LoadMode,Packet>(i, col), res);
682 template<
typename Lhs,
typename Rhs,
typename Packet,
int LoadMode>
688 for(
Index i = 0; i < innerDim; ++i)
689 res =
pmadd(lhs.template packet<LoadMode,Packet>(row, i), pset1<Packet>(rhs.coeff(i, col)), res);
697 template<
int Mode,
bool LhsIsTriangular,
698 typename Lhs,
bool LhsIsVector,
699 typename Rhs,
bool RhsIsVector>
702 template<
typename Lhs,
typename Rhs,
int ProductTag>
708 template<
typename Dest>
709 static void scaleAndAddTo(Dest& dst,
const Lhs& lhs,
const Rhs& rhs,
const Scalar& alpha)
712 ::run(dst, lhs.nestedExpression(), rhs, alpha);
716 template<
typename Lhs,
typename Rhs,
int ProductTag>
722 template<
typename Dest>
723 static void scaleAndAddTo(Dest& dst,
const Lhs& lhs,
const Rhs& rhs,
const Scalar& alpha)
733 template <
typename Lhs,
int LhsMode,
bool LhsIsVector,
734 typename Rhs,
int RhsMode,
bool RhsIsVector>
737 template<
typename Lhs,
typename Rhs,
int ProductTag>
743 template<
typename Dest>
744 static void scaleAndAddTo(Dest& dst,
const Lhs& lhs,
const Rhs& rhs,
const Scalar& alpha)
750 template<
typename Lhs,
typename Rhs,
int ProductTag>
756 template<
typename Dest>
757 static void scaleAndAddTo(Dest& dst,
const Lhs& lhs,
const Rhs& rhs,
const Scalar& alpha)
768 template<
typename MatrixType,
typename DiagonalType,
typename Derived,
int ProductOrder>
785 _Vectorizable = bool(
int(MatrixFlags)&PacketAccessBit) && _SameTypes && (_ScalarAccessOnDiag || (bool(
int(DiagFlags)&PacketAccessBit))),
786 _LinearAccessMask = (MatrixType::RowsAtCompileTime==1 || MatrixType::ColsAtCompileTime==1) ? LinearAccessBit : 0,
787 Flags = ((
HereditaryBits|_LinearAccessMask) & (
unsigned int)(MatrixFlags)) | (_Vectorizable ? PacketAccessBit : 0),
792 : m_diagImpl(diag), m_matImpl(mat)
800 return m_diagImpl.coeff(idx) * m_matImpl.coeff(idx);
804 template<
int LoadMode,
typename PacketType>
807 return internal::pmul(m_matImpl.template packet<LoadMode,PacketType>(row, col),
808 internal::pset1<PacketType>(m_diagImpl.coeff(
id)));
811 template<
int LoadMode,
typename PacketType>
815 InnerSize = (MatrixType::Flags &
RowMajorBit) ? MatrixType::ColsAtCompileTime : MatrixType::RowsAtCompileTime,
818 return internal::pmul(m_matImpl.template packet<LoadMode,PacketType>(row, col),
819 m_diagImpl.template packet<DiagonalPacketLoadMode,PacketType>(
id));
827 template<
typename Lhs,
typename Rhs,
int ProductKind,
int ProductTag>
832 using Base::m_diagImpl;
833 using Base::m_matImpl;
845 : Base(xpr.rhs(), xpr.lhs().diagonal())
851 return m_diagImpl.coeff(row) * m_matImpl.coeff(row, col);
855 template<
int LoadMode,
typename PacketType>
860 return this->
template packet_impl<LoadMode,PacketType>(
row,
col,
row,
864 template<
int LoadMode,
typename PacketType>
867 return packet<LoadMode,PacketType>(int(StorageOrder)==
ColMajor?idx:0,int(StorageOrder)==
ColMajor?0:idx);
873 template<
typename Lhs,
typename Rhs,
int ProductKind,
int ProductTag>
878 using Base::m_diagImpl;
879 using Base::m_matImpl;
889 : Base(xpr.lhs(), xpr.rhs().diagonal())
895 return m_matImpl.coeff(row, col) * m_diagImpl.coeff(col);
899 template<
int LoadMode,
typename PacketType>
902 return this->
template packet_impl<LoadMode,PacketType>(
row,
col,
col,
906 template<
int LoadMode,
typename PacketType>
909 return packet<LoadMode,PacketType>(int(StorageOrder)==
ColMajor?idx:0,int(StorageOrder)==
ColMajor?0:idx);
923 template<
typename ExpressionType,
int S
ide,
bool Transposed,
typename ExpressionShape>
926 template<
typename ExpressionType,
int S
ide,
bool Transposed>
932 template<
typename Dest,
typename PermutationType>
933 static inline void run(Dest& dst,
const PermutationType& perm,
const ExpressionType& xpr)
946 while(r < perm.size())
949 while(r<perm.size() && mask[r]) r++;
956 for(
Index k=perm.indices().coeff(k0); k!=k0; k=perm.indices().coeff(k))
960 (dst,((Side==
OnTheLeft) ^ Transposed) ? k0 : kPrev));
962 mask.coeffRef(k) =
true;
969 for(
Index i = 0; i < n; ++i)
972 (dst, ((Side==
OnTheLeft) ^ Transposed) ? perm.indices().coeff(i) : i)
977 (mat, ((Side==
OnTheRight) ^ Transposed) ? perm.indices().coeff(i) : i);
983 template<
typename Lhs,
typename Rhs,
int ProductTag,
typename MatrixShape>
986 template<
typename Dest>
987 static void evalTo(Dest& dst,
const Lhs& lhs,
const Rhs& rhs)
993 template<
typename Lhs,
typename Rhs,
int ProductTag,
typename MatrixShape>
996 template<
typename Dest>
997 static void evalTo(Dest& dst,
const Lhs& lhs,
const Rhs& rhs)
1003 template<
typename Lhs,
typename Rhs,
int ProductTag,
typename MatrixShape>
1006 template<
typename Dest>
1013 template<
typename Lhs,
typename Rhs,
int ProductTag,
typename MatrixShape>
1016 template<
typename Dest>
1034 template<
typename ExpressionType,
int S
ide,
bool Transposed,
typename ExpressionShape>
1040 template<
typename Dest,
typename TranspositionType>
1041 static inline void run(Dest& dst,
const TranspositionType& tr,
const ExpressionType& xpr)
1043 MatrixType mat(xpr);
1044 typedef typename TranspositionType::StorageIndex StorageIndex;
1051 for(
Index k=(Transposed?size-1:0) ; Transposed?k>=0:k<
size ; Transposed?--k:++k)
1052 if(
Index(j=tr.coeff(k))!=k)
1054 if(Side==
OnTheLeft) dst.row(k).swap(dst.row(j));
1055 else if(Side==
OnTheRight) dst.col(k).swap(dst.col(j));
1060 template<
typename Lhs,
typename Rhs,
int ProductTag,
typename MatrixShape>
1063 template<
typename Dest>
1064 static void evalTo(Dest& dst,
const Lhs& lhs,
const Rhs& rhs)
1070 template<
typename Lhs,
typename Rhs,
int ProductTag,
typename MatrixShape>
1073 template<
typename Dest>
1074 static void evalTo(Dest& dst,
const Lhs& lhs,
const Rhs& rhs)
1081 template<
typename Lhs,
typename Rhs,
int ProductTag,
typename MatrixShape>
1084 template<
typename Dest>
1091 template<
typename Lhs,
typename Rhs,
int ProductTag,
typename MatrixShape>
1094 template<
typename Dest>
1105 #endif // EIGEN_PRODUCT_EVALUATORS_H
find_best_packet_helper< Size, typename packet_traits< T >::type >::type type
Generic expression of a matrix where all coefficients are defined by a functor.
EIGEN_STRONG_INLINE PacketType packet(Index idx) const
void operator()(const Dst &dst, const Src &src) const
EIGEN_DEVICE_FUNC Index rows() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void call_assignment_no_alias(Dst &dst, const Src &src, const Func &func)
const unsigned int ActualPacketAccessBit
Product< Lhs, Rhs >::Scalar Scalar
#define EIGEN_STRONG_INLINE
static void run(Dest &dst, const TranspositionType &tr, const ExpressionType &xpr)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CoeffReturnType coeff(Index row, Index col) const
static void evalTo(Dest &dst, const Lhs &lhs, const Inverse< Rhs > &rhs)
EIGEN_DEVICE_FUNC product_evaluator(const XprType &xpr)
evaluator< Diagonal< const Product< Lhs, Rhs, LazyProduct >, DiagIndex > > Base
Diagonal< const Product< Lhs, Rhs, DefaultProduct >, DiagIndex > XprType
internal::nested_eval< Lhs, Rhs::ColsAtCompileTime >::type LhsNested
internal::add_const_on_value_type< LhsNested >::type m_lhs
Expression of the product of two arbitrary matrices or vectors.
static EIGEN_STRONG_INLINE void scaleAndAddTo(Dst &dst, const Lhs &lhs, const Rhs &rhs, const Scalar &alpha)
EIGEN_STRONG_INLINE PacketType packet_impl(Index row, Index col, Index id, internal::false_type) const
EIGEN_DEVICE_FUNC evaluator(const XprType &xpr)
static EIGEN_STRONG_INLINE void run(Index, Index, const Lhs &, const Rhs &, Index, Packet &res)
internal::nested_eval< Rhs, Lhs::RowsAtCompileTime >::type RhsNested
Product< Lhs, Rhs, Options > SrcXprType
Product< Lhs, Rhs, Options > XprType
bool is_same_dense(const T1 &mat1, const T2 &mat2, typename enable_if< has_direct_access< T1 >::ret &&has_direct_access< T2 >::ret, T1 >::type *=0)
static EIGEN_STRONG_INLINE void subTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
static void evalTo(Dest &dst, const Lhs &lhs, const Rhs &rhs)
internal::remove_all< LhsNested >::type LhsNestedCleaned
Product< Lhs, Rhs >::Scalar Scalar
Expression of the transpose of a matrix.
Product< Lhs, Rhs, ProductKind > XprType
static void evalTo(Dest &dst, const Inverse< Lhs > &lhs, const Rhs &rhs)
nested_eval< Lhs, 1 >::type LhsNested
static EIGEN_STRONG_INLINE void evalTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
EIGEN_DEVICE_FUNC product_evaluator(const XprType &xpr)
#define EIGEN_PLAIN_ENUM_MAX(a, b)
Product< Lhs, Rhs, Options > SrcXprType
static void evalTo(Dest &dst, const Lhs &lhs, const Rhs &rhs)
static constexpr size_t size(Tuple< Args... > &)
Provides access to the number of elements in a tuple as a compile-time constant expression.
static void subTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
Product< Lhs, Rhs >::Scalar Scalar
static EIGEN_STRONG_INLINE void run(DstXprType &dst, const SrcXprType &src, const internal::sub_assign_op< Scalar, Scalar > &)
static EIGEN_STRONG_INLINE void run(Index row, Index col, const Lhs &lhs, const Rhs &rhs, Index innerDim, Packet &res)
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE product_evaluator(const XprType &xpr)
static EIGEN_STRONG_INLINE void run(Index row, Index col, const Lhs &lhs, const Rhs &rhs, Index innerDim, Packet &res)
remove_all< MatrixType >::type MatrixTypeCleaned
EIGEN_CATCH_ASSIGN_XPR_OP_PRODUCT(assign_op, scalar_sum_op, add_assign_op)
const unsigned int RowMajorBit
static EIGEN_STRONG_INLINE void scaleAndAddTo(Dest &dst, const Lhs &lhs, const Rhs &rhs, const Scalar &alpha)
find_best_packet< Scalar, ColsAtCompileTime >::type RhsVecPacketType
CwiseBinaryOp< internal::scalar_product_op< Scalar1, Scalar2 >, const CwiseNullaryOp< internal::scalar_constant_op< Scalar1 >, Plain1 >, const Product< Lhs, Rhs, DefaultProduct > > XprType
#define EIGEN_SIZE_MIN_PREFER_FIXED(a, b)
bool add(const actionlib::TwoIntsGoal &req, actionlib::TwoIntsResult &res)
EIGEN_DEVICE_FUNC const _LhsNested & lhs() const
static void addTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
const unsigned int PacketAccessBit
Product< Lhs, Rhs, Options > SrcXprType
const PacketType packet(Index index) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index rowId, Index colId)
void outer_product_selector_run(Dst &dst, const Lhs &lhs, const Rhs &rhs, const Func &func, const false_type &)
evaluator< PlainObject > Base
nested_eval< Rhs, 1 >::type RhsNested
EIGEN_DEVICE_FUNC const LhsNestedCleaned & lhs() const
unary_evaluator< T > Base
Expression of the inverse of another expression.
EIGEN_DEVICE_FUNC product_evaluator(const XprType &xpr)
find_best_packet< Scalar, RowsAtCompileTime >::type LhsVecPacketType
const PacketType packet(Index row, Index col) const
internal::remove_all< typename internal::conditional< int(Side)==OnTheRight, LhsNested, RhsNested >::type >::type MatrixType
static void run(Dest &dst, const PermutationType &perm, const ExpressionType &xpr)
EIGEN_DEVICE_FUNC evaluator(const XprType &xpr)
#define EIGEN_INTERNAL_CHECK_COST_VALUE(C)
Generic expression where a coefficient-wise binary operator is applied to two expressions.
static void evalTo(Dest &dst, const Lhs &lhs, const Transpose< Rhs > &rhs)
const unsigned int HereditaryBits
Product< Lhs, Rhs, DefaultProduct > XprType
static void addTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
EIGEN_DEVICE_FUNC ColXpr col(Index i)
This is the const version of col().
product_evaluator< XprType > Base
ROSCPP_DECL void set(const std::string &key, const XmlRpc::XmlRpcValue &v)
evaluator< LhsNestedCleaned > LhsEtorType
internal::remove_all< RhsNested >::type RhsNestedCleaned
void operator()(const Dst &dst, const Src &src) const
static EIGEN_STRONG_INLINE void addTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Product< Lhs, Rhs >::Scalar Scalar
static EIGEN_STRONG_INLINE void run(Index, Index, const Lhs &, const Rhs &, Index, Packet &res)
XprType::CoeffReturnType CoeffReturnType
XprType::PlainObject PlainObject
Product< Lhs, Rhs, LazyProduct > BaseProduct
EIGEN_DEVICE_FUNC RowXpr row(Index i)
This is the const version of row(). */.
Product< Lhs, Rhs >::Scalar Scalar
static EIGEN_STRONG_INLINE void run(DstXprType &dst, const SrcXprType &src, const InitialFunc &)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar coeff(Index idx) const
Product< Lhs, Rhs, LazyProduct > XprType
static EIGEN_STRONG_INLINE void run(Index row, Index col, const Lhs &lhs, const Rhs &rhs, Index, Packet &res)
static void evalTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
const mpreal sum(const mpreal tab[], const unsigned long int n, int &status, mp_rnd_t mode=mpreal::get_default_rnd())
static void scaleAndAddTo(Dest &dst, const Lhs &lhs, const Rhs &rhs, const Scalar &alpha)
evaluator< RhsNestedCleaned > RhsEtorType
Product< Lhs, Rhs >::Scalar Scalar
static void evalTo(Dest &dst, const Transpose< Lhs > &lhs, const Rhs &rhs)
ScalarBinaryOpTraits< typename MatrixType::Scalar, typename DiagonalType::Scalar >::ReturnType Scalar
EIGEN_DEVICE_FUNC const internal::remove_all< MatrixTypeNested >::type & nestedExpression() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar coeff(Index row, Index col) const
static void evalTo(Dest &dst, const Lhs &lhs, const Rhs &rhs)
EIGEN_STRONG_INLINE PacketType packet_impl(Index row, Index col, Index id, internal::true_type) const
EIGEN_STRONG_INLINE PacketType packet(Index row, Index col) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE product_evaluator(const XprType &xpr)
internal::add_const_on_value_type< RhsNested >::type m_rhs
static EIGEN_STRONG_INLINE void run(DstXprType &dst, const SrcXprType &src, const internal::add_assign_op< Scalar, Scalar > &)
remove_all< MatrixType >::type MatrixTypeCleaned
evaluator< DiagonalType > m_diagImpl
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar coeff(Index row, Index col) const
Product< Lhs, Rhs, ProductKind > XprType
static EIGEN_STRONG_INLINE void run(Index row, Index col, const Lhs &lhs, const Rhs &rhs, Index innerDim, Packet &res)
Product< Lhs, Rhs >::Scalar Scalar
Expression of a fixed-size or dynamic-size block.
evaluator< MatrixType > m_matImpl
static void scaleAndAddTo(Dest &dst, const Lhs &lhs, const Rhs &rhs, const Scalar &alpha)
#define EIGEN_PLAIN_ENUM_MIN(a, b)
static EIGEN_STRONG_INLINE void subTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
storage_kind_to_shape< typename traits< T >::StorageKind >::Shape Shape
Product< Lhs, Rhs, Options > XprType
CwiseBinaryOp< internal::scalar_product_op< ScalarBis, Scalar >, const CwiseNullaryOp< internal::scalar_constant_op< ScalarBis >, Plain >, const Product< Lhs, Rhs, DefaultProduct > > SrcXprType
static EIGEN_STRONG_INLINE void run(DstXprType &dst, const SrcXprType &src, const AssignFunc &func)
EIGEN_STRONG_INLINE PacketType packet(Index row, Index col) const
diagonal_product_evaluator_base< Lhs, typename Rhs::DiagonalVectorType, Product< Lhs, Rhs, LazyProduct >, OnTheRight > Base
EIGEN_STRONG_INLINE Packet4f pmadd(const Packet4f &a, const Packet4f &b, const Packet4f &c)
diagonal_product_evaluator_base(const MatrixType &mat, const DiagonalType &diag)
Product< Lhs, Rhs >::Scalar Scalar
static void subTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
nested_eval< ExpressionType, 1 >::type MatrixType
XprType::PlainObject PlainObject
Determines whether the given binary operation of two numeric types is allowed and what the scalar ret...
static EIGEN_STRONG_INLINE void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op< Scalar, Scalar > &)
EIGEN_DEVICE_FUNC evaluator(const XprType &xpr)
static void evalTo(Dest &dst, const Lhs &lhs, const Rhs &rhs)
diagonal_product_evaluator_base< Rhs, typename Lhs::DiagonalVectorType, Product< Lhs, Rhs, LazyProduct >, OnTheLeft > Base
Expression of a diagonal/subdiagonal/superdiagonal in a matrix.
static void scaleAndAddTo(Dest &dst, const Lhs &lhs, const Rhs &rhs, const Scalar &alpha)
evaluator< Product< EIGEN_SCALAR_BINARYOP_EXPR_RETURN_TYPE(Scalar1, Lhs, product), Rhs, DefaultProduct > > Base
const unsigned int EvalBeforeNestingBit
static void scaleAndAddTo(Dst &dst, const Lhs &lhs, const Rhs &rhs, const Scalar &alpha)
nested_eval< ExpressionType, 1 >::type MatrixType
EIGEN_DEVICE_FUNC const CoeffReturnType coeff(Index index) const
XprType::PlainObject PlainObject
product_evaluator< BaseProduct, CoeffBasedProductMode, DenseShape, DenseShape > Base
static void evalTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
static EIGEN_STRONG_INLINE void run(Index row, Index col, const Lhs &lhs, const Rhs &rhs, Index, Packet &res)
The matrix class, also used for vectors and row-vectors.
void operator()(const Dst &dst, const Src &src) const
static EIGEN_STRONG_INLINE void run(Index row, Index col, const Lhs &lhs, const Rhs &rhs, Index innerDim, Packet &res)
static void scaleAndAddTo(Dest &dst, const Lhs &lhs, const Rhs &rhs, const Scalar &alpha)
EIGEN_DEVICE_FUNC const XprTypeNestedCleaned & nestedExpression() const
void run(Expr &expr, Dev &dev)
EIGEN_DEVICE_FUNC const _RhsNested & rhs() const
EIGEN_DEVICE_FUNC const RhsNestedCleaned & rhs() const
static EIGEN_STRONG_INLINE void addTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
EIGEN_DEVICE_FUNC Packet pmul(const Packet &a, const Packet &b)
const unsigned int LinearAccessBit
EIGEN_STRONG_INLINE PacketType packet(Index idx) const
static EIGEN_STRONG_INLINE void evalTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
EIGEN_DEVICE_FUNC Index cols() const
#define EIGEN_UNROLLING_LIMIT
void swap(scoped_array< T > &a, scoped_array< T > &b)
void operator()(const Dst &dst, const Src &src) const