-
aoclsparse_status aoclsparse_export_scoo(const aoclsparse_matrix mat, aoclsparse_index_base *base, aoclsparse_int *m, aoclsparse_int *n, aoclsparse_int *nnz, aoclsparse_int **row_ptr, aoclsparse_int **col_ptr, float **val)#
-
aoclsparse_status aoclsparse_export_dcoo(const aoclsparse_matrix mat, aoclsparse_index_base *base, aoclsparse_int *m, aoclsparse_int *n, aoclsparse_int *nnz, aoclsparse_int **row_ptr, aoclsparse_int **col_ptr, double **val)#
-
aoclsparse_status aoclsparse_export_ccoo(const aoclsparse_matrix mat, aoclsparse_index_base *base, aoclsparse_int *m, aoclsparse_int *n, aoclsparse_int *nnz, aoclsparse_int **row_ptr, aoclsparse_int **col_ptr, aoclsparse_float_complex **val)#
-
aoclsparse_status aoclsparse_export_zcoo(const aoclsparse_matrix mat, aoclsparse_index_base *base, aoclsparse_int *m, aoclsparse_int *n, aoclsparse_int *nnz, aoclsparse_int **row_ptr, aoclsparse_int **col_ptr, aoclsparse_double_complex **val)#
Export a
COOmatrix.aoclsparse_export_?cooexposes the components defining theCOOmatrix inmatstructure by copying out the data pointers. No additional memory is allocated. User should not modify the arrays and once aoclsparse_destroy() is called to freemat, these arrays will become inaccessible. If the matrix is not inCOOformat, an error is obtained.- Parameters:
mat – [in] the pointer to the COO sparse matrix.
base – [out] aoclsparse_index_base_zero or aoclsparse_index_base_one.
m – [out] number of rows of the sparse COO matrix.
n – [out] number of columns of the sparse COO matrix.
nnz – [out] number of non-zero entries of the sparse CSR matrix.
row_ptr – [out] array of
nnzelements containing the row indices of the sparse COO matrix.col_ptr – [out] array of
nnzelements containing the column indices of the sparse COO matrix.val – [out] array of
nnzelements of the sparse COO matrix.
- Return values:
aoclsparse_status_success – the operation completed successfully.
aoclsparse_status_invalid_pointer –
mator any of the output arguments are NULL.aoclsparse_status_invalid_value –
matis not in COO format.aoclsparse_status_wrong_type – data type of
matdoes not match the function.