koblas

UmfpackSparseLapack

The sparse factorization half, backed by SuiteSparse's UMFPACK.

The first host sparse backend koblas has, and the one that shows the sparse seams were drawn correctly: SparseLapack.factor returns a SparseFactorization interface, so UMFPACK's opaque void *Numeric fits behind it without the public model changing at all. Registered at priority 100, matching the dense host-OpenBLAS backend, so it wins over the portable SparseLu wherever SuiteSparse is installed.

A SparseMatrix crosses to umfpack_di_* with no repacking: koblas's CSC invariant is UMFPACK's stated precondition, verified against the headers rather than assumed. That is the whole reason this binding is short.

Two things it deliberately does not do.

It does not implement SparseBlas. A sparse gemv is O(nnz) memory-bound work, so a foreign call has very little to amortize, and UMFPACK does not offer one anyway — the products would have to come from CXSparse or CHOLMOD, each wanting its own struct built per call. koblas's own gemv walks the same arrays with no call overhead at all.

It does not gate on size. Every other host binding in koblas consults a dispatch threshold, because for dense work there is a size below which the foreign call costs more than the arithmetic. Here the arithmetic is a whole sparse LU with a fill-reducing ordering, so the crossover is expected to sit at a very small n. "Expected" is not measured: see the threshold task before treating it as settled.

Constructors

UmfpackSparseLapack

constructor()(source)

Properties

name

open override val name: String(source)

A short backend identifier for diagnostics (e.g. "reference").

priority

open override val priority: Int(source)

Relative preference among simultaneously available backends: automatic selection through registerBackend — JVM classpath discovery, native startup registration — picks the highest per half. The portable reference is 0; native-accelerated backends rank above it (koblas-openblas 100, koblas-cblas 90).

Functions

factor

open override fun factor(a: SparseMatrix, equilibrate: Boolean = false, dropTolerance: Double = NO_DROP): SparseFactorization(source)

Factorize a with UMFPACK: symbolic analysis, then numeric factorization.

equilibrate falls back to the portable factorization rather than being ignored. koblas's SparseLu takes it to mean "scale rows by a power of two before pivoting"; UMFPACK scales rows by default as part of its own strategy (UMFPACK_SCALE_SUM) and offers no way to ask for koblas's specific variant, so a caller who asked for that scaling gets it rather than something else with the same name.

dropTolerance falls back for a stronger reason: UMFPACK computes a complete factorization and has no drop threshold at all, so honoring the request is impossible and ignoring it would return factors of a different matrix than the caller asked for, silently accurate where they budgeted for approximate.