6 #ifndef KERNEL_AGGREGATION_INTERFACE_HPP
7 #define KERNEL_AGGREGATION_INTERFACE_HPP
18 namespace kernel_aggregation {
30 template <
typename T,
typename Host_Allocator,
typename Executor>
37 template <
typename Executor>
42 template <const
char *kernelname,
class Interface,
class Pool>
48 template <const
char* region_name,
typename executor_t,
typename return_type>
50 std::function<return_type(
size_t,
size_t,
52 executor_t>::executor_slice&)> &&aggregation_area) {
55 static hpx::once_flag pool_init;
56 hpx::call_once(pool_init,
57 detail::init_area_aggregation_pool<aggregation_pool_t>, team_size);
58 auto executor_slice_fut = aggregation_pool_t::request_executor_slice();
59 auto ret_fut = executor_slice_fut.value().then(hpx::annotated_function(
60 [aggregation_area](
auto &&fut) {
62 executor_t>::Executor_Slice agg_exec = fut.get();
63 const size_t slice_id = agg_exec.id;
64 const size_t number_slices = agg_exec.number_slices;
65 return aggregation_area(slice_id, number_slices, agg_exec);
Definition: executor_pools_management.hpp:54
Executor Class that aggregates function calls for specific kernels.
Definition: aggregation_executors_and_allocators.hpp:394
Definition: aggregation_executor_pools.hpp:16
Declaration since the actual allocator is only defined after the Executors.
Definition: aggregation_executors_and_allocators.hpp:993
aggregated_executor_modes
Definition: aggregation_executors_and_allocators.hpp:383
hpx::future< return_type > aggregation_region(const size_t team_size, std::function< return_type(size_t, size_t, typename cppuddle::kernel_aggregation::detail::aggregated_executor< executor_t >::executor_slice &)> &&aggregation_area)
Start an aggregation region (passsed via lambda)
Definition: kernel_aggregation_interface.hpp:49
Definition: config.hpp:31