add cusparse check macro

This commit is contained in:
abnerhexu
2026-01-18 22:47:24 +08:00
parent 83ca24cd13
commit ccdfce1619

View File

@@ -1,5 +1,15 @@
#include "dasp_spmv3.h"
#define CHECK_CUSPARSE(func) \
{ \
cusparseStatus_t status = (func); \
if (status != CUSPARSE_STATUS_SUCCESS) { \
printf("cuSPARSE API Error at line %d: %s\n", \
__LINE__, cusparseGetErrorString(status)); \
return; \
} \
}
int verify_new(MAT_VAL_TYPE *cusp_val, MAT_VAL_TYPE *cuda_val, int *new_order, int length)
{
for (int i = 0; i < length; i ++)