Fix 1x1 selfadjoint matrix-vector product bug

This commit is contained in:
Charles Schlosser
2025-07-07 17:32:54 +00:00
parent ac1b29f823
commit 6854da2ea0
2 changed files with 9 additions and 0 deletions

View File

@@ -173,6 +173,11 @@ struct selfadjoint_product_impl<Lhs, LhsMode, false, Rhs, 0, true> {
eigen_assert(dest.rows() == a_lhs.rows() && dest.cols() == a_rhs.cols());
if (a_lhs.rows() == 1) {
dest = (alpha * a_lhs.coeff(0, 0)) * a_rhs;
return;
}
add_const_on_value_type_t<ActualLhsType> lhs = LhsBlasTraits::extract(a_lhs);
add_const_on_value_type_t<ActualRhsType> rhs = RhsBlasTraits::extract(a_rhs);