|
| integer(kind(hipsparse_status_success)) function | hipsparsexcsrgemmnnz_ (handle, transa, transb, m, n, k, descra, nnza, csrrowptra, csrcolinda, descrb, nnzb, csrrowptrb, csrcolindb, descrc, csrrowptrc, nnztotaldevhostptr) |
| |
| integer(kind(hipsparse_status_success)) function | hipsparsexcsrgemmnnz_rank_0 (handle, transa, transb, m, n, k, descra, nnza, csrrowptra, csrcolinda, descrb, nnzb, csrrowptrb, csrcolindb, descrc, csrrowptrc, nnztotaldevhostptr) |
| |
| integer(kind(hipsparse_status_success)) function | hipsparsexcsrgemmnnz_rank_1 (handle, transa, transb, m, n, k, descra, nnza, csrrowptra, csrcolinda, descrb, nnzb, csrrowptrb, csrcolindb, descrc, csrrowptrc, nnztotaldevhostptr) |
| |
hipsparseXcsrgemmNnz computes the total CSR non-zero elements and the CSR row offsets that point to the start of every row of the sparse CSR matrix of the resulting multiplied matrix \(C\). It is assumed that csrRowPtrC has been allocated with size m+1. The desired index base in the output CSR matrix \(C\) is set in the hipsparseMatDescr_t descrC. See hipsparseSetMatIndexBase().
- Note
- As indicated,
nnzTotalDevHostPtr can point to either host or device memory. This is controlled by setting the pointer mode. See hipsparseSetPointerMode().
-
This function is non-blocking and executed asynchronously with respect to the host. It can return before the actual computation has finished.
-
For matrix products with more than 8192 intermediate products per row, an additional temporary storage buffer is allocated by the algorithm.
-
Currently, only
transA == transB == HIPSPARSE_OPERATION_NON_TRANSPOSE is supported.
-
Currently, only
HIPSPARSE_MATRIX_TYPE_GENERAL is supported.
- Deprecated:
- This function is deprecated when using the CUDA backend (CUDA 10.0+) and will be removed in CUDA 11.0. This deprecation does not apply to the ROCm backend.
- Parameters
-
| [in] | handle | - handle to the hipSPARSE library context queue. |
| [in] | transA | - matrix \(A\) operation type. |
| [in] | transB | - matrix \(B\) operation type. |
| [in] | m | - number of rows of the sparse CSR matrix \(op(A)\) and \(C\). Must be non-negative. |
| [in] | n | - number of columns of the sparse CSR matrix \(op(B)\) and \(C\). Must be non-negative. |
| [in] | k | - number of columns of the sparse CSR matrix \(op(A)\) and number of rows of the sparse CSR matrix \(op(B)\). Must be non-negative. |
| [in] | descrA | - descriptor of the sparse CSR matrix \(A\). Currently, only HIPSPARSE_MATRIX_TYPE_GENERAL is supported. |
| [in] | nnzA | - number of non-zero entries of the sparse CSR matrix \(A\). Must be non-negative. |
| [in] | csrRowPtrA | - array of m+1 elements ( \(op(A) == A\), k+1 otherwise) that point to the start of every row of the sparse CSR matrix \(op(A)\). |
| [in] | csrColIndA | - array of nnzA elements containing the column indices of the sparse CSR matrix \(A\). |
| [in] | descrB | - descriptor of the sparse CSR matrix \(B\). Currently, only HIPSPARSE_MATRIX_TYPE_GENERAL is supported. |
| [in] | nnzB | - number of non-zero entries of the sparse CSR matrix \(B\). Must be non-negative. |
| [in] | csrRowPtrB | - array of k+1 elements ( \(op(B) == B\), m+1 otherwise) that point to the start of every row of the sparse CSR matrix \(op(B)\). |
| [in] | csrColIndB | - array of nnzB elements containing the column indices of the sparse CSR matrix \(B\). |
| [in] | descrC | - descriptor of the sparse CSR matrix \(C\). Currently, only HIPSPARSE_MATRIX_TYPE_GENERAL is supported. |
| [in] | csrRowPtrC | - array of m+1 elements that point to the start of every row of the sparse CSR matrix \(C\). |
| [in,out] | nnzTotalDevHostPtr | - pointer to the number of non-zero entries of the sparse CSR matrix \(C\). nnzTotalDevHostPtr can be a host or device pointer. |
- Return values
-
| HIPSPARSE_STATUS_SUCCESS | the operation completed successfully. |
| HIPSPARSE_STATUS_NOT_INITIALIZED | handle is not initialized. |
| HIPSPARSE_STATUS_INVALID_VALUE | handle, descrA, descrB, or descrC is nullptr, m, n, k, nnzA, or nnzB is negative, or csrRowPtrA, csrColIndA, csrRowPtrB, csrColIndB, csrRowPtrC, or nnzTotalDevHostPtr is nullptr. |
| HIPSPARSE_STATUS_NOT_SUPPORTED | transA is not HIPSPARSE_OPERATION_NON_TRANSPOSE, transB is not HIPSPARSE_OPERATION_NON_TRANSPOSE, or hipsparseMatrixType_t is not HIPSPARSE_MATRIX_TYPE_GENERAL. |