13 #ifndef EIGEN_PRODUCTEVALUATORS_H 14 #define EIGEN_PRODUCTEVALUATORS_H 28 template<
typename Lhs,
typename Rhs,
int Options>
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> > >
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> >
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> >
82 template<
typename Lhs,
typename Rhs,
88 template<
typename Lhs,
typename Rhs>
95 template<
typename Lhs,
typename Rhs,
int Options,
int ProductTag,
typename LhsShape,
typename RhsShape>
97 :
public evaluator<typename Product<Lhs, Rhs, Options>::PlainObject>
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>
210 template<
typename OtherXpr,
typename Lhs,
typename Rhs>
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>
251 dst.coeffRef(0,0) = (lhs.transpose().cwiseProduct(rhs)).
sum();
254 template<
typename Dst>
257 dst.coeffRef(0,0) += (lhs.transpose().cwiseProduct(rhs)).
sum();
260 template<
typename Dst>
262 { dst.coeffRef(0,0) -= (lhs.transpose().cwiseProduct(rhs)).
sum(); }
271 template<
typename Dst,
typename Lhs,
typename Rhs,
typename Func>
280 func(dst.col(
j), rhsEval.coeff(
Index(0),
j) * actual_lhs);
284 template<
typename Dst,
typename Lhs,
typename Rhs,
typename Func>
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>
320 template<
typename Dst>
326 template<
typename Dst>
332 template<
typename Dst>
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,
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)
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>
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>
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>
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>
712 ::run(dst, lhs.nestedExpression(), rhs,
alpha);
716 template<
typename Lhs,
typename Rhs,
int ProductTag>
722 template<
typename Dest>
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>
750 template<
typename Lhs,
typename Rhs,
int ProductTag>
756 template<
typename Dest>
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),
790 AsScalarProduct = (DiagonalType::SizeAtCompileTime==1)
791 || (DiagonalType::SizeAtCompileTime==
Dynamic && MatrixType::RowsAtCompileTime==1 && ProductOrder==
OnTheLeft)
792 || (DiagonalType::SizeAtCompileTime==
Dynamic && MatrixType::ColsAtCompileTime==1 && ProductOrder==
OnTheRight)
796 : m_diagImpl(diag), m_matImpl(mat)
805 return m_diagImpl.coeff(0) * m_matImpl.coeff(idx);
807 return m_diagImpl.coeff(idx) * m_matImpl.coeff(idx);
811 template<
int LoadMode,
typename PacketType>
814 return internal::pmul(m_matImpl.template packet<LoadMode,PacketType>(row, col),
815 internal::pset1<PacketType>(m_diagImpl.coeff(
id)));
818 template<
int LoadMode,
typename PacketType>
822 InnerSize = (MatrixType::Flags &
RowMajorBit) ? MatrixType::ColsAtCompileTime : MatrixType::RowsAtCompileTime,
825 return internal::pmul(m_matImpl.template packet<LoadMode,PacketType>(row, col),
826 m_diagImpl.template packet<DiagonalPacketLoadMode,PacketType>(
id));
834 template<
typename Lhs,
typename Rhs,
int ProductKind,
int ProductTag>
839 using Base::m_diagImpl;
840 using Base::m_matImpl;
852 : Base(xpr.rhs(), xpr.lhs().
diagonal())
858 return m_diagImpl.coeff(row) * m_matImpl.coeff(row, col);
862 template<
int LoadMode,
typename PacketType>
867 return this->
template packet_impl<LoadMode,PacketType>(
row,
col,
row,
871 template<
int LoadMode,
typename PacketType>
880 template<
typename Lhs,
typename Rhs,
int ProductKind,
int ProductTag>
885 using Base::m_diagImpl;
886 using Base::m_matImpl;
896 : Base(xpr.lhs(), xpr.rhs().
diagonal())
902 return m_matImpl.coeff(row, col) * m_diagImpl.coeff(col);
906 template<
int LoadMode,
typename PacketType>
909 return this->
template packet_impl<LoadMode,PacketType>(
row,
col,
col,
913 template<
int LoadMode,
typename PacketType>
930 template<
typename ExpressionType,
int S
ide,
bool Transposed,
typename ExpressionShape>
933 template<
typename ExpressionType,
int S
ide,
bool Transposed>
939 template<
typename Dest,
typename PermutationType>
940 static inline void run(Dest& dst,
const PermutationType&
perm,
const ExpressionType& xpr)
953 while(r < perm.size())
956 while(r<perm.size() && mask[r]) r++;
963 for(
Index k=perm.indices().coeff(k0); k!=k0; k=perm.indices().coeff(k))
967 (dst,((Side==
OnTheLeft) ^ Transposed) ? k0 : kPrev));
969 mask.coeffRef(k) =
true;
979 (dst, ((Side==
OnTheLeft) ^ Transposed) ? perm.indices().coeff(
i) :
i)
990 template<
typename Lhs,
typename Rhs,
int ProductTag,
typename MatrixShape>
993 template<
typename Dest>
994 static void evalTo(Dest& dst,
const Lhs& lhs,
const Rhs& rhs)
1000 template<
typename Lhs,
typename Rhs,
int ProductTag,
typename MatrixShape>
1003 template<
typename Dest>
1004 static void evalTo(Dest& dst,
const Lhs& lhs,
const Rhs& rhs)
1010 template<
typename Lhs,
typename Rhs,
int ProductTag,
typename MatrixShape>
1013 template<
typename Dest>
1020 template<
typename Lhs,
typename Rhs,
int ProductTag,
typename MatrixShape>
1023 template<
typename Dest>
1041 template<
typename ExpressionType,
int S
ide,
bool Transposed,
typename ExpressionShape>
1047 template<
typename Dest,
typename TranspositionType>
1048 static inline void run(Dest& dst,
const TranspositionType& tr,
const ExpressionType& xpr)
1050 MatrixType
mat(xpr);
1051 typedef typename TranspositionType::StorageIndex StorageIndex;
1058 for(
Index k=(Transposed?size-1:0) ; Transposed?k>=0:k<
size ; Transposed?--k:++k)
1059 if(
Index(j=tr.coeff(k))!=k)
1061 if(Side==
OnTheLeft) dst.row(k).swap(dst.row(j));
1062 else if(Side==
OnTheRight) dst.col(k).swap(dst.col(j));
1067 template<
typename Lhs,
typename Rhs,
int ProductTag,
typename MatrixShape>
1070 template<
typename Dest>
1071 static void evalTo(Dest& dst,
const Lhs& lhs,
const Rhs& rhs)
1077 template<
typename Lhs,
typename Rhs,
int ProductTag,
typename MatrixShape>
1080 template<
typename Dest>
1081 static void evalTo(Dest& dst,
const Lhs& lhs,
const Rhs& rhs)
1088 template<
typename Lhs,
typename Rhs,
int ProductTag,
typename MatrixShape>
1091 template<
typename Dest>
1098 template<
typename Lhs,
typename Rhs,
int ProductTag,
typename MatrixShape>
1101 template<
typename Dest>
1112 #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 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 EIGEN_STRONG_INLINE void subTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
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 EIGEN_STRONG_INLINE Index cols() const
static EIGEN_STRONG_INLINE void run(Index, Index, const Lhs &, const Rhs &, Index, Packet &res)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index rows() const
internal::nested_eval< Rhs, Lhs::RowsAtCompileTime >::type RhsNested
Product< Lhs, Rhs, Options > SrcXprType
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE evaluator(const XprType &xpr)
Matrix diag(const std::vector< Matrix > &Hs)
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)
void diagonal(const MatrixType &m)
EIGEN_DEVICE_FUNC product_evaluator(const XprType &xpr)
#define EIGEN_PLAIN_ENUM_MAX(a, b)
Namespace containing all symbols from the Eigen library.
Product< Lhs, Rhs, Options > SrcXprType
static void evalTo(Dest &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. ...
static EIGEN_STRONG_INLINE void evalTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
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)
EIGEN_DEVICE_FUNC const _LhsNested & lhs() const
const unsigned int PacketAccessBit
Product< Lhs, Rhs, Options > SrcXprType
const PacketType packet(Index index) const
graph add(boost::make_shared< UnaryFactor >(1, 0.0, 0.0, unaryNoise))
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE evaluator(const XprType &xpr)
virtual EIGEN_DEVICE_FUNC const Scalar coeff(DenseIndex 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.
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
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)
#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
product_evaluator< XprType > Base
static EIGEN_STRONG_INLINE void scaleAndAddTo(Dst &dst, const Lhs &lhs, const Rhs &rhs, const Scalar &alpha)
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
Product< Lhs, Rhs >::Scalar Scalar
idx_t idx_t idx_t idx_t idx_t * perm
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)
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)
static EIGEN_STRONG_INLINE void addTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
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)
static EIGEN_STRONG_INLINE void subTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
EIGEN_DONT_INLINE T sub(T a, T b)
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_DEVICE_FUNC EIGEN_STRONG_INLINE evaluator(const XprType &xpr)
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)
static EIGEN_STRONG_INLINE void addTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
diagonal_product_evaluator_base(const MatrixType &mat, const DiagonalType &diag)
Product< Lhs, Rhs >::Scalar Scalar
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 > &)
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
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 EIGEN_STRONG_INLINE 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)
#define EIGEN_UNROLLING_LIMIT
void swap(scoped_array< T > &a, scoped_array< T > &b)
void operator()(const Dst &dst, const Src &src) const