From: Daniel Arndt Date: Wed, 16 Aug 2023 20:59:32 +0000 (-0400) Subject: Fix cuda_tensor_product_kernels.h X-Git-Tag: relicensing~584^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=132c9544d0e38f536a3b3abd08cc80cc8f130d82;p=dealii.git Fix cuda_tensor_product_kernels.h --- 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 74bb8be7c6..c26dd9ab51 100644 --- a/include/deal.II/matrix_free/cuda_tensor_product_kernels.h +++ b/include/deal.II/matrix_free/cuda_tensor_product_kernels.h @@ -151,19 +151,16 @@ namespace CUDAWrappers if (in_place) team_member.team_barrier(); - Kokkos::parallel_for(Kokkos::TeamThreadRange(team_member, n_q_points), - [&](const int i, const int j) { - const int q_point = i + j * n_q_points_1d; - const unsigned int destination_idx = - (direction == 0) ? (j + n_q_points_1d * i) : - (i + n_q_points_1d * j); - - if (add) - Kokkos::atomic_add(&out(destination_idx), - t[q_point]); - else - out(destination_idx) = t[q_point]; - }); + Kokkos::parallel_for(thread_policy, [&](const int i, const int j) { + const int q_point = i + j * n_q_points_1d; + const unsigned int destination_idx = + (direction == 0) ? (j + n_q_points_1d * i) : (i + n_q_points_1d * j); + + if (add) + Kokkos::atomic_add(&out(destination_idx), t[q_point]); + else + out(destination_idx) = t[q_point]; + }); }