specfem::execution::for_all¶
-
template<typename IteratorType, typename ClosureType, typename std::enable_if<IteratorType::is_top_level_policy, int>::type = 0>
inline void specfem::execution::for_all(const std::string &name, const IteratorType &iterator, const ClosureType &closure)¶ Visit every GLL point within a given index range.
This function applies a closure to each GLL point in the specified index range.
The closure is passed onto the underlying Kokkos policy for the iterator.
- Parameters:
name – a string identifier for the operation.
iterator – iterator type that defines the range of indices to iterate over. The iterator must be a top-level policy based on a Kokkos policy.
closure – a callable object that will be invoked for each index. The closure must be callable with a single argument, which is the index of the GLL point.
-
template<typename IteratorType, typename ClosureType, typename std::enable_if<IteratorType::is_top_level_policy, int>::type = 0>
inline void specfem::execution::for_all(const IteratorType &iterator, const ClosureType &closure)¶ Visit every GLL point within a given index range.
This function applies a closure to each GLL point in the specified index range. The closure is passed onto the underlying Kokkos policy for the iterator.
- Parameters:
iterator – iterator type that defines the range of indices to iterate over. The iterator must be a top-level policy based on a Kokkos policy.
closure – a callable object that will be invoked for each index. The closure must be callable with a single argument, which is the index of the GLL point.