@@ -51,15 +51,12 @@ sol = solve(prob, alg; Pl = prec)
51
51
"""
52
52
struct HYPREAlgorithm <: SciMLLinearSolveAlgorithm
53
53
solver:: Any
54
-
55
- @static if VERSION >= v " 1.9-"
56
- function HYPREAlgorithm (solver)
57
- ext = Base. get_extension (@__MODULE__ , :LinearSolveHYPREExt )
58
- if ext === nothing
59
- error (" HYPREAlgorithm requires that HYPRE is loaded, i.e. `using HYPRE`" )
60
- else
61
- return new {} (solver)
62
- end
54
+ function HYPREAlgorithm (solver)
55
+ ext = Base. get_extension (@__MODULE__ , :LinearSolveHYPREExt )
56
+ if ext === nothing
57
+ error (" HYPREAlgorithm requires that HYPRE is loaded, i.e. `using HYPRE`" )
58
+ else
59
+ return new {} (solver)
63
60
end
64
61
end
65
62
end
@@ -75,14 +72,12 @@ Requires a sufficiently large `A` to overcome the data transfer costs.
75
72
Using this solver requires adding the package CUDA.jl, i.e. `using CUDA`
76
73
"""
77
74
struct CudaOffloadFactorization <: LinearSolve.AbstractFactorization
78
- @static if VERSION >= v " 1.9-"
79
- function CudaOffloadFactorization ()
80
- ext = Base. get_extension (@__MODULE__ , :LinearSolveCUDAExt )
81
- if ext === nothing
82
- error (" CudaOffloadFactorization requires that CUDA is loaded, i.e. `using CUDA`" )
83
- else
84
- return new {} ()
85
- end
75
+ function CudaOffloadFactorization ()
76
+ ext = Base. get_extension (@__MODULE__ , :LinearSolveCUDAExt )
77
+ if ext === nothing
78
+ error (" CudaOffloadFactorization requires that CUDA is loaded, i.e. `using CUDA`" )
79
+ else
80
+ return new {} ()
86
81
end
87
82
end
88
83
end
@@ -133,83 +128,51 @@ default handling process. This should not be required by most users.
133
128
"""
134
129
MKLPardisoIterate (; kwargs... ) = PardisoJL (; solver_type = 1 , kwargs... )
135
130
136
- @static if VERSION >= v " 1.9-"
137
- """
138
- ```julia
139
- PardisoJL(; nprocs::Union{Int, Nothing} = nothing,
140
- solver_type = nothing,
141
- matrix_type = nothing,
142
- iparm::Union{Vector{Tuple{Int, Int}}, Nothing} = nothing,
143
- dparm::Union{Vector{Tuple{Int, Int}}, Nothing} = nothing)
144
- ```
145
-
146
- A generic method using MKL Pardiso. Specifying `solver_type` is required.
147
-
148
- !!! note
149
-
150
- Using this solver requires adding the package Pardiso.jl, i.e. `using Pardiso`
151
-
152
- ## Keyword Arguments
153
-
154
- For the definition of the keyword arguments, see the Pardiso.jl documentation.
155
- All values default to `nothing` and the solver internally determines the values
156
- given the input types, and these keyword arguments are only for overriding the
157
- default handling process. This should not be required by most users.
158
- """
159
- struct PardisoJL{T1, T2} <: LinearSolve.SciMLLinearSolveAlgorithm
160
- nprocs:: Union{Int, Nothing}
161
- solver_type:: T1
162
- matrix_type:: T2
163
- iparm:: Union{Vector{Tuple{Int, Int}}, Nothing}
164
- dparm:: Union{Vector{Tuple{Int, Int}}, Nothing}
165
-
166
- function PardisoJL (; nprocs:: Union{Int, Nothing} = nothing ,
131
+ """
132
+ ```julia
133
+ PardisoJL(; nprocs::Union{Int, Nothing} = nothing,
167
134
solver_type = nothing,
168
135
matrix_type = nothing,
169
136
iparm::Union{Vector{Tuple{Int, Int}}, Nothing} = nothing,
170
137
dparm::Union{Vector{Tuple{Int, Int}}, Nothing} = nothing)
171
- ext = Base. get_extension (@__MODULE__ , :LinearSolvePardisoExt )
172
- if ext === nothing
173
- error (" PardisoJL requires that Pardiso is loaded, i.e. `using Pardiso`" )
174
- else
175
- T1 = typeof (solver_type)
176
- T2 = typeof (matrix_type)
177
- @assert T1 <: Union{Int, Nothing, ext.Pardiso.Solver}
178
- @assert T2 <: Union{Int, Nothing, ext.Pardiso.MatrixType}
179
- return new {T1, T2} (nprocs, solver_type, matrix_type, iparm, dparm)
180
- end
138
+ ```
139
+
140
+ A generic method using MKL Pardiso. Specifying `solver_type` is required.
141
+
142
+ !!! note
143
+
144
+ Using this solver requires adding the package Pardiso.jl, i.e. `using Pardiso`
145
+
146
+ ## Keyword Arguments
147
+
148
+ For the definition of the keyword arguments, see the Pardiso.jl documentation.
149
+ All values default to `nothing` and the solver internally determines the values
150
+ given the input types, and these keyword arguments are only for overriding the
151
+ default handling process. This should not be required by most users.
152
+ """
153
+ struct PardisoJL{T1, T2} <: LinearSolve.SciMLLinearSolveAlgorithm
154
+ nprocs:: Union{Int, Nothing}
155
+ solver_type:: T1
156
+ matrix_type:: T2
157
+ iparm:: Union{Vector{Tuple{Int, Int}}, Nothing}
158
+ dparm:: Union{Vector{Tuple{Int, Int}}, Nothing}
159
+
160
+ function PardisoJL (; nprocs:: Union{Int, Nothing} = nothing ,
161
+ solver_type = nothing ,
162
+ matrix_type = nothing ,
163
+ iparm:: Union{Vector{Tuple{Int, Int}}, Nothing} = nothing ,
164
+ dparm:: Union{Vector{Tuple{Int, Int}}, Nothing} = nothing )
165
+ ext = Base. get_extension (@__MODULE__ , :LinearSolvePardisoExt )
166
+ if ext === nothing
167
+ error (" PardisoJL requires that Pardiso is loaded, i.e. `using Pardiso`" )
168
+ else
169
+ T1 = typeof (solver_type)
170
+ T2 = typeof (matrix_type)
171
+ @assert T1 <: Union{Int, Nothing, ext.Pardiso.Solver}
172
+ @assert T2 <: Union{Int, Nothing, ext.Pardiso.MatrixType}
173
+ return new {T1, T2} (nprocs, solver_type, matrix_type, iparm, dparm)
181
174
end
182
175
end
183
- else
184
- """
185
- ```julia
186
- PardisoJL(; nprocs::Union{Int, Nothing} = nothing,
187
- solver_type = nothing,
188
- matrix_type = nothing,
189
- iparm::Union{Vector{Tuple{Int, Int}}, Nothing} = nothing,
190
- dparm::Union{Vector{Tuple{Int, Int}}, Nothing} = nothing)
191
- ```
192
-
193
- A generic method using MKL Pardiso. Specifying `solver_type` is required.
194
-
195
- !!! note
196
-
197
- Using this solver requires adding the package Pardiso.jl, i.e. `using Pardiso`
198
-
199
- ## Keyword Arguments
200
-
201
- For the definition of the keyword arguments, see the Pardiso.jl documentation.
202
- All values default to `nothing` and the solver internally determines the values
203
- given the input types, and these keyword arguments are only for overriding the
204
- default handling process. This should not be required by most users.
205
- """
206
- Base. @kwdef struct PardisoJL <: LinearSolve.SciMLLinearSolveAlgorithm
207
- nprocs:: Union{Int, Nothing} = nothing
208
- solver_type:: Any = nothing
209
- matrix_type:: Any = nothing
210
- iparm:: Union{Vector{Tuple{Int, Int}}, Nothing} = nothing
211
- dparm:: Union{Vector{Tuple{Int, Int}}, Nothing} = nothing
212
- end
213
176
end
214
177
215
178
"""
0 commit comments