Skip to content
Merged
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
20 changes: 10 additions & 10 deletions ext/ArrayInterfaceSparseArraysExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,25 @@
(rowind, colind)
end

function bunchkaufman_instance(A::SparseMatrixCSC)
bunchkaufman(sparse(similar(A, 1, 1)), check = false)
function bunchkaufman_instance(A::SparseMatrixCSC{Tv, Ti}) where {Tv, Ti}
bunchkaufman(SparseMatrixCSC{Tv, Ti}(similar(A, 1, 1)), check = false)

Check warning on line 18 in ext/ArrayInterfaceSparseArraysExt.jl

View check run for this annotation

Codecov / codecov/patch

ext/ArrayInterfaceSparseArraysExt.jl#L17-L18

Added lines #L17 - L18 were not covered by tests
end

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

function ldlt_instance(A::SparseMatrixCSC)
ldlt(sparse(similar(A, 1, 1)), check=false)
function ldlt_instance(A::SparseMatrixCSC{Tv, Ti}) where {Tv, Ti}
ldlt(SparseMatrixCSC{Tv, Ti}(similar(A, 1, 1)), check=false)

Check warning on line 26 in ext/ArrayInterfaceSparseArraysExt.jl

View check run for this annotation

Codecov / codecov/patch

ext/ArrayInterfaceSparseArraysExt.jl#L25-L26

Added lines #L25 - L26 were not covered by tests
end

# Could be optimized but this should work for any real case.
function lu_instance(jac_prototype::SparseMatrixCSC, pivot = DEFAULT_CHOLESKY_PIVOT)
lu(sparse(rand(1,1)))
function lu_instance(jac_prototype::SparseMatrixCSC{Tv, Ti}, pivot = DEFAULT_CHOLESKY_PIVOT) where {Tv, Ti}
lu(SparseMatrixCSC{Tv, Ti}(rand(1,1)))
end

function qr_instance(jac_prototype::SparseMatrixCSC, pivot = DEFAULT_CHOLESKY_PIVOT)
qr(sparse(rand(1,1)))
function qr_instance(jac_prototype::SparseMatrixCSC{Tv, Ti}, pivot = DEFAULT_CHOLESKY_PIVOT) where {Tv, Ti}
qr(SparseMatrixCSC{Tv, Ti}(rand(1,1)))
end

end
Loading