Positive definite
Cholesky supports solves and log determinants. Sparse Cholesky adds natural or minimum-degree ordering and original-coordinate solutions.
Unified numerical engine · JDistlib 0.10.2
Use matching FP64 and FP32 dense, sparse, and factorization APIs while JDistlib owns provider discovery, device reuse, capability reporting, and checked portable fallbacks.
FP64 and FP32
| Area | Released operations | Reuse support |
|---|---|---|
| Level 1 | scale, copy, swap, AXPY, dot, norm, absolute sum, absolute maximum | strided caller-owned vectors |
| Dense | GEMV/GEMM, rank updates, symmetric multiply/rank-k updates, triangular solves | offsets, leading dimensions, batching, prepared fixed operands |
| Sparse CSR | matrix-vector, matrix-dense, CSR-by-CSR, triangular solve | canonical output and prepared provider storage |
| Factorization | Cholesky, LU, LDL', pivoted QR, symmetric/generalized eigen, thin SVD | factor objects, repeated solves, determinant metadata |
Dense storage is row-major. Standard d* and s* prefixes distinguish double[] and float[] without introducing a second naming system.
Reusable decomposition results
Cholesky supports solves and log determinants. Sparse Cholesky adds natural or minimum-degree ordering and original-coordinate solutions.
Partial-pivoted LU supports vector or multiple-right-side solves plus determinant sign and log-absolute-determinant metadata.
Pivoted LDL' retains 1x1 and 2x2 blocks for stable solves and determinant inspection.
Pivoted QR reports numerical rank; eigen, generalized eigen, and thin SVD cover spectral and rank-deficient workflows.
Prepared operands
try (ComputeSelection selected = ComputeBackends.select(Compute.AUTO);
PreparedDenseMatrix prepared =
selected.backend().prepareDge(a, rows, shared)) {
prepared.multiply(MatrixTranspose.NONE,
1.0, right, columns, 0.0, result);
}
Prepared dense handles can retain the fixed matrix in a native CPU or CUDA/OpenCL/Vulkan provider buffer. Prepared sparse Cholesky retains symbolic analysis and accepts numeric refactorization when the authoritative CSR structure is unchanged. GPU numeric factors and solves remain in provider buffers; symbolic analysis remains host-side. Batched entry points amortize dispatch for collections of independent products or factors.
Explicit capability boundary
| Provider | Role | Installation boundary |
|---|---|---|
| Java CPU | portable deterministic reference and universal fallback | always available |
| oneMKL | native CBLAS/LAPACKE plus reusable PARDISO sparse factorization | system oneMKL runtime |
| OpenBLAS | native CBLAS/LAPACKE, with optional CHOLMOD 5+ sparse factors | system OpenBLAS; optional SuiteSparse runtime |
| CUDA | NVIDIA device kernels and resident prepared dense/CSR factors | compatible driver and NVRTC |
| OpenCL | portable GPU kernels and resident prepared dense/CSR factors | FP64-capable OpenCL implementation |
| Vulkan | SPIR-V kernels and resident prepared dense/CSR factors | Vulkan device with shaderFloat64 |
ComputeCapabilities reports the backend, device, memory, precision, dense/sparse acceleration, native factorization, prepared storage, reusable sparse factorization, and batching support. Execution plans separately identify portable fallback. Numerical results are tolerance-checked, but parallel reduction order means cross-hardware bit identity is not promised.
Scientific sources
Library foundation
JDistlib now owns the low-level numerical and provider layer. A downstream package can focus on design matrices, formula handling, statistical algorithms, variance-component optimization, pedigree construction, diagnostics, and result objects. Additional primitives can be added when those real workloads expose a measured gap.