]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use AssertNothrowCuda
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Sat, 18 Aug 2018 21:35:34 +0000 (23:35 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Sun, 19 Aug 2018 22:53:29 +0000 (00:53 +0200)
source/lac/cuda_sparse_matrix.cu

index dfd9d7956bf72cbbbb37e0174dc7052bdfd21871..c1afb5c1062a24ff446289a33331a0c8adc49b06 100644 (file)
@@ -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;
       }
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.