Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
version:
- '1'
- '1.6'
- '1.7'
- '1.8'
steps:
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@v1
Expand Down
22 changes: 6 additions & 16 deletions src/ArrayInterface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ Returns the number.
"""
bunchkaufman_instance(a::Any) = bunchkaufman(a, check = false)

@static if VERSION < v"1.7beta"
@static if VERSION < v"1.8beta"
const DEFAULT_CHOLESKY_PIVOT = Val(false)
else
const DEFAULT_CHOLESKY_PIVOT = LinearAlgebra.NoPivot()
Expand All @@ -498,10 +498,6 @@ end
function cholesky_instance(A::Matrix{T}, pivot = DEFAULT_CHOLESKY_PIVOT) where {T}
return cholesky(similar(A, 0, 0), pivot, check = false)
end

function cholesky_instance(A::Union{SparseMatrixCSC,Symmetric{<:Number,<:SparseMatrixCSC}}, pivot = DEFAULT_CHOLESKY_PIVOT)
cholesky(sparse(similar(A, 1, 1)), check = false)
end
else
"""
cholesky_instance(A, pivot = LinearAlgebra.RowMaximum()) -> cholesky_factorization_instance
Expand All @@ -512,10 +508,10 @@ else
function cholesky_instance(A::Matrix{T}, pivot = DEFAULT_CHOLESKY_PIVOT) where {T}
return cholesky(similar(A, 0, 0), pivot)
end
end

function cholesky_instance(A::Union{SparseMatrixCSC,Symmetric{<:Number,<:SparseMatrixCSC}}, pivot = DEFAULT_CHOLESKY_PIVOT)
cholesky(sparse(similar(A, 1, 1)))
end
function cholesky_instance(A::Union{SparseMatrixCSC,Symmetric{<:Number,<:SparseMatrixCSC}}, pivot = DEFAULT_CHOLESKY_PIVOT)
cholesky(sparse(similar(A, 1, 1)), check = false)
end

"""
Expand Down Expand Up @@ -553,14 +549,8 @@ function ldlt_instance(A::Matrix{T}) where {T}
return ldlt(SymTridiagonal(similar(A, 0, 0)))
end

@static if VERSION > v"1.9-"
function ldlt_instance(A::SparseMatrixCSC)
ldlt(sparse(similar(A, 1, 1)), check=false)
end
else
function ldlt_instance(A::SparseMatrixCSC)
ldlt(sparse(similar(A, 1, 1)))
end
function ldlt_instance(A::SparseMatrixCSC)
ldlt(sparse(similar(A, 1, 1)), check=false)
end

"""
Expand Down