]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Replace macro with constexpr variable
authorBruno Turcksin <bruno.turcksin@gmail.com>
Mon, 22 Jun 2020 13:27:18 +0000 (13:27 +0000)
committerBruno Turcksin <bruno.turcksin@gmail.com>
Tue, 7 Jul 2020 00:50:40 +0000 (00:50 +0000)
include/deal.II/matrix_free/cuda_hanging_nodes_internal.h

index 294d74a9bf7aec49049117707e88a3057bc1c2ff..01a3ea69701343ae14125d2afceeb96176a08f32 100644 (file)
@@ -20,6 +20,7 @@
 
 #ifdef DEAL_II_COMPILER_CUDA_AWARE
 
+#  include <deal.II/base/cuda_size.h>
 #  include <deal.II/base/utilities.h>
 
 #  include <deal.II/dofs/dof_accessor.h>
@@ -103,10 +104,8 @@ namespace CUDAWrappers
 
     namespace internal
     {
-      // TODO: use a template parameter instead of a macro
-#  define DEAL_II_MAX_ELEM_DEGREE 10
-      __constant__ double constraint_weights[(DEAL_II_MAX_ELEM_DEGREE + 1) *
-                                             (DEAL_II_MAX_ELEM_DEGREE + 1)];
+      __constant__ double
+        constraint_weights[(mf_max_elem_degree + 1) * (mf_max_elem_degree + 1)];
 
       // Here is the system for how we store constraint types in a binary mask.
       // This is not a complete contradiction-free system, i.e., there are

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.