3#include <batchlas/export.hh>
19using trsm =
Event(Queue&,
20 const MatrixView<T, MatrixFormat::Dense>&,
21 const MatrixView<T, MatrixFormat::Dense>&,
26using trsm_vendor =
Event(Queue&,
27 const MatrixView<T,MatrixFormat::Dense>&,
28 const MatrixView<T,MatrixFormat::Dense>&,
60 int lda = A.
ld(), ldb = B.
ld();
64 ", n=" + std::to_string(n) +
")");
81 if (A.
rows() != m || A.
cols() != m) {
83 std::to_string(A.
rows()) +
"x" + std::to_string(A.
cols()) +
84 " instead of " + std::to_string(m) +
"x" + std::to_string(m));
86 if (lda < std::max(1, m)) {
88 std::to_string(lda) +
", m=" + std::to_string(m));
91 if (A.
rows() != n || A.
cols() != n) {
93 std::to_string(A.
rows()) +
"x" + std::to_string(A.
cols()) +
94 " instead of " + std::to_string(n) +
"x" + std::to_string(n));
96 if (lda < std::max(1, n)) {
98 std::to_string(lda) +
", n=" + std::to_string(n));
102 if (ldb < std::max(1, m)) {
104 std::to_string(ldb) +
", m=" + std::to_string(m));
149template <Backend Back,
typename T>
164template <Backend Back,
typename T>
184template <Backend Back,
typename T>
Non-owning view of a batch of matrices: the argument type of every entry point.
int rows() const
Rows per item (the capacity on a heterogeneous batch).
int cols() const
Columns per item (the capacity on a heterogeneous batch).
int ld() const
Leading dimension: element distance between columns.
int batch_size() const
Number of batch items.
The call violates the API contract.
Enumerations, scalar traits and scalar concepts shared by every public header.
void trsm_validate_params(const MatrixView< T, MatrixFormat::Dense > &A, const MatrixView< T, MatrixFormat::Dense > &B, Side side, Uplo uplo, Transpose transA, Diag diag)
Host-side argument check that trsm runs on every backend before kernel selection.
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 trsm_vendor(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, const MatrixView< T, MatrixFormat::Dense > &B, Side side, Uplo uplo, Transpose transA, Diag diag, T alpha)
Vendor-library implementation of trsm (cuBLAS, rocBLAS, host BLAS).
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.
Uplo
Which triangle of a symmetric, Hermitian or triangular operand is referenced.
Side
Side on which a special operand multiplies: op(A) * B or B * op(A).
@ ConjTrans
op(A) = A^H (the same as Trans for real scalars).
@ Unit
The diagonal is taken as 1 and not read.
@ NonUnit
The stored diagonal is used.
@ Upper
The upper triangle (i <= j).
@ Lower
The lower triangle (i >= j).
@ Right
The special operand is on the right.
@ Left
The special operand is on the left.
The batched containers: Matrix (owning), MatrixView (non-owning), KernelMatrixView (device-side),...
Backend deduction from the Queue and the USM pointer check.
#define BATCHLAS_DISPATCH_ON_QUEUE(NAME)
Completion handle of enqueued work, returned by every entry point.
Event()
An empty Event, already complete.
Where BatchLAS work runs: a device, a backend, an ordered SYCL queue and a workspace arena.
batchlas::Device, batchlas::Event and batchlas::Queue: where work runs and how it is ordered.