Intel® Math Kernel Library 2018 Developer Reference - C
Creates a handle for a matrix in BSR format.
sparse_status_t mkl_sparse_s_create_bsr (sparse_matrix_t *A, sparse_index_base_t indexing, sparse_layout_t block_layout, MKL_INT rows, MKL_INT cols, MKL_INT block_size, MKL_INT *rows_start, MKL_INT *rows_end, MKL_INT *col_indx, float *values);
sparse_status_t mkl_sparse_d_create_bsr (sparse_matrix_t *A, sparse_index_base_t indexing, sparse_layout_t block_layout, MKL_INT rows, MKL_INT cols, MKL_INT block_size, MKL_INT *rows_start, MKL_INT *rows_end, MKL_INT *col_indx, double *values);
sparse_status_t mkl_sparse_c_create_bsr (sparse_matrix_t *A, sparse_index_base_t indexing, sparse_layout_t block_layout, MKL_INT rows, MKL_INT cols, MKL_INT block_size, MKL_INT *rows_start, MKL_INT *rows_end, MKL_INT *col_indx, MKL_Complex8 *values);
sparse_status_t mkl_sparse_z_create_bsr (sparse_matrix_t *A, sparse_index_base_t indexing, sparse_layout_t block_layout, MKL_INT rows, MKL_INT cols, MKL_INT block_size, MKL_INT *rows_start, MKL_INT *rows_end, MKL_INT *col_indx, MKL_Complex16 *values);
The mkl_sparse_?_create_bsr routine creates a handle for an m-by-k matrix A in BSR format.
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. |
Specifies layout of blocks:
SPARSE_LAYOUT_ROW_MAJOR |
Storage of elements of blocks uses row major layout. |
SPARSE_LAYOUT_COLUMN_MAJOR |
Storage of elements of blocks uses column major layout. |
If you specify SPARSE_INDEX_BASE_ZERO for indexing, you must use SPARSE_LAYOUT_ROW_MAJOR for block_layout. Similarly, if you specify SPARSE_INDEX_BASE_ONE for indexing, you must use SPARSE_LAYOUT_COLUMN_MAJOR for block_layout. Otherwise mkl_sparse_?_create_bsr returns SPARSE_STATUS_NOT_SUPPORTED.
Number of block rows of matrix A.
Number of block columns of matrix A.
Size of blocks in matrix A.
Array of length m. This array contains row indices, such that rows_start[i] - rows_start[0] is the first index of block row i in the arrays values and col_indx.
Refer to pointerb array description in CSR Format for more details.
Array of length m. This array contains row indices, such that rows_end[i] - rows_start[0] - 1 is the last index of block row i in the arrays values and col_indx.
Refer to pointerE array description in CSR Format for more details.
For one-based indexing, array containing the column indices plus one for each non-zero block of the matrix A. For zero-based indexing, array containing the column indices for each non-zero block of the matrix A. Its length is rows_end[rows - 1] - rows_start[0].
Array containing non-zero elements of the matrix A. Its length is equal to length of the col_indx array multiplied by block_size*block_size.
Refer to the values array description in BSR Format for more details.
Handle containing internal data.
The function returns a value indicating whether the operation was successful or not, and 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. |