You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/mkl/interfaces.jl
+25-6Lines changed: 25 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -7,16 +7,35 @@ function LinearAlgebra.generic_matvecmul!(C::oneVector{T}, tA::AbstractChar, A::
7
7
sparse_gemv!(tA, _add.alpha, A, B, _add.beta, C)
8
8
end
9
9
10
+
function LinearAlgebra.generic_matvecmul!(C::oneVector{T}, tA::AbstractChar, A::oneSparseMatrixCSC{T}, B::oneVector{T}, _add::MulAddMul) where T <:BlasReal
11
+
tA = tA in ('S', 's', 'H', 'h') ?'T':flip_trans(tA)
12
+
sparse_gemv!(tA, _add.alpha, A, B, _add.beta, C)
13
+
end
14
+
10
15
function LinearAlgebra.generic_matmatmul!(C::oneMatrix{T}, tA, tB, A::oneSparseMatrixCSR{T}, B::oneMatrix{T}, _add::MulAddMul) where T <:BlasFloat
11
16
tA = tA in ('S', 's', 'H', 'h') ?'N': tA
12
17
tB = tB in ('S', 's', 'H', 'h') ?'N': tB
13
18
sparse_gemm!(tA, tB, _add.alpha, A, B, _add.beta, C)
14
19
end
15
20
16
-
for SparseMatrixType in (:oneSparseMatrixCSR,)
17
-
@evalbegin
18
-
function LinearAlgebra.generic_trimatdiv!(C::oneVector{T}, uploc, isunitc, tfun::Function, A::$SparseMatrixType{T}, B::oneVector{T}) where T <:BlasFloat
19
-
sparse_trsv!(uploc, tfun === identity ?'N': tfun === transpose ?'T':'C', isunitc, one(T), A, B, C)
20
-
end
21
-
end
21
+
function LinearAlgebra.generic_matmatmul!(C::oneMatrix{T}, tA, tB, A::oneSparseMatrixCSC{T}, B::oneMatrix{T}, _add::MulAddMul) where T <:BlasReal
22
+
tA = tA in ('S', 's', 'H', 'h') ?'T':flip_trans(tA)
23
+
tB = tB in ('S', 's', 'H', 'h') ?'N': tB
24
+
sparse_gemm!(tA, tB, _add.alpha, A, B, _add.beta, C)
25
+
end
26
+
27
+
function LinearAlgebra.generic_trimatdiv!(C::oneVector{T}, uploc, isunitc, tfun::Function, A::oneSparseMatrixCSR{T}, B::oneVector{T}) where T <:BlasFloat
28
+
sparse_trsv!(uploc, tfun === identity ?'N': tfun === transpose ?'T':'C', isunitc, one(T), A, B, C)
29
+
end
30
+
31
+
function LinearAlgebra.generic_trimatdiv!(C::oneVector{T}, uploc, isunitc, tfun::Function, A::oneSparseMatrixCSC{T}, B::oneVector{T}) where T <:BlasReal
32
+
sparse_trsv!(flip_uplo(uploc), tfun === identity ?'N': tfun === transpose ?'T':'C', isunitc, one(T), A, B, C)
33
+
end
34
+
35
+
function LinearAlgebra.generic_trimatdiv!(C::oneMatrix{T}, uploc, isunitc, tfun::Function, A::oneSparseMatrixCSR{T}, B::oneMatrix{T}) where T <:BlasFloat
36
+
sparse_trsm!(uploc, tfun === identity ?'N': tfun === transpose ?'T':'C', 'N', isunitc, one(T), A, B, C)
37
+
end
38
+
39
+
function LinearAlgebra.generic_trimatdiv!(C::oneMatrix{T}, uploc, isunitc, tfun::Function, A::oneSparseMatrixCSC{T}, B::oneMatrix{T}) where T <:BlasReal
40
+
sparse_trsm!(flip_uplo(uploc), tfun === identity ?'N': tfun === transpose ?'T':'C', 'N', isunitc, one(T), A, B, C)
0 commit comments