Skip to content

Commit

Permalink
Restrict to Float64
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Feb 13, 2024
1 parent 8e5e41e commit 6fd247c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/default.jl
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,7 @@ function defaultalg(A, b, assump::OperatorAssumptions{Bool})
(__conditioning(assump) === OperatorCondition.IllConditioned ||
__conditioning(assump) === OperatorCondition.WellConditioned)
if length(b) <= 10
# DefaultAlgorithmChoice.GenericLUFactorization
DefaultAlgorithmChoice.RFLUFactorization
DefaultAlgorithmChoice.GenericLUFactorization
elseif appleaccelerate_isavailable()
DefaultAlgorithmChoice.AppleAccelerateLUFactorization
elseif (length(b) <= 100 || (isopenblas() && length(b) <= 500) ||
Expand Down
6 changes: 3 additions & 3 deletions src/factorization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1020,12 +1020,12 @@ function init_cacheval(alg::NormalCholeskyFactorization, A, b, u, Pl, Pr,
return ArrayInterface.cholesky_instance(Symmetric(MType{eltype(A), 2}(undef,0,0)), alg.pivot)

Check warning on line 1020 in src/factorization.jl

View check run for this annotation

Codecov / codecov/patch

src/factorization.jl#L1019-L1020

Added lines #L1019 - L1020 were not covered by tests
end

const PREALLOCATED_NORMALCHOLESKY = ArrayInterface.cholesky_instance(
const PREALLOCATED_NORMALCHOLESKY_SYMMETRIC = ArrayInterface.cholesky_instance(
Symmetric(rand(1, 1)), NoPivot())

function init_cacheval(alg::NormalCholeskyFactorization, A::Matrix, b, u, Pl, Pr,
function init_cacheval(alg::NormalCholeskyFactorization, A::Matrix{Float64}, b, u, Pl, Pr,
maxiters::Int, abstol, reltol, verbose::Bool, assumptions::OperatorAssumptions)
return PREALLOCATED_NORMALCHOLESKY
return PREALLOCATED_NORMALCHOLESKY_SYMMETRIC
end

function init_cacheval(alg::NormalCholeskyFactorization,
Expand Down

0 comments on commit 6fd247c

Please sign in to comment.