makes rank 2 update function conformant to BLAS HER2

This commit is contained in:
Gael Guennebaud 2010-11-19 16:50:15 +01:00
parent e14f14642d
commit f369b5a711

View File

@ -43,7 +43,7 @@ struct selfadjoint_rank2_update_selector<Scalar,Index,UType,VType,Lower>
for (Index i=0; i<size; ++i)
{
Map<Matrix<Scalar,Dynamic,1> >(mat+stride*i+i, size-i) +=
(alpha * conj(u.coeff(i))) * v.tail(size-i)
(conj(alpha) * conj(u.coeff(i))) * v.tail(size-i)
+ (alpha * conj(v.coeff(i))) * u.tail(size-i);
}
}
@ -57,7 +57,7 @@ struct selfadjoint_rank2_update_selector<Scalar,Index,UType,VType,Upper>
const Index size = u.size();
for (Index i=0; i<size; ++i)
Map<Matrix<Scalar,Dynamic,1> >(mat+stride*i, i+1) +=
(alpha * conj(u.coeff(i))) * v.head(i+1)
(conj(alpha) * conj(u.coeff(i))) * v.head(i+1)
+ (alpha * conj(v.coeff(i))) * u.head(i+1);
}
};