Unified numerical engine · JDistlib 0.10.0

One linear-algebra contract from portable CPU to GPU

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

Dense and sparse primitives share one shape

AreaReleased operationsReuse support
Level 1scale, copy, swap, AXPY, dot, norm, absolute sum, absolute maximumstrided caller-owned vectors
DenseGEMV/GEMM, rank updates, symmetric multiply/rank-k updates, triangular solvesoffsets, leading dimensions, batching, prepared fixed operands
Sparse CSRmatrix-vector, matrix-dense, CSR-by-CSR, triangular solvecanonical output and prepared provider storage
FactorizationCholesky, LU, LDL', pivoted QR, symmetric/generalized eigen, thin SVDfactor 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

Factor once, solve and inspect repeatedly

Positive definite

Cholesky supports solves and log determinants. Sparse Cholesky adds natural or minimum-degree ordering and original-coordinate solutions.

General systems

Partial-pivoted LU supports vector or multiple-right-side solves plus determinant sign and log-absolute-determinant metadata.

Symmetric indefinite

Pivoted LDL' retains 1x1 and 2x2 blocks for stable solves and determinant inspection.

Least squares and spectra

Pivoted QR reports numerical rank; eigen, generalized eigen, and thin SVD cover spectral and rank-deficient workflows.

Prepared operands

Avoid rebuilding or retransferring fixed matrices

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. Batched entry points amortize dispatch for collections of independent products or factors.

Explicit capability boundary

Know which machine and implementation did the work

ProviderRoleInstallation boundary
Java CPUportable deterministic reference and universal fallbackalways available
oneMKLnative CBLAS/LAPACKE plus reusable PARDISO sparse factorizationsystem oneMKL runtime
OpenBLASnative CBLAS/LAPACKE dense operations and factors when exportedsystem OpenBLAS runtime
CUDANVIDIA device kernels and resident prepared dense/CSR operandscompatible driver and NVRTC
OpenCLportable GPU kernels and resident prepared dense/CSR operandsFP64-capable OpenCL implementation
VulkanSPIR-V compute kernels and resident prepared dense operandsVulkan 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.

Library foundation

Ready for regression, REML, pedigree, and graphical-model packages

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.