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 {};
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; } };
308 explicit adds(
const Scalar&
s) : m_scale(s) {}
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>
379 if (lhs.rows() == 1 && rhs.cols() == 1) {
380 dst.coeffRef(0,0) += alpha * lhs.row(0).conjugate().dot(rhs.col(0));
383 LhsNested actual_lhs(lhs);
384 RhsNested actual_rhs(rhs);
388 >
::run(actual_lhs, actual_rhs, dst, alpha);
392 template<
typename Lhs,
typename Rhs>
397 template<
typename Dst>
405 template<
typename Dst>
412 template<
typename Dst>
433 template<
typename Dst,
typename Func>
444 Scalar actualAlpha = combine_scalar_factors<Scalar>(lhs, rhs);
446 eval_dynamic_impl(dst,
456 template<
typename Dst,
typename LhsT,
typename RhsT,
typename Func,
typename Scalar>
465 template<
typename Dst,
typename LhsT,
typename RhsT,
typename Func,
typename Scalar>
474 template<
typename Lhs,
typename Rhs>
484 template<
int Traversal,
int UnrollingIndex,
typename Lhs,
typename Rhs,
typename RetScalar>
487 template<
int StorageOrder,
int UnrollingIndex,
typename Lhs,
typename Rhs,
typename Packet,
int LoadMode>
490 template<
typename Lhs,
typename Rhs,
int ProductTag>
505 m_innerDim(xpr.lhs().
cols())
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";
536 RowsAtCompileTime = LhsNestedCleaned::RowsAtCompileTime,
537 ColsAtCompileTime = RhsNestedCleaned::ColsAtCompileTime,
539 MaxRowsAtCompileTime = LhsNestedCleaned::MaxRowsAtCompileTime,
540 MaxColsAtCompileTime = RhsNestedCleaned::MaxColsAtCompileTime
548 LhsCoeffReadCost = LhsEtorType::CoeffReadCost,
549 RhsCoeffReadCost = RhsEtorType::CoeffReadCost,
557 LhsFlags = LhsEtorType::Flags,
558 RhsFlags = RhsEtorType::Flags,
572 CanVectorizeRhs = bool(RhsRowMajor) && (RhsFlags &
PacketAccessBit) && (ColsAtCompileTime!=1),
573 CanVectorizeLhs = (!LhsRowMajor) && (LhsFlags &
PacketAccessBit) && (RowsAtCompileTime!=1),
575 EvalToRowMajor = (MaxRowsAtCompileTime==1&&MaxColsAtCompileTime!=1) ? 1
576 : (MaxColsAtCompileTime==1&&MaxRowsAtCompileTime!=1) ? 0
577 : (
bool(RhsRowMajor) && !CanVectorizeLhs),
582 | (SameType && (CanVectorizeLhs || CanVectorizeRhs) ?
PacketAccessBit : 0)
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)
597 CanVectorizeInner = SameType
606 return (m_lhs.row(row).transpose().cwiseProduct( m_rhs.col(col) )).sum();
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();
621 template<
int LoadMode,
typename PacketType>
628 LhsEtorType, RhsEtorType,
PacketType, LoadMode> PacketImpl;
633 template<
int LoadMode,
typename PacketType>
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);
653 template<
typename Lhs,
typename Rhs>
655 :
product_evaluator<Product<Lhs, Rhs, LazyProduct>, CoeffBasedProductMode, DenseShape, DenseShape>
665 : Base(BaseProduct(xpr.lhs(),xpr.rhs()))
673 template<
int UnrollingIndex,
typename Lhs,
typename Rhs,
typename Packet,
int LoadMode>
678 etor_product_packet_impl<RowMajor, UnrollingIndex-1, Lhs, Rhs, Packet, LoadMode>::run(row, col, lhs, rhs, innerDim, res);
679 res =
pmadd(pset1<Packet>(lhs.coeff(row,
Index(UnrollingIndex-1))), rhs.template packet<LoadMode,Packet>(
Index(UnrollingIndex-1),
col), res);
683 template<
int UnrollingIndex,
typename Lhs,
typename Rhs,
typename Packet,
int LoadMode>
688 etor_product_packet_impl<ColMajor, UnrollingIndex-1, Lhs, Rhs, Packet, LoadMode>::run(row, col, lhs, rhs, innerDim, res);
689 res =
pmadd(lhs.template packet<LoadMode,Packet>(row,
Index(UnrollingIndex-1)), pset1<Packet>(rhs.coeff(
Index(UnrollingIndex-1), col)), res);
693 template<
typename Lhs,
typename Rhs,
typename Packet,
int LoadMode>
698 res =
pmul(pset1<Packet>(lhs.coeff(row,
Index(0))),rhs.template packet<LoadMode,Packet>(
Index(0),
col));
702 template<
typename Lhs,
typename Rhs,
typename Packet,
int LoadMode>
707 res =
pmul(lhs.template packet<LoadMode,Packet>(row,
Index(0)), pset1<Packet>(rhs.coeff(
Index(0), col)));
711 template<
typename Lhs,
typename Rhs,
typename Packet,
int LoadMode>
720 template<
typename Lhs,
typename Rhs,
typename Packet,
int LoadMode>
729 template<
typename Lhs,
typename Rhs,
typename Packet,
int LoadMode>
736 res =
pmadd(pset1<Packet>(lhs.coeff(row,
i)), rhs.template packet<LoadMode,Packet>(
i, col),
res);
740 template<
typename Lhs,
typename Rhs,
typename Packet,
int LoadMode>
747 res =
pmadd(lhs.template packet<LoadMode,Packet>(row,
i), pset1<Packet>(rhs.coeff(
i, col)), res);
755 template<
int Mode,
bool LhsIsTriangular,
756 typename Lhs,
bool LhsIsVector,
757 typename Rhs,
bool RhsIsVector>
760 template<
typename Lhs,
typename Rhs,
int ProductTag>
766 template<
typename Dest>
770 ::run(dst, lhs.nestedExpression(), rhs,
alpha);
774 template<
typename Lhs,
typename Rhs,
int ProductTag>
780 template<
typename Dest>
791 template <
typename Lhs,
int LhsMode,
bool LhsIsVector,
792 typename Rhs,
int RhsMode,
bool RhsIsVector>
795 template<
typename Lhs,
typename Rhs,
int ProductTag>
801 template<
typename Dest>
809 template<
typename Lhs,
typename Rhs,
int ProductTag>
815 template<
typename Dest>
827 template<
typename MatrixType,
typename DiagonalType,
typename Derived,
int ProductOrder>
839 _StorageOrder = (Derived::MaxRowsAtCompileTime==1 && Derived::MaxColsAtCompileTime!=1) ?
RowMajor 840 : (Derived::MaxColsAtCompileTime==1 && Derived::MaxRowsAtCompileTime!=1) ?
ColMajor 849 _Vectorizable = bool(
int(MatrixFlags)&PacketAccessBit)
851 && (_SameStorageOrder || (MatrixFlags&
LinearAccessBit)==LinearAccessBit)
852 && (_ScalarAccessOnDiag || (bool(
int(DiagFlags)&PacketAccessBit))),
853 _LinearAccessMask = (MatrixType::RowsAtCompileTime==1 || MatrixType::ColsAtCompileTime==1) ? LinearAccessBit : 0,
854 Flags = ((
HereditaryBits|_LinearAccessMask) & (
unsigned int)(MatrixFlags)) | (_Vectorizable ? PacketAccessBit : 0),
857 AsScalarProduct = (DiagonalType::SizeAtCompileTime==1)
858 || (DiagonalType::SizeAtCompileTime==
Dynamic && MatrixType::RowsAtCompileTime==1 && ProductOrder==
OnTheLeft)
859 || (DiagonalType::SizeAtCompileTime==
Dynamic && MatrixType::ColsAtCompileTime==1 && ProductOrder==
OnTheRight)
863 : m_diagImpl(diag), m_matImpl(mat)
872 return m_diagImpl.coeff(0) * m_matImpl.coeff(idx);
874 return m_diagImpl.coeff(idx) * m_matImpl.coeff(idx);
878 template<
int LoadMode,
typename PacketType>
881 return internal::pmul(m_matImpl.template packet<LoadMode,PacketType>(row, col),
882 internal::pset1<PacketType>(m_diagImpl.coeff(
id)));
885 template<
int LoadMode,
typename PacketType>
889 InnerSize = (MatrixType::Flags &
RowMajorBit) ? MatrixType::ColsAtCompileTime : MatrixType::RowsAtCompileTime,
892 return internal::pmul(m_matImpl.template packet<LoadMode,PacketType>(row, col),
893 m_diagImpl.template packet<DiagonalPacketLoadMode,PacketType>(
id));
901 template<
typename Lhs,
typename Rhs,
int ProductKind,
int ProductTag>
906 using Base::m_diagImpl;
907 using Base::m_matImpl;
916 enum { StorageOrder = Base::_StorageOrder };
919 : Base(xpr.rhs(), xpr.lhs().
diagonal())
925 return m_diagImpl.coeff(row) * m_matImpl.coeff(row, col);
929 template<
int LoadMode,
typename PacketType>
934 return this->
template packet_impl<LoadMode,PacketType>(
row,
col,
row,
938 template<
int LoadMode,
typename PacketType>
947 template<
typename Lhs,
typename Rhs,
int ProductKind,
int ProductTag>
952 using Base::m_diagImpl;
953 using Base::m_matImpl;
960 enum { StorageOrder = Base::_StorageOrder };
963 : Base(xpr.lhs(), xpr.rhs().
diagonal())
969 return m_matImpl.coeff(row, col) * m_diagImpl.coeff(col);
973 template<
int LoadMode,
typename PacketType>
976 return this->
template packet_impl<LoadMode,PacketType>(
row,
col,
col,
980 template<
int LoadMode,
typename PacketType>
997 template<
typename ExpressionType,
int S
ide,
bool Transposed,
typename ExpressionShape>
1000 template<
typename ExpressionType,
int S
ide,
bool Transposed>
1006 template<
typename Dest,
typename PermutationType>
1009 MatrixType
mat(xpr);
1020 while(r < perm.size())
1023 while(r<perm.size() && mask[r]) r++;
1030 for(
Index k=perm.indices().coeff(k0); k!=k0; k=perm.indices().coeff(k))
1034 (dst,((Side==
OnTheLeft) ^ Transposed) ? k0 : kPrev));
1036 mask.coeffRef(k) =
true;
1046 (dst, ((Side==
OnTheLeft) ^ Transposed) ? perm.indices().coeff(
i) :
i)
1051 (mat, ((Side==
OnTheRight) ^ Transposed) ? perm.indices().coeff(
i) :
i);
1057 template<
typename Lhs,
typename Rhs,
int ProductTag,
typename MatrixShape>
1060 template<
typename Dest>
1067 template<
typename Lhs,
typename Rhs,
int ProductTag,
typename MatrixShape>
1070 template<
typename Dest>
1077 template<
typename Lhs,
typename Rhs,
int ProductTag,
typename MatrixShape>
1080 template<
typename Dest>
1087 template<
typename Lhs,
typename Rhs,
int ProductTag,
typename MatrixShape>
1090 template<
typename Dest>
1108 template<
typename ExpressionType,
int S
ide,
bool Transposed,
typename ExpressionShape>
1114 template<
typename Dest,
typename TranspositionType>
1117 MatrixType
mat(xpr);
1118 typedef typename TranspositionType::StorageIndex StorageIndex;
1125 for(
Index k=(Transposed?size-1:0) ; Transposed?k>=0:k<
size ; Transposed?--k:++k)
1126 if(
Index(j=tr.coeff(k))!=k)
1128 if(Side==
OnTheLeft) dst.row(k).swap(dst.row(j));
1129 else if(Side==
OnTheRight) dst.col(k).swap(dst.col(j));
1134 template<
typename Lhs,
typename Rhs,
int ProductTag,
typename MatrixShape>
1137 template<
typename Dest>
1144 template<
typename Lhs,
typename Rhs,
int ProductTag,
typename MatrixShape>
1147 template<
typename Dest>
1155 template<
typename Lhs,
typename Rhs,
int ProductTag,
typename MatrixShape>
1158 template<
typename Dest>
1165 template<
typename Lhs,
typename Rhs,
int ProductTag,
typename MatrixShape>
1168 template<
typename Dest>
1179 #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.
#define ei_declare_local_nested_eval(XPR_T, XPR, N, NAME)
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(Index row, Index col, const Lhs &lhs, const Rhs &rhs, Index, Packet &res)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void call_assignment_no_alias(Dst &dst, const Src &src, const Func &func)
void EIGEN_DEVICE_FUNC operator()(const Dst &dst, const Src &src) const
const unsigned int ActualPacketAccessBit
Product< Lhs, Rhs >::Scalar Scalar
#define EIGEN_STRONG_INLINE
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void subTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dest &dst, const Lhs &lhs, const Transpose< 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
EIGEN_STRONG_INLINE PacketType packet(Index row, Index col) const
internal::add_const_on_value_type< LhsNested >::type m_lhs
Expression of the product of two arbitrary matrices or vectors.
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(DstXprType &dst, const SrcXprType &src, const internal::sub_assign_op< Scalar, Scalar > &)
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
internal::remove_all< LhsNested >::type LhsNestedCleaned
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const _RhsNested & rhs() const
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)
Product< Lhs, Rhs >::Scalar Scalar
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dest &dst, const Lhs &lhs, const Rhs &rhs)
Expression of the transpose of a matrix.
Product< Lhs, Rhs, ProductKind > XprType
EIGEN_DEVICE_FUNC void operator()(const Dst &dst, const Src &src) const
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void subTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
nested_eval< Lhs, 1 >::type LhsNested
void diagonal(const MatrixType &m)
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(DstXprType &dst, const SrcXprType &src, const internal::add_assign_op< Scalar, Scalar > &)
#define EIGEN_PLAIN_ENUM_MAX(a, b)
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void scaleAndAddTo(Dst &dst, const Lhs &lhs, const Rhs &rhs, const Scalar &alpha)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
Namespace containing all symbols from the Eigen library.
Product< Lhs, Rhs, Options > SrcXprType
EIGEN_STRONG_INLINE PacketType packet(Index idx) const
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
Product< Lhs, Rhs >::Scalar Scalar
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE product_evaluator(const XprType &xpr)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
remove_all< MatrixType >::type MatrixTypeCleaned
EIGEN_STRONG_INLINE PacketType packet(Index row, Index col) const
EIGEN_DEVICE_FUNC void operator()(const Dst &dst, const Src &src) const
EIGEN_CATCH_ASSIGN_XPR_OP_PRODUCT(assign_op, scalar_sum_op, add_assign_op)
const unsigned int RowMajorBit
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)
const unsigned int PacketAccessBit
Product< Lhs, Rhs, Options > SrcXprType
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(DstXprType &dst, const SrcXprType &src, const AssignFunc &func)
static EIGEN_DEVICE_FUNC void scaleAndAddTo(Dest &dst, const Lhs &lhs, const Rhs &rhs, const Scalar &alpha)
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dest &dst, const Lhs &lhs, const Rhs &rhs)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE evaluator(const XprType &xpr)
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void addTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index rowId, Index colId)
evaluator< PlainObject > Base
nested_eval< Rhs, 1 >::type RhsNested
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_STRONG_INLINE PacketType packet_impl(Index row, Index col, Index id, internal::true_type) const
EIGEN_DEVICE_FUNC product_evaluator(const XprType &xpr)
find_best_packet< Scalar, RowsAtCompileTime >::type LhsVecPacketType
internal::remove_all< typename internal::conditional< int(Side)==OnTheRight, LhsNested, RhsNested >::type >::type MatrixType
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const PacketType packet(Index index) const
#define EIGEN_INTERNAL_CHECK_COST_VALUE(C)
Generic expression where a coefficient-wise binary operator is applied to two expressions.
const unsigned int HereditaryBits
Product< Lhs, Rhs, DefaultProduct > XprType
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(Index, Index, const Lhs &, const Rhs &, Index, Packet &res)
product_evaluator< XprType > Base
evaluator< LhsNestedCleaned > LhsEtorType
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const internal::remove_all< MatrixTypeNested >::type & nestedExpression() const
EIGEN_STRONG_INLINE PacketType packet(Index idx) const
internal::remove_all< RhsNested >::type RhsNestedCleaned
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
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)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(Index row, Index col, const Lhs &lhs, const Rhs &rhs, Index innerDim, Packet &res)
Product< Lhs, Rhs >::Scalar Scalar
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void subTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CoeffReturnType coeff(Index row, Index col) const
XprType::CoeffReturnType CoeffReturnType
XprType::PlainObject PlainObject
Product< Lhs, Rhs, LazyProduct > BaseProduct
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op< Scalar, Scalar > &)
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dest &dst, const Transpose< Lhs > &lhs, const Rhs &rhs)
Product< Lhs, Rhs >::Scalar Scalar
idx_t idx_t idx_t idx_t idx_t * perm
Product< Lhs, Rhs, LazyProduct > XprType
EIGEN_STRONG_INLINE PacketType packet_impl(Index row, Index col, Index id, internal::false_type) const
static void scaleAndAddTo(Dest &dst, const Lhs &lhs, const Rhs &rhs, const Scalar &alpha)
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dest &dst, const Lhs &lhs, const Rhs &rhs)
evaluator< RhsNestedCleaned > RhsEtorType
EIGEN_DEVICE_FUNC bool is_same_dense(const T1 &mat1, const T2 &mat2, typename enable_if< possibly_same_dense< T1, T2 >::value >::type *=0)
Product< Lhs, Rhs >::Scalar Scalar
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar coeff(Index idx) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar coeff(Index row, Index col) const
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void subTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
EIGEN_DEVICE_FUNC diagonal_product_evaluator_base(const MatrixType &mat, const DiagonalType &diag)
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void addTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
ScalarBinaryOpTraits< typename MatrixType::Scalar, typename DiagonalType::Scalar >::ReturnType Scalar
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(Dest &dst, const PermutationType &perm, const ExpressionType &xpr)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE product_evaluator(const XprType &xpr)
Lhs::DiagonalVectorType DiagonalType
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const _LhsNested & lhs() const
EIGEN_DONT_INLINE T sub(T a, T b)
internal::add_const_on_value_type< RhsNested >::type m_rhs
EIGEN_CONSTEXPR Index size(const T &x)
#define EIGEN_DEVICE_FUNC
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void scaleAndAddTo(Dest &dst, const Lhs &lhs, const Rhs &rhs, const Scalar &alpha)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const PacketType packet(Index row, Index col) const
remove_all< MatrixType >::type MatrixTypeCleaned
evaluator< DiagonalType > m_diagImpl
Product< Lhs, Rhs, ProductKind > XprType
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void scaleAndAddTo(Dst &dst, const Lhs &lhs, const Rhs &rhs, const Scalar &alpha)
void EIGEN_DEVICE_FUNC outer_product_selector_run(Dst &dst, const Lhs &lhs, const Rhs &rhs, const Func &func, const false_type &)
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)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void call_restricted_packet_assignment_no_alias(Dst &dst, const Src &src, const Func &func)
#define EIGEN_PLAIN_ENUM_MIN(a, b)
storage_kind_to_shape< typename traits< T >::StorageKind >::Shape Shape
Product< Lhs, Rhs, Options > XprType
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dest &dst, const Lhs &lhs, const Rhs &rhs)
CwiseBinaryOp< internal::scalar_product_op< ScalarBis, Scalar >, const CwiseNullaryOp< internal::scalar_constant_op< ScalarBis >, Plain >, const Product< Lhs, Rhs, DefaultProduct > > SrcXprType
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(Index row, Index col, const Lhs &lhs, const Rhs &rhs, Index innerDim, Packet &res)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE evaluator(const XprType &xpr)
diagonal_product_evaluator_base< Lhs, typename Rhs::DiagonalVectorType, Product< Lhs, Rhs, LazyProduct >, OnTheRight > Base
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(Index row, Index col, const Lhs &lhs, const Rhs &rhs, Index innerDim, Packet &res)
EIGEN_STRONG_INLINE Packet4f pmadd(const Packet4f &a, const Packet4f &b, const Packet4f &c)
Product< Lhs, Rhs >::Scalar Scalar
nested_eval< ExpressionType, 1 >::type MatrixType
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dest &dst, const Inverse< Lhs > &lhs, const Rhs &rhs)
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(DstXprType &dst, const SrcXprType &src, const InitialFunc &)
graph add(PriorFactor< Pose2 >(1, priorMean, priorNoise))
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(Index row, Index col, const Lhs &lhs, const Rhs &rhs, Index, Packet &res)
XprType::PlainObject PlainObject
Determines whether the given binary operation of two numeric types is allowed and what the scalar ret...
diagonal_product_evaluator_base< Rhs, typename Lhs::DiagonalVectorType, Product< Lhs, Rhs, LazyProduct >, OnTheLeft > Base
Expression of a diagonal/subdiagonal/superdiagonal in a matrix.
evaluator< Product< EIGEN_SCALAR_BINARYOP_EXPR_RETURN_TYPE(Scalar1, Lhs, product), Rhs, DefaultProduct > > Base
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const LhsNestedCleaned & lhs() const
const unsigned int EvalBeforeNestingBit
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
#define eigen_internal_assert(x)
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(Dest &dst, const TranspositionType &tr, const ExpressionType &xpr)
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void addTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
nested_eval< ExpressionType, 1 >::type MatrixType
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void addTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
Generic expression where a coefficient-wise unary operator is applied to an expression.
XprType::PlainObject PlainObject
product_evaluator< BaseProduct, CoeffBasedProductMode, DenseShape, DenseShape > Base
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(Index, Index, const Lhs &, const Rhs &, Index, Packet &res)
The matrix class, also used for vectors and row-vectors.
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dest &dst, const Lhs &lhs, const Inverse< Rhs > &rhs)
static EIGEN_DEVICE_FUNC 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 EIGEN_STRONG_INLINE const RhsNestedCleaned & rhs() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CoeffReturnType coeff(Index index) const
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void eval_dynamic(Dst &dst, const Lhs &lhs, const Rhs &rhs, const Func &func)
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dst &dst, const Lhs &lhs, const Rhs &rhs)
EIGEN_DEVICE_FUNC Packet pmul(const Packet &a, const Packet &b)
const unsigned int LinearAccessBit
EIGEN_DEVICE_FUNC void operator()(const Dst &dst, const Src &src) const
EIGEN_DEVICE_FUNC const XprTypeNestedCleaned & nestedExpression() const
#define EIGEN_UNROLLING_LIMIT
#define EIGEN_UNUSED_VARIABLE(var)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE product_evaluator(const XprType &xpr)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar coeff(Index row, Index col) const
void swap(scoped_array< T > &a, scoped_array< T > &b)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT