]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix reviewer's comments
authorBruno Turcksin <bruno.turcksin@gmail.com>
Tue, 4 Apr 2023 15:55:03 +0000 (15:55 +0000)
committerBruno Turcksin <bruno.turcksin@gmail.com>
Thu, 6 Apr 2023 13:15:24 +0000 (13:15 +0000)
include/deal.II/base/utilities.h
include/deal.II/matrix_free/cuda_matrix_free.templates.h
include/deal.II/matrix_free/cuda_tensor_product_kernels.h

index e14a858879aa37f712c209d662dac696b4b8920d..18f58566b475f7a59e0b0caa228896567c649599 100644 (file)
@@ -449,16 +449,16 @@ namespace Utilities
 #if defined(DEBUG) && !defined(DEAL_II_CXX14_CONSTEXPR_BUG)
     // Up to __builtin_expect this is the same code as in the 'Assert' macro.
     // The call to __builtin_expect turns out to be problematic.
-    KOKKOS_IF_ON_HOST(if (!(iexp >= 0))::dealii::deal_II_exceptions::internals::
-                        issue_error_noreturn(
-                          ::dealii::deal_II_exceptions::internals::
-                            ExceptionHandling::abort_or_throw_on_exception,
-                          __FILE__,
-                          __LINE__,
-                          __PRETTY_FUNCTION__,
-                          "iexp>=0",
-                          "ExcMessage(\"The exponent must not be negative!\")",
-                          ExcMessage("The exponent must not be negative!"));)
+    KOKKOS_IF_ON_HOST((if (!(iexp >= 0))::dealii::deal_II_exceptions::
+                         internals::issue_error_noreturn(
+                           ::dealii::deal_II_exceptions::internals::
+                             ExceptionHandling::abort_or_throw_on_exception,
+                           __FILE__,
+                           __LINE__,
+                           __PRETTY_FUNCTION__,
+                           "iexp>=0",
+                           "ExcMessage(\"The exponent must not be negative!\")",
+                           ExcMessage("The exponent must not be negative!"));))
 #endif
     // The "exponentiation by squaring" algorithm used below has to be
     // compressed to one statement due to C++11's restrictions on constexpr
index 21a891060d1227880853013fefee865d9a60b471..b75833d856bc43dc351b45cf40da15e8616864b5 100644 (file)
@@ -590,8 +590,9 @@ namespace CUDAWrappers
         // When working with distributed vectors, the constrained dofs are
         // computed for ghosted vectors but we want to copy the values of the
         // constrained dofs of non-ghosted vectors.
-        if (constr_dofs[dof] < size)
-          dst_ptr[constr_dofs[dof]] = src_ptr[constr_dofs[dof]];
+        const auto constrained_dof = constr_dofs[dof];
+        if (constrained_dof < size)
+          dst_ptr[constrained_dof] = src_ptr[constrained_dof];
       });
   }
 
@@ -1019,7 +1020,6 @@ namespace CUDAWrappers
           const unsigned int size =
             (grid_dim[i].x * grid_dim[i].y * grid_dim[i].z) * cells_per_block *
             Functor::n_local_dofs;
-          // std::cout << "color " << i << " " << size << std::endl;
           values_colors[i] =
             Kokkos::View<Number *, MemorySpace::Default::kokkos_space>(
               Kokkos::view_alloc("values_" + std::to_string(i),
index 583cd7962cff54527b0001f43d1e120f78d56f1d..e72becc23857ec3f0e537151baada47b532a9920 100644 (file)
@@ -71,8 +71,8 @@ namespace CUDAWrappers
                                (dim == 2) ? threadIdx.y :
                                             threadIdx.z;
 
-        // This loop simply multiply the shape function at the quadrature point
-        // by the value finite element coefficient.
+        // This loop simply multiplies the shape function at the quadrature
+        // point by the value finite element coefficient.
         Number t = 0;
         for (int k = 0; k < n_q_points_1d; ++k) {
           const unsigned int shape_idx =

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.