From: Daniel Arndt Date: Tue, 8 Dec 2020 00:40:02 +0000 (-0500) Subject: Guard matrix_free/cuda_matrix_free.h again X-Git-Tag: v9.3.0-rc1~788^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f78db96e4355575c98488310c98b4065a48c606b;p=dealii.git Guard matrix_free/cuda_matrix_free.h again --- diff --git a/include/deal.II/matrix_free/cuda_matrix_free.h b/include/deal.II/matrix_free/cuda_matrix_free.h index ca8ec5895f..9d3ff0c598 100644 --- a/include/deal.II/matrix_free/cuda_matrix_free.h +++ b/include/deal.II/matrix_free/cuda_matrix_free.h @@ -19,22 +19,24 @@ #include -#include -#include -#include -#include +#ifdef DEAL_II_COMPILER_CUDA_AWARE + +# include +# include +# include +# include -#include +# include -#include -#include -#include +# include +# include +# include -#include +# include -#include -#include -#include +# include +# include +# include DEAL_II_NAMESPACE_OPEN @@ -42,13 +44,13 @@ DEAL_II_NAMESPACE_OPEN namespace CUDAWrappers { // forward declaration -#ifndef DOXYGEN +# ifndef DOXYGEN namespace internal { template class ReinitHelper; } -#endif +# endif /** * This class collects all the data that is stored for the matrix free @@ -116,12 +118,12 @@ namespace CUDAWrappers , use_coloring(use_coloring) , overlap_communication_computation(overlap_communication_computation) { -#ifndef DEAL_II_MPI_WITH_CUDA_SUPPORT +# ifndef DEAL_II_MPI_WITH_CUDA_SUPPORT AssertThrow( overlap_communication_computation == false, ExcMessage( "Overlapping communication and computation requires CUDA-aware MPI.")); -#endif +# endif if (overlap_communication_computation == true) AssertThrow( use_coloring == false || overlap_communication_computation == false, @@ -668,8 +670,6 @@ namespace CUDAWrappers -#ifdef DEAL_II_COMPILER_CUDA_AWARE - // This function determines the number of cells per block, possibly at compile // time (by virtue of being 'constexpr') // TODO this function should be rewritten using meta-programming @@ -897,12 +897,11 @@ namespace CUDAWrappers { return data.q_points[data.padding_length * cell + i]; } -#endif /*----------------------- Inline functions ---------------------------------*/ -#ifndef DOXYGEN +# ifndef DOXYGEN template inline const std::vector