Add `scalar_cast_product_op`, eliminate boolean product warnings.

The new binary op multiplies two values and returns a value of known type. In cases where scalar_product_op exists, it will use that. Otherwise, it will use operator* and cast the result.

This is used to replace instances of alpha = alpha * a_lhs * a_rhs and avoids multiplying bools (-Wbool-in-int-context).

Modified:

  • GeneralMatrixMatrix.h, generic_product_impl::scaleAndAddTo(...)
  • GeneralProduct.h, gemv_dense_selector::run()
  • ProductEvaluators.h, generic_product_impl::eval_dynamic(...)

Merge request reports

Loading