Skip to content

Commit 412845e

Browse files
fix basic bugs
1 parent 5c41c43 commit 412845e

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

src/LinearSolve.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ EnumX.@enumx DefaultAlgorithmChoice begin
9595
CholeskyFactorization
9696
NormalCholeskyFactorization
9797
AppleAccelerateLUFactorization
98+
MKLLUFactorization
9899
end
99100

100101
struct DefaultLinearSolver <: SciMLLinearSolveAlgorithm
@@ -104,6 +105,7 @@ end
104105
include("common.jl")
105106
include("factorization.jl")
106107
include("appleaccelerate.jl")
108+
include("mkl.jl")
107109
include("simplelu.jl")
108110
include("simplegmres.jl")
109111
include("iterative_wrappers.jl")

src/extension_algs.jl

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -339,16 +339,6 @@ A wrapper over the IterativeSolvers.jl MINRES.
339339
"""
340340
function IterativeSolversJL_MINRES end
341341

342-
"""
343-
```julia
344-
MKLLUFactorization()
345-
```
346-
347-
A wrapper over Intel's Math Kernel Library (MKL). Direct calls to MKL in a way that pre-allocates workspace
348-
to avoid allocations and does not require libblastrampoline.
349-
"""
350-
struct MKLLUFactorization <: AbstractFactorization end
351-
352342
"""
353343
```julia
354344
MetalLUFactorization()

src/mkl.jl

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
"""
2+
```julia
3+
MKLLUFactorization()
4+
```
5+
6+
A wrapper over Intel's Math Kernel Library (MKL). Direct calls to MKL in a way that pre-allocates workspace
7+
to avoid allocations and does not require libblastrampoline.
8+
"""
9+
struct MKLLUFactorization <: AbstractFactorization end
10+
111
function getrf!(A::AbstractMatrix{<:Float64};
212
ipiv = similar(A, BlasInt, min(size(A, 1), size(A, 2))),
313
info = Ref{BlasInt}(),
@@ -91,7 +101,7 @@ end
91101
default_alias_A(::MKLLUFactorization, ::Any, ::Any) = false
92102
default_alias_b(::MKLLUFactorization, ::Any, ::Any) = false
93103

94-
function LinearSolve.init_cacheval(alg::MKLLUFactorization, A, b, u, Pl, Pr,
104+
function init_cacheval(alg::MKLLUFactorization, A, b, u, Pl, Pr,
95105
maxiters::Int, abstol, reltol, verbose::Bool,
96106
assumptions::OperatorAssumptions)
97107
ArrayInterface.lu_instance(convert(AbstractMatrix, A)), Ref{BlasInt}()

0 commit comments

Comments
 (0)