From: Bruno Turcksin Date: Tue, 4 Apr 2023 15:55:03 +0000 (+0000) Subject: Fix reviewer's comments X-Git-Tag: v9.5.0-rc1~349^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ccc7ade787358d20cf4c4b8dfa930cb109cf3fa4;p=dealii.git Fix reviewer's comments --- diff --git a/include/deal.II/base/utilities.h b/include/deal.II/base/utilities.h index e14a858879..18f58566b4 100644 --- a/include/deal.II/base/utilities.h +++ b/include/deal.II/base/utilities.h @@ -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 diff --git a/include/deal.II/matrix_free/cuda_matrix_free.templates.h b/include/deal.II/matrix_free/cuda_matrix_free.templates.h index 21a891060d..b75833d856 100644 --- a/include/deal.II/matrix_free/cuda_matrix_free.templates.h +++ b/include/deal.II/matrix_free/cuda_matrix_free.templates.h @@ -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( Kokkos::view_alloc("values_" + std::to_string(i), diff --git a/include/deal.II/matrix_free/cuda_tensor_product_kernels.h b/include/deal.II/matrix_free/cuda_tensor_product_kernels.h index 583cd7962c..e72becc238 100644 --- a/include/deal.II/matrix_free/cuda_tensor_product_kernels.h +++ b/include/deal.II/matrix_free/cuda_tensor_product_kernels.h @@ -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 =