]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix failing CUDA test 6309/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Tue, 24 Apr 2018 09:59:16 +0000 (11:59 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Tue, 24 Apr 2018 09:59:54 +0000 (11:59 +0200)
include/deal.II/base/tensor.h

index 2aa612b6dc915f4652d1c22c06ca68828cd39007..21ca0b5b5f7e1f86d07dc5cd563fd0839d32d2e3 100644 (file)
@@ -909,7 +909,10 @@ inline
 typename Tensor<0,dim,Number>::real_type
 DEAL_II_CUDA_HOST_DEV Tensor<0,dim,Number>::norm_square () const
 {
+  // We cannot use Assert inside a CUDA kernel
+#ifndef DEAL_II_WITH_CUDA
   Assert(dim != 0, ExcMessage("Cannot access an object of type Tensor<0,0,Number>"));
+#endif
   return numbers::NumberTraits<Number>::abs_square (value);
 }
 

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.