-
aoclsparse_status aoclsparse_sspmmd(const aoclsparse_operation op, const aoclsparse_matrix A, const aoclsparse_matrix B, const aoclsparse_order layout, float *C, const aoclsparse_int ldc)#
-
aoclsparse_status aoclsparse_dspmmd(const aoclsparse_operation op, const aoclsparse_matrix A, const aoclsparse_matrix B, const aoclsparse_order layout, double *C, const aoclsparse_int ldc)#
-
aoclsparse_status aoclsparse_cspmmd(const aoclsparse_operation op, const aoclsparse_matrix A, const aoclsparse_matrix B, const aoclsparse_order layout, aoclsparse_float_complex *C, const aoclsparse_int ldc)#
-
aoclsparse_status aoclsparse_zspmmd(const aoclsparse_operation op, const aoclsparse_matrix A, const aoclsparse_matrix B, const aoclsparse_order layout, aoclsparse_double_complex *C, const aoclsparse_int ldc)#
Matrix multiplication of two sparse matrices stored in the CSR storage format. The output matrix is stored in a dense format.
aoclsparse_?spmmdmultiplies a sparse matrix \(A\) and a sparse matrix \(B\), both stored in the CSR storage format, and saves the result in a dense matrix \(C\), such that\[ C := op(A) \cdot B, \]with\[\begin{split} op(A) = \left\{ \begin{array}{ll} A, & \text{if op} = \text{aoclsparse\_operation\_none} \\ A^T, & \text{if op} = \text{aoclsparse\_operation\_transpose} \\ A^H, & \text{if op} = \text{aoclsparse\_operation\_conjugate\_transpose} \end{array} \right. \end{split}\]- Parameters:
op – [in] Operation to perform on matrix \(A\).
A – [in] Matrix structure containing sparse matrix \(A\) of size \(m \times k\).
B – [in] Matrix structure containing sparse matrix \(B\) of size \(k \times n\) if
opis aoclsparse_operation_none otherwise of size \(m \times n\).layout – [in] Ordering of the dense output matrix: valid values are aoclsparse_order_row and aoclsparse_order_column.
C – [inout] Dense output matrix \(C\) of size \(m \times n\) if
opis aoclsparse_operation_none, otherwise of size \(k \times n\) containing the matrix-matrix product of \(A\) and \(B\).ldc – [in] Leading dimension of \(C\), e.g., for C stored in
aoclsparse_order_row,ldcmust be at least \(\max{(1, m)}\) when \(op(A) = A\), or \(\max{(1, k)}\) if \(op(A) = A^T\) or \(op(A) = A^H\).
- Return values:
aoclsparse_status_success – The operation completed successfully.
aoclsparse_status_invalid_size –
m,n,k,nnzorldcis not valid.aoclsparse_status_invalid_pointer –
A,BorCpointer is not valid.aoclsparse_status_wrong_type – aoclsparse_matrix_data_type does not match the precision type.
aoclsparse_status_not_implemented – aoclsparse_matrix_format_type is not aoclsparse_csr_mat.