9.2
general documentation
cs_matrix_spmv_hip.h File Reference

Sparse Matrix SpMV operations with HIP. More...

#include "base/cs_defs.h"
+ Include dependency graph for cs_matrix_spmv_hip.h:

Go to the source code of this file.

Functions

void cs_matrix_spmv_hip_finalize (void)
 Finalize HIP matrix API. More...
 
void cs_matrix_spmv_hip_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 HIP version. More...
 
void cs_matrix_spmv_hip_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 HIP version. More...
 
void cs_matrix_spmv_hip_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 HIP version. More...
 
void cs_matrix_spmv_hip_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 HIP version. More...
 
void cs_matrix_spmv_hip_msr_bb_rocsparse (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 rocSPARSE version. More...
 

Detailed Description

Sparse Matrix SpMV operations with HIP.

Function Documentation

◆ cs_matrix_spmv_hip_csr()

void cs_matrix_spmv_hip_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 HIP 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)

Matrix.vector product y = A.x with CSR matrix, scalar HIP 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_hip_finalize()

void cs_matrix_spmv_hip_finalize ( void  )

Finalize HIP matrix API.

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

Finalize HIP matrix API.

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

◆ cs_matrix_spmv_hip_msr()

void cs_matrix_spmv_hip_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 HIP 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)

Matrix.vector product y = A.x with MSR matrix, scalar HIP 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_hip_msr_b()

void cs_matrix_spmv_hip_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 HIP 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)

Matrix.vector product y = A.x with MSR matrix, block diagonal HIP 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_hip_msr_bb_rocsparse()

void cs_matrix_spmv_hip_msr_bb_rocsparse ( 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 rocSPARSE version.

Remmark: this functions is available with older rocSPARSE 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_hip_native()

void cs_matrix_spmv_hip_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 HIP 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)