Skip to content

Commit

Permalink
Update stdlib/LinearAlgebra/src/matmul.jl
Browse files Browse the repository at this point in the history
Co-authored-by: N5N3 <[email protected]>
  • Loading branch information
ranocha and N5N3 authored Nov 23, 2022
1 parent 1ef5ae2 commit d037d73
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions stdlib/LinearAlgebra/src/matmul.jl
Original file line number Diff line number Diff line change
Expand Up @@ -807,15 +807,7 @@ function generic_matvecmul!(C::AbstractVector{R}, tA, A::AbstractVecOrMat, B::Ab
end
for k = 1:mB
aoffs = (k-1)*Astride
bk = B[k]
# We use `false` for `Number`s since `Bool`s are also numbers and
# we assume that we can add them. This should be more efficient in
# general since it avoids allocating a zero number for something
# like `BigFloats`. However, we do not necessarily need to have
# vectors of numbers but can also have vectors of vectors. In this
# case, adding a scalar `false` to the vector-valued entries is
# not defined, so we need to use an appropriate zero.
b = _add(bk, bk isa Number ? false : zero(bk))
b = _add(B[k])
for i = 1:mA
C[i] += A[aoffs + i] * b
end
Expand Down

0 comments on commit d037d73

Please sign in to comment.