Skip to content

Package for solving linear systems given an LDLt factorization, with no unnessesary allocations.

License

Notifications You must be signed in to change notification settings

mfalt/CholmodSolve2.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CholmodSolve2

Build Status

Coverage Status

codecov.io

Package for solving linear systems given an LDLt factorization, with no unnessesary allocations.

This package supplies a wrapper for the solve2 routine in SuiteSparse/CHOLMOD, callable using A_ldiv_B!(c, F, b). The package keeps the necessary workspace variables in memory to avoid new allocations on every solve.

Example:

using CholmodSolve2
m = 400;  n = 500;
A = randn(m, n);
Q = sparse([I A'; A -I]);
x = randn(m+n); y = similar(x);
F = ldltfact(Q)
A_ldiv_B!(y, F, x) # Will do some allocations
A_ldiv_B!(y, F, x) # Should be free of allocations
Q*y  x

CHOLMOD reallocates workspace variables if they do not have correct dimensions, even if the allocated space is large enough. This package tries to avoid this by manually reshaping the workspace variables before sending them to CHOLMOD.

There is currently no support for complex vectors or sparse RHS.

About

Package for solving linear systems given an LDLt factorization, with no unnessesary allocations.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages