mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-13 04:09:10 +08:00
Use numext::fma for sparse x dense dot product.
This commit is contained in:
parent
cc0be00435
commit
8ac2fb077d
@ -36,10 +36,10 @@ inline typename internal::traits<Derived>::Scalar SparseMatrixBase<Derived>::dot
|
||||
Scalar res1(0);
|
||||
Scalar res2(0);
|
||||
for (; i; ++i) {
|
||||
res1 += numext::conj(i.value()) * other.coeff(i.index());
|
||||
res1 = numext::fma(numext::conj(i.value()), other.coeff(i.index()), res1);
|
||||
++i;
|
||||
if (i) {
|
||||
res2 += numext::conj(i.value()) * other.coeff(i.index());
|
||||
res2 = numext::fma(numext::conj(i.value()), other.coeff(i.index()), res2);
|
||||
}
|
||||
}
|
||||
return res1 + res2;
|
||||
|
Loading…
x
Reference in New Issue
Block a user