onemkl::sparse::gemm

Computes a sparse matrix-dense matrix product. Currently, only ROW-MAJOR layout for dense matrix storage in Data Parallel C++ onemkl::sparse::gemm functionality is supported.

Syntax

Note

Currently, complex types are not supported.

Using SYCL buffers:

void onemkl::sparse::gemm(cl::sycl::queue &queue, onemkl::transpose transpose_val, const fp alpha, matrixHandle_t handle, cl::sycl::buffer<fp, 1> &b, const std::int64_t columns, const std::int64_t ldb, const fp beta, cl::sycl::buffer<fp, 1> &c, const std::int64_t ldc)

Using USM pointers:

void onemkl::sparse::gemm(cl::sycl::queue &queue, onemkl::transpose transpose_val, const fp alpha, matrixHandle_t handle, const fp *b, const std::int64_t columns, const std::int64_t ldb, const fp beta, fp *c, const std::int64_t ldc)

Include Files

  • mkl_spblas_sycl.hpp

Description

Note

Refer to Supported Types for a list of supported <fp> and <intType> and refer to Exceptions for a detailed description of the exceptions thrown. The onemkl::sparse::gemm routine computes a sparse matrix-dense matrix defined as

c := alpha*op(A)*b + beta*c

where:

alpha and beta are scalars, b and c are dense matrices.

Input Parameters

queue

Specifies the SYCL command queue which will be used for SYCL kernels execution.

transpose_val

Specifies operation op() on input matrix.

onemkl::transpose::nontrans

Non-transpose, op(A) = A.

onemkl::transpose::trans

Transpose, op(A) = AT.

onemkl::transpose::conjtrans

Conjugate transpose, op(A) = AH.

Note

Currently, the only supported case for operation is onemkl::transpose::nontrans.

alpha

Specifies the scalar alpha.

handle

Handle to object containing sparse matrix and other internal data. Created using one of the onemkl::sparse::set<sparse_matrix_type>structure routines.

Note

Currently, the only supported case for <sparse_matrix_type> is CSR.

b

SYCL or USM memory object containing an array of size at least rows*ldb, where rows = the number of columns of matrix A if op = onemkl::transpose::nontrans, or rows = the number of rows of matrix A otherwise.

columns

Number of columns of matrix c.

ldb

Specifies the leading dimension of matrix b.

beta

Specifies the scalar beta.

c

SYCL or USM memory object containing an array of size at least rows*ldc, where rows = the number of columns of matrix A if op = onemkl::transpose::nontrans, or rows = the number of columns of matrix A otherwise.

Output Parameters

c

Overwritten by the updated matrix c.