]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix cuda_tensor_product_kernels.h 15888/head
authorDaniel Arndt <arndtd@ornl.gov>
Wed, 16 Aug 2023 20:59:32 +0000 (16:59 -0400)
committerDaniel Arndt <arndtd@ornl.gov>
Wed, 16 Aug 2023 20:59:32 +0000 (16:59 -0400)
include/deal.II/matrix_free/cuda_tensor_product_kernels.h

index 74bb8be7c6f24748df3598a261c065831dba01ed..c26dd9ab519bc66932b54ea21e4d50288d094e65 100644 (file)
@@ -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];
+      });
     }
 
 

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.