Skip to content
This repository has been archived by the owner on Mar 12, 2021. It is now read-only.

Commit

Permalink
Add direct BLAS calls for trmm! and trsm!.
Browse files Browse the repository at this point in the history
  • Loading branch information
aterenin committed May 5, 2020
1 parent 9b2ec43 commit 7ee3747
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/blas/linalg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -301,3 +301,11 @@ LinearAlgebra.rdiv!(A::CuMatrix{T}, B::Transpose{T,<:LowerTriangular{T, <:CuMatr
CUBLAS.trsm!('R', 'L', 'T', 'N', one(T), parent(parent(B)), A)
LinearAlgebra.rdiv!(A::CuMatrix{T}, B::Transpose{T,<:UnitLowerTriangular{T, <:CuMatrix{T}}}) where T<:CublasFloat =
CUBLAS.trsm!('R', 'L', 'T', 'U', one(T), parent(parent(B)), A)

# Direct BLAS calls
for T in Base.uniontypes(CublasFloat)
@eval LinearAlgebra.BLAS.trmm!(side::AbstractChar, uplo::AbstractChar, transa::AbstractChar, diag::AbstractChar, alpha::$T, A::CuMatrix{$T}, B::CuMatrix{$T}) =
CuArrays.CUBLAS.trmm!(side, uplo, transa, diag, alpha, A, B, B)
@eval LinearAlgebra.BLAS.trsm!(side::AbstractChar, uplo::AbstractChar, transa::AbstractChar, diag::AbstractChar, alpha::$T, A::CuMatrix{$T}, B::CuMatrix{$T}) =
CuArrays.CUBLAS.trsm!(side, uplo, transa, diag, alpha, A, B)
end

0 comments on commit 7ee3747

Please sign in to comment.