Package for solving linear systems given an LDLt factorization, with no unnessesary allocations.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
test
.codecov.yml
.gitignore
.travis.yml
LICENSE.md
README.md
REQUIRE
appveyor.yml

README.md

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.