Skip to content

Commit 16805f1

Browse files
Fix BLIS 64 (#699)
1 parent b74bdec commit 16805f1

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

ext/LinearSolveBLISExt.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function getrf!(A::AbstractMatrix{<:ComplexF64};
2727
if isempty(ipiv)
2828
ipiv = similar(A, BlasInt, min(size(A, 1), size(A, 2)))
2929
end
30-
ccall(("zgetrf_", liblapack), Cvoid,
30+
ccall((@blasfunc(zgetrf_), liblapack), Cvoid,
3131
(Ref{BlasInt}, Ref{BlasInt}, Ptr{ComplexF64},
3232
Ref{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}),
3333
m, n, A, lda, ipiv, info)
@@ -47,7 +47,7 @@ function getrf!(A::AbstractMatrix{<:ComplexF32};
4747
if isempty(ipiv)
4848
ipiv = similar(A, BlasInt, min(size(A, 1), size(A, 2)))
4949
end
50-
ccall(("cgetrf_", liblapack), Cvoid,
50+
ccall((@blasfunc(cgetrf_), liblapack), Cvoid,
5151
(Ref{BlasInt}, Ref{BlasInt}, Ptr{ComplexF32},
5252
Ref{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}),
5353
m, n, A, lda, ipiv, info)
@@ -67,7 +67,7 @@ function getrf!(A::AbstractMatrix{<:Float64};
6767
if isempty(ipiv)
6868
ipiv = similar(A, BlasInt, min(size(A, 1), size(A, 2)))
6969
end
70-
ccall(("dgetrf_", liblapack), Cvoid,
70+
ccall((@blasfunc(dgetrf_), liblapack), Cvoid,
7171
(Ref{BlasInt}, Ref{BlasInt}, Ptr{Float64},
7272
Ref{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}),
7373
m, n, A, lda, ipiv, info)
@@ -87,7 +87,7 @@ function getrf!(A::AbstractMatrix{<:Float32};
8787
if isempty(ipiv)
8888
ipiv = similar(A, BlasInt, min(size(A, 1), size(A, 2)))
8989
end
90-
ccall(("sgetrf_", liblapack), Cvoid,
90+
ccall((@blasfunc(sgetrf_), liblapack), Cvoid,
9191
(Ref{BlasInt}, Ref{BlasInt}, Ptr{Float32},
9292
Ref{BlasInt}, Ptr{BlasInt}, Ptr{BlasInt}),
9393
m, n, A, lda, ipiv, info)
@@ -111,7 +111,7 @@ function getrs!(trans::AbstractChar,
111111
throw(DimensionMismatch("ipiv has length $(length(ipiv)), but needs to be $n"))
112112
end
113113
nrhs = size(B, 2)
114-
ccall(("zgetrs_", liblapack), Cvoid,
114+
ccall((@blasfunc(zgetrs_), liblapack), Cvoid,
115115
(Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ptr{ComplexF64}, Ref{BlasInt},
116116
Ptr{BlasInt}, Ptr{ComplexF64}, Ref{BlasInt}, Ptr{BlasInt}, Clong),
117117
trans, n, size(B, 2), A, max(1, stride(A, 2)), ipiv, B, max(1, stride(B, 2)), info,
@@ -136,7 +136,7 @@ function getrs!(trans::AbstractChar,
136136
throw(DimensionMismatch("ipiv has length $(length(ipiv)), but needs to be $n"))
137137
end
138138
nrhs = size(B, 2)
139-
ccall(("cgetrs_", liblapack), Cvoid,
139+
ccall((@blasfunc(cgetrs_), liblapack), Cvoid,
140140
(Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ptr{ComplexF32}, Ref{BlasInt},
141141
Ptr{BlasInt}, Ptr{ComplexF32}, Ref{BlasInt}, Ptr{BlasInt}, Clong),
142142
trans, n, size(B, 2), A, max(1, stride(A, 2)), ipiv, B, max(1, stride(B, 2)), info,
@@ -161,7 +161,7 @@ function getrs!(trans::AbstractChar,
161161
throw(DimensionMismatch("ipiv has length $(length(ipiv)), but needs to be $n"))
162162
end
163163
nrhs = size(B, 2)
164-
ccall(("dgetrs_", liblapack), Cvoid,
164+
ccall((@blasfunc(dgetrs_), liblapack), Cvoid,
165165
(Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ptr{Float64}, Ref{BlasInt},
166166
Ptr{BlasInt}, Ptr{Float64}, Ref{BlasInt}, Ptr{BlasInt}, Clong),
167167
trans, n, size(B, 2), A, max(1, stride(A, 2)), ipiv, B, max(1, stride(B, 2)), info,
@@ -186,7 +186,7 @@ function getrs!(trans::AbstractChar,
186186
throw(DimensionMismatch("ipiv has length $(length(ipiv)), but needs to be $n"))
187187
end
188188
nrhs = size(B, 2)
189-
ccall(("sgetrs_", liblapack), Cvoid,
189+
ccall((@blasfunc(sgetrs_), liblapack), Cvoid,
190190
(Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ptr{Float32}, Ref{BlasInt},
191191
Ptr{BlasInt}, Ptr{Float32}, Ref{BlasInt}, Ptr{BlasInt}, Clong),
192192
trans, n, size(B, 2), A, max(1, stride(A, 2)), ipiv, B, max(1, stride(B, 2)), info,
@@ -248,4 +248,4 @@ function SciMLBase.solve!(cache::LinearCache, alg::BLISLUFactorization;
248248
SciMLBase.build_linear_solution(alg, cache.u, nothing, cache; retcode = ReturnCode.Success)
249249
end
250250

251-
end
251+
end

0 commit comments

Comments
 (0)