Designated-initialiser option structs accepted by the entry points.
Each entry point here takes its non-matrix arguments as one designated-initialiser struct, so a call names only what differs from the defaults:
Every overload comes twice: f(ctx, ...) takes the backend from the Queue and checks that pointer arguments are device-accessible; f<Backend>(ctx, ...) fixes it at compile time. T is always deduced from the matrix arguments, never from the option struct. Matrix arguments may be Matrix or MatrixView.
The LAPACK-style calls (potrf, getrf, getrs, getri, geqrf, orgqr, syev, ormqr, gesvd) come with and without a Span<std::byte> ws argument. Without it, scratch is leased from the Queue's arena, sized by the matching *_buffer_size; on an out-of-order queue releasing the lease drains the queue, so pass your own span there to stay asynchronous. Every option overload, both spellings, with and without ws, checks shapes (squareness, matching rows and batch sizes, minimum span lengths) and throws batchlas::invalid_argument on a violation; only the deducing spelling also checks pointers. The ordinary spelling with non-const lvalue arguments can resolve to the queue-dispatch overload, which lands on the f<Backend> form, so that form must check too.
Every uplo defaults to Uplo::Lower. With an explicit workspace, write PotrfOptions{}, never a bare {}.
The *Params structs of blas/extensions.hh are ordinary trailing arguments, not option structs; see docs/cpp-api.md. Design notes: API conventions.
|
inline |
gemm with a compile-time backend; same contract as the Queue-deducing overload, without the pointer check.
| Back | backend to run on |
Definition at line 278 of file options.hh.
|
inline |
Batched matrix product \(C_i := \alpha\,\mathrm{op}(A_i)\,\mathrm{op}(B_i) + \beta C_i\).
A batch whose items carry differing active extents is handled natively.
| MA,MB,MC | Matrix or MatrixView, dense; T is deduced from A |
| ctx | queue; supplies the backend |
| A | op(A) is m x k per item |
| B | op(B) is k x n per item |
| C | m x n per item; read when beta != 0, overwritten |
| opts | alpha, beta, transA, transB, precision |
| std::invalid_argument | if a pointer is not reachable from the queue's device |
Definition at line 298 of file options.hh.
|
inline |
gemv with a compile-time backend; same contract as the Queue-deducing overload, without the pointer check.
| Back | backend to run on |
Definition at line 308 of file options.hh.
|
inline |
Batched matrix-vector product \(y_i := \alpha\,\mathrm{op}(A_i)\,x_i + \beta y_i\).
| ctx | queue; supplies the backend |
| A | op(A) is m x n per item |
| x | length n per item |
| y | length m per item; overwritten |
| opts | alpha, beta, transA |
| std::invalid_argument | if a pointer is not reachable from the queue's device |
Definition at line 323 of file options.hh.
|
inline |
symm with a compile-time backend; same contract as the Queue-deducing overload, without the pointer check.
| Back | backend to run on |
Definition at line 335 of file options.hh.
|
inline |
Batched symmetric product \(C := \alpha AB + \beta C\) (Left) or \(\alpha BA + \beta C\) (Right).
| A | symmetric, m x m (Left) or n x n (Right); only the uplo triangle is read |
| B | m x n per item |
| C | m x n per item; overwritten |
| opts | alpha, beta, side, uplo |
| std::invalid_argument | if a pointer is not reachable from the queue's device |
Definition at line 350 of file options.hh.
|
inline |
hemm with a compile-time backend; same contract as the Queue-deducing overload, without the pointer check.
| Back | backend to run on |
Definition at line 362 of file options.hh.
|
inline |
Batched Hermitian product; as symm() with A Hermitian.
The unread triangle is taken as the conjugate transpose of the uplo one and the diagonal's imaginary part as zero, whatever is stored there.
| opts | alpha, beta, side, uplo |
| std::invalid_argument | if a pointer is not reachable from the queue's device |
Definition at line 378 of file options.hh.
|
inline |
herk with a compile-time backend; same contract as the Queue-deducing overload, without the pointer check.
| Back | backend to run on |
Definition at line 390 of file options.hh.
|
inline |
Batched Hermitian rank-k update \(C := \alpha AA^H + \beta C\) (NoTrans) or \(\alpha A^HA + \beta C\) (ConjTrans).
| A | n x k (NoTrans) or k x n (ConjTrans) per item |
| C | n x n per item; only the uplo triangle is written, the other is left exactly as it was (mirror it with hermitize if needed) |
| opts | real alpha and beta, uplo, trans |
| std::invalid_argument | if a pointer is not reachable from the queue's device |
Definition at line 406 of file options.hh.
|
inline |
her2k with a compile-time backend; same contract as the Queue-deducing overload, without the pointer check.
| Back | backend to run on |
Definition at line 418 of file options.hh.
|
inline |
Batched Hermitian rank-2k update \(C := \alpha\,\mathrm{op}(A)\,\mathrm{op}(B)^H + \bar\alpha\,\mathrm{op}(B)\,\mathrm{op}(A)^H + \beta C\).
| A,B | n x k (NoTrans) or k x n (ConjTrans) per item |
| C | n x n per item; only the uplo triangle is written, real diagonal |
| opts | complex alpha, real beta, uplo, trans |
| std::invalid_argument | if a pointer is not reachable from the queue's device |
Definition at line 434 of file options.hh.
|
inline |
syrk with a compile-time backend; same contract as the Queue-deducing overload, without the pointer check.
| Back | backend to run on |
Definition at line 446 of file options.hh.
|
inline |
Batched symmetric rank-k update \(C := \alpha AA^T + \beta C\) (NoTrans) or \(\alpha A^TA + \beta C\) (Trans).
| A | n x k (NoTrans) or k x n (Trans) per item |
| C | n x n per item; only the uplo triangle is written, the other is left exactly as it was (mirror it with symmetrize if needed) |
| opts | alpha, beta, uplo, trans |
| std::invalid_argument | if a pointer is not reachable from the queue's device |
Definition at line 461 of file options.hh.
|
inline |
syr2k with a compile-time backend; same contract as the Queue-deducing overload, without the pointer check.
| Back | backend to run on |
Definition at line 472 of file options.hh.
|
inline |
Batched symmetric rank-2k update \(C := \alpha(\mathrm{op}(A)\,\mathrm{op}(B)^T + \mathrm{op}(B)\,\mathrm{op}(A)^T) + \beta C\).
| A,B | n x k (NoTrans) or k x n (Trans) per item, k > 0 |
| C | n x n per item; only the uplo triangle is written |
| opts | alpha, beta, uplo, trans |
| std::invalid_argument | if a pointer is not reachable from the queue's device |
Definition at line 487 of file options.hh.
|
inline |
trmm with a compile-time backend; same contract as the Queue-deducing overload, without the pointer check.
| Back | backend to run on |
Definition at line 499 of file options.hh.
|
inline |
Batched triangular product, out of place: \(C := \alpha\,\mathrm{op}(A)\,B\) (Left) or \(\alpha B\,\mathrm{op}(A)\) (Right).
Unlike reference BLAS ?trmm, the result goes to C; B is not modified.
| A | triangular, m x m (Left) or n x n (Right); uplo and diag describe it |
| B | m x n per item; read only |
| C | m x n per item; overwritten |
| opts | alpha, side, uplo, trans, diag |
| std::invalid_argument | if a pointer is not reachable from the queue's device |
Definition at line 516 of file options.hh.
|
inline |
trsm with a compile-time backend; same contract as the Queue-deducing overload, without the pointer check.
| Back | backend to run on |
Definition at line 527 of file options.hh.
|
inline |
Batched triangular solve \(\mathrm{op}(A)X = \alpha B\) (Left) or \(X\,\mathrm{op}(A) = \alpha B\) (Right), in place.
| A | triangular, m x m (Left) or n x n (Right); uplo and diag describe it |
| B | m x n per item; overwritten with X |
| opts | alpha, side, uplo, trans, diag |
| std::invalid_argument | if a pointer is not reachable from the queue's device |
Definition at line 540 of file options.hh.
|
inline |
potrf with a compile-time backend and a caller workspace.
| B | backend to run on |
| ws | at least potrf_buffer_size<B, T>(ctx, A, opts.uplo) bytes |
| batchlas::invalid_argument | as the Queue-deducing overload |
Definition at line 573 of file options.hh.
|
inline |
potrf with a compile-time backend; workspace leased from the arena.
| B | backend to run on |
| batchlas::invalid_argument | if A is not square or opts.info is non-empty and short |
Definition at line 584 of file options.hh.
|
inline |
Batched Cholesky factorisation with a caller-owned workspace.
Same contract as the arena overload; the call stays asynchronous on any queue.
| ws | device-accessible scratch of at least potrf_buffer_size bytes; must outlive the kernels |
Definition at line 600 of file options.hh.
|
inline |
Batched Cholesky factorisation \(A_i = L_iL_i^H\) (Lower) or \(U_i^HU_i\) (Upper), in place.
Workspace is leased from the queue's arena (blocking on an out-of-order queue).
| ctx | queue; supplies the backend and the arena |
| A | n x n per item; the uplo triangle is read and overwritten with the factor, the other triangle is not referenced |
| opts | uplo (default Lower) and an optional per-item info span |
| batchlas::invalid_argument | if A is not square or opts.info is non-empty and shorter than the batch |
| std::invalid_argument | if a pointer is not reachable from the queue's device |
Definition at line 622 of file options.hh.
|
delete |
Deleted: makes potrf<B>(ctx, A, {}, ws) ambiguous. Write PotrfOptions{}.
|
delete |
Deleted: makes potrf(ctx, A, {}, ws) ambiguous. Write PotrfOptions{}.
|
inline |
getrf with a compile-time backend; workspace leased from the arena.
| B | backend to run on |
| batchlas::invalid_argument | as the Queue-deducing overload |
Definition at line 656 of file options.hh.
|
inline |
Batched LU factorisation with partial pivoting, \(A_i = P_iL_iU_i\), in place.
Workspace is leased from the queue's arena. L (unit diagonal, implicit) and U overwrite A.
| ctx | queue; supplies the backend and the arena |
| A | n x n per item |
| pivots | at least n * batch_size entries; pass it unchanged to getrs() or getri() (see the pivot format note on the positional getrf) |
| info | optional per-item status: 0 = success, > 0 = index of the first exactly-zero pivot; empty reports nothing |
| batchlas::invalid_argument | if A is not square or a span is too short |
| std::invalid_argument | if a pointer is not reachable from the queue's device |
Definition at line 680 of file options.hh.
|
inline |
getrs with a compile-time backend and a caller workspace.
| B | backend to run on |
| batchlas::invalid_argument | as the Queue-deducing overload |
Definition at line 695 of file options.hh.
|
inline |
getrs with a compile-time backend; workspace leased from the arena.
| B | backend to run on |
| batchlas::invalid_argument | as the Queue-deducing overload |
Definition at line 711 of file options.hh.
|
inline |
Batched LU solve with a caller-owned workspace; otherwise as the arena overload.
| ws | device-accessible scratch of at least getrs_buffer_size bytes |
Definition at line 727 of file options.hh.
|
inline |
Batched LU solve \(\mathrm{op}(A_i)X_i = B_i\) from getrf()'s factors, in place.
Workspace is leased from the queue's arena. No status is reported: a singular factor produces non-finite or meaningless X without an exception.
| A | n x n per item, already factorised by getrf() |
| B_ | n x nrhs per item; overwritten with X |
| pivots | getrf()'s pivots, at least n * batch_size entries |
| opts | trans |
| batchlas::invalid_argument | if A is not square, A and B_ differ in rows or batch size, or pivots is too short |
| std::invalid_argument | if a pointer is not reachable from the queue's device |
Definition at line 753 of file options.hh.
|
inline |
getri with a compile-time backend; workspace leased from the arena.
| B | backend to run on |
| batchlas::invalid_argument | as the Queue-deducing overload |
Definition at line 770 of file options.hh.
|
inline |
Batched inverse \(A_{\mathrm{inv},i} := A_i^{-1}\) from getrf()'s factors.
Workspace is leased from the queue's arena. A is read only.
| A | n x n per item, already factorised by getrf() |
| Ainv | n x n per item; overwritten with the inverse |
| pivots | getrf()'s pivots, at least n * batch_size entries |
| info | optional per-item status (0 = success); empty reports nothing |
| batchlas::invalid_argument | on a non-square or mismatched operand or a short span |
| std::invalid_argument | if a pointer is not reachable from the queue's device |
Definition at line 796 of file options.hh.
|
inline |
geqrf with a compile-time backend; workspace leased from the arena.
| B | backend to run on |
Definition at line 813 of file options.hh.
|
inline |
Batched Householder QR, \(A_i = Q_iR_i\), in place.
R overwrites the upper triangle of A, the Householder vectors are stored below it, and their scalars go to tau. Workspace is leased from the arena.
| A | m x n per item (rectangular allowed) |
| tau | at least min(m, n) * batch_size entries; item i's scalars start at i * min(m, n) |
| batchlas::invalid_argument | if tau is too short |
| std::invalid_argument | if a pointer is not reachable from the queue's device |
Definition at line 832 of file options.hh.
|
inline |
orgqr with a compile-time backend; workspace leased from the arena.
| B | backend to run on |
Definition at line 844 of file options.hh.
|
inline |
Form the explicit Q of geqrf() in place.
Overwrites A (holding geqrf()'s reflectors) with the first min(m, n) columns of Q. Workspace is leased from the arena.
| A | m x n per item, as left by geqrf() |
| tau | geqrf()'s scalars, at least min(m, n) * batch_size entries |
| batchlas::invalid_argument | if tau is too short |
| std::invalid_argument | if a pointer is not reachable from the queue's device |
Definition at line 862 of file options.hh.
|
inline |
syev with a compile-time backend and a caller workspace.
| B | backend to run on |
| batchlas::invalid_argument | as the Queue-deducing overload |
Definition at line 874 of file options.hh.
|
inline |
syev with a compile-time backend; workspace leased from the arena.
| B | backend to run on |
| batchlas::invalid_argument | as the Queue-deducing overload |
Definition at line 887 of file options.hh.
|
inline |
Batched symmetric/Hermitian eigensolver with a caller-owned workspace; otherwise as the arena overload.
| ws | device-accessible scratch of at least syev_buffer_size bytes |
Definition at line 901 of file options.hh.
|
inline |
Batched symmetric/Hermitian eigendecomposition \(A_i = V_i\Lambda_iV_i^H\).
Workspace is leased from the queue's arena. This spelling reports no per-item convergence status; use the positional syev() with an info span for that.
| A | n x n per item; the uplo triangle is read. Overwritten with the eigenvectors (columns) when opts.jobz == JobType::EigenVectors, left unspecified otherwise |
| W | real, at least n * batch_size entries; eigenvalues ascending per item |
| opts | jobz, uplo |
| batchlas::invalid_argument | if A is not square or W is too short |
| std::invalid_argument | if a pointer is not reachable from the queue's device |
Definition at line 924 of file options.hh.
|
inline |
ormqr with a compile-time backend and a caller workspace.
| B | backend to run on |
| batchlas::invalid_argument | as the Queue-deducing overload |
Definition at line 949 of file options.hh.
|
inline |
ormqr with a compile-time backend; workspace leased from the arena.
| B | backend to run on |
| batchlas::invalid_argument | as the Queue-deducing overload |
Definition at line 963 of file options.hh.
|
inline |
Apply Q from geqrf() with a caller-owned workspace; otherwise as the arena overload.
| ws | device-accessible scratch of at least ormqr_buffer_size bytes, sized with the same block_size_hint |
Definition at line 981 of file options.hh.
|
inline |
Apply the Q of geqrf() to C: \(C_i := \mathrm{op}(Q_i)C_i\) (Left) or \(C_i\,\mathrm{op}(Q_i)\) (Right).
Workspace is leased from the queue's arena.
| A | geqrf()'s output (reflectors below the diagonal), m x k per item |
| C | overwritten with the product |
| tau | geqrf()'s scalars, at least min(A.rows(), A.cols()) * batch_size |
| opts | side, trans, block_size_hint |
| batchlas::invalid_argument | if A and C differ in batch size or tau is too short |
| std::invalid_argument | if a pointer is not reachable from the queue's device |
Definition at line 1003 of file options.hh.
|
inline |
gesvd with a compile-time backend and a caller workspace.
| B | backend to run on |
| batchlas::invalid_argument | as the Queue-deducing overload |
Definition at line 1028 of file options.hh.
|
inline |
gesvd with a compile-time backend; workspace leased from the arena.
| B | backend to run on |
| batchlas::invalid_argument | as the Queue-deducing overload |
Definition at line 1045 of file options.hh.
|
inline |
Batched SVD with a caller-owned workspace; otherwise as the arena overload.
| ws | device-accessible scratch of at least gesvd_buffer_size bytes, sized for the same hermitian_uplo branch |
Definition at line 1071 of file options.hh.
|
inline |
Batched singular value decomposition \(A_i = U_i\Sigma_iV_i^H\).
Workspace is leased from the queue's arena. A is overwritten. This spelling reports no per-item convergence status; use the positional gesvd() with an info span for that.
| A | m x n per item (square when hermitian_uplo is engaged) |
| singular_values | real, at least min(m, n) * batch_size; descending per item |
| U | m x m (All) or m x k (Thin); default-constructed for None |
| Vh | n x n (All) or k x n (Thin); default-constructed for None |
| opts | jobu, jobvh, hermitian_uplo |
| batchlas::invalid_argument | if singular_values is too short, or A is not square with hermitian_uplo engaged |
| std::invalid_argument | if a pointer is not reachable from the queue's device |
Definition at line 1097 of file options.hh.
Files | |
| file | include/batchlas/blas/options.hh |
| Option-struct spellings of the dense BLAS and LAPACK-style entry points. | |
Classes | |
| struct | batchlas::GemmOptions< T > |
| Options for gemm(): \(C := \alpha\,\mathrm{op}(A)\,\mathrm{op}(B) + \beta C\). More... | |
| struct | batchlas::GemvOptions< T > |
| Options for gemv(): \(y := \alpha\,\mathrm{op}(A)\,x + \beta y\). More... | |
| struct | batchlas::SymmOptions< T > |
| Options for symm(): \(C := \alpha A B + \beta C\) (Left) or \(\alpha B A + \beta C\) (Right), A symmetric. More... | |
| struct | batchlas::HemmOptions< T > |
| Options for hemm(): as SymmOptions, with A Hermitian. More... | |
| struct | batchlas::HerkOptions< T > |
| Options for herk(): \(C := \alpha\,\mathrm{op}(A)\,\mathrm{op}(A)^H + \beta C\). More... | |
| struct | batchlas::Her2kOptions< T > |
| Options for her2k(): \(C := \alpha\,\mathrm{op}(A)\,\mathrm{op}(B)^H + \bar\alpha\,\mathrm{op}(B)\,\mathrm{op}(A)^H + \beta C\). More... | |
| struct | batchlas::SyrkOptions< T > |
| Options for syrk(): \(C := \alpha\,\mathrm{op}(A)\,\mathrm{op}(A)^T + \beta C\). More... | |
| struct | batchlas::Syr2kOptions< T > |
| Options for syr2k(): \(C := \alpha(\mathrm{op}(A)\,\mathrm{op}(B)^T + \mathrm{op}(B)\,\mathrm{op}(A)^T) + \beta C\). More... | |
| struct | batchlas::TrmmOptions< T > |
| Options for trmm(): \(C := \alpha\,\mathrm{op}(A)\,B\) (Left) or \(\alpha B\,\mathrm{op}(A)\) (Right). No beta. More... | |
| struct | batchlas::TrsmOptions< T > |
| Options for trsm(): solve \(\mathrm{op}(A)X = \alpha B\) (Left) or \(X\,\mathrm{op}(A) = \alpha B\) (Right). More... | |
| struct | batchlas::PotrfOptions |
| Options for potrf(): Cholesky \(A = LL^H\) (Lower) or \(U^HU\) (Upper). More... | |
| struct | batchlas::GetrsOptions |
| Options for getrs(): solve \(\mathrm{op}(A)X = B\) with getrf's factors. More... | |
| struct | batchlas::SyevOptions |
| Options for syev(): symmetric/Hermitian eigendecomposition. More... | |
| struct | batchlas::OrmqrOptions |
| Options for ormqr(): apply geqrf()'s Q, \(C := \mathrm{op}(Q)C\) (Left) or \(C\,\mathrm{op}(Q)\) (Right). More... | |
| struct | batchlas::GesvdOptions |
| Options for gesvd(): \(A = U\Sigma V^H\). More... | |