Skip to content
Snippets Groups Projects
Commit 6b2cb5ce authored by Michel Juillard's avatar Michel Juillard
Browse files

fix bug for sub-matrices

parent c146d429
No related branches found
No related tags found
No related merge requests found
...@@ -36,7 +36,7 @@ for (getrf, getrs, elty) in ...@@ -36,7 +36,7 @@ for (getrf, getrs, elty) in
mm,nn = size(a) mm,nn = size(a)
m = Ref{BlasInt}(mm) m = Ref{BlasInt}(mm)
n = Ref{BlasInt}(nn) n = Ref{BlasInt}(nn)
lda = Ref{BlasInt}(max(1,stride(a,2))) lda = Ref{BlasInt}(max(1,stride(ws.lu,2)))
info = Ref{BlasInt}(0) info = Ref{BlasInt}(0)
ccall((@blasfunc($getrf), liblapack), Cvoid, ccall((@blasfunc($getrf), liblapack), Cvoid,
(Ref{BlasInt},Ref{BlasInt},Ptr{$elty},Ref{BlasInt}, (Ref{BlasInt},Ref{BlasInt},Ptr{$elty},Ref{BlasInt},
...@@ -72,7 +72,7 @@ for (getrf, getrs, elty) in ...@@ -72,7 +72,7 @@ for (getrf, getrs, elty) in
m = Ref{BlasInt}(mm) m = Ref{BlasInt}(mm)
n = Ref{BlasInt}(nn) n = Ref{BlasInt}(nn)
nhrs = Ref{BlasInt}(size(b,2)) nhrs = Ref{BlasInt}(size(b,2))
lda = Ref{BlasInt}(max(1,stride(a,2))) lda = Ref{BlasInt}(max(1,stride(ws.lu,2)))
ldb = Ref{BlasInt}(max(1,stride(b,2))) ldb = Ref{BlasInt}(max(1,stride(b,2)))
info = Ref{BlasInt}(0) info = Ref{BlasInt}(0)
...@@ -90,22 +90,8 @@ for (getrf, getrs, elty) in ...@@ -90,22 +90,8 @@ for (getrf, getrs, elty) in
b::StridedVecOrMat{$elty}, b::StridedVecOrMat{$elty},
ws::LinSolveWs) ws::LinSolveWs)
mm,nn = size(a)
m = Ref{BlasInt}(mm)
n = Ref{BlasInt}(nn)
nhrs = Ref{BlasInt}(size(b,2))
lda = Ref{BlasInt}(max(1,stride(a,2)))
ldb = Ref{BlasInt}(max(1,stride(b,2)))
info = Ref{BlasInt}(0)
lu!(a, ws) lu!(a, ws)
ccall((@blasfunc($getrs), liblapack), Cvoid, linsolve_core_no_lu!(a, b, ws)
(Ref{UInt8},Ref{BlasInt},Ref{BlasInt},Ptr{$elty},Ref{BlasInt},
Ptr{BlasInt},Ptr{$elty},Ref{BlasInt},Ref{BlasInt}),
$transchar, n, nhrs, ws.lu, lda, ws.ipiv, b, ldb, info)
if info[] != 0
chklapackerror(info[])
end
end end
end end
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment