Skip to content

Commit 3480ba3

Browse files
don't require operator conversion for MKL
1 parent 412845e commit 3480ba3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/mkl.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,15 @@ end
101101
default_alias_A(::MKLLUFactorization, ::Any, ::Any) = false
102102
default_alias_b(::MKLLUFactorization, ::Any, ::Any) = false
103103

104+
const PREALLOCATED_MKL_LU = begin
105+
A = rand(0, 0)
106+
luinst = ArrayInterface.lu_instance(A), Ref{BlasInt}()
107+
end
108+
104109
function init_cacheval(alg::MKLLUFactorization, A, b, u, Pl, Pr,
105110
maxiters::Int, abstol, reltol, verbose::Bool,
106111
assumptions::OperatorAssumptions)
107-
ArrayInterface.lu_instance(convert(AbstractMatrix, A)), Ref{BlasInt}()
112+
PREALLOCATED_MKL_LU
108113
end
109114

110115
function SciMLBase.solve!(cache::LinearCache, alg::MKLLUFactorization;

0 commit comments

Comments
 (0)