From ca62619189bf920ec2f73f774f045fbcf58792c4 Mon Sep 17 00:00:00 2001 From: Atell Krasnopolski Date: Tue, 9 Apr 2024 17:41:32 +0200 Subject: [PATCH] Use `Policy` for all `parallel_for` tests --- unittests/Kokkos/ParallelFor.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/unittests/Kokkos/ParallelFor.cpp b/unittests/Kokkos/ParallelFor.cpp index bd8dda720..f83ad07a4 100644 --- a/unittests/Kokkos/ParallelFor.cpp +++ b/unittests/Kokkos/ParallelFor.cpp @@ -10,8 +10,9 @@ TEST(ParallelFor, HelloWorldLambdaLoopForward) { // const double tau = 1e-6; // tolerance std::function _f = [](double x) { + using Policy = Kokkos::RangePolicy; double res[5] = {0}; - Kokkos::parallel_for("HelloWorld-forward", 5, + Kokkos::parallel_for("HelloWorld-forward", Policy(0, 5), [&res, x](const int i) { res[i] = x*x; }); @@ -34,8 +35,9 @@ TEST(ParallelFor, HelloWorldLambdaLoopReverse) { // const double tau = 1e-6; // tolerance std::function _f = [](double x) { + using Policy = Kokkos::RangePolicy; double res[5] = {0}; - Kokkos::parallel_for("HelloWorld-reverse", 5, + Kokkos::parallel_for("HelloWorld-reverse", Policy(0, 5), [&res, x](const int i) { res[i] = x*x; });