Workspace queries and argument validation behind potrf, getrf, getrs, getri, gesv and posv.
|
inline |
Validates the arguments of gesv() and gesv_buffer_size().
Checks non-negative extents, a square A, B.rows() == A.rows() and equal batch sizes.
| batchlas::invalid_argument | if any check fails |
| size_t batchlas::gesv_buffer_size | ( | Queue & | ctx, |
| const MatrixView< T, MatrixFormat::Dense > & | A, | ||
| const MatrixView< T, MatrixFormat::Dense > & | B ) |
Workspace, in bytes, that gesv() needs for these operands on this queue.
Takes the same operands as the call, so both resolve the same route.
| batchlas::invalid_argument | if gesv_validate_params() rejects the operands |
|
inline |
Validates the arguments of the positional getrf() entry point.
Checks only non-negative extents. Squareness and the pivot span's length are checked by the option overloads, not here: every native kernel's can_run refuses a non-square view, which sends it to the vendor rather than rejecting it (in a vendor-free build: batchlas::NoRouteError).
| batchlas::invalid_argument | on negative extents |
| size_t batchlas::getrf_buffer_size | ( | Queue & | ctx, |
| const MatrixView< T, MatrixFormat::Dense > & | A ) |
|
inline |
Validates A for getri_buffer_size(): non-negative extents only.
| batchlas::invalid_argument | on negative extents |
|
inline |
Validates A and C for the positional getri(): non-negative extents, C not aliasing A.
| batchlas::invalid_argument | on negative extents of A or C, or if a non-empty C starts at A's storage (getri is out of place on every backend) |
| size_t batchlas::getri_buffer_size | ( | Queue & | ctx, |
| const MatrixView< T, MatrixFormat::Dense > & | A ) |
Workspace, in bytes, that getri() needs for A on this queue.
Takes A alone: the kernel choice, and therefore the size, depends only on A.
|
inline |
Validates the arguments of the positional getrs() entry point.
Checks only non-negative extents. Squareness of A, A.rows() == B.rows(), equal batch sizes and the pivot span's length are checked by the option overloads; on this path a non-conforming pair fails every native can_run and goes to the vendor.
| batchlas::invalid_argument | on negative extents |
| size_t batchlas::getrs_buffer_size | ( | Queue & | ctx, |
| const MatrixView< T, MatrixFormat::Dense > & | A, | ||
| const MatrixView< T, MatrixFormat::Dense > & | B, | ||
| Transpose | transA ) |
Workspace, in bytes, that getrs() needs for these operands on this queue.
|
inline |
Validates the arguments of posv() and posv_buffer_size().
Checks non-negative extents, a square A, B.rows() == A.rows(), equal batch sizes and a valid uplo.
| batchlas::invalid_argument | if any check fails |
| size_t batchlas::posv_buffer_size | ( | Queue & | ctx, |
| const MatrixView< T, MatrixFormat::Dense > & | A, | ||
| const MatrixView< T, MatrixFormat::Dense > & | B, | ||
| Uplo | uplo ) |
Workspace, in bytes, that posv() needs for these operands on this queue.
Takes the same operands as the call, so both resolve the same route.
| batchlas::invalid_argument | if posv_validate_params() rejects the operands |
|
inline |
Validates the arguments of the positional potrf() entry point.
Checks only what no kernel can serve: non-negative extents, a square A and a valid uplo. It does not check the length of a non-empty info span. Called by the public potrf() before the selection key is built.
| batchlas::invalid_argument | on negative extents, a non-square A or an invalid uplo. |
| size_t batchlas::potrf_buffer_size | ( | Queue & | ctx, |
| const MatrixView< T, MatrixFormat::Dense > & | A, | ||
| Uplo | uplo ) |
Workspace, in bytes, that potrf() needs for this shape on this queue.
The size does not depend on whether a caller passes an info span, so the same value serves both potrf() overloads.
| B | backend; the backend-deducing overload takes it from ctx.backend() |
| T | scalar type (float, double, std::complex<float>, std::complex<double>) |
| ctx | queue the factorization will run on (kernel selection reads its device) |
| A | batch of n x n matrices to be factorized |
| uplo | triangle that will be factorized |