]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Only use TeamVectorRange from Kokkos 2.9.00 on 18203/head
authorDaniel Arndt <arndtd@ornl.gov>
Fri, 7 Mar 2025 15:10:20 +0000 (09:10 -0600)
committerDaniel Arndt <arndtd@ornl.gov>
Fri, 7 Mar 2025 15:10:20 +0000 (09:10 -0600)
include/deal.II/matrix_free/portable_tensor_product_kernels.h

index e168512b18e7fb57f0af30c75e0eeae82e2ff59a..dbf673b78d6a9c65983243ea2a2edab2562b8db5 100644 (file)
@@ -58,14 +58,18 @@ namespace Portable
     {
       Assert(dst.size() >= N, ExcInternalError());
       Assert(src.size() >= N, ExcInternalError());
-
-      Kokkos::parallel_for(Kokkos::TeamVectorRange(team_member, N),
-                           [&](const int i) {
-                             if constexpr (add)
-                               Kokkos::atomic_add(&dst(i), src(i));
-                             else
-                               dst(i) = src(i);
-                           });
+      Kokkos::parallel_for(
+#if KOKKOS_VERSION >= 20900
+        Kokkos::TeamVectorRange(team_member, N),
+#else
+        Kokkos::TeamThreadRange(team_member, N),
+#endif
+        [&](const int i) {
+          if constexpr (add)
+            Kokkos::atomic_add(&dst(i), src(i));
+          else
+            dst(i) = src(i);
+        });
 
       team_member.team_barrier();
     }

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.