diff --git a/first_steps.html b/first_steps.html index 74686c556..cd70aea2d 100644 --- a/first_steps.html +++ b/first_steps.html @@ -286,7 +286,7 @@

ddc::ChunkSpan const ghosted_initial_temp
= ghosted_last_temp.span_view();
// Initialize the temperature on the main domain
-
ddc::parallel_for_each(
+
ddc::parallel_for_each(
ddc::DiscreteDomain<DDimX, DDimY>(x_domain, y_domain),
KOKKOS_LAMBDA(ddc::DiscreteElement<DDimX, DDimY> const ixy) {
double const x
@@ -296,8 +296,8 @@

ghosted_initial_temp(ixy)
= 9.999 * ((x * x + y * y) < 0.25);
});
+
void parallel_for_each(ExecSpace const &execution_space, DiscreteDomain< DDims... > const &domain, Functor &&f) noexcept
iterates over a nD domain using a given Kokkos execution space
Definition: for_each.hpp:174
KOKKOS_FUNCTION Coordinate< typename DDim::continuous_dimension_type... > coordinate(DiscreteElement< DDim... > const &c)
Definition: coordinate_md.hpp:13
-
void parallel_for_each(ExecSpace &&execution_space, DiscreteDomain< DDims... > const &domain, Functor &&f) noexcept
iterates over a nD domain using a given Kokkos execution space
Definition: for_each.hpp:174
Definition: chunk_span.hpp:28
// display the initial data
ddc::deepcopy(ghosted_temp, ghosted_last_temp);
@@ -337,7 +337,7 @@

// span_cview returns a read-only ChunkSpan
ddc::ChunkSpan const last_temp {ghosted_last_temp.span_cview()};

// Stencil computation on the main domain
- +
next_temp.domain(),
KOKKOS_LAMBDA(
diff --git a/for__each_8hpp_source.html b/for__each_8hpp_source.html index ad744f722..c1173267c 100644 --- a/for__each_8hpp_source.html +++ b/for__each_8hpp_source.html @@ -219,34 +219,31 @@

a discrete 171 * @param[in] f a functor taking an index as parameter

172 */
173template <class ExecSpace, class... DDims, class Functor>
-
174inline void parallel_for_each(
-
175 ExecSpace&& execution_space,
+
174inline void parallel_for_each(
+
175 ExecSpace const& execution_space,
176 DiscreteDomain<DDims...> const& domain,
177 Functor&& f) noexcept
178{
-
179 detail::for_each_kokkos(
-
180 std::forward<ExecSpace>(execution_space),
-
181 domain,
-
182 std::forward<Functor>(f));
-
183}
-
184
-
185/** iterates over a nD domain using the `Kokkos` default execution space
-
186 * @param[in] domain the domain over which to iterate
-
187 * @param[in] f a functor taking an index as parameter
-
188 */
-
189template <class... DDims, class Functor>
-
190inline void parallel_for_each(DiscreteDomain<DDims...> const& domain, Functor&& f) noexcept
-
191{
-
192 parallel_for_each(Kokkos::DefaultExecutionSpace(), domain, std::forward<Functor>(f));
-
193}
-
194
-
195} // namespace ddc
+
179 detail::for_each_kokkos(execution_space, domain, std::forward<Functor>(f));
+
180}
+
181
+
182/** iterates over a nD domain using the `Kokkos` default execution space
+
183 * @param[in] domain the domain over which to iterate
+
184 * @param[in] f a functor taking an index as parameter
+
185 */
+
186template <class... DDims, class Functor>
+
187inline void parallel_for_each(DiscreteDomain<DDims...> const& domain, Functor&& f) noexcept
+
188{
+
189 parallel_for_each(Kokkos::DefaultExecutionSpace(), domain, std::forward<Functor>(f));
+
190}
+
191
+
192} // namespace ddc
friend class DiscreteDomain
Definition: discrete_domain.hpp:51
KOKKOS_DEFAULTED_FUNCTION constexpr DiscreteElement()=default
Definition: aligned_allocator.hpp:9
+
void parallel_for_each(ExecSpace const &execution_space, DiscreteDomain< DDims... > const &domain, Functor &&f) noexcept
iterates over a nD domain using a given Kokkos execution space
Definition: for_each.hpp:174
void for_each(DiscreteDomain< DDims... > const &domain, Functor &&f) noexcept
iterates over a nD domain in serial
Definition: for_each.hpp:159
-
void parallel_for_each(ExecSpace &&execution_space, DiscreteDomain< DDims... > const &domain, Functor &&f) noexcept
iterates over a nD domain using a given Kokkos execution space
Definition: for_each.hpp:174
-
void parallel_for_each(DiscreteDomain< DDims... > const &domain, Functor &&f) noexcept
iterates over a nD domain using the Kokkos default execution space
Definition: for_each.hpp:190
+
void parallel_for_each(DiscreteDomain< DDims... > const &domain, Functor &&f) noexcept
iterates over a nD domain using the Kokkos default execution space
Definition: for_each.hpp:187
diff --git a/heat_equation.html b/heat_equation.html index 710522080..0da240ace 100644 --- a/heat_equation.html +++ b/heat_equation.html @@ -248,7 +248,7 @@

a discrete 236 ddc::ChunkSpan const ghosted_initial_temp
237 = ghosted_last_temp.span_view();
238 // Initialize the temperature on the main domain
- +
240 ddc::DiscreteDomain<DDimX, DDimY>(x_domain, y_domain),
241 KOKKOS_LAMBDA(ddc::DiscreteElement<DDimX, DDimY> const ixy) {
242 double const x
@@ -300,7 +300,7 @@

a discrete 296 ddc::ChunkSpan const last_temp {ghosted_last_temp.span_cview()};
298
300 // Stencil computation on the main domain
- +
302 next_temp.domain(),
303 KOKKOS_LAMBDA(
@@ -363,12 +363,12 @@

a discrete
PdiEvent & with(std::string const &name, BorrowedChunk &&data)
Definition: pdi.hpp:61
Definition: scope_guard.hpp:15
UniformPointSampling models a uniform discretization of the provided continuous dimension.
Definition: uniform_point_sampling.hpp:26
+
void parallel_for_each(ExecSpace const &execution_space, DiscreteDomain< DDims... > const &domain, Functor &&f) noexcept
iterates over a nD domain using a given Kokkos execution space
Definition: for_each.hpp:174
void for_each(DiscreteDomain< DDims... > const &domain, Functor &&f) noexcept
iterates over a nD domain in serial
Definition: for_each.hpp:159
KOKKOS_FUNCTION Coordinate< typename DDim::continuous_dimension_type... > coordinate(DiscreteElement< DDim... > const &c)
Definition: coordinate_md.hpp:13
auto deepcopy(ChunkDst &&dst, ChunkSrc &&src)
Copy the content of a borrowed chunk into another.
Definition: deepcopy.hpp:19
void init_discrete_space(Args &&... args)
Initialize (emplace) a global singleton discrete space.
Definition: discrete_space.hpp:148
T transform_reduce(serial_host_policy policy, DiscreteDomain< DDims... > const &domain, T neutral, BinaryReductionOp &&reduce, UnaryTransformOp &&transform) noexcept
A reduction over a nD domain using the Serial execution policy.
Definition: transform_reduce.hpp:321
-
void parallel_for_each(ExecSpace &&execution_space, DiscreteDomain< DDims... > const &domain, Functor &&f) noexcept
iterates over a nD domain using a given Kokkos execution space
Definition: for_each.hpp:174
KOKKOS_FUNCTION Coordinate< CDim > distance_at_left(DiscreteElement< NonUniformPointSampling< CDim > > i)
Definition: non_uniform_point_sampling.hpp:145
detail::TaggedVector< CoordinateElement, CDims... > Coordinate
A Coordinate represents a coordinate in the continuous space.
Definition: coordinate.hpp:21
KOKKOS_FUNCTION Coordinate< CDim > distance_at_right(DiscreteElement< NonUniformPointSampling< CDim > > i)
Definition: non_uniform_point_sampling.hpp:151
diff --git a/namespaceddc.html b/namespaceddc.html index ac0c56f35..4db4612fb 100644 --- a/namespaceddc.html +++ b/namespaceddc.html @@ -416,10 +416,10 @@

a discrete void for_each (DiscreteDomain< DDims... > const &domain, Functor &&f) noexcept  iterates over a nD domain in serial More...
  -template<class ExecSpace , class... DDims, class Functor > -void parallel_for_each (ExecSpace &&execution_space, DiscreteDomain< DDims... > const &domain, Functor &&f) noexcept - iterates over a nD domain using a given Kokkos execution space More...
-  +template<class ExecSpace , class... DDims, class Functor > +void parallel_for_each (ExecSpace const &execution_space, DiscreteDomain< DDims... > const &domain, Functor &&f) noexcept + iterates over a nD domain using a given Kokkos execution space More...
+  template<class... DDims, class Functor > void parallel_for_each (DiscreteDomain< DDims... > const &domain, Functor &&f) noexcept  iterates over a nD domain using the Kokkos default execution space More...
@@ -3307,8 +3307,8 @@

-

◆ parallel_for_each() [1/2]

+ +

◆ parallel_for_each() [1/2]