Types#

rocsparse_handle#

typedef struct _rocsparse_handle *rocsparse_handle#

Handle to the rocSPARSE library context queue.

The rocSPARSE handle is a structure holding the rocSPARSE library context. It must be initialized using rocsparse_create_handle() and the returned handle must be passed to all subsequent library function calls. It should be destroyed at the end using rocsparse_destroy_handle().

rocsparse_mat_descr#

typedef struct _rocsparse_mat_descr *rocsparse_mat_descr#

Descriptor of the matrix.

The rocSPARSE matrix descriptor is a structure holding all properties of a matrix. It must be initialized using rocsparse_create_mat_descr() and the returned descriptor must be passed to all subsequent library calls that involve the matrix. It should be destroyed at the end using rocsparse_destroy_mat_descr().

rocsparse_mat_info#

typedef struct _rocsparse_mat_info *rocsparse_mat_info#

Info structure to hold all matrix meta data.

The rocSPARSE matrix info is a structure holding all matrix information that is gathered during analysis routines. It must be initialized using rocsparse_create_mat_info() and the returned info structure must be passed to all subsequent library calls that require additional matrix information. It should be destroyed at the end using rocsparse_destroy_mat_info().

rocsparse_hyb_mat#

typedef struct _rocsparse_hyb_mat *rocsparse_hyb_mat#

HYB matrix storage format.

The rocSPARSE HYB matrix structure holds the HYB matrix. It must be initialized using rocsparse_create_hyb_mat() and the returned HYB matrix must be passed to all subsequent library calls that involve the matrix. It should be destroyed at the end using rocsparse_destroy_hyb_mat().

For more details on the HYB format, see HYB storage format.

rocsparse_action#

enum rocsparse_action#

Specify where the operation is performed on.

The rocsparse_action indicates whether the operation is performed on the full matrix, or only on the sparsity pattern of the matrix.

Values:

enumerator rocsparse_action_symbolic#

Operate only on indices.

enumerator rocsparse_action_numeric#

Operate on data and indices.

rocsparse_direction#

enum rocsparse_direction#

Specify the matrix direction.

The rocsparse_direction indicates whether a dense matrix should be parsed by rows or by columns, assuming column-major storage.

Values:

enumerator rocsparse_direction_row#

Parse the matrix by rows.

enumerator rocsparse_direction_column#

Parse the matrix by columns.

rocsparse_hyb_partition#

enum rocsparse_hyb_partition#

HYB matrix partitioning type.

The rocsparse_hyb_partition type indicates how the hybrid format partitioning between COO and ELL storage formats is performed.

Values:

enumerator rocsparse_hyb_partition_auto#

automatically decide on ELL nnz per row.

enumerator rocsparse_hyb_partition_user#

user given ELL nnz per row.

enumerator rocsparse_hyb_partition_max#

max ELL nnz per row, no COO part.

rocsparse_index_base#

enum rocsparse_index_base#

Specify the matrix index base.

The rocsparse_index_base indicates the index base of the indices. For a given rocsparse_mat_descr, the rocsparse_index_base can be set using rocsparse_set_mat_index_base(). The current rocsparse_index_base of a matrix can be obtained by rocsparse_get_mat_index_base().

Values:

enumerator rocsparse_index_base_zero#

zero based indexing.

enumerator rocsparse_index_base_one#

one based indexing.

rocsparse_matrix_type#

enum rocsparse_matrix_type#

Specify the matrix type.

The rocsparse_matrix_type indices the type of a matrix. For a given rocsparse_mat_descr, the rocsparse_matrix_type can be set using rocsparse_set_mat_type(). The current rocsparse_matrix_type of a matrix can be obtained by rocsparse_get_mat_type().

Values:

enumerator rocsparse_matrix_type_general#

general matrix type.

enumerator rocsparse_matrix_type_symmetric#

symmetric matrix type.

enumerator rocsparse_matrix_type_hermitian#

hermitian matrix type.

enumerator rocsparse_matrix_type_triangular#

triangular matrix type.

rocsparse_fill_mode#

enum rocsparse_fill_mode#

Specify the matrix fill mode.

The rocsparse_fill_mode indicates whether the lower or the upper part is stored in a sparse triangular matrix. For a given rocsparse_mat_descr, the rocsparse_fill_mode can be set using rocsparse_set_mat_fill_mode(). The current rocsparse_fill_mode of a matrix can be obtained by rocsparse_get_mat_fill_mode().

Values:

enumerator rocsparse_fill_mode_lower#

lower triangular part is stored.

enumerator rocsparse_fill_mode_upper#

upper triangular part is stored.

rocsparse_storage_mode#

enum rocsparse_storage_mode#

Specify whether the matrix is stored sorted or not.

The rocsparse_storage_mode indicates whether the matrix is stored sorted or not. For a given rocsparse_mat_descr, the rocsparse_storage_mode can be set using rocsparse_set_mat_storage_mode(). The current rocsparse_storage_mode of a matrix can be obtained by rocsparse_get_mat_storage_mode().

Values:

enumerator rocsparse_storage_mode_sorted#

matrix is sorted.

enumerator rocsparse_storage_mode_unsorted#

matrix is unsorted.

rocsparse_diag_type#

enum rocsparse_diag_type#

Indicates if the diagonal entries are unity.

The rocsparse_diag_type indicates whether the diagonal entries of a matrix are unity or not. If rocsparse_diag_type_unit is specified, all present diagonal values will be ignored. For a given rocsparse_mat_descr, the rocsparse_diag_type can be set using rocsparse_set_mat_diag_type(). The current rocsparse_diag_type of a matrix can be obtained by rocsparse_get_mat_diag_type().

Values:

enumerator rocsparse_diag_type_non_unit#

diagonal entries are non-unity.

enumerator rocsparse_diag_type_unit#

diagonal entries are unity

rocsparse_operation#

enum rocsparse_operation#

Specify whether the matrix is to be transposed or not.

The rocsparse_operation indicates the operation performed with the given matrix.

Values:

enumerator rocsparse_operation_none#

Operate with matrix.

enumerator rocsparse_operation_transpose#

Operate with transpose.

enumerator rocsparse_operation_conjugate_transpose#

Operate with conj. transpose.

rocsparse_pointer_mode#

enum rocsparse_pointer_mode#

Indicates if the pointer is device pointer or host pointer.

The rocsparse_pointer_mode indicates whether scalar values are passed by reference on the host or device. The rocsparse_pointer_mode can be changed by rocsparse_set_pointer_mode(). The currently used pointer mode can be obtained by rocsparse_get_pointer_mode().

Values:

enumerator rocsparse_pointer_mode_host#

scalar pointers are in host memory.

enumerator rocsparse_pointer_mode_device#

scalar pointers are in device memory.

rocsparse_analysis_policy#

enum rocsparse_analysis_policy#

Specify policy in analysis functions.

The rocsparse_analysis_policy specifies whether gathered analysis data should be re-used or not. If meta data from a previous e.g. rocsparse_csrilu0_analysis() call is available, it can be re-used for subsequent calls to e.g. rocsparse_csrsv_analysis() and greatly improve performance of the analysis function.

Values:

enumerator rocsparse_analysis_policy_reuse#

try to re-use meta data.

enumerator rocsparse_analysis_policy_force#

force to re-build meta data.

rocsparse_solve_policy#

enum rocsparse_solve_policy#

Specify policy in triangular solvers and factorizations.

This is a placeholder.

Values:

enumerator rocsparse_solve_policy_auto#

automatically decide on level information.

rocsparse_layer_mode#

enum rocsparse_layer_mode#

Indicates if layer is active with bitmask.

The rocsparse_layer_mode bit mask indicates the logging characteristics.

Values:

enumerator rocsparse_layer_mode_none#

layer is not active.

enumerator rocsparse_layer_mode_log_trace#

layer is in logging mode.

enumerator rocsparse_layer_mode_log_bench#

layer is in benchmarking mode (deprecated)

enumerator rocsparse_layer_mode_log_debug#

layer is in debug mode.

For more details on logging, see Logging.

rocsparse_status#

enum rocsparse_status#

List of rocsparse status codes definition.

This is a list of the rocsparse_status types that are used by the rocSPARSE library.

Values:

enumerator rocsparse_status_success#

success.

enumerator rocsparse_status_invalid_handle#

handle not initialized, invalid or null.

enumerator rocsparse_status_not_implemented#

function is not implemented.

enumerator rocsparse_status_invalid_pointer#

invalid pointer parameter.

enumerator rocsparse_status_invalid_size#

invalid size parameter.

enumerator rocsparse_status_memory_error#

failed memory allocation, copy, dealloc.

enumerator rocsparse_status_internal_error#

other internal library failure.

enumerator rocsparse_status_invalid_value#

invalid value parameter.

enumerator rocsparse_status_arch_mismatch#

device arch is not supported.

enumerator rocsparse_status_zero_pivot#

encountered zero pivot.

enumerator rocsparse_status_not_initialized#

descriptor has not been initialized.

enumerator rocsparse_status_type_mismatch#

index types do not match.

enumerator rocsparse_status_requires_sorted_storage#

sorted storage required.

enumerator rocsparse_status_thrown_exception#

exception being thrown.

enumerator rocsparse_status_continue#

Nothing preventing function to proceed

rocsparse_indextype#

enum rocsparse_indextype#

List of rocsparse index types.

Indicates the index width of a rocsparse index type.

Values:

enumerator rocsparse_indextype_u16#

16 bit unsigned integer.

enumerator rocsparse_indextype_i32#

32 bit signed integer.

enumerator rocsparse_indextype_i64#

64 bit signed integer.

rocsparse_datatype#

enum rocsparse_datatype#

List of rocsparse data types.

Indicates the precision width of data stored in a rocsparse type.

Values:

enumerator rocsparse_datatype_f32_r#

32 bit floating point, real.

enumerator rocsparse_datatype_f64_r#

64 bit floating point, real.

enumerator rocsparse_datatype_f32_c#

32 bit floating point, complex.

enumerator rocsparse_datatype_f64_c#

64 bit floating point, complex.

enumerator rocsparse_datatype_i8_r#

8-bit signed integer, real

enumerator rocsparse_datatype_u8_r#

8-bit unsigned integer, real

enumerator rocsparse_datatype_i32_r#

32-bit signed integer, real

enumerator rocsparse_datatype_u32_r#

32-bit unsigned integer, real

rocsparse_format#

enum rocsparse_format#

List of sparse matrix formats.

This is a list of supported rocsparse_format types that are used to describe a sparse matrix.

Values:

enumerator rocsparse_format_coo#

COO sparse matrix format.

enumerator rocsparse_format_coo_aos#

COO AoS sparse matrix format.

enumerator rocsparse_format_csr#

CSR sparse matrix format.

enumerator rocsparse_format_csc#

CSC sparse matrix format.

enumerator rocsparse_format_ell#

ELL sparse matrix format.

enumerator rocsparse_format_bell#

BLOCKED ELL sparse matrix format.

enumerator rocsparse_format_bsr#

BSR sparse matrix format.

rocsparse_order#

enum rocsparse_order#

List of dense matrix ordering.

This is a list of supported rocsparse_order types that are used to describe the memory layout of a dense matrix

Values:

enumerator rocsparse_order_row#

Row major.

enumerator rocsparse_order_column#

Column major.

rocsparse_spmv_alg#

enum rocsparse_spmv_alg#

List of SpMV algorithms.

This is a list of supported rocsparse_spmv_alg types that are used to perform matrix vector product.

Values:

enumerator rocsparse_spmv_alg_default#

Default SpMV algorithm for the given format.

enumerator rocsparse_spmv_alg_coo#

COO SpMV algorithm 1 (segmented) for COO matrices.

enumerator rocsparse_spmv_alg_csr_adaptive#

CSR SpMV algorithm 1 (adaptive) for CSR matrices.

enumerator rocsparse_spmv_alg_csr_stream#

CSR SpMV algorithm 2 (stream) for CSR matrices.

enumerator rocsparse_spmv_alg_ell#

ELL SpMV algorithm for ELL matrices.

enumerator rocsparse_spmv_alg_coo_atomic#

COO SpMV algorithm 2 (atomic) for COO matrices.

enumerator rocsparse_spmv_alg_bsr#

BSR SpMV algorithm 1 for BSR matrices.

enumerator rocsparse_spmv_alg_csr_lrb#

CSR SpMV algorithm 3 (LRB) for CSR matrices.

rocsparse_spmv_stage#

enum rocsparse_spmv_stage#

List of SpMV stages.

This is a list of possible stages during SpMV computation. Typical order is rocsparse_spmv_buffer_size, rocsparse_spmv_preprocess, rocsparse_spmv_compute.

Values:

enumerator rocsparse_spmv_stage_buffer_size#

Returns the required buffer size.

enumerator rocsparse_spmv_stage_preprocess#

Preprocess data.

enumerator rocsparse_spmv_stage_compute#

Performs the actual SpMV computation.

rocsparse_spsv_alg#

enum rocsparse_spsv_alg#

List of SpSV algorithms.

This is a list of supported rocsparse_spsv_alg types that are used to perform triangular solve.

Values:

enumerator rocsparse_spsv_alg_default#

Default SpSV algorithm for the given format.

rocsparse_spsv_stage#

enum rocsparse_spsv_stage#

List of SpSV stages.

This is a list of possible stages during SpSV computation. Typical order is rocsparse_spsv_buffer_size, rocsparse_spsv_preprocess, rocsparse_spsv_compute.

Values:

enumerator rocsparse_spsv_stage_buffer_size#

Returns the required buffer size.

enumerator rocsparse_spsv_stage_preprocess#

Preprocess data.

enumerator rocsparse_spsv_stage_compute#

Performs the actual SpSV computation.

rocsparse_spsm_alg#

enum rocsparse_spsm_alg#

List of SpSM algorithms.

This is a list of supported rocsparse_spsm_alg types that are used to perform triangular solve.

Values:

enumerator rocsparse_spsm_alg_default#

Default SpSM algorithm for the given format.

rocsparse_spsm_stage#

enum rocsparse_spsm_stage#

List of SpSM stages.

This is a list of possible stages during SpSM computation. Typical order is rocsparse_spsm_buffer_size, rocsparse_spsm_preprocess, rocsparse_spsm_compute.

Values:

enumerator rocsparse_spsm_stage_buffer_size#

Returns the required buffer size.

enumerator rocsparse_spsm_stage_preprocess#

Preprocess data.

enumerator rocsparse_spsm_stage_compute#

Performs the actual SpSM computation.

rocsparse_spmm_alg#

enum rocsparse_spmm_alg#

List of SpMM algorithms.

This is a list of supported rocsparse_spmm_alg types that are used to perform matrix vector product.

Values:

enumerator rocsparse_spmm_alg_default#

Default SpMM algorithm for the given format.

enumerator rocsparse_spmm_alg_csr#

SpMM algorithm for CSR format using row split and shared memory.

enumerator rocsparse_spmm_alg_coo_segmented#

SpMM algorithm for COO format using segmented scan.

enumerator rocsparse_spmm_alg_coo_atomic#

SpMM algorithm for COO format using atomics.

enumerator rocsparse_spmm_alg_csr_row_split#

SpMM algorithm for CSR format using row split and shfl.

enumerator rocsparse_spmm_alg_csr_merge#

SpMM algorithm for CSR format using conversion to COO.

enumerator rocsparse_spmm_alg_coo_segmented_atomic#

SpMM algorithm for COO format using segmented scan and atomics.

enumerator rocsparse_spmm_alg_bell#

SpMM algorithm for Blocked ELL format.

enumerator rocsparse_spmm_alg_bsr#

SpMM algorithm for BSR format.

rocsparse_spmm_stage#

enum rocsparse_spmm_stage#

List of SpMM stages.

This is a list of possible stages during SpMM computation. Typical order is rocsparse_spmm_buffer_size, rocsparse_spmm_preprocess, rocsparse_spmm_compute.

Values:

enumerator rocsparse_spmm_stage_buffer_size#

Returns the required buffer size.

enumerator rocsparse_spmm_stage_preprocess#

Preprocess data.

enumerator rocsparse_spmm_stage_compute#

Performs the actual SpMM computation.

rocsparse_sddmm_alg#

enum rocsparse_sddmm_alg#

List of sddmm algorithms.

This is a list of supported rocsparse_sddmm_alg types that are used to perform matrix vector product.

Values:

enumerator rocsparse_sddmm_alg_default#

Default sddmm algorithm for the given format.

enumerator rocsparse_sddmm_alg_dense#

Sddmm algorithm using dense blas operations.

rocsparse_spgemm_stage#

enum rocsparse_spgemm_stage#

List of SpGEMM stages.

This is a list of possible stages during SpGEMM computation. Typical order is rocsparse_spgemm_buffer_size, rocsparse_spgemm_nnz, rocsparse_spgemm_compute.

Values:

enumerator rocsparse_spgemm_stage_buffer_size#

Returns the required buffer size.

enumerator rocsparse_spgemm_stage_nnz#

Computes number of non-zero entries.

enumerator rocsparse_spgemm_stage_compute#

Performs the actual SpGEMM computation.

enumerator rocsparse_spgemm_stage_symbolic#

Performs the actual SpGEMM symbolic computation.

enumerator rocsparse_spgemm_stage_numeric#

Performs the actual SpGEMM numeric computation.

rocsparse_spgemm_alg#

enum rocsparse_spgemm_alg#

List of SpGEMM algorithms.

This is a list of supported rocsparse_spgemm_alg types that are used to perform sparse matrix sparse matrix product.

Values:

enumerator rocsparse_spgemm_alg_default#

Default SpGEMM algorithm for the given format.

rocsparse_sparse_to_dense_alg#

enum rocsparse_sparse_to_dense_alg#

List of sparse to dense algorithms.

This is a list of supported rocsparse_sparse_to_dense_alg types that are used to perform sparse to dense conversion.

Values:

enumerator rocsparse_sparse_to_dense_alg_default#

Default sparse to dense algorithm for the given format.

rocsparse_dense_to_sparse_alg#

enum rocsparse_dense_to_sparse_alg#

List of dense to sparse algorithms.

This is a list of supported rocsparse_dense_to_sparse_alg types that are used to perform dense to sparse conversion.

Values:

enumerator rocsparse_dense_to_sparse_alg_default#

Default dense to sparse algorithm for the given format.

rocsparse_gtsv_interleaved_alg#

enum rocsparse_gtsv_interleaved_alg#

List of interleaved gtsv algorithms.

This is a list of supported rocsparse_gtsv_interleaved_alg types that are used to perform interleaved tridiagonal solve.

Values:

enumerator rocsparse_gtsv_interleaved_alg_default#

Solve interleaved gtsv using QR algorithm (stable).

enumerator rocsparse_gtsv_interleaved_alg_thomas#

Solve interleaved gtsv using thomas algorithm (unstable).

enumerator rocsparse_gtsv_interleaved_alg_lu#

Solve interleaved gtsv using LU algorithm (stable).

enumerator rocsparse_gtsv_interleaved_alg_qr#

Solve interleaved gtsv using QR algorithm (stable).