13#ifndef EIGEN_PRODUCTEVALUATORS_H
14#define EIGEN_PRODUCTEVALUATORS_H
28template<
typename Lhs,
typename Rhs,
int Options>
40template<
typename Lhs,
typename Rhs,
typename Scalar1,
typename Scalar2,
typename Plain1>
45 static const bool value =
true;
47template<
typename Lhs,
typename Rhs,
typename Scalar1,
typename Scalar2,
typename Plain1>
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())
64template<
typename Lhs,
typename Rhs,
int DiagIndex>
66 :
public evaluator<Diagonal<const Product<Lhs, Rhs, LazyProduct>, DiagIndex> >
82template<
typename Lhs,
typename Rhs,
83 typename LhsShape =
typename evaluator_traits<Lhs>::Shape,
84 typename RhsShape =
typename evaluator_traits<Rhs>::Shape,
88template<
typename Lhs,
typename Rhs>
90 static const bool value =
true;
95template<
typename Lhs,
typename Rhs,
int Options,
int ProductTag,
typename LhsShape,
typename RhsShape>
97 :
public evaluator<typename Product<Lhs, Rhs, Options>::PlainObject>
106 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
108 : m_result(
xpr.rows(),
xpr.cols())
110 ::new (
static_cast<Base*
>(
this))
Base(m_result);
135template<
typename DstXprType,
typename Lhs,
typename Rhs,
int Options,
typename Scalar>
137 typename enable_if<(Options==DefaultProduct || Options==AliasFreeProduct)>::type>
140 static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
153template<
typename DstXprType,
typename Lhs,
typename Rhs,
int Options,
typename Scalar>
155 typename enable_if<(Options==DefaultProduct || Options==AliasFreeProduct)>::type>
158 static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
161 eigen_assert(
dst.rows() ==
src.rows() &&
dst.cols() ==
src.cols());
168template<
typename DstXprType,
typename Lhs,
typename Rhs,
int Options,
typename Scalar>
170 typename enable_if<(Options==DefaultProduct || Options==AliasFreeProduct)>::type>
173 static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
176 eigen_assert(
dst.rows() ==
src.rows() &&
dst.cols() ==
src.cols());
186template<
typename DstXprType,
typename Lhs,
typename Rhs,
typename AssignFunc,
typename Scalar,
typename ScalarBis,
typename Plain>
193 static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
196 call_assignment_no_alias(
dst, (
src.lhs().functor().m_other *
src.rhs().lhs())*
src.rhs().rhs(), func);
204template<
typename OtherXpr,
typename Lhs,
typename Rhs>
207 static const bool value =
true;
210template<
typename OtherXpr,
typename Lhs,
typename Rhs>
213 static const bool value =
true;
216template<
typename DstXprType,
typename OtherXpr,
typename ProductType,
typename Func1,
typename Func2>
219 template<
typename SrcXprType,
typename InitialFunc>
220 static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
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> > \
245template<
typename Lhs,
typename Rhs>
248 template<
typename Dst>
249 static EIGEN_DEVICE_FUNC EIGEN_STRONG_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 EIGEN_DEVICE_FUNC EIGEN_STRONG_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 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(); }
271template<
typename Dst,
typename Lhs,
typename Rhs,
typename Func>
272void EIGEN_DEVICE_FUNC outer_product_selector_run(Dst&
dst,
const Lhs &lhs,
const Rhs &rhs,
const Func& func,
const false_type&)
275 ei_declare_local_nested_eval(Lhs,lhs,Rhs::SizeAtCompileTime,
actual_lhs);
279 for (
Index j=0; j<cols; ++j)
284template<
typename Dst,
typename Lhs,
typename Rhs,
typename Func>
285void EIGEN_DEVICE_FUNC outer_product_selector_run(Dst&
dst,
const Lhs &lhs,
const Rhs &rhs,
const Func& func,
const true_type&)
288 ei_declare_local_nested_eval(Rhs,rhs,Lhs::SizeAtCompileTime,
actual_rhs);
292 for (
Index i=0; i<rows; ++i)
296template<
typename Lhs,
typename Rhs>
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; } };
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;
314 template<
typename Dst>
315 static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
void evalTo(Dst&
dst,
const Lhs& lhs,
const Rhs& rhs)
320 template<
typename Dst>
321 static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
void addTo(Dst&
dst,
const Lhs& lhs,
const Rhs& rhs)
326 template<
typename Dst>
327 static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
void subTo(Dst&
dst,
const Lhs& lhs,
const Rhs& rhs)
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)
335 internal::outer_product_selector_run(dst, lhs, rhs, adds(alpha), is_row_major<Dst>());
342template<
typename Lhs,
typename Rhs,
typename Derived>
347 template<
typename Dst>
348 static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
void evalTo(Dst&
dst,
const Lhs& lhs,
const Rhs& rhs)
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)); }
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)); }
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); }
365template<
typename Lhs,
typename Rhs>
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)
379 if (lhs.rows() == 1 && rhs.cols() == 1) {
380 dst.coeffRef(0,0) += alpha * lhs.row(0).conjugate().
dot(rhs.col(0));
392template<
typename Lhs,
typename Rhs>
397 template<
typename Dst>
398 static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
void evalTo(Dst&
dst,
const Lhs& lhs,
const Rhs& rhs)
405 template<
typename Dst>
406 static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
void addTo(Dst&
dst,
const Lhs& lhs,
const Rhs& rhs)
412 template<
typename Dst>
413 static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
void subTo(Dst&
dst,
const Lhs& lhs,
const Rhs& rhs)
433 template<
typename Dst,
typename Func>
434 static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
435 void eval_dynamic(Dst&
dst,
const Lhs& lhs,
const Rhs& rhs,
const Func &func)
446 eval_dynamic_impl(
dst,
456 template<
typename Dst,
typename LhsT,
typename RhsT,
typename Func,
typename Scalar>
457 static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
460 EIGEN_UNUSED_VARIABLE(s);
461 eigen_internal_assert(s==
Scalar(1));
462 call_restricted_packet_assignment_no_alias(
dst, lhs.lazyProduct(rhs), func);
465 template<
typename Dst,
typename LhsT,
typename RhsT,
typename Func,
typename Scalar>
466 static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
469 call_restricted_packet_assignment_no_alias(
dst, s * lhs.lazyProduct(rhs), func);
474template<
typename Lhs,
typename Rhs>
484template<
int Traversal,
int UnrollingIndex,
typename Lhs,
typename Rhs,
typename RetScalar>
487template<
int StorageOrder,
int UnrollingIndex,
typename Lhs,
typename Rhs,
typename Packet,
int LoadMode>
490template<
typename Lhs,
typename Rhs,
int ProductTag>
495 typedef typename XprType::Scalar Scalar;
496 typedef typename XprType::CoeffReturnType CoeffReturnType;
498 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
505 m_innerDim(
xpr.lhs().cols())
509 EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);
519 std::cerr <<
"Alignment= " << Alignment <<
"\n";
520 std::cerr <<
"Flags= " << Flags <<
"\n";
529 typedef typename internal::remove_all<LhsNested>::type LhsNestedCleaned;
530 typedef typename internal::remove_all<RhsNested>::type RhsNestedCleaned;
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
543 typedef typename find_best_packet<Scalar,RowsAtCompileTime>::type LhsVecPacketType;
544 typedef typename find_best_packet<Scalar,ColsAtCompileTime>::type RhsVecPacketType;
548 LhsCoeffReadCost = LhsEtorType::CoeffReadCost,
549 RhsCoeffReadCost = RhsEtorType::CoeffReadCost,
555 Unroll = CoeffReadCost <= EIGEN_UNROLLING_LIMIT,
557 LhsFlags = LhsEtorType::Flags,
558 RhsFlags = RhsEtorType::Flags,
575 EvalToRowMajor = (MaxRowsAtCompileTime==1&&MaxColsAtCompileTime!=1) ? 1
576 : (MaxColsAtCompileTime==1&&MaxRowsAtCompileTime!=1) ? 0
579 Flags = ((
int(LhsFlags) |
int(RhsFlags)) & HereditaryBits & ~RowMajorBit)
585 LhsOuterStrideBytes =
int(LhsNestedCleaned::OuterStrideAtCompileTime) * int(
sizeof(
typename LhsNestedCleaned::Scalar)),
586 RhsOuterStrideBytes = int(RhsNestedCleaned::OuterStrideAtCompileTime) * int(
sizeof(
typename RhsNestedCleaned::Scalar)),
600 && (
int(LhsFlags) & int(RhsFlags) & ActualPacketAccessBit)
604 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const CoeffReturnType coeff(
Index row,
Index col)
const
606 return (m_lhs.row(row).transpose().cwiseProduct( m_rhs.col(col) )).sum();
613 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
614 const CoeffReturnType coeff(
Index index)
const
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>
622 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
623 const PacketType packet(
Index row,
Index col)
const
629 PacketImpl::run(row, col, m_lhsImpl, m_rhsImpl, m_innerDim, res);
633 template<
int LoadMode,
typename PacketType>
634 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
635 const PacketType packet(
Index index)
const
637 const Index row = (RowsAtCompileTime == 1 || MaxRowsAtCompileTime==1) ? 0 : index;
638 const Index col = (RowsAtCompileTime == 1 || MaxRowsAtCompileTime==1) ? index : 0;
643 typename internal::add_const_on_value_type<LhsNested>::type m_lhs;
644 typename internal::add_const_on_value_type<RhsNested>::type m_rhs;
653template<
typename Lhs,
typename Rhs>
655 :
product_evaluator<Product<Lhs, Rhs, LazyProduct>, CoeffBasedProductMode, DenseShape, DenseShape>
663 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
673template<
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);
683template<
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);
693template<
typename Lhs,
typename Rhs,
typename Packet,
int LoadMode>
696 static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
void run(
Index row,
Index col,
const Lhs& lhs,
const Rhs& rhs,
Index ,
Packet &res)
702template<
typename Lhs,
typename Rhs,
typename Packet,
int LoadMode>
705 static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
void run(
Index row,
Index col,
const Lhs& lhs,
const Rhs& rhs,
Index ,
Packet &res)
711template<
typename Lhs,
typename Rhs,
typename Packet,
int LoadMode>
714 static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
void run(
Index ,
Index ,
const Lhs& ,
const Rhs& ,
Index ,
Packet &res)
720template<
typename Lhs,
typename Rhs,
typename Packet,
int LoadMode>
723 static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
void run(
Index ,
Index ,
const Lhs& ,
const Rhs& ,
Index ,
Packet &res)
729template<
typename Lhs,
typename Rhs,
typename Packet,
int LoadMode>
740template<
typename Lhs,
typename Rhs,
typename Packet,
int LoadMode>
760template<
typename Lhs,
typename Rhs,
int ProductTag>
766 template<
typename Dest>
767 static void scaleAndAddTo(
Dest&
dst,
const Lhs& lhs,
const Rhs& rhs,
const Scalar& alpha)
770 ::run(
dst, lhs.nestedExpression(), rhs, alpha);
774template<
typename Lhs,
typename Rhs,
int ProductTag>
780 template<
typename Dest>
781 static void scaleAndAddTo(
Dest&
dst,
const Lhs& lhs,
const Rhs& rhs,
const Scalar& alpha)
795template<
typename Lhs,
typename Rhs,
int ProductTag>
801 template<
typename Dest>
802 static EIGEN_DEVICE_FUNC
803 void scaleAndAddTo(
Dest&
dst,
const Lhs& lhs,
const Rhs& rhs,
const Scalar& alpha)
809template<
typename Lhs,
typename Rhs,
int ProductTag>
815 template<
typename Dest>
816 static void scaleAndAddTo(
Dest&
dst,
const Lhs& lhs,
const Rhs& rhs,
const Scalar& alpha)
827template<
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
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)
863 : m_diagImpl(
diag), m_matImpl(
mat)
866 EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);
869 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const Scalar coeff(
Index idx)
const
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>
882 internal::pset1<PacketType>(m_diagImpl.coeff(
id)));
885 template<
int LoadMode,
typename PacketType>
889 InnerSize = (MatrixType::Flags &
RowMajorBit) ? MatrixType::ColsAtCompileTime : MatrixType::RowsAtCompileTime,
901template<
typename Lhs,
typename Rhs,
int ProductKind,
int ProductTag>
906 using Base::m_diagImpl;
907 using Base::m_matImpl;
909 typedef typename Base::Scalar Scalar;
913 typedef typename Lhs::DiagonalVectorType DiagonalType;
916 enum { StorageOrder = Base::_StorageOrder };
923 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const Scalar coeff(
Index row,
Index col)
const
925 return m_diagImpl.coeff(row) * m_matImpl.coeff(row, col);
929 template<
int LoadMode,
typename PacketType>
930 EIGEN_STRONG_INLINE PacketType packet(
Index row,
Index col)
const
938 template<
int LoadMode,
typename PacketType>
939 EIGEN_STRONG_INLINE PacketType packet(
Index idx)
const
947template<
typename Lhs,
typename Rhs,
int ProductKind,
int ProductTag>
952 using Base::m_diagImpl;
953 using Base::m_matImpl;
955 typedef typename Base::Scalar Scalar;
960 enum { StorageOrder = Base::_StorageOrder };
967 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const Scalar coeff(
Index row,
Index col)
const
969 return m_matImpl.coeff(row, col) * m_diagImpl.coeff(col);
973 template<
int LoadMode,
typename PacketType>
974 EIGEN_STRONG_INLINE PacketType packet(
Index row,
Index col)
const
980 template<
int LoadMode,
typename PacketType>
981 EIGEN_STRONG_INLINE PacketType packet(
Index idx)
const
997template<
typename ExpressionType,
int S
ide,
bool Transposed,
typename ExpressionShape>
1000template<
typename ExpressionType,
int S
ide,
bool Transposed>
1004 typedef typename remove_all<MatrixType>::type MatrixTypeCleaned;
1006 template<
typename Dest,
typename PermutationType>
1007 static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
void run(
Dest&
dst,
const PermutationType& perm,
const ExpressionType&
xpr)
1014 if(is_same_dense(
dst,
mat))
1020 while(r < perm.size())
1023 while(r<perm.size() && mask[r]) r++;
1029 mask.coeffRef(
k0) =
true;
1030 for(
Index k=perm.indices().coeff(
k0); k!=
k0; k=perm.indices().coeff(k))
1036 mask.coeffRef(k) =
true;
1043 for(
Index i = 0; i < n; ++i)
1057template<
typename Lhs,
typename Rhs,
int ProductTag,
typename MatrixShape>
1060 template<
typename Dest>
1061 static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
void evalTo(
Dest&
dst,
const Lhs& lhs,
const Rhs& rhs)
1067template<
typename Lhs,
typename Rhs,
int ProductTag,
typename MatrixShape>
1070 template<
typename Dest>
1071 static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
void evalTo(
Dest&
dst,
const Lhs& lhs,
const Rhs& rhs)
1077template<
typename Lhs,
typename Rhs,
int ProductTag,
typename MatrixShape>
1080 template<
typename Dest>
1081 static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
void evalTo(
Dest&
dst,
const Inverse<Lhs>& lhs,
const Rhs& rhs)
1087template<
typename Lhs,
typename Rhs,
int ProductTag,
typename MatrixShape>
1090 template<
typename Dest>
1091 static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
void evalTo(
Dest&
dst,
const Lhs& lhs,
const Inverse<Rhs>& rhs)
1108template<
typename ExpressionType,
int S
ide,
bool Transposed,
typename ExpressionShape>
1112 typedef typename remove_all<MatrixType>::type MatrixTypeCleaned;
1114 template<
typename Dest,
typename TranspositionType>
1115 static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
void run(
Dest&
dst,
const TranspositionType&
tr,
const ExpressionType&
xpr)
1118 typedef typename TranspositionType::StorageIndex StorageIndex;
1122 if(!is_same_dense(
dst,
mat))
1134template<
typename Lhs,
typename Rhs,
int ProductTag,
typename MatrixShape>
1137 template<
typename Dest>
1138 static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
void evalTo(
Dest&
dst,
const Lhs& lhs,
const Rhs& rhs)
1144template<
typename Lhs,
typename Rhs,
int ProductTag,
typename MatrixShape>
1147 template<
typename Dest>
1148 static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
void evalTo(
Dest&
dst,
const Lhs& lhs,
const Rhs& rhs)
1155template<
typename Lhs,
typename Rhs,
int ProductTag,
typename MatrixShape>
1158 template<
typename Dest>
1159 static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
void evalTo(
Dest&
dst,
const Transpose<Lhs>& lhs,
const Rhs& rhs)
1165template<
typename Lhs,
typename Rhs,
int ProductTag,
typename MatrixShape>
1168 template<
typename Dest>
1169 static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
void evalTo(
Dest&
dst,
const Lhs& lhs,
const Transpose<Rhs>& rhs)
Generic expression where a coefficient-wise binary operator is applied to two expressions.
Definition CwiseBinaryOp.h:84
Generic expression of a matrix where all coefficients are defined by a functor.
Definition CwiseNullaryOp.h:61
EIGEN_DEVICE_FUNC void resize(Index newSize)
Only plain matrices/arrays, not expressions, may be resized; therefore the only useful resize methods...
Definition DenseBase.h:246
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void swap(const DenseBase< OtherDerived > &other)
swaps *this with the expression other.
Definition DenseBase.h:420
EIGEN_DEVICE_FUNC void fill(const Scalar &value)
Alias for setConstant(): sets all coefficients in this expression to val.
Definition CwiseNullaryOp.h:335
EIGEN_DEVICE_FUNC Derived & setZero()
Sets all coefficients in this expression to zero.
Definition CwiseNullaryOp.h:546
Expression of a diagonal/subdiagonal/superdiagonal in a matrix.
Definition Diagonal.h:65
Expression of the inverse of another expression.
Definition Inverse.h:44
Base class for all dense matrices, vectors, and expressions.
Definition MatrixBase.h:50
EIGEN_DEVICE_FUNC ScalarBinaryOpTraits< typenameinternal::traits< Derived >::Scalar, typenameinternal::traits< OtherDerived >::Scalar >::ReturnType dot(const MatrixBase< OtherDerived > &other) const
EIGEN_DEVICE_FUNC DiagonalReturnType diagonal()
Definition Diagonal.h:187
Expression of the product of two arbitrary matrices or vectors.
Definition Product.h:75
Expression of the transpose of a matrix.
Definition Transpose.h:54
@ Aligned16
Data pointer is aligned on a 16 bytes boundary.
Definition Constants.h:235
@ ColMajor
Storage order is column major (see TopicStorageOrders).
Definition Constants.h:319
@ RowMajor
Storage order is row major (see TopicStorageOrders).
Definition Constants.h:321
@ OnTheLeft
Apply transformation on the left.
Definition Constants.h:332
@ OnTheRight
Apply transformation on the right.
Definition Constants.h:334
const unsigned int PacketAccessBit
Short version: means the expression might be vectorized.
Definition Constants.h:94
const unsigned int LinearAccessBit
Short version: means the expression can be seen as 1D vector.
Definition Constants.h:130
const unsigned int EvalBeforeNestingBit
means the expression should be evaluated by the calling expression
Definition Constants.h:70
const unsigned int RowMajorBit
for a matrix, this means that the storage order is row-major.
Definition Constants.h:66
Namespace containing all symbols from the Eigen library.
Definition LDLT.h:16
const int HugeCost
This value means that the cost to evaluate an expression coefficient is either very expensive or cann...
Definition Constants.h:44
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition Meta.h:74
const int Dynamic
This value means that a positive quantity (e.g., a size) is not known at compile-time,...
Definition Constants.h:22
Definition Constants.h:528
Definition Constants.h:531
Holds information about the various numeric (i.e.
Definition NumTraits.h:236
Definition Constants.h:535
Determines whether the given binary operation of two numeric types is allowed and what the scalar ret...
Definition XprHelper.h:806
Definition Constants.h:534
Definition Constants.h:536
Definition Constants.h:533
Definition AssignEvaluator.h:824
Definition AssignEvaluator.h:814
Definition AssignmentFunctors.h:46
Definition AssignmentFunctors.h:21
Definition ProductEvaluators.h:218
Definition BlasUtil.h:403
Definition ProductEvaluators.h:830
Definition ProductEvaluators.h:485
Definition ProductEvaluators.h:488
Definition CoreEvaluators.h:84
Definition CoreEvaluators.h:111
Definition CoreEvaluators.h:91
Definition GeneralProduct.h:155
Definition ProductEvaluators.h:344
Definition ProductEvaluators.h:86
Definition GenericPacketMath.h:107
Definition ProductEvaluators.h:998
Definition ForwardDeclarations.h:164
Definition GeneralProduct.h:52
Definition BinaryFunctors.h:350
Definition BinaryFunctors.h:71
Definition BinaryFunctors.h:33
Definition ProductEvaluators.h:793
Definition AssignmentFunctors.h:67
Definition ProductEvaluators.h:1110
Definition ProductEvaluators.h:758
Definition GenericPacketMath.h:133
Definition PacketMath.h:47