From: Daniel Arndt Date: Tue, 24 Apr 2018 09:59:16 +0000 (+0200) Subject: Fix failing CUDA test X-Git-Tag: v9.0.0-rc1~128^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68a4bf264b4ef657a83b9d077c81fad87fa256c7;p=dealii.git Fix failing CUDA test --- diff --git a/include/deal.II/base/tensor.h b/include/deal.II/base/tensor.h index 2aa612b6dc..21ca0b5b5f 100644 --- a/include/deal.II/base/tensor.h +++ b/include/deal.II/base/tensor.h @@ -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::abs_square (value); }