Skip to content

Commit 5122dbf

Browse files
authored
Reduce stable_muladdmul branches in generic matvecmul! (#1240)
Since `beta` is not used in this operation, we may set it to a constant to eliminate two of the branches generated by `@stable_muladdmul`.
1 parent 38273fd commit 5122dbf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/matmul.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,7 @@ function __generic_matvecmul!(::typeof(identity), C::AbstractVector, A::Abstract
962962
end
963963
for k = eachindex(B)
964964
aoffs = (k-1)*Astride
965-
b = @stable_muladdmul MulAddMul(alpha,beta)(B[k])
965+
b = @stable_muladdmul MulAddMul(alpha,false)(B[k])
966966
for i = eachindex(C)
967967
C[i] += A[aoffs + i] * b
968968
end

0 commit comments

Comments
 (0)