koblas

F64Lapacke

The host LAPACKE through java.lang.foreign. Every shared routine lives in F64DecompositionsAdapter; this supplies the JVM's entry points and measured gates.

Constructors

F64Lapacke

constructor(config: HostBlasConfig = HostBlasConfig())(source)

Properties

isAvailable

open override val isAvailable: Boolean(source)

LAPACKE resolves separately from CBLAS, either inside OpenBLAS or as its own library.

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 the backends offered for one half (F64Blas, F64Decompositions, F64Kernels or a sparse counterpart). registerBackend picks the highest; the portable reference is 0.

Link copied to clipboard
open override val isPortable: Boolean

A binding that calls out, whatever the portable instance it falls back to reports.

Link copied to clipboard

The vector kernels this half's inherited routines run on; the installed ones by default.

Functions

Link copied to clipboard
open fun applyQ(qr: F64QrDecomposition, y: DoubleArray, transpose: Boolean = false): DoubleArray

Apply Q, or Qᵀ when transpose, from qr to a length-m y, into a fresh result (LAPACK dormqr restricted to a single column).

Link copied to clipboard
open override fun applyQInto(qr: F64QrDecomposition, y: DoubleArray, out: DoubleArray, transpose: Boolean = false): DoubleArray

Apply Q, or Qᵀ when transpose, from qr to y into out, which is returned. out may be y.

Link copied to clipboard
open override fun cholesky(a: F64DenseMatrix, policy: CholeskyPolicy = CholeskyPolicy.Strict): F64CholeskyDecomposition

Reads only the lower triangle of the input, and falls back to the portable path on a positive info, which CholeskyPolicy.Regularize needs.

Link copied to clipboard

LU factorization with partial pivoting of a square a (LAPACK dgetrf). a is not modified.

Link copied to clipboard

dgetrf works in place, so out's buffers take the copy of a and the factorization overwrites it.

Link copied to clipboard
open override fun invert(chol: F64CholeskyDecomposition, workspace: Workspace? = null): F64DenseMatrix

dpotri writes only the triangle it is given, so the result is mirrored, and it overwrites the factor, so the factor is copied first.

open override fun invert(lu: F64LuDecomposition, workspace: Workspace? = null): F64DenseMatrix

Invert a general matrix from its LU factorization, returning A⁻¹ given P·A = L·U (LAPACK dgetri). Prefer solve to apply A⁻¹, which costs less and is more accurate.

Link copied to clipboard
open override fun ldl(a: F64DenseMatrix, workspace: Workspace? = null): F64LdlDecomposition

Symmetric indefinite factorization A = L·D·Lᵀ with Bunch-Kaufman pivoting (LAPACK dsytrf, lower). Reads only the lower triangle of a, so an upper-only matrix factors to silent nonsense.

Link copied to clipboard
open override fun qr(a: F64DenseMatrix, workspace: Workspace? = null): F64QrDecomposition

QR factorization A = Q·R of an m×n a via Householder reflections (LAPACK dgeqrf). a is not modified, any shape is accepted, and rank deficiency is not detected.

Link copied to clipboard
open override fun qrPivoted(a: F64DenseMatrix, tolerance: Double = AUTOMATIC_RANK_TOLERANCE, workspace: Workspace? = null): F64PivotedQrDecomposition

QR with column pivoting, A·P = Q·R (LAPACK dgeqp3), reporting F64PivotedQrDecomposition.rank as the count of leading diagonal entries with |R_kk| > tolerance · |R₀₀|. tolerance is a fraction of |R₀₀|; AUTOMATIC_RANK_TOLERANCE derives one from the shape, max(m, n) · ε, and a negative value is rejected.

Link copied to clipboard
open override fun rcond(lu: F64LuDecomposition, anorm: Double, workspace: Workspace? = null): Double

Order-of-magnitude estimate of 1 / (anorm · est(‖A⁻¹‖₁)) (LAPACK dgecon), where anorm is the 1-norm of the unfactored matrix (see norm1). Returns 1.0 when n == 0 and 0.0 when singular.

Link copied to clipboard

Solve A · x = b for the Cholesky factorization chol (LAPACK dpotrs). b is not modified.

Solve A · X = B for all right-hand-side columns of b at once against a symmetric indefinite factorization (LAPACK dsytrs with nrhs).

Solve A · x = b for a symmetric indefinite factorization ldl (LAPACK dsytrs).

open fun solve(lu: F64LuDecomposition, b: F64DenseMatrix, transpose: Boolean = false): F64DenseMatrix

Solve A · X = B, or Aᵀ · X = B when transpose, for all right-hand-side columns of b at once (LAPACK dgetrs with nrhs).

open fun solve(lu: F64LuDecomposition, b: DoubleArray, transpose: Boolean = false): DoubleArray

Solve A · x = b, or Aᵀ · x = b when transpose, for the factorization lu (LAPACK dgetrs).

open fun solve(qr: F64PivotedQrDecomposition, b: DoubleArray, workspace: Workspace? = null): DoubleArray

Least-squares solve from a pivoted factorization, with the column permutation undone. A rank-deficient factorization returns the basic solution, not the minimum-norm one: zero outside the pivoted rank.

open fun solve(qr: F64QrDecomposition, b: DoubleArray, minimumNorm: Boolean = false, workspace: Workspace? = null): DoubleArray

Solve from a QR factorization. By default, finds the least-squares solution min ‖A·x − b‖₂ for a tall or square A; it requires full column rank and returns R⁻¹·(Qᵀb). With minimumNorm, finds the minimum-norm solution of a consistent wide system from qr(Aᵀ); it requires full row rank.

Link copied to clipboard

The vector solve stays portable on both bindings: one dsytrs call does not cover its own cost.

open override fun solveInto(ldl: F64LdlDecomposition, b: F64DenseMatrix, out: F64DenseMatrix, workspace: Workspace? = null): F64DenseMatrix

Native only from the configured right-hand-side count, as for the LU multi-RHS solve above.

open override fun solveInto(qr: F64PivotedQrDecomposition, b: DoubleArray, out: DoubleArray, workspace: Workspace? = null): DoubleArray

solve into out, which is returned.

open override fun solveInto(lu: F64LuDecomposition, b: F64DenseMatrix, out: F64DenseMatrix, transpose: Boolean = false, workspace: Workspace? = null): F64DenseMatrix

Solve A · X = B, or Aᵀ · X = B when transpose, into out, which is returned. out may be b, and a workspace lends the transposed direction's n·nrhs staging block.

open override fun solveInto(lu: F64LuDecomposition, b: DoubleArray, out: DoubleArray, transpose: Boolean = false, workspace: Workspace? = null): DoubleArray

Delegated to the portable path for the same reason as a small gemv, the per-call cost.

open override fun solveInto(qr: F64QrDecomposition, b: DoubleArray, out: DoubleArray, minimumNorm: Boolean = false, workspace: Workspace? = null): DoubleArray

solve into out, which is returned. Its length is n by default and m with minimumNorm. A workspace lends the intermediate for applying Q or Qᵀ.

Link copied to clipboard
open override fun trtri(a: F64DenseMatrix, lower: Boolean, unitDiag: Boolean = false): F64DenseMatrix

Invert a triangular matrix into a fresh result (LAPACK dtrtri), returning T⁻¹ for the lower or upper triangle of the square a, taking the diagonal as 1 when unitDiag.