10 #ifndef EIGEN_SKYLINEPRODUCT_H
11 #define EIGEN_SKYLINEPRODUCT_H
15 template<
typename Lhs,
typename Rhs,
int ProductMode>
23 template<
typename LhsNested,
typename RhsNested,
int ProductMode>
31 LhsCoeffReadCost = _LhsNested::CoeffReadCost,
32 RhsCoeffReadCost = _RhsNested::CoeffReadCost,
33 LhsFlags = _LhsNested::Flags,
34 RhsFlags = _RhsNested::Flags,
36 RowsAtCompileTime = _LhsNested::RowsAtCompileTime,
37 ColsAtCompileTime = _RhsNested::ColsAtCompileTime,
40 MaxRowsAtCompileTime = _LhsNested::MaxRowsAtCompileTime,
41 MaxColsAtCompileTime = _RhsNested::MaxColsAtCompileTime,
61 template<
typename LhsNested,
typename RhsNested,
int ProductMode>
63 public traits<SkylineProduct<LhsNested, RhsNested, ProductMode> >
::Base {
75 template<
typename Lhs,
typename Rhs>
81 ProductIsValid = _LhsNested::ColsAtCompileTime ==
Dynamic
82 || _RhsNested::RowsAtCompileTime ==
Dynamic
83 ||
int(_LhsNested::ColsAtCompileTime) ==
int(_RhsNested::RowsAtCompileTime),
84 AreVectors = _LhsNested::IsVectorAtCompileTime && _RhsNested::IsVectorAtCompileTime,
91 INVALID_VECTOR_VECTOR_PRODUCT__IF_YOU_WANTED_A_DOT_OR_COEFF_WISE_PRODUCT_YOU_MUST_USE_THE_EXPLICIT_FUNCTIONS)
93 INVALID_MATRIX_PRODUCT__IF_YOU_WANTED_A_COEFF_WISE_PRODUCT_YOU_MUST_USE_THE_EXPLICIT_FUNCTION)
121 template<
typename Lhs,
typename Rhs,
typename Dest>
129 LhsIsSelfAdjoint = (_Lhs::Flags & SelfAdjointBit) == SelfAdjointBit,
130 ProcessFirstHalf = LhsIsSelfAdjoint
131 && (((_Lhs::Flags & (UpperTriangularBit | LowerTriangularBit)) == 0)
132 || ((_Lhs::Flags & UpperTriangularBit) && !LhsIsRowMajor)
133 || ((_Lhs::Flags & LowerTriangularBit) && LhsIsRowMajor)),
134 ProcessSecondHalf = LhsIsSelfAdjoint && (!ProcessFirstHalf)
145 typename _Lhs::InnerLowerIterator lIt(lhs,
row);
146 const Index stop = lIt.col() + lIt.size();
164 for (
Index lhscol = 0; lhscol < lhs.cols(); lhscol++) {
165 typename _Lhs::InnerUpperIterator uIt(lhs, lhscol);
166 const Index stop = uIt.size() + uIt.row();
167 for (
Index rhscol = 0; rhscol < rhs.cols(); rhscol++) {
170 const Scalar rhsCoeff = rhs.coeff(lhscol, rhscol);
184 template<
typename Lhs,
typename Rhs,
typename Dest>
192 LhsIsSelfAdjoint = (_Lhs::Flags & SelfAdjointBit) == SelfAdjointBit,
193 ProcessFirstHalf = LhsIsSelfAdjoint
194 && (((_Lhs::Flags & (UpperTriangularBit | LowerTriangularBit)) == 0)
195 || ((_Lhs::Flags & UpperTriangularBit) && !LhsIsRowMajor)
196 || ((_Lhs::Flags & LowerTriangularBit) && LhsIsRowMajor)),
197 ProcessSecondHalf = LhsIsSelfAdjoint && (!ProcessFirstHalf)
209 typename _Lhs::InnerUpperIterator uIt(lhs,
row);
210 const Index stop = uIt.col() + uIt.size();
229 for (
Index lhscol = 0; lhscol < lhs.cols(); lhscol++) {
230 typename _Lhs::InnerLowerIterator lIt(lhs, lhscol);
231 const Index stop = lIt.size() + lIt.row();
232 for (
Index rhscol = 0; rhscol < rhs.cols(); rhscol++) {
234 const Scalar rhsCoeff = rhs.coeff(lhscol, rhscol);
248 template<
typename Lhs,
typename Rhs,
typename ResultType,
249 int LhsStorageOrder = traits<Lhs>::Flags&
RowMajorBit>
252 template<
typename Lhs,
typename Rhs,
typename ResultType>
257 skyline_row_major_time_dense_product<Lhs, Rhs, ResultType > (lhs, rhs,
res);
261 template<
typename Lhs,
typename Rhs,
typename ResultType>
266 skyline_col_major_time_dense_product<Lhs, Rhs, ResultType > (lhs, rhs,
res);
285 template<
typename Derived>
286 template<
typename OtherDerived >
295 #endif // EIGEN_SKYLINEPRODUCT_H