Skip to content

Commit 48ed53f

Browse files
Merge pull request #360 from Wimmerer/umfpack1_9
Update Umfpack constructor for 1.9
2 parents 1b4076e + 4ef8597 commit 48ed53f

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

lib/ArrayInterfaceCore/src/ArrayInterfaceCore.jl

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -453,16 +453,22 @@ function lu_instance(A::Matrix{T}) where {T}
453453
return LU{luT}(similar(A, 0, 0), ipiv, info)
454454
end
455455
function lu_instance(jac_prototype::SparseMatrixCSC)
456-
SuiteSparse.UMFPACK.UmfpackLU(
457-
Ptr{Cvoid}(),
458-
Ptr{Cvoid}(),
459-
1,
460-
1,
461-
jac_prototype.colptr[1:1],
462-
jac_prototype.rowval[1:1],
463-
jac_prototype.nzval[1:1],
464-
0,
465-
)
456+
@static if VERSION < v"1.9.0-DEV.1622"
457+
SuiteSparse.UMFPACK.UmfpackLU(
458+
Ptr{Cvoid}(),
459+
Ptr{Cvoid}(),
460+
1,
461+
1,
462+
jac_prototype.colptr[1:1],
463+
jac_prototype.rowval[1:1],
464+
jac_prototype.nzval[1:1],
465+
0,
466+
)
467+
else
468+
SuiteSparse.UMFPACK.UmfpackLU(
469+
similar(jac_prototype, 1, 1)
470+
)
471+
end
466472
end
467473

468474
"""

0 commit comments

Comments
 (0)