7#include <initializer_list>
60template <
typename... Args>
62 const char*
const* names,
const Args&... args) {
65 (void)std::initializer_list<int>{
72#define BATCHLAS_CHECK_ARGS(CTX, FN, ...) \
74 static const char* const _bl_names[] = {BATCHLAS_ARG_NAMES(__VA_ARGS__)}; \
75 ::batchlas::detail::require_args_accessible((CTX), FN, _bl_names, __VA_ARGS__); \
78#define BATCHLAS_ARG_NAMES_1(a) #a
79#define BATCHLAS_ARG_NAMES_2(a, b) #a, #b
80#define BATCHLAS_ARG_NAMES_3(a, b, c) #a, #b, #c
81#define BATCHLAS_ARG_NAMES_4(a, b, c, d) #a, #b, #c, #d
82#define BATCHLAS_ARG_NAMES_5(a, b, c, d, e) #a, #b, #c, #d, #e
83#define BATCHLAS_ARG_NAMES_6(a, b, c, d, e, f) #a, #b, #c, #d, #e, #f
84#define BATCHLAS_ARG_NAMES_PICK(_1, _2, _3, _4, _5, _6, NAME, ...) NAME
85#define BATCHLAS_ARG_NAMES(...) \
86 BATCHLAS_ARG_NAMES_PICK(__VA_ARGS__, BATCHLAS_ARG_NAMES_6, BATCHLAS_ARG_NAMES_5, \
87 BATCHLAS_ARG_NAMES_4, BATCHLAS_ARG_NAMES_3, \
88 BATCHLAS_ARG_NAMES_2, BATCHLAS_ARG_NAMES_1)(__VA_ARGS__)
99 if (A.rows() != A.cols())
101 " must be square, got " + std::to_string(A.rows()) +
"x" + std::to_string(A.cols()));
104template <
typename MA,
typename MB>
106 const char* bn,
const MB& B) {
107 if (A.rows() != B.rows())
109 std::to_string(A.rows()) +
") must equal " + bn +
".rows() (" +
110 std::to_string(B.rows()) +
")");
113template <
typename MA,
typename MB>
115 const char* bn,
const MB& B) {
116 if (A.batch_size() != B.batch_size())
118 " must have the same batch size (" + std::to_string(A.batch_size()) +
" vs " +
119 std::to_string(B.batch_size()) +
")");
126 std::to_string(have) +
" elements, needs at least " + std::to_string(need));
266#define BATCHLAS_DENSE_VIEW(T) MatrixView<T, MatrixFormat::Dense>
276template <
Backend Back, detail::DenseMatrixLike MA, detail::DenseMatrixLike MB,
296template <detail::DenseMatrixLike MA, detail::DenseMatrixLike MB, detail::DenseMatrixLike MC,
299 BATCHLAS_CHECK_ARGS(ctx,
"gemm", A, B, C);
301 [&](
auto Back) {
return gemm<Back.value>(ctx, A, B, C, opts); });
307template <Backend Back, detail::DenseMatrixLike MA,
typename T = detail::dense_scalar_t<MA>>
322template <detail::DenseMatrixLike MA,
typename T = detail::dense_scalar_t<MA>>
325 BATCHLAS_CHECK_ARGS(ctx,
"gemv", A, x, y);
327 [&](
auto Back) {
return gemv<Back.value>(ctx, A, x, y, opts); });
333template <
Backend Back, detail::DenseMatrixLike MA, detail::DenseMatrixLike MB,
348template <detail::DenseMatrixLike MA, detail::DenseMatrixLike MB, detail::DenseMatrixLike MC,
351 BATCHLAS_CHECK_ARGS(ctx,
"symm", A, B, C);
353 [&](
auto Back) {
return symm<Back.value>(ctx, A, B, C, opts); });
359template <
Backend Back, detail::DenseMatrixLike MA, detail::DenseMatrixLike MB,
361 requires ComplexScalar<T>
375template <detail::DenseMatrixLike MA, detail::DenseMatrixLike MB, detail::DenseMatrixLike MC,
377 requires ComplexScalar<T>
379 BATCHLAS_CHECK_ARGS(ctx,
"hemm", A, B, C);
381 [&](
auto Back) {
return hemm<Back.value>(ctx, A, B, C, opts); });
387template <
Backend Back, detail::DenseMatrixLike MA, detail::DenseMatrixLike MC,
389 requires ComplexScalar<T>
403template <detail::DenseMatrixLike MA, detail::DenseMatrixLike MC,
405 requires ComplexScalar<T>
407 BATCHLAS_CHECK_ARGS(ctx,
"herk", A, C);
409 [&](
auto Back) {
return herk<Back.value>(ctx, A, C, opts); });
415template <
Backend Back, detail::DenseMatrixLike MA, detail::DenseMatrixLike MB,
417 requires ComplexScalar<T>
431template <detail::DenseMatrixLike MA, detail::DenseMatrixLike MB, detail::DenseMatrixLike MC,
433 requires ComplexScalar<T>
436 BATCHLAS_CHECK_ARGS(ctx,
"her2k", A, B, C);
438 [&](
auto Back) {
return her2k<Back.value>(ctx, A, B, C, opts); });
444template <
Backend Back, detail::DenseMatrixLike MA, detail::DenseMatrixLike MC,
459template <detail::DenseMatrixLike MA, detail::DenseMatrixLike MC,
462 BATCHLAS_CHECK_ARGS(ctx,
"syrk", A, C);
464 [&](
auto Back) {
return syrk<Back.value>(ctx, A, C, opts); });
470template <
Backend Back, detail::DenseMatrixLike MA, detail::DenseMatrixLike MB,
485template <detail::DenseMatrixLike MA, detail::DenseMatrixLike MB, detail::DenseMatrixLike MC,
489 BATCHLAS_CHECK_ARGS(ctx,
"syr2k", A, B, C);
491 [&](
auto Back) {
return syr2k<Back.value>(ctx, A, B, C, opts); });
497template <
Backend Back, detail::DenseMatrixLike MA, detail::DenseMatrixLike MB,
514template <detail::DenseMatrixLike MA, detail::DenseMatrixLike MB, detail::DenseMatrixLike MC,
517 BATCHLAS_CHECK_ARGS(ctx,
"trmm", A, B, C);
519 [&](
auto Back) {
return trmm<Back.value>(ctx, A, B, C, opts); });
525template <
Backend Back, detail::DenseMatrixLike MA, detail::DenseMatrixLike MB,
538template <detail::DenseMatrixLike MA, detail::DenseMatrixLike MB,
541 BATCHLAS_CHECK_ARGS(ctx,
"trsm", A, B);
543 [&](
auto Back) {
return trsm<Back.value>(ctx, A, B, opts); });
572template <Backend B, detail::DenseMatrixLike MA,
typename T = detail::dense_scalar_t<MA>>
583template <Backend B, detail::DenseMatrixLike MA,
typename T = detail::dense_scalar_t<MA>>
599template <detail::DenseMatrixLike MA,
typename T = detail::dense_scalar_t<MA>>
601 BATCHLAS_CHECK_ARGS(ctx,
"potrf", A, ws, opts.
info);
605 [&](
auto Back) {
return potrf<Back.value>(ctx, A, opts, ws); });
621template <detail::DenseMatrixLike MA,
typename T = detail::dense_scalar_t<MA>>
623 BATCHLAS_CHECK_ARGS(ctx,
"potrf", A, opts.info);
627 [&](
auto Back) {
return potrf<Back.value>(ctx, A, opts); });
636enum class EmptyBracesAreAmbiguous {};
643template <Backend B, detail::DenseMatrixLike MA,
typename T = detail::dense_scalar_t<MA>>
647template <detail::DenseMatrixLike MA,
typename T = detail::dense_scalar_t<MA>>
655template <Backend B, detail::DenseMatrixLike MA,
typename T = detail::dense_scalar_t<MA>>
660 static_cast<size_t>(A.rows()) * A.batch_size());
663 return getrf<B, T>(ctx, V(A), pivots, lease.span(), info);
679template <detail::DenseMatrixLike MA,
typename T = detail::dense_scalar_t<MA>>
681 BATCHLAS_CHECK_ARGS(ctx,
"getrf", A, pivots, info);
684 static_cast<size_t>(A.rows()) * A.batch_size());
687 [&](
auto Back) {
return getrf<Back.value>(ctx, A, pivots, info); });
702 static_cast<size_t>(A.rows()) * A.batch_size());
709template <
Backend B, detail::DenseMatrixLike MA, detail::DenseMatrixLike MB,
718 static_cast<size_t>(A.rows()) * A.batch_size());
725template <detail::DenseMatrixLike MA, detail::DenseMatrixLike MB,
729 BATCHLAS_CHECK_ARGS(ctx,
"getrs", A, B_, pivots, ws);
734 static_cast<size_t>(A.rows()) * A.batch_size());
736 ctx,
"getrs", [&](
auto Back) {
return getrs<Back.value>(ctx, A, B_, pivots, opts, ws); });
751template <detail::DenseMatrixLike MA, detail::DenseMatrixLike MB,
755 BATCHLAS_CHECK_ARGS(ctx,
"getrs", A, B_, pivots);
760 static_cast<size_t>(A.rows()) * A.batch_size());
762 [&](
auto Back) {
return getrs<Back.value>(ctx, A, B_, pivots, opts); });
778 static_cast<size_t>(A.rows()) * A.batch_size());
781 return getri<B, T>(ctx, V(A), V(Ainv), pivots, lease.span(), info);
798 BATCHLAS_CHECK_ARGS(ctx,
"getri", A, Ainv, pivots, info);
804 static_cast<size_t>(A.rows()) * A.batch_size());
807 [&](
auto Back) {
return getri<Back.value>(ctx, A, Ainv, pivots, info); });
812template <Backend B, detail::DenseMatrixLike MA,
typename T = detail::dense_scalar_t<MA>>
816 static_cast<size_t>(std::min(A.rows(), A.cols())) * A.batch_size());
831template <detail::DenseMatrixLike MA,
typename T = detail::dense_scalar_t<MA>>
833 BATCHLAS_CHECK_ARGS(ctx,
"geqrf", A, tau);
836 static_cast<size_t>(std::min(A.rows(), A.cols())) * A.batch_size());
838 [&](
auto Back) {
return geqrf<Back.value>(ctx, A, tau); });
843template <Backend B, detail::DenseMatrixLike MA,
typename T = detail::dense_scalar_t<MA>>
847 static_cast<size_t>(std::min(A.rows(), A.cols())) * A.batch_size());
861template <detail::DenseMatrixLike MA,
typename T = detail::dense_scalar_t<MA>>
863 BATCHLAS_CHECK_ARGS(ctx,
"orgqr", A, tau);
865 static_cast<size_t>(std::min(A.rows(), A.cols())) * A.batch_size());
867 [&](
auto Back) {
return orgqr<Back.value>(ctx, A, tau); });
873template <Backend B, detail::DenseMatrixLike MA,
typename T = detail::dense_scalar_t<MA>>
879 static_cast<size_t>(A.rows()) * A.batch_size());
886template <Backend B, detail::DenseMatrixLike MA,
typename T = detail::dense_scalar_t<MA>>
892 static_cast<size_t>(A.rows()) * A.batch_size());
900template <detail::DenseMatrixLike MA,
typename T = detail::dense_scalar_t<MA>>
903 BATCHLAS_CHECK_ARGS(ctx,
"syev", A, W, ws);
906 static_cast<size_t>(A.rows()) * A.batch_size());
908 [&](
auto Back) {
return syev<Back.value>(ctx, A, W, opts, ws); });
923template <detail::DenseMatrixLike MA,
typename T = detail::dense_scalar_t<MA>>
926 BATCHLAS_CHECK_ARGS(ctx,
"syev", A, W);
929 static_cast<size_t>(A.rows()) * A.batch_size());
931 [&](
auto Back) {
return syev<Back.value>(ctx, A, W, opts); });
954 static_cast<size_t>(std::min(A.rows(), A.cols())) * A.batch_size());
961template <
Backend B, detail::DenseMatrixLike MA, detail::DenseMatrixLike MC,
968 static_cast<size_t>(std::min(A.rows(), A.cols())) * A.batch_size());
979template <detail::DenseMatrixLike MA, detail::DenseMatrixLike MC,
983 BATCHLAS_CHECK_ARGS(ctx,
"ormqr", A, C, tau, ws);
986 static_cast<size_t>(std::min(A.rows(), A.cols())) * A.batch_size());
988 [&](
auto Back) {
return ormqr<Back.value>(ctx, A, C, tau, opts, ws); });
1001template <detail::DenseMatrixLike MA, detail::DenseMatrixLike MC,
1005 BATCHLAS_CHECK_ARGS(ctx,
"ormqr", A, C, tau);
1009 static_cast<size_t>(std::min(A.rows(), A.cols())) * A.batch_size());
1011 [&](
auto Back) {
return ormqr<Back.value>(ctx, A, C, tau, opts); });
1033 static_cast<size_t>(std::min(A.rows(), A.cols())) * A.batch_size());
1043template <
Backend B, detail::DenseMatrixLike MA, detail::DenseMatrixLike MU,
1050 static_cast<size_t>(std::min(A.rows(), A.cols())) * A.batch_size());
1052 const size_t bytes =
1069template <detail::DenseMatrixLike MA, detail::DenseMatrixLike MU, detail::DenseMatrixLike MV,
1073 BATCHLAS_CHECK_ARGS(ctx,
"gesvd", A, singular_values, U, Vh, ws);
1076 static_cast<size_t>(std::min(A.rows(), A.cols())) * A.batch_size());
1078 ctx,
"gesvd", [&](
auto Back) {
return gesvd<Back.value>(ctx, A, singular_values, U, Vh, opts, ws); });
1095template <detail::DenseMatrixLike MA, detail::DenseMatrixLike MU, detail::DenseMatrixLike MV,
1098 const MU& U,
const MV& Vh,
const GesvdOptions& opts = {}) {
1099 BATCHLAS_CHECK_ARGS(ctx,
"gesvd", A, singular_values, U, Vh);
1103 static_cast<size_t>(std::min(A.rows(), A.cols())) * A.batch_size());
1105 ctx,
"gesvd", [&](
auto Back) {
return gesvd<Back.value>(ctx, A, singular_values, U, Vh, opts); });
1110#undef BATCHLAS_DENSE_VIEW
Non-owning view of a batch of matrices: the argument type of every entry point.
Owning batch of batch_size() matrices of equal (capacity) shape.
Non-owning view of a batch of strided vectors: the vector argument type of the entry points.
The call violates the API contract.
Enumerations, scalar traits and scalar concepts shared by every public header.
Event gemv(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, const VectorView< T > &X, const VectorView< T > &Y, T alpha, T beta, Transpose transA)
Batched general matrix-vector multiply.
Event syr2k(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, const MatrixView< T, MatrixFormat::Dense > &B, const MatrixView< T, MatrixFormat::Dense > &C, T alpha, T beta, Uplo uplo, Transpose transA)
Batched symmetric rank-2k update.
Event herk(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, const MatrixView< T, MatrixFormat::Dense > &C, float_t< T > alpha, float_t< T > beta, Uplo uplo, Transpose transA)
Batched Hermitian rank-k update.
Event hemm(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, const MatrixView< T, MatrixFormat::Dense > &B, const MatrixView< T, MatrixFormat::Dense > &C, T alpha, T beta, Side side, Uplo uplo)
Batched Hermitian matrix-matrix multiply.
Event gemm(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, const MatrixView< T, MatrixFormat::Dense > &B, const MatrixView< T, MatrixFormat::Dense > &C, T alpha, T beta, Transpose transA, Transpose transB, ComputePrecision precision=ComputePrecision::Default)
Batched general matrix-matrix multiply.
Event syrk(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, const MatrixView< T, MatrixFormat::Dense > &C, T alpha, T beta, Uplo uplo, Transpose transA)
Batched symmetric rank-k update.
Event trsm(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, const MatrixView< T, MatrixFormat::Dense > &B, T alpha, Side side, Uplo uplo, Transpose transA, Diag diag)
Batched triangular solve with multiple right-hand sides, in place.
Event her2k(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, const MatrixView< T, MatrixFormat::Dense > &B, const MatrixView< T, MatrixFormat::Dense > &C, T alpha, float_t< T > beta, Uplo uplo, Transpose transA)
Batched Hermitian rank-2k update.
Event trmm(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, const MatrixView< T, MatrixFormat::Dense > &B, const MatrixView< T, MatrixFormat::Dense > &C, T alpha, Side side, Uplo uplo, Transpose transA, Diag diag)
Batched triangular matrix-matrix multiply, out of place.
Event symm(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, const MatrixView< T, MatrixFormat::Dense > &B, const MatrixView< T, MatrixFormat::Dense > &C, T alpha, T beta, Side side, Uplo uplo)
Batched symmetric matrix-matrix multiply.
auto with_backend_for(Queue &ctx, const char *op, F &&f)
with_backend() for a call on element type T: throws batchlas::unsupported before dispatch when T is d...
size_t syev_buffer_size(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, Span< typename base_type< T >::type > eigenvalues, JobType jobtype, Uplo uplo)
Workspace, in bytes, that syev() needs for the same arguments.
Event syev(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &descrA, Span< typename base_type< T >::type > eigenvalues, JobType jobtype, Uplo uplo, Span< std::byte > workspace, Span< int32_t > info)
Eigenvalues, and optionally eigenvectors, of a batch of symmetric/Hermitian matrices (LAPACK ?...
JobType
Whether an eigensolver computes eigenvectors (LAPACK jobz).
Transpose
The operator op() applied to an operand: op(A) = A, A^T or A^H.
Diag
Whether a triangular operand's diagonal is read or assumed to be one.
Backend
Library family an entry point dispatches to, used as a template argument.
ComputePrecision
Internal compute precision of a GEMM (the cuBLAS cublasComputeType_t).
Uplo
Which triangle of a symmetric, Hermitian or triangular operand is referenced.
SvdVectors
Which singular vectors gesvd computes for one factor (LAPACK jobu / jobvt).
typename base_type< T >::type float_t
Shorthand for base_type<T>::type: the precision of T (tolerances, norms, eigenvalues).
MatrixFormat
Storage format of a Matrix / MatrixView, used as a template argument.
Side
Side on which a special operand multiplies: op(A) * B or B * op(A).
@ EigenVectors
Eigenvalues and eigenvectors (jobz = 'V').
@ NonUnit
The stored diagonal is used.
@ Default
The precision of the scalar type.
@ Lower
The lower triangle (i >= j).
@ All
Full square factor (LAPACK 'A').
@ Dense
Column-major dense storage with leading dimension and batch stride.
@ Left
The special operand is on the left.
size_t getrf_buffer_size(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A)
Workspace, in bytes, that getrf() needs for this shape on this queue.
size_t 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.
size_t getri_buffer_size(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A)
Workspace, in bytes, that getri() needs for A on this queue.
size_t 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.
Event potrf(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &descrA, Uplo uplo, Span< std::byte > workspace, Span< int32_t > info)
Batched Cholesky factorization of Hermitian positive-definite matrices.
Event getrs(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, const MatrixView< T, MatrixFormat::Dense > &B, Transpose transA, Span< int64_t > pivots, Span< std::byte > work_space)
Batched solve of using the LU factors from getrf().
Event getrf(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, Span< int64_t > pivots, Span< std::byte > work_space, Span< int32_t > info)
Batched LU factorization with partial pivoting.
Event getri(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, const MatrixView< T, MatrixFormat::Dense > &C, Span< int64_t > pivots, Span< std::byte > work_space, Span< int32_t > info)
Batched inverse from the LU factors produced by getrf().
size_t geqrf_buffer_size(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, Span< T > tau)
Workspace, in bytes, that geqrf() needs for this shape on this queue.
size_t orgqr_buffer_size(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, Span< T > tau)
Workspace, in bytes, that orgqr() needs for this shape on this queue.
size_t ormqr_buffer_size(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, const MatrixView< T, MatrixFormat::Dense > &C, Side side, Transpose trans, Span< T > tau, int32_t block_size_hint=0)
Workspace, in bytes, that ormqr() needs for these operands on this queue.
Event orgqr(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, Span< T > tau, Span< std::byte > workspace)
Batched formation of the first n columns of Q from geqrf() output.
Event geqrf(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, Span< T > tau, Span< std::byte > work_space)
Batched Householder QR factorization .
Event ormqr(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, const MatrixView< T, MatrixFormat::Dense > &C, Side side, Transpose trans, Span< T > tau, Span< std::byte > workspace, int32_t block_size_hint=0)
Batched multiplication by the orthogonal/unitary Q from geqrf().
size_t gesvd_buffer_size(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, Span< typename base_type< T >::type > singular_values, const MatrixView< T, MatrixFormat::Dense > &U, const MatrixView< T, MatrixFormat::Dense > &Vh, SvdVectors jobu, SvdVectors jobvh)
Workspace, in bytes, that gesvd() needs for the same arguments.
Event gesvd(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, Span< typename base_type< T >::type > singular_values, const MatrixView< T, MatrixFormat::Dense > &U, const MatrixView< T, MatrixFormat::Dense > &Vh, SvdVectors jobu, SvdVectors jobvh, Span< std::byte > workspace, Span< int32_t > info)
Singular value decomposition of a batch of matrices (LAPACK ?gesvd).
The batched containers: Matrix (owning), MatrixView (non-owning), KernelMatrixView (device-side),...
void require_square(const char *fn, const char *name, const MV &A)
void require_arg_accessible(const Queue &ctx, const A &arg, const std::string &what)
typename dense_scalar< std::remove_cvref_t< M > >::type dense_scalar_t
bool pointer_checks_enabled()
void require_info_span(const char *fn, size_t have, size_t batch_size)
void require_span_at_least(const char *fn, const char *name, size_t have, size_t need)
void require_args_accessible(const Queue &ctx, const char *fn, const char *const *names, const Args &... args)
void require_same_rows(const char *fn, const char *an, const MA &A, const char *bn, const MB &B)
void require_same_batch(const char *fn, const char *an, const MA &A, const char *bn, const MB &B)
#define BATCHLAS_DENSE_VIEW(T)
Backend deduction from the Queue and the USM pointer check.
Completion handle of enqueued work, returned by every entry point.
T alpha
scale of the product
T beta
scale of the incoming C; 0 means C is not read
ComputePrecision precision
internal compute type; Default = the input type
T beta
scale of the incoming y
T alpha
scale of the product
std::optional< Uplo > hermitian_uplo
Engaged: A is Hermitian and the given triangle is read (square only); this selects a different entry ...
SvdVectors jobu
which columns of U to compute
SvdVectors jobvh
which rows of V^H to compute
Options for getrs(): solve with getrf's factors.
Options for hemm(): as SymmOptions, with A Hermitian.
T beta
scale of the incoming C
T alpha
scale of the product
Side side
which side A multiplies from
Uplo uplo
triangle of A that is read
Uplo uplo
triangle of C that is written
Transpose trans
NoTrans or ConjTrans.
float_t< T > beta
real scale of the incoming C
Transpose trans
NoTrans ( ) or ConjTrans ( ).
float_t< T > alpha
real scale of the product
Uplo uplo
triangle of C that is written
float_t< T > beta
real scale of the incoming C
Options for ormqr(): apply geqrf()'s Q, (Left) or (Right).
int32_t block_size_hint
WY panel width; 0 lets the tuning table pick.
Side side
which side Q multiplies from
Options for potrf(): Cholesky (Lower) or (Upper).
Span< int32_t > info
Per-item status, one int32 per batch item: 0 = factorised, > 0 = the order of the leading minor that ...
Uplo uplo
triangle read and overwritten with the factor
Where BatchLAS work runs: a device, a backend, an ordered SYCL queue and a workspace arena.
batchlas::WorkspaceLease workspace(size_t bytes)
Borrow bytes of device scratch from this Queue's arena.
Non-owning view of size() contiguous elements of type T.
constexpr size_t size() const
Number of elements.
Options for syev(): symmetric/Hermitian eigendecomposition.
JobType jobz
eigenvectors too, or eigenvalues only
Uplo uplo
triangle of A that is read
Options for symm(): (Left) or (Right), A symmetric.
Uplo uplo
triangle of A that is read
T beta
scale of the incoming C
Side side
which side A multiplies from
T alpha
scale of the product
T beta
scale of the incoming C
T alpha
scale of the product pair
Uplo uplo
triangle of C that is written
Transpose trans
NoTrans or Trans.
T alpha
scale of the product
Uplo uplo
triangle of C that is written
T beta
scale of the incoming C
Transpose trans
NoTrans ( ) or Trans ( ).
Options for trmm(): (Left) or (Right). No beta.
Side side
which side op(A) multiplies from
Uplo uplo
which triangle A is
T alpha
scale of the product
Diag diag
Unit: A's diagonal is taken as ones and not read.
Options for trsm(): solve (Left) or (Right).
T alpha
scale of the right-hand side
Side side
which side op(A) is on
Diag diag
Unit: A's diagonal is taken as ones and not read.
Uplo uplo
which triangle A is
batchlas::Device, batchlas::Event and batchlas::Queue: where work runs and how it is ordered.
batchlas::Span, the non-owning pointer + length every entry point takes for 1-D data.