Computes a matrix-matrix product with general matrices, but updates only the upper or lower triangular part of the result matrix.
event gemmt(queue &exec_queue, uplo upper_lower, transpose transa, transpose transb, std::int64_t n, std::int64_t k, T alpha, const T* a, std::int64_t lda, const T* b, std::int64_t ldb, T beta, T* c, std::int64_t ldc, const vector_class<event> &dependencies = {});
The USM version ofgemmt supports the following precisions and devices.
T | Devices Supported |
---|---|
float | Host, CPU, and GPU |
double | Host, CPU, and GPU |
std::complex<float> | Host, CPU, and GPU |
std::complex<double> | Host, CPU, and GPU |
The gemmt routines compute a scalar-matrix-matrix product and add the result to the upper or lower part of a scalar-matrix product, with general matrices. The operation is defined as:
C <- alpha*op(A)*op(B) + beta*C
where:
op(X) is one of op(X) = X, or op(X) = XT, or op(X) = XH
alpha and beta are scalars
A, B, and C are matrices
Here, op(A) is n x k, op(B) is k x n, and C is n x n.
The queue where the routine should be executed.
Specifies whether C’s data is stored in its upper or lower triangle. See Data Types for more details.
Specifies op(A), the transposition operation applied to A. See Data Types for more details.
Specifies op(B), the transposition operation applied to B. See Data Types for more details.
Number of columns of op(A), columns of op(B), and columns ofC. Must be at least zero.
Number of columns of op(A) and rows of op(B). Must be at least zero.
Scaling factor for the matrix-matrix product.
Pointer to input matrix A.
If A is not transposed, A is an n-by-k matrix so the array a must have size at least lda*k.
If A is transposed, A is a k-by-n matrix so the array a must have size at least lda*n.
See Matrix Storage for more details.
Leading dimension of A. Must be at least n if A is not transposed, and at least k if A is transposed. Must be positive.
Pointer to input matrix B.
If B is not transposed, B is a k-by-n matrix so the array b must have size at least ldb*n.
If B is transposed, B is an n-by-k matrix so the array b must have size at least ldb*k.
See Matrix Storage for more details.
Leading dimension of B. Must be at least k if B is not transposed, and at least n if B is transposed. Must be positive.
Scaling factor for matrix C.
Pointer to input/output matrix C. Must have size at least ldc * n. See Matrix Storage for more details.
Leading dimension of C. Must be positive and at least m.
List of events to wait for before starting computation, if any. If omitted, defaults to no dependencies.
Pointer to the output matrix, overwritten by the upper or lower triangular part ofalpha*op(A)*op(B) + beta*C.
If beta = 0, matrix C does not need to be initialized before calling gemmt.
Output event to wait on to ensure computation is complete.