Skip to content

Commit 16c775e

Browse files
fix and test
1 parent 683d5c3 commit 16c775e

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

ext/LinearSolveMKLExt.jl

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ module LinearSolveMKLExt
22

33
using MKL_jll
44
using LinearAlgebra: BlasInt, LU
5-
using LinearAlgebra.LAPACK: require_one_based_indexing, chkfinite, chkstride1, chkargsok
5+
using LinearAlgebra.LAPACK: require_one_based_indexing, chkfinite, chkstride1,
6+
@blasfunc, chkargsok
67
using LinearAlgebra
78
const usemkl = MKL_jll.is_available()
89

@@ -15,12 +16,7 @@ function getrf!(A::AbstractMatrix{<:Float64}; ipiv = similar(A, BlasInt, min(siz
1516
chkstride1(A)
1617
m, n = size(A)
1718
lda = max(1,stride(A, 2))
18-
19-
if isempty(ipiv)
20-
ipiv = similar(A, BlasInt, min(size(A,1),size(A,2)))
21-
end
22-
23-
ccall((:dgetrf_, MKL_jll.libmkl_rt), Cvoid,
19+
ccall((@blasfunc(dgetrf_), MKL_jll.libmkl_rt), Cvoid,
2420
(Ref{BlasInt}, Ref{BlasInt}, Ptr{Float64},
2521
Ref{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}),
2622
m, n, A, lda, ipiv, info)

test/basictests.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ end
207207
QRFactorization(),
208208
SVDFactorization(),
209209
RFLUFactorization(),
210+
MKLLUFactorization(),
210211
LinearSolve.defaultalg(prob1.A, prob1.b))
211212
@testset "$alg" begin
212213
test_interface(alg, prob1, prob2)

0 commit comments

Comments
 (0)