Skip to content

Commit 6c6ff18

Browse files
committed
linalg/dense: use the right pattern for Eigen mat += alpha * A * B
1 parent 472569c commit 6c6ff18

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/proxsuite/linalg/dense/core.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -804,11 +804,11 @@ noalias_mul_add_impl(Dst dst, Lhs lhs, Rhs rhs, T factor)
804804

805805
auto dst_ =
806806
MapMut(dst.data(), dst.rows(), dst.cols(), { dst.outerStride() });
807-
dst_.noalias().operator+=(lhs.operator*(rhs).operator*(factor));
807+
dst_.noalias().operator+=(factor * lhs.operator*(rhs));
808808
} else
809809
#endif
810810
{
811-
dst.noalias().operator+=(lhs.operator*(rhs).operator*(factor));
811+
dst.noalias().operator+=(factor * lhs.operator*(rhs));
812812
}
813813
}
814814
} // namespace _detail

0 commit comments

Comments
 (0)