diff --git a/DASP/src/main_spmv3_f64.cu b/DASP/src/main_spmv3_f64.cu index 810de46..2511fac 100644 --- a/DASP/src/main_spmv3_f64.cu +++ b/DASP/src/main_spmv3_f64.cu @@ -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 ++)