Skip to content

Commit

Permalink
Remove matrix * vector specialization for strided arrays
Browse files Browse the repository at this point in the history
This method entirely duplicates the one below it with the exception that
it also does a `convert` on one of the inputs with the result of
`promote_op`, which doesn't make a whole lot of sense in some cases. By
virtue of calling `mul!`, strided arrays that go through the abstract
array method will still hit the same optimized methods that use BLAS.

Fixes #32092.
  • Loading branch information
ararslan committed May 20, 2019
1 parent 6e04733 commit 2ca4c5b
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions stdlib/LinearAlgebra/src/matmul.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ function *(transx::Transpose{<:Any,<:StridedVector{T}}, y::StridedVector{T}) whe
end

# Matrix-vector multiplication
function (*)(A::StridedMatrix{T}, x::StridedVector{S}) where {T<:BlasFloat,S}
TS = promote_op(matprod, T, S)
mul!(similar(x, TS, size(A,1)), A, convert(AbstractVector{TS}, x))
end
function (*)(A::AbstractMatrix{T}, x::AbstractVector{S}) where {T,S}
TS = promote_op(matprod, T, S)
mul!(similar(x,TS,axes(A,1)),A,x)
Expand Down

0 comments on commit 2ca4c5b

Please sign in to comment.