Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions src/matmul.jl
Original file line number Diff line number Diff line change
Expand Up @@ -951,20 +951,18 @@ function __generic_matvecmul!(::typeof(identity), C::AbstractVector, A::Abstract
alpha::Number, beta::Number)
Astride = size(A, 1)
@inbounds begin
for i = eachindex(C)
if !iszero(beta)
C[i] *= beta
elseif length(B) == 0
for i in eachindex(C)
if length(B) == 0
C[i] = false
else
C[i] = zero(A[i]*B[1] + A[i]*B[1])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really see how to get this working, without modifying the corresponding test case, which fails for all commits on this branch. We need this sum here to be able to promote to the eltype of C, but we don't have zero available for neither A nor B. If this doesn't affect performance too much, maybe it's not worth it after all?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, probably not worth it

@stable_muladdmul _modify!(MulAddMul(alpha, beta), A[i]*B[1], C, i)
end
end
for k = eachindex(B)
for k in @view eachindex(B)[2:end]
aoffs = (k-1)*Astride
b = @stable_muladdmul MulAddMul(alpha,false)(B[k])
for i = eachindex(C)
C[i] += A[aoffs + i] * b
= @stable_muladdmul MulAddMul(alpha,false)(B[k])
for i in eachindex(C)
C[i] += A[aoffs + i] *
end
end
end
Expand Down
Loading