From 95eb631ada71f7123699024a69ea12d52c0d8933 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Sat, 18 Aug 2018 23:35:34 +0200 Subject: [PATCH] Use AssertNothrowCuda --- source/lac/cuda_sparse_matrix.cu | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/source/lac/cuda_sparse_matrix.cu b/source/lac/cuda_sparse_matrix.cu index dfd9d7956b..c1afb5c106 100644 --- a/source/lac/cuda_sparse_matrix.cu +++ b/source/lac/cuda_sparse_matrix.cu @@ -218,29 +218,30 @@ namespace CUDAWrappers { if (val_dev != nullptr) { - cudaError_t error_code = cudaFree(val_dev); - AssertCuda(error_code); + const cudaError_t error_code = cudaFree(val_dev); + AssertNothrowCuda(error_code); val_dev = nullptr; } if (column_index_dev != nullptr) { - cudaError_t error_code = cudaFree(column_index_dev); - AssertCuda(error_code); + const cudaError_t error_code = cudaFree(column_index_dev); + AssertNothrowCuda(error_code); column_index_dev = nullptr; } if (row_ptr_dev != nullptr) { - cudaError_t error_code = cudaFree(row_ptr_dev); - AssertCuda(error_code); + const cudaError_t error_code = cudaFree(row_ptr_dev); + AssertNothrowCuda(error_code); row_ptr_dev = nullptr; } if (descr != nullptr) { - cusparseStatus_t cusparse_error_code = cusparseDestroyMatDescr(descr); - AssertCusparse(cusparse_error_code); + const cusparseStatus_t cusparse_error_code = + cusparseDestroyMatDescr(descr); + AssertNothrowCusparse(cusparse_error_code); descr = nullptr; } -- 2.39.5