mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-14 04:35:57 +08:00
make sure our internal selfadjoint*vector product does not use the imaginary part of the diagonal entries
This commit is contained in:
parent
e88901daf4
commit
12bfe5e718
@ -94,7 +94,7 @@ static EIGEN_DONT_INLINE void product_selfadjoint_vector(
|
|||||||
size_t alignedStart = (starti) + first_aligned(&res[starti], endi-starti);
|
size_t alignedStart = (starti) + first_aligned(&res[starti], endi-starti);
|
||||||
alignedEnd = alignedStart + ((endi-alignedStart)/(PacketSize))*(PacketSize);
|
alignedEnd = alignedStart + ((endi-alignedStart)/(PacketSize))*(PacketSize);
|
||||||
|
|
||||||
res[j] += cj0.pmul(A0[j], t0);
|
res[j] += internal::real(A0[j]) * t0;
|
||||||
if(FirstTriangular)
|
if(FirstTriangular)
|
||||||
{
|
{
|
||||||
res[j+1] += cj0.pmul(A1[j+1], t1);
|
res[j+1] += cj0.pmul(A1[j+1], t1);
|
||||||
@ -147,8 +147,9 @@ static EIGEN_DONT_INLINE void product_selfadjoint_vector(
|
|||||||
|
|
||||||
Scalar t1 = cjAlpha * rhs[j];
|
Scalar t1 = cjAlpha * rhs[j];
|
||||||
Scalar t2 = 0;
|
Scalar t2 = 0;
|
||||||
res[j] += cj0.pmul(A0[j],t1);
|
res[j] += internal::real(A0[j]) * t1;
|
||||||
for (Index i=FirstTriangular ? 0 : j+1; i<(FirstTriangular ? j : size); i++) {
|
for (Index i=FirstTriangular ? 0 : j+1; i<(FirstTriangular ? j : size); i++)
|
||||||
|
{
|
||||||
res[i] += cj0.pmul(A0[i], t1);
|
res[i] += cj0.pmul(A0[i], t1);
|
||||||
t2 += cj1.pmul(A0[i], rhs[i]);
|
t2 += cj1.pmul(A0[i], rhs[i]);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user