F64BlasAdapter
The dense matrix routines a host CBLAS provides, over whichever CblasCalls the platform supplies. Both host bindings are this class plus their own FFI mechanism.
Below the DispatchThresholds gate for its level, each routine hands back to the portable implementation: crossing into a native library costs more than the work saves on a small problem.
Inheritors
Properties
isPortable
A binding that calls out, whatever the portable instance it falls back to reports.
Whether this backend can do work on this host. koblas's own implementations always can, so the default is true; a binding reports whether the library it calls resolved.
The vector kernels this half's inherited routines run on; the installed ones by default.
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.
Functions
ger
A = A + alpha · x · yᵀ (BLAS dger), the dense form a backend can dispatch. The free ger accepts F64VectorView operands and takes a sparse fast path.
symm
C = alpha · A · B + beta · C, or C = alpha · B · A + beta · C when right (BLAS dsymm). Only the lower triangle of a is read; beta == 0.0 overwrites c without reading it.
symv
The shape is checked ahead of the gate: dsymv takes one dimension and a leading dimension, so a non-square matrix would have it read n² entries from a shorter array, past the end of the buffer.
syr
A += alpha · x · xᵀ (BLAS dsyr), writing the triangles uplo selects. syrk is the rank-k form.
syr2
A += alpha · (x · yᵀ + y · xᵀ) (BLAS dsyr2), writing the triangles uplo selects.
syr2k
C = alpha · (op(A) · op(B)ᵀ + op(B) · op(A)ᵀ) + beta · C (BLAS dsyr2k), where op transposes when transpose. Writes the triangles uplo selects.
A non-transposed pair is transposed into scratch first, so pass a workspace to keep a loop over this routine from allocating 2·n·k doubles per call. syrk borrows the same way for its one operand.
syrk
C = alpha · A·Aᵀ + beta · C, or alpha · Aᵀ·A + beta · C when transpose (BLAS dsyrk). Uplo.FULL writes both triangles, unlike standard dsyrk; beta == 0.0 overwrites without reading.
trmm
trmv
x = op(T) · x in place (BLAS dtrmv), the product counterpart of trsv.
trsm
B = alpha · op(T)⁻¹ · B in place, or B = alpha · B · op(T)⁻¹ when right (BLAS dtrsm). Flags follow trsv; the right-hand sides are the columns of b from the left and its rows from the right.
trsv
Solve op(T) · x = b in place (BLAS dtrsv) for the lower or upper triangle of the square a, op transposing when transpose and unitDiag taking the diagonal as 1. x carries b in and x out.
The diagonal is divided by, not tested: dtrsv carries no info and reports nothing, so a singular triangle yields infinities or NaNs and the caller who needs the distinction tests the diagonal first. That is the convention rather than a cost, and trtri shows it: having an info to return, it throws on a zero diagonal. The sparse com.eignex.koblas.sparse.F64SparseBlas.trsv throws too, having no BLAS routine whose silence it has to match.
gemm with alpha = 1, beta = 0, into a fresh matrix. A.cols must equal B.rows.
C = alpha · op(A) · op(B) + beta · C (BLAS dgemm), with shapes op(A): m×k, op(B): k×n, C: m×n. beta == 0.0 overwrites c without reading it.
gemv with alpha = 1, beta = 0, into a fresh result.
gemm
C = alpha · op(A) · op(B) + beta · C (BLAS dgemm), with shapes op(A): m×k, op(B): k×n, C: m×n. beta == 0.0 overwrites c without reading it.
gemv
y = alpha · op(A) · x + beta · y (BLAS dgemv), with op(A) being Aᵀ when transpose. beta == 0.0 overwrites y without reading it.