10 #ifndef EIGEN_SELFADJOINT_MATRIX_VECTOR_H
11 #define EIGEN_SELFADJOINT_MATRIX_VECTOR_H
23 template<
typename Scalar,
typename Index,
int StorageOrder,
int UpLo,
bool ConjugateLhs,
bool ConjugateRhs,
int Version=Specialized>
26 template<
typename Scalar,
typename Index,
int StorageOrder,
int UpLo,
bool ConjugateLhs,
bool ConjugateRhs,
int Version>
39 template<
typename Scalar,
typename Index,
int StorageOrder,
int UpLo,
bool ConjugateLhs,
bool ConjugateRhs,
int Version>
53 IsRowMajor = StorageOrder==
RowMajor ? 1 : 0,
54 IsLower = UpLo ==
Lower ? 1 : 0,
55 FirstTriangular = IsRowMajor == IsLower
78 Packet ptmp0 = pset1<Packet>(t0);
80 Packet ptmp1 = pset1<Packet>(t1);
83 Packet ptmp2 = pset1<Packet>(t2);
85 Packet ptmp3 = pset1<Packet>(t3);
87 Index starti = FirstTriangular ? 0 :
j+2;
90 Index alignedEnd = alignedStart + ((endi-alignedStart)/(PacketSize))*(PacketSize);
105 for (
Index i=starti;
i<alignedStart; ++
i)
117 for (
Index i=alignedStart;
i<alignedEnd;
i+=PacketSize)
119 Packet A0i = ploadu<Packet>(a0It); a0It += PacketSize;
120 Packet A1i = ploadu<Packet>(a1It); a1It += PacketSize;
121 Packet Bi = ploadu<Packet>(rhsIt); rhsIt += PacketSize;
122 Packet Xi = pload <Packet>(resIt);
124 Xi = pcj0.
pmadd(A0i,ptmp0, pcj0.
pmadd(A1i,ptmp1,Xi));
125 ptmp2 = pcj1.
pmadd(A0i, Bi, ptmp2);
126 ptmp3 = pcj1.
pmadd(A1i, Bi, ptmp3);
127 pstore(resIt,Xi); resIt += PacketSize;
129 for (
Index i=alignedEnd;
i<endi;
i++)
146 for (
Index i=FirstTriangular ? 0 :
j+1;
i<(FirstTriangular ?
j :
size);
i++)
163 template<
typename Lhs,
int LhsMode,
typename Rhs>
164 struct selfadjoint_product_impl<
Lhs,LhsMode,false,
Rhs,0,true>
178 template<
typename Dest>
186 eigen_assert(dest.rows()==a_lhs.rows() && dest.cols()==a_rhs.cols());
191 Scalar actualAlpha =
alpha * LhsBlasTraits::extractScalarFactor(a_lhs)
192 * RhsBlasTraits::extractScalarFactor(a_rhs);
195 EvalToDest = (Dest::InnerStrideAtCompileTime==1),
196 UseRhs = (ActualRhsTypeCleaned::InnerStrideAtCompileTime==1)
203 EvalToDest ? dest.data() : static_dest.data());
206 UseRhs ?
const_cast<RhsScalar*
>(rhs.data()) : static_rhs.data());
210 #ifdef EIGEN_DENSE_STORAGE_CTOR_PLUGIN
212 EIGEN_DENSE_STORAGE_CTOR_PLUGIN
214 MappedDest(actualDestPtr, dest.size()) = dest;
219 #ifdef EIGEN_DENSE_STORAGE_CTOR_PLUGIN
221 EIGEN_DENSE_STORAGE_CTOR_PLUGIN
228 int(LhsUpLo), bool(LhsBlasTraits::NeedToConjugate), bool(RhsBlasTraits::NeedToConjugate)>
::run
231 &lhs.coeffRef(0,0), lhs.outerStride(),
238 dest = MappedDest(actualDestPtr, dest.size());
242 template<
typename Lhs,
typename Rhs,
int RhsMode>
243 struct selfadjoint_product_impl<
Lhs,0,true,
Rhs,RhsMode,false>
248 template<
typename Dest>
262 #endif // EIGEN_SELFADJOINT_MATRIX_VECTOR_H