From eba655486065a3c71768ee94177180c131cbfa53 Mon Sep 17 00:00:00 2001 From: antoinemeyer5 Date: Thu, 6 Jul 2023 10:26:38 +0200 Subject: [PATCH] Fix MDRangePolicy --- docs/source/usecases/MDRangePolicy.md | 36 +++++++++++++-------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/docs/source/usecases/MDRangePolicy.md b/docs/source/usecases/MDRangePolicy.md index 910822761..743ebe539 100644 --- a/docs/source/usecases/MDRangePolicy.md +++ b/docs/source/usecases/MDRangePolicy.md @@ -17,9 +17,9 @@ Such a use case occurs for example when working on numerical solution to PDEs su `outputField(C,F,P,D)` - a rank 4 View -**Computation**: +**Computation**: For each triple in `C,F,P` compute an output field from the two input views: - + ``` c++ for each (c,f,p) in (C,F,P) compute the product inputData(c,p,:,:) * inputField(c,f,p,:) @@ -38,14 +38,14 @@ for (int p = 0; p < P; ++p) auto result = Kokkos::subview(outputField, c, f, p, Kokkos::ALL); auto left = Kokkos::subview(inputData, c, p, Kokkos::ALL, Kokkos::ALL); auto right = Kokkos::subview(inputField, c, f, p, Kokkos::ALL); - + for (int i=0;i(0,C), KOKKOS_LAMBDA (const int c) { for (int f = 0; f < F; ++f) @@ -70,14 +70,14 @@ Kokkos::parallel_for("for_all_cells", auto result = Kokkos::subview(outputField, c, f, p, Kokkos::ALL); auto left = Kokkos::subview(inputData, c, p, Kokkos::ALL, Kokkos::ALL); auto right = Kokkos::subview(inputField, c, f, p, Kokkos::ALL); - + for (int i=0;i > ({0,0,0}, {C,F,P}), KOKKOS_LAMBDA (const int c, const int f, const int p) { auto result = Kokkos::subview(outputField, c, f, p, Kokkos::ALL); auto left = Kokkos::subview(inputData, c, p, Kokkos::ALL, Kokkos::ALL); auto right = Kokkos::subview(inputField, c, f, p, Kokkos::ALL); - + for (int i=0;i