Sparse Matrix SpMV operations with CUDA. More...
#include "cs_defs.h" Include dependency graph for cs_matrix_spmv_cuda.h:
 Include dependency graph for cs_matrix_spmv_cuda.h:Go to the source code of this file.
| Functions | |
| void | cs_matrix_spmv_cuda_finalize (void) | 
| Finalize CUDA matrix API.  More... | |
| void | cs_matrix_spmv_cuda_native (cs_matrix_t *matrix, bool exclude_diag, bool sync, cs_real_t d_x[restrict], cs_real_t d_y[restrict]) | 
| Matrix.vector product y = A.x with MSR matrix, scalar CUDA version.  More... | |
| void | cs_matrix_spmv_cuda_csr (cs_matrix_t *matrix, bool exclude_diag, bool sync, cs_real_t d_x[restrict], cs_real_t d_y[restrict]) | 
| Matrix.vector product y = A.x with CSR matrix, scalar CUDA version.  More... | |
| void | cs_matrix_spmv_cuda_csr_cusparse (cs_matrix_t *matrix, bool exclude_diag, bool sync, cs_real_t d_x[restrict], cs_real_t d_y[restrict]) | 
| Matrix.vector product y = A.x with CSR matrix, scalar cuSPARSE version.  More... | |
| void | cs_matrix_spmv_cuda_msr (cs_matrix_t *matrix, bool exclude_diag, bool sync, cs_real_t d_x[restrict], cs_real_t d_y[restrict]) | 
| Matrix.vector product y = A.x with MSR matrix, scalar CUDA version.  More... | |
| void | cs_matrix_spmv_cuda_msr_cusparse (cs_matrix_t *matrix, bool exclude_diag, bool sync, cs_real_t d_x[restrict], cs_real_t d_y[restrict]) | 
| Matrix.vector product y = A.x with MSR matrix, scalar cuSPARSE version.  More... | |
| void | cs_matrix_spmv_cuda_msr_b (cs_matrix_t *matrix, bool exclude_diag, bool sync, cs_real_t d_x[restrict], cs_real_t d_y[restrict]) | 
| Matrix.vector product y = A.x with MSR matrix, block diagonal CUDA version.  More... | |
| void | cs_matrix_spmv_cuda_msr_bb_cusparse (cs_matrix_t *matrix, bool exclude_diag, bool sync, cs_real_t d_x[restrict], cs_real_t d_y[restrict]) | 
| Matrix.vector product y = A.x with MSR matrix, block cuSPARSE version.  More... | |
Sparse Matrix SpMV operations with CUDA.
| void cs_matrix_spmv_cuda_csr | ( | cs_matrix_t * | matrix, | 
| bool | exclude_diag, | ||
| bool | sync, | ||
| cs_real_t | d_x[restrict], | ||
| cs_real_t | d_y[restrict] | ||
| ) | 
Matrix.vector product y = A.x with CSR matrix, scalar CUDA version.
| [in] | matrix | pointer to matrix structure | 
| [in] | exclude_diag | exclude diagonal if true, | 
| [in] | sync | synchronize ghost cells if true | 
| [in] | d_x | multipliying vector values (on device) | 
| [out] | d_y | resulting vector (on device) | 
| void cs_matrix_spmv_cuda_csr_cusparse | ( | cs_matrix_t * | matrix, | 
| bool | exclude_diag, | ||
| bool | sync, | ||
| cs_real_t | d_x[restrict], | ||
| cs_real_t | d_y[restrict] | ||
| ) | 
Matrix.vector product y = A.x with CSR matrix, scalar cuSPARSE version.
| [in] | matrix | pointer to matrix structure | 
| [in] | exclude_diag | exclude diagonal if true, | 
| [in] | sync | synchronize ghost cells if true | 
| [in] | d_x | multipliying vector values (on device) | 
| [out] | d_y | resulting vector (on device) | 
| void cs_matrix_spmv_cuda_finalize | ( | void | ) | 
Finalize CUDA matrix API.
This frees resources such as the cuSPARSE handle, if used.
| void cs_matrix_spmv_cuda_msr | ( | cs_matrix_t * | matrix, | 
| bool | exclude_diag, | ||
| bool | sync, | ||
| cs_real_t | d_x[restrict], | ||
| cs_real_t | d_y[restrict] | ||
| ) | 
Matrix.vector product y = A.x with MSR matrix, scalar CUDA version.
| [in] | matrix | pointer to matrix structure | 
| [in] | exclude_diag | exclude diagonal if true, | 
| [in] | sync | synchronize ghost cells if true | 
| [in] | d_x | multipliying vector values (on device) | 
| [out] | d_y | resulting vector (on device) | 
| void cs_matrix_spmv_cuda_msr_b | ( | cs_matrix_t * | matrix, | 
| bool | exclude_diag, | ||
| bool | sync, | ||
| cs_real_t | d_x[restrict], | ||
| cs_real_t | d_y[restrict] | ||
| ) | 
Matrix.vector product y = A.x with MSR matrix, block diagonal CUDA version.
| [in] | matrix | pointer to matrix structure | 
| [in] | exclude_diag | exclude diagonal if true, | 
| [in] | sync | synchronize ghost cells if true | 
| [in] | d_x | multipliying vector values (on device) | 
| [out] | d_y | resulting vector (on device) | 
| void cs_matrix_spmv_cuda_msr_bb_cusparse | ( | cs_matrix_t * | matrix, | 
| bool | exclude_diag, | ||
| bool | sync, | ||
| cs_real_t | d_x[restrict], | ||
| cs_real_t | d_y[restrict] | ||
| ) | 
Matrix.vector product y = A.x with MSR matrix, block cuSPARSE version.
Remmark: this functions is available with older cuSPARSE versions not providing the generic API, because they assume dense matrixes are always in column-major order, while row-major is needed with interleaved blocks.
| [in] | matrix | pointer to matrix structure | 
| [in] | exclude_diag | exclude diagonal if true, | 
| [in] | sync | synchronize ghost cells if true | 
| [in] | d_x | multipliying vector values (on device) | 
| [out] | d_y | resulting vector (on device) | 
| void cs_matrix_spmv_cuda_msr_cusparse | ( | cs_matrix_t * | matrix, | 
| bool | exclude_diag, | ||
| bool | sync, | ||
| cs_real_t | d_x[restrict], | ||
| cs_real_t | d_y[restrict] | ||
| ) | 
Matrix.vector product y = A.x with MSR matrix, scalar cuSPARSE version.
| [in] | matrix | pointer to matrix structure | 
| [in] | exclude_diag | exclude diagonal if true, | 
| [in] | sync | synchronize ghost cells if true | 
| [in] | d_x | multipliying vector values (on device) | 
| [out] | d_y | resulting vector (on device) | 
| void cs_matrix_spmv_cuda_native | ( | cs_matrix_t * | matrix, | 
| bool | exclude_diag, | ||
| bool | sync, | ||
| cs_real_t | d_x[restrict], | ||
| cs_real_t | d_y[restrict] | ||
| ) | 
Matrix.vector product y = A.x with MSR matrix, scalar CUDA version.
| [in] | matrix | pointer to matrix structure | 
| [in] | exclude_diag | exclude diagonal if true, | 
| [in] | sync | synchronize ghost cells if true | 
| [in] | d_x | multipliying vector values (on device) | 
| [out] | d_y | resulting vector (on device) |