-
Notifications
You must be signed in to change notification settings - Fork 67
Exported functions
| Function name |
|---|
| rocsparse_create_handle |
| rocsparse_destroy_handle |
| rocsparse_set_stream |
| rocsparse_get_stream |
| rocsparse_set_pointer_mode |
| rocsparse_get_pointer_mode |
| rocsparse_get_version |
| rocsparse_get_git_rev |
| rocsparse_create_mat_descr |
| rocsparse_copy_mat_descr |
| rocsparse_destroy_mat_descr |
| rocsparse_set_mat_index_base |
| rocsparse_get_mat_index_base |
| rocsparse_set_mat_type |
| rocsparse_get_mat_type |
| rocsparse_set_mat_fill_mode |
| rocsparse_get_mat_fill_mode |
| rocsparse_set_mat_diag_type |
| rocsparse_get_mat_diag_type |
| rocsparse_create_hyb_matrix |
| rocsparse_destroy_hyb_matrix |
| rocsparse_create_mat_info |
| rocsparse_destroy_mat_info |
| Function | single | double | single complex | double complex | half |
|---|---|---|---|---|---|
| rocsparse_Xaxpyi | x | x | x | x | |
| rocsparse_Xdoti | x | x | x | x | |
| rocsparse_Xdotci | x | x | |||
| rocsparse_Xgthr | x | x | x | x | |
| rocsparse_Xgthrz | x | x | x | x | |
| rocsparse_Xroti | x | x | |||
| rocsparse_Xsctr | x | x | x | x |
| Function | single | double | single complex | double complex | half |
|---|---|---|---|---|---|
| rocsparse_Xbsrmv | x | x | x | x | |
| rocsparse_Xbsrsv_buffer_size | x | x | x | x | |
| rocsparse_Xbsrsv_analysis | x | x | x | x | |
| rocsparse_bsrsv_zero_pivot | |||||
| rocsparse_bsrsv_clear | |||||
| rocsparse_Xbsrsv_solve | x | x | x | x | |
| rocsparse_Xcoomv | x | x | x | x | |
| rocsparse_Xcsrmv_analysis | x | x | x | x | |
| rocsparse_csrmv_clear | |||||
| rocsparse_Xcsrmv | x | x | x | x | |
| rocsparse_Xcsrsv_buffer_size | x | x | x | x | |
| rocsparse_Xcsrsv_analysis | x | x | x | x | |
| rocsparse_csrsv_zero_pivot | |||||
| rocsparse_csrsv_clear | |||||
| rocsparse_Xcsrsv_solve | x | x | x | x | |
| rocsparse_Xellmv | x | x | x | x | |
| rocsparse_Xhybmv | x | x | x | x |
| Function | single | double | single complex | double complex | half |
|---|---|---|---|---|---|
| rocsparse_Xbsrmm | x | x | x | x | |
| rocsparse_Xcsrmm | x | x | x | x | |
| rocsparse_Xcsrsm_buffer_size | x | x | x | x | |
| rocsparse_Xcsrsm_analysis | x | x | x | x | |
| rocsparse_csrsm_zero_pivot | |||||
| rocsparse_csrsm_clear | |||||
| rocsparse_csrsm_solve | x | x | x | x | |
| rocsparse_gemmi | x | x | x | x |
| Function | single | double | single complex | double complex | half |
|---|---|---|---|---|---|
| rocsparse_csrgeam_nnz | |||||
| rocsparse_Xcsrgeam | x | x | x | x | |
| rocsparse_Xcsrgemm_buffer_size | x | x | x | x | |
| rocsparse_csrgemm_nnz | |||||
| rocsparse_Xcsrgemm | x | x | x | x |
| Function | single | double | single complex | double complex | half |
|---|---|---|---|---|---|
| rocsparse_Xcsrilu0_buffer_size | x | x | x | x | |
| rocsparse_Xcsrilu0_analysis | x | x | x | x | |
| rocsparse_csrilu0_zero_pivot | |||||
| rocsparse_csrilu0_clear | |||||
| rocsparse_Xcsrilu0 | x | x | x | x | |
| rocsparse_Xcsric0_buffer_size | x | x | x | x | |
| rocsparse_Xcsric0_analysis | x | x | x | x | |
| rocsparse_csric0_zero_pivot | |||||
| rocsparse_csric0_clear | |||||
| rocsparse_Xcsric0 | x | x | x | x |
| Function | single | double | single complex | double complex | half |
|---|---|---|---|---|---|
| rocsparse_csr2coo | |||||
| rocsparse_csr2csc_buffer_size | |||||
| rocsparse_Xcsr2csc | x | x | x | x | |
| rocsparse_csr2ell_width | |||||
| rocsparse_Xcsr2ell | x | x | x | x | |
| rocsparse_Xcsr2hyb | x | x | x | x | |
| rocsparse_csr2bsr_nnz | |||||
| rocsparse_Xcsr2bsr | x | x | x | x | |
| rocsparse_coo2csr | |||||
| rocsparse_ell2csr_nnz | |||||
| rocsparse_Xell2csr | x | x | x | x | |
| rocsparse_Xhyb2csr_buffer_size | x | x | x | x | |
| rocsparse_Xhyb2csr | x | x | x | x | |
| rocsparse_Xbsr2csr | x | x | x | x | |
| rocsparse_Xcsr2csr_compress | x | x | x | x | |
| rocsparse_create_identity_permutation | |||||
| rocsparse_cscsort_buffer_size | |||||
| rocsparse_cscsort | |||||
| rocsparse_csrsort_buffer_size | |||||
| rocsparse_csrsort | |||||
| rocsparse_coosort_buffer_size | |||||
| rocsparse_coosort_by_row | |||||
| rocsparse_coosort_by_column | |||||
| rocsparse_Xdense2csr | x | x | x | x | |
| rocsparse_Xdense2csc | x | x | x | x | |
| rocsparse_Xcsr2dense | x | x | x | x | |
| rocsparse_Xcsc2dense | x | x | x | x | |
| rocsparse_Xnnz_compress | x | x | x | x | |
| rocsparse_Xnnz | x | x | x | x |
-
The rocSPARSE library is LP64, so
rocsparse_intarguments are 32 bit androcsparse_longarguments are 64 bit. -
rocSPARSE supports 0 and 1 based indexing. The index base is selected by
rocsparse_index_basetype which is either passed as standalone parameter or part of therocsparse_mat_descrtype. -
Dense vectors are represented with a 1D array stored linearly in memory.
-
Sparse vectors are represented with a 1D data array stored linearly in memory that holds all non-zero elements and a 1D indexing array stored linearly in memory that holds the positions of the corresponding non-zero elements.
-
The auxiliary functions
rocsparse_set_pointerandrocsparse_get_pointerare used to set and get the value of the state variablerocsparse_pointer_mode. Ifrocsparse_pointer_mode == rocsparse_pointer_mode_host, then scalar parameters must be allocated on the host. Ifrocsparse_pointer_mode == rocsparse_pointer_mode_device, then scalar parameters must be allocated on the device.There are two types of scalar parameter:
- Scaling parameters, such as alpha and beta used in e.g. csrmv, coomv, ...
- Scalar results from functions such as doti, dotci, ...
For scalar parameters such as alpha and beta, memory can be allocated on the host heap or stack, when
rocsparse_pointer_mode == rocsparse_pointer_mode_host. The kernel launch is asynchronous, and if the scalar parameter is on the heap, it can be freed after the return from the kernel launch. Whenrocsparse_pointer_mode == rocsparse_pointer_mode_device, the scalar parameter must not be changed till the kernel completes.For scalar results, when
rocsparse_pointer_mode == rocsparse_pointer_mode_host, then the function blocks the CPU till the GPU has copied the result back to the host. Usingrocsparse_pointer_mode == rocsparse_pointer_mode_device, the function will return after the asynchronous launch. Similarly to vector and matrix results, the scalar result is only available when the kernel has completed execution.