Developer Reference for Intel® oneAPI Math Kernel Library for Fortran
mkl_sparse_?_export_coo
Exports COO matrix from internal representation.
Syntax
stat = mkl_sparse_s_export_coo (source, indexing, rows, cols, nnz, rows_indx, cols_indx, values)
stat = mkl_sparse_d_export_coo (source, indexing, rows, cols, nnz, rows_indx, cols_indx, values)
stat = mkl_sparse_c_export_coo (source, indexing, rows, cols, nnz, rows_indx, cols_indx, values)
stat = mkl_sparse_z_export_coo (source, indexing, rows, cols, nnz, rows_indx, cols_indx, values)
Include Files
mkl_spblas.f90
Description
If the matrix specified by the source handle is in Coordinate (COO) format, the mkl_sparse_?_export_coo routine exports a rows -by- cols matrix A using COO as the internal representation. The routine returns pointers to the internal representation and does not allocate additional memory.
In case the handle had library allocated data arrays, the users should make a copy of the exported arrays if they need to modify them or keep them beyond the lifetime of the source matrix handle, as modifying the exported arrays may lead to undefined behavior in subsequent calls to any sparse BLAS routine that uses the source handle.
If the matrix is not already in COO format, the routine returns SPARSE_STATUS_INVALID_VALUE .
Input Parameters
source
SPARSE_MATRIX_T .
Handle containing internal data.
Output Parameters
indexing
sparse_index_base_t .
Indicates how input arrays are indexed:
SPARSE_INDEX_BASE_ZERO |
Zero-based (C-style) indexing: indices start at 0. |
SPARSE_INDEX_BASE_ONE |
One-based (Fortran-style) indexing: indices start at 1. |
rows
C_INT .
Number of rows of matrix A .
cols
C_INT .
Number of columns of matrix A .
nnz
C_INT .
Specifies the number of stored elements (sometimes called the non-zero elements, but they can be explicit zeros) of the matrix \(A\) . Refer to nnz description in Coordinate Format for more details.
row_indx
C_INT .
Array of length nnz, containing the row indices for each stored element of matrix \(A\) . Refer to rows array description in Coordinate Format for more details.
col_indx
C_INT .
Array of length nnz , containing the column indices for each non-zero element of matrix \(A\) . Refer to columns array description in Coordinate Format for more details.
values
C_FLOAT |
for mkl_sparse_s_create_coo |
C_DOUBLE |
for mkl_sparse_d_create_coo |
C_FLOAT_COMPLEX |
for mkl_sparse_c_create_coo |
C_DOUBLE_COMPLEX |
for mkl_sparse_z_create_coo |
Array of length nnz , containing the stored elements of matrix A. Refer to values array description in Coordinate Format for more details.
stat
INTEGER
Value indicating whether the operation was successful, and if not, why:
SPARSE_STATUS_SUCCESS |
The operation was successful. |
SPARSE_STATUS_NOT_INITIALIZED |
The routine encountered an empty handle or matrix array. |
SPARSE_STATUS_ALLOC_FAILED |
Internal memory allocation failed. |
SPARSE_STATUS_INVALID_VALUE |
The input parameters contain an invalid value. |
SPARSE_STATUS_EXECUTION_FAILED |
Execution failed. |
SPARSE_STATUS_INTERNAL_ERROR |
An error in algorithm implementation occurred. |
SPARSE_STATUS_NOT_SUPPORTED |
The requested operation is not supported. |
Return Values
See Output Parameter, stat.