Skip to content

Commit

Permalink
Make LinearAlgebra.generic_trimatmul more specific (#2359)
Browse files Browse the repository at this point in the history
  • Loading branch information
tgymnich committed May 6, 2024
1 parent 754bb6c commit 0873eb1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/cublas/linalg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,10 @@ end

if VERSION >= v"1.10-"
# multiplication
LinearAlgebra.generic_trimatmul!(c::StridedCuVector{T}, uploc, isunitc, tfun::Function, A::StridedCuMatrix{T}, b::AbstractVector{T}) where {T<:CublasFloat} =
LinearAlgebra.generic_trimatmul!(c::StridedCuVector{T}, uploc, isunitc, tfun::Function, A::StridedCuMatrix{T}, b::StridedCuVector{T}) where {T<:CublasFloat} =
trmv!(uploc, tfun === identity ? 'N' : tfun === transpose ? 'T' : 'C', isunitc, A, c === b ? c : copyto!(c, b))
# division
LinearAlgebra.generic_trimatdiv!(C::StridedCuVector{T}, uploc, isunitc, tfun::Function, A::StridedCuMatrix{T}, B::AbstractVector{T}) where {T<:CublasFloat} =
LinearAlgebra.generic_trimatdiv!(C::StridedCuVector{T}, uploc, isunitc, tfun::Function, A::StridedCuMatrix{T}, B::StridedCuVector{T}) where {T<:CublasFloat} =
trsv!(uploc, tfun === identity ? 'N' : tfun === transpose ? 'T' : 'C', isunitc, A, C === B ? C : copyto!(C, B))
else
## direct multiplication/division
Expand Down

0 comments on commit 0873eb1

Please sign in to comment.