]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Guard matrix_free/cuda_matrix_free.h again 11337/head
authorDaniel Arndt <arndtd@ornl.gov>
Tue, 8 Dec 2020 00:40:02 +0000 (19:40 -0500)
committerDaniel Arndt <arndtd@ornl.gov>
Tue, 8 Dec 2020 00:40:02 +0000 (19:40 -0500)
include/deal.II/matrix_free/cuda_matrix_free.h

index ca8ec5895f4e216c4a88d1aff684b9f2224b2f4f..9d3ff0c5983e34ccf7141fbf238d8a2779f939c1 100644 (file)
 
 #include <deal.II/base/config.h>
 
-#include <deal.II/base/cuda_size.h>
-#include <deal.II/base/mpi.h>
-#include <deal.II/base/quadrature.h>
-#include <deal.II/base/tensor.h>
+#ifdef DEAL_II_COMPILER_CUDA_AWARE
+
+#  include <deal.II/base/cuda_size.h>
+#  include <deal.II/base/mpi.h>
+#  include <deal.II/base/quadrature.h>
+#  include <deal.II/base/tensor.h>
 
-#include <deal.II/dofs/dof_handler.h>
+#  include <deal.II/dofs/dof_handler.h>
 
-#include <deal.II/fe/fe_update_flags.h>
-#include <deal.II/fe/mapping.h>
-#include <deal.II/fe/mapping_q1.h>
+#  include <deal.II/fe/fe_update_flags.h>
+#  include <deal.II/fe/mapping.h>
+#  include <deal.II/fe/mapping_q1.h>
 
-#include <deal.II/grid/filtered_iterator.h>
+#  include <deal.II/grid/filtered_iterator.h>
 
-#include <deal.II/lac/affine_constraints.h>
-#include <deal.II/lac/cuda_vector.h>
-#include <deal.II/lac/la_parallel_vector.h>
+#  include <deal.II/lac/affine_constraints.h>
+#  include <deal.II/lac/cuda_vector.h>
+#  include <deal.II/lac/la_parallel_vector.h>
 
 
 DEAL_II_NAMESPACE_OPEN
@@ -42,13 +44,13 @@ DEAL_II_NAMESPACE_OPEN
 namespace CUDAWrappers
 {
   // forward declaration
-#ifndef DOXYGEN
+#  ifndef DOXYGEN
   namespace internal
   {
     template <int dim, typename Number>
     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 <int dim, typename Number>
   inline const std::vector<std::vector<
@@ -932,10 +931,11 @@ namespace CUDAWrappers
     return *dof_handler;
   }
 
-#endif
+#  endif
 
 } // namespace CUDAWrappers
 
 DEAL_II_NAMESPACE_CLOSE
 
 #endif
+#endif

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.