8.3
general documentation
cs_matrix_spmv_cuda.h File Reference

Sparse Matrix SpMV operations with CUDA. More...

#include "cs_defs.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[], cs_real_t d_y[])
 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[], cs_real_t d_y[])
 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[], cs_real_t d_y[])
 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[], cs_real_t d_y[])
 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[], cs_real_t d_y[])
 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[], cs_real_t d_y[])
 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[], cs_real_t d_y[])
 Matrix.vector product y = A.x with MSR matrix, block cuSPARSE version. More...
 

Detailed Description

Sparse Matrix SpMV operations with CUDA.

Function Documentation

◆ cs_matrix_spmv_cuda_csr()

void cs_matrix_spmv_cuda_csr ( cs_matrix_t matrix,
bool  exclude_diag,
bool  sync,
cs_real_t  d_x[],
cs_real_t  d_y[] 
)

Matrix.vector product y = A.x with CSR matrix, scalar CUDA version.

Parameters
[in]matrixpointer to matrix structure
[in]exclude_diagexclude diagonal if true,
[in]syncsynchronize ghost cells if true
[in]d_xmultipliying vector values (on device)
[out]d_yresulting vector (on device)

◆ cs_matrix_spmv_cuda_csr_cusparse()

void cs_matrix_spmv_cuda_csr_cusparse ( cs_matrix_t matrix,
bool  exclude_diag,
bool  sync,
cs_real_t  d_x[],
cs_real_t  d_y[] 
)

Matrix.vector product y = A.x with CSR matrix, scalar cuSPARSE version.

Parameters
[in]matrixpointer to matrix structure
[in]exclude_diagexclude diagonal if true,
[in]syncsynchronize ghost cells if true
[in]d_xmultipliying vector values (on device)
[out]d_yresulting vector (on device)

◆ cs_matrix_spmv_cuda_finalize()

void cs_matrix_spmv_cuda_finalize ( void  )

Finalize CUDA matrix API.

This frees resources such as the cuSPARSE handle, if used.

◆ cs_matrix_spmv_cuda_msr()

void cs_matrix_spmv_cuda_msr ( cs_matrix_t matrix,
bool  exclude_diag,
bool  sync,
cs_real_t  d_x[],
cs_real_t  d_y[] 
)

Matrix.vector product y = A.x with MSR matrix, scalar CUDA version.

Parameters
[in]matrixpointer to matrix structure
[in]exclude_diagexclude diagonal if true,
[in]syncsynchronize ghost cells if true
[in]d_xmultipliying vector values (on device)
[out]d_yresulting vector (on device)

◆ cs_matrix_spmv_cuda_msr_b()

void cs_matrix_spmv_cuda_msr_b ( cs_matrix_t matrix,
bool  exclude_diag,
bool  sync,
cs_real_t  d_x[],
cs_real_t  d_y[] 
)

Matrix.vector product y = A.x with MSR matrix, block diagonal CUDA version.

Parameters
[in]matrixpointer to matrix structure
[in]exclude_diagexclude diagonal if true,
[in]syncsynchronize ghost cells if true
[in]d_xmultipliying vector values (on device)
[out]d_yresulting vector (on device)

◆ cs_matrix_spmv_cuda_msr_bb_cusparse()

void cs_matrix_spmv_cuda_msr_bb_cusparse ( cs_matrix_t matrix,
bool  exclude_diag,
bool  sync,
cs_real_t  d_x[],
cs_real_t  d_y[] 
)

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.

Parameters
[in]matrixpointer to matrix structure
[in]exclude_diagexclude diagonal if true,
[in]syncsynchronize ghost cells if true
[in]d_xmultipliying vector values (on device)
[out]d_yresulting vector (on device)

◆ cs_matrix_spmv_cuda_msr_cusparse()

void cs_matrix_spmv_cuda_msr_cusparse ( cs_matrix_t matrix,
bool  exclude_diag,
bool  sync,
cs_real_t  d_x[],
cs_real_t  d_y[] 
)

Matrix.vector product y = A.x with MSR matrix, scalar cuSPARSE version.

Parameters
[in]matrixpointer to matrix structure
[in]exclude_diagexclude diagonal if true,
[in]syncsynchronize ghost cells if true
[in]d_xmultipliying vector values (on device)
[out]d_yresulting vector (on device)

◆ cs_matrix_spmv_cuda_native()

void cs_matrix_spmv_cuda_native ( cs_matrix_t matrix,
bool  exclude_diag,
bool  sync,
cs_real_t  d_x[],
cs_real_t  d_y[] 
)

Matrix.vector product y = A.x with MSR matrix, scalar CUDA version.

Parameters
[in]matrixpointer to matrix structure
[in]exclude_diagexclude diagonal if true,
[in]syncsynchronize ghost cells if true
[in]d_xmultipliying vector values (on device)
[out]d_yresulting vector (on device)