@@ -587,6 +587,17 @@ function _diag(A::Bidiagonal, k)
587587 end
588588end
589589
590+ """
591+ _MulAddMul_nonzeroalpha(_add::MulAddMul[, ::Val{false}])
592+
593+ Return a new `MulAddMul` with the value of `alpha` potentially set to a literal non-zero
594+ value if permitted by the type (e.g., for `_add.alpha isa Bool`, in which case the `alpha` is
595+ set to `true` in the returned instance).
596+ In other cases, the single-argument call is a no-op and returns `_add` without modifications.
597+
598+ In addition, if `Val(false)` is provided as the second argument,
599+ `beta` is set to `false` in the returned `MulAddMul` instance.
600+ """
590601_MulAddMul_nonzeroalpha (_add:: MulAddMul ) = _add
591602function _MulAddMul_nonzeroalpha (_add:: MulAddMul{ais1,bis0,A} , :: Val{false} ) where {ais1,bis0,A}
592603 MulAddMul {ais1,true,A,Bool} (_add. alpha, false )
@@ -1132,6 +1143,7 @@ function _dibimul!(C, A, B, _add)
11321143 # ensure that we fill off-band elements in the destination
11331144 _rmul_or_fill! (C, _add. beta)
11341145 iszero (_add. alpha) && return C
1146+ # beta is unused in the _dibimul_nonzeroalpha! call, so we set it to false
11351147 _add_nonzeroalpha = _MulAddMul_nonzeroalpha (_add, Val (false ))
11361148 _dibimul_nonzeroalpha! (C, A, B, _add_nonzeroalpha)
11371149 C
0 commit comments