Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas committed May 31, 2023
1 parent 73dfa2c commit 1eccc20
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 27 deletions.
39 changes: 20 additions & 19 deletions src/factorization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ end

@static if VERSION < v"1.7-"
function init_cacheval(alg::Union{LUFactorization, GenericLUFactorization},
A::Union{Diagonal,SymTridiagonal}, b, u, Pl, Pr,
maxiters::Int, abstol, reltol, verbose::Bool,
assumptions::OperatorAssumptions)
A::Union{Diagonal, SymTridiagonal}, b, u, Pl, Pr,
maxiters::Int, abstol, reltol, verbose::Bool,
assumptions::OperatorAssumptions)
nothing
end
end
Expand Down Expand Up @@ -160,9 +160,9 @@ end

@static if VERSION < v"1.7-"
function init_cacheval(alg::QRFactorization,
A::Union{Diagonal,SymTridiagonal,Tridiagonal}, b, u, Pl, Pr,
maxiters::Int, abstol, reltol, verbose::Bool,
assumptions::OperatorAssumptions)
A::Union{Diagonal, SymTridiagonal, Tridiagonal}, b, u, Pl, Pr,
maxiters::Int, abstol, reltol, verbose::Bool,
assumptions::OperatorAssumptions)
nothing
end
end
Expand Down Expand Up @@ -232,9 +232,10 @@ function init_cacheval(alg::CholeskyFactorization, A::AbstractSciMLOperator, b,
end

@static if VERSION < v"1.7beta"
function init_cacheval(alg::CholeskyFactorization, A::Union{SymTridiagonal,Tridiagonal}, b, u, Pl, Pr,
maxiters::Int, abstol, reltol, verbose::Bool,
assumptions::OperatorAssumptions)
function init_cacheval(alg::CholeskyFactorization,
A::Union{SymTridiagonal, Tridiagonal}, b, u, Pl, Pr,
maxiters::Int, abstol, reltol, verbose::Bool,
assumptions::OperatorAssumptions)
nothing
end
end
Expand Down Expand Up @@ -309,9 +310,9 @@ end

@static if VERSION < v"1.7-"
function init_cacheval(alg::SVDFactorization,
A::Union{Diagonal,SymTridiagonal,Tridiagonal}, b, u, Pl, Pr,
maxiters::Int, abstol, reltol, verbose::Bool,
assumptions::OperatorAssumptions)
A::Union{Diagonal, SymTridiagonal, Tridiagonal}, b, u, Pl, Pr,
maxiters::Int, abstol, reltol, verbose::Bool,
assumptions::OperatorAssumptions)
nothing
end
end
Expand Down Expand Up @@ -787,7 +788,7 @@ function init_cacheval(alg::RFLUFactorization, A::Matrix{Float64}, b, u, Pl, Pr,
maxiters::Int,
abstol, reltol, verbose::Bool, assumptions::OperatorAssumptions)
ipiv = Vector{LinearAlgebra.BlasInt}(undef, 0)
PREALLOCATED_LU, ipiv
PREALLOCATED_LU, ipiv
end

function init_cacheval(alg::RFLUFactorization,
Expand All @@ -799,9 +800,9 @@ end

@static if VERSION < v"1.7-"
function init_cacheval(alg::RFLUFactorization,
A::Union{Diagonal,SymTridiagonal,Tridiagonal}, b, u, Pl, Pr,
maxiters::Int,
abstol, reltol, verbose::Bool, assumptions::OperatorAssumptions)
A::Union{Diagonal, SymTridiagonal, Tridiagonal}, b, u, Pl, Pr,
maxiters::Int,
abstol, reltol, verbose::Bool, assumptions::OperatorAssumptions)
nothing, nothing
end
end
Expand Down Expand Up @@ -875,9 +876,9 @@ end

@static if VERSION < v"1.7-"
function init_cacheval(alg::NormalCholeskyFactorization,
A::Union{Tridiagonal, SymTridiagonal}, b, u, Pl, Pr,
maxiters::Int, abstol, reltol, verbose::Bool,
assumptions::OperatorAssumptions)
A::Union{Tridiagonal, SymTridiagonal}, b, u, Pl, Pr,
maxiters::Int, abstol, reltol, verbose::Bool,
assumptions::OperatorAssumptions)
nothing
end
end
Expand Down
1 change: 0 additions & 1 deletion test/basictests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ end
end
end


if VERSION > v"1.7-"
@testset "CHOLMOD" begin
# Create a posdef symmetric matrix
Expand Down
14 changes: 7 additions & 7 deletions test/default_algs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ using LinearSolve, LinearAlgebra, SparseArrays, Test
LinearSolve.DefaultAlgorithmChoice.UMFPACKFactorization

@static if VERSION >= v"v1.7-"
# Test inference
A = rand(4, 4)
b = rand(4)
prob = LinearProblem(A, b)
@inferred solve(prob)
@inferred init(prob, nothing)
end
# Test inference
A = rand(4, 4)
b = rand(4)
prob = LinearProblem(A, b)
@inferred solve(prob)
@inferred init(prob, nothing)
end

0 comments on commit 1eccc20

Please sign in to comment.