class handler
Declaration
class handler { /* full declaration omitted */ };
Declared at: include/handler.h:308
Member Variables
- detail::raw_command_group& m_cg
- range<3> m_split_constraint = detail::ones
- size_t m_non_void_side_effects_count = 0
- detail::hydration_id m_next_accessor_hydration_id = 1
Member Function Overview
- handler(handler &&)
- handler(const handler &)
- template <typename Functor>
host_task(detail::once_tag once, Functor && task) → void - template <int Dims, typename Functor>
host_task(range<Dims> global_range, Functor && task) → void - template <int Dims, typename Functor>
host_task(range<Dims> global_range, id<Dims> global_offset, Functor && task) → void - template <typename Functor>
host_task(detail::collective_tag collective, Functor && task) → void - template <typename Functor>
host_task(detail::on_master_node_tag on_master_node, Functor && task) → void - operator=(const handler &) → handler &
- operator=(handler &&) → handler &
- template <typename KernelName = detail::unnamed_kernel, int Dims, typename... ReductionsAndKernel, std::enable_if_t<detail::is_reductions_and_kernel_v<ReductionsAndKernel...>, int> = 0>
parallel_for(celerity::nd_range<Dims> execution_range, ReductionsAndKernel &&... reductions_and_kernel) → void - template <typename KernelName = detail::unnamed_kernel, typename... ReductionsAndKernel, std::enable_if_t<detail::is_reductions_and_kernel_v<ReductionsAndKernel...>, int> = 0>
parallel_for(size_t global_range, size_t global_offset, ReductionsAndKernel &&... reductions_and_kernel) → void - template <typename KernelName = detail::unnamed_kernel, typename... ReductionsAndKernel, std::enable_if_t<detail::is_reductions_and_kernel_v<ReductionsAndKernel...>, int> = 0>
parallel_for(size_t global_range, ReductionsAndKernel &&... reductions_and_kernel) → void - template <typename KernelName = detail::unnamed_kernel, int Dims, typename... ReductionsAndKernel, std::enable_if_t<detail::is_reductions_and_kernel_v<ReductionsAndKernel...>, int> = 0>
parallel_for(range<Dims> global_range, id<Dims> global_offset, ReductionsAndKernel &&... reductions_and_kernel) → void - template <typename KernelName = detail::unnamed_kernel, int Dims, typename... ReductionsAndKernel, std::enable_if_t<detail::is_reductions_and_kernel_v<ReductionsAndKernel...>, int> = 0>
parallel_for(range<Dims> global_range, ReductionsAndKernel &&... reductions_and_kernel) → void - ~handler()
- add_reduction(const detail::reduction_info & rinfo) → void
- add_requirement(detail::host_object_id hoid, experimental::side_effect_order order, bool is_void) → void
- add_requirement(detail::buffer_id bid, access_mode mode, std::unique_ptr<detail::range_mapper_base> rm) → [[nodiscard]] detail::hydration_id
- template <int Dims>
experimental_constrain_split(const range<Dims> & constraint) → void - template <typename Hint>
experimental_hint(Hint && hint) → void - template <int Dims>
get_constrained_granularity(const range<Dims> & global_size, const range<Dims> & granularity) const → range<3> - handler(detail::raw_command_group & out_cg) → explicit
- template <typename KernelFlavor, typename KernelName, int Dims, typename Kernel, size_t... ReductionIndices, typename... Reductions>
make_device_kernel_launcher(const range<Dims> & global_range, const id<Dims> & global_offset, typename detail::kernel_flavor_traits<KernelFlavor, Dims>::local_size_type local_range, Kernel && kernel, std::index_sequence<ReductionIndices...>, Reductions... reductions) → detail::device_kernel_launcher - template <int Dims, bool Collective, typename Kernel>
make_host_task_launcher(Kernel && kernel) → detail::host_task_launcher - template <typename KernelFlavor, typename KernelName, int Dims, typename Kernel, typename... Reductions>
parallel_for_kernel_and_reductions(range<Dims> global_range, id<Dims> global_offset, typename detail::kernel_flavor_traits<KernelFlavor, Dims>::local_size_type local_range, Kernel && kernel, Reductions &... reductions) → void - template <typename KernelFlavor, typename KernelName, int Dims, typename... ReductionsAndKernel, size_t... ReductionIndices>
parallel_for_reductions_and_kernel(range<Dims> global_range, id<Dims> global_offset, typename detail::kernel_flavor_traits<KernelFlavor, Dims>::local_size_type local_size, std::index_sequence<ReductionIndices...> indices, ReductionsAndKernel &&... kernel_and_reductions) → void
Member Functions
¶handler(handler&&)
handler(handler&&)
Declared at: include/handler.h:311
Parameters
- handler&&
¶handler(const handler&)
handler(const handler&)
Declared at: include/handler.h:310
Parameters
- const handler&
¶template <typename Functor>
void host_task(detail::once_tag once,
Functor&& task)
template <typename Functor>
void host_task(detail::once_tag once,
Functor&& task)
Description
Schedules a host task with a single-element iteration space, causing it to be executed exactly once and on a single cluster node. Equivalent to host_task(range < 0>{}, ...)
.
Declared at: include/handler.h:422
Template Parameters
- Functor
Parameters
- detail::once_tag once
- Functor&& task
¶template <int Dims, typename Functor>
void host_task(range<Dims> global_range,
Functor&& task)
template <int Dims, typename Functor>
void host_task(range<Dims> global_range,
Functor&& task)
Description
Like host_task(range <Dims > global_range, id <Dims > global_offset, Functor task)
, but with a global_offset
of zero.
Declared at: include/handler.h:413
Template Parameters
- int Dims
- Functor
Parameters
- range<Dims> global_range
- Functor&& task
¶template <int Dims, typename Functor>
void host_task(range<Dims> global_range,
id<Dims> global_offset,
Functor&& task)
template <int Dims, typename Functor>
void host_task(range<Dims> global_range,
id<Dims> global_offset,
Functor&& task)
Description
Schedules a distributed execution of task
by splitting the iteration space in a runtime-defined manner. The task functor is assumed to be invocable with the signature void(const celerity::partition <Dims > & )
. The task is executed in a background thread with multiple host tasks being run concurrently if they are independent in the task graph, so proper synchronization must be ensured. The partition passed into the task functor describes the split each host receives. It may be used with accessors to obtain the per-node portion of a buffer en-bloc, see celerity::accessor::get_allocation_window
for details. There are no guarantees with respect to the split size and the order in which host tasks are reordered between nodes other than the restrictions imposed by dependencies in the task graph. Also, the task functor may be invoked multiple times on one node and not be scheduled on another node. If you need guarantees about execution order, consider host_task(experimental::collective)
instead.
Declared at: include/handler.h:398
Template Parameters
- int Dims
- Functor
Parameters
- range<Dims> global_range
- id<Dims> global_offset
- Functor&& task
¶template <typename Functor>
void host_task(detail::collective_tag collective,
Functor&& task)
template <typename Functor>
void host_task(detail::collective_tag collective,
Functor&& task)
Description
Schedules task
to be executed collectively on all nodes participating in the specified collective group. Call via cgh.host_task(celerity::experimental::collective, []...)
or cgh.host_task(celerity::experimental::collective(group), []...)
. The task functor is assumed to be invocable with the signature void(const celerity::experimental::collective_partition & )
or void(const celerity::partition < 1> & )
. This provides framework to use arbitrary collective MPI operations in a host task, such as performing collective I/O with parallel HDF5. The local node id,t the number of participating nodes as well as the group MPI communicator can be obtained from the collective_partition
passed into the task functor. All collective tasks within a collective group are guaranteed to be executed in the same order on all nodes.
Declared at: include/handler.h:378
Template Parameters
- Functor
Parameters
- detail::collective_tag collective
- Functor&& task
¶template <typename Functor>
void host_task(
detail::on_master_node_tag on_master_node,
Functor&& task)
template <typename Functor>
void host_task(
detail::on_master_node_tag on_master_node,
Functor&& task)
Description
Schedules task
to execute on the master node only. Call via cgh.host_task(celerity::on_master_node, []...)
. The task functor is assumed to be invocable with the signature void(const celerity::partition < 0> & )
or void()
. The task is executed in a background thread and multiple master node tasks may be executed concurrently if they are independent in the task graph, so proper synchronization must be ensured.
Declared at: include/handler.h:360
Template Parameters
- Functor
Parameters
- detail::on_master_node_tag on_master_node
- Functor&& task
¶handler& operator=(const handler&)
handler& operator=(const handler&)
Declared at: include/handler.h:312
Parameters
- const handler&
¶handler& operator=(handler&&)
handler& operator=(handler&&)
Declared at: include/handler.h:313
Parameters
- handler&&
¶template <
typename KernelName = detail::unnamed_kernel,
int Dims,
typename... ReductionsAndKernel,
std::enable_if_t<
detail::is_reductions_and_kernel_v<
ReductionsAndKernel...>,
int> = 0>
void parallel_for(
celerity::nd_range<Dims> execution_range,
ReductionsAndKernel&&... reductions_and_kernel)
template <
typename KernelName = detail::unnamed_kernel,
int Dims,
typename... ReductionsAndKernel,
std::enable_if_t<
detail::is_reductions_and_kernel_v<
ReductionsAndKernel...>,
int> = 0>
void parallel_for(
celerity::nd_range<Dims> execution_range,
ReductionsAndKernel&&... reductions_and_kernel)
Declared at: include/handler.h:346
Template Parameters
- KernelName = detail::unnamed_kernel
- int Dims
- ReductionsAndKernel
- std::enable_if_t<detail::is_reductions_and_kernel_v<ReductionsAndKernel...>, int> = 0
Parameters
- celerity::nd_range<Dims> execution_range
- ReductionsAndKernel&&... reductions_and_kernel
¶template <
typename KernelName = detail::unnamed_kernel,
typename... ReductionsAndKernel,
std::enable_if_t<
detail::is_reductions_and_kernel_v<
ReductionsAndKernel...>,
int> = 0>
void parallel_for(
size_t global_range,
size_t global_offset,
ReductionsAndKernel&&... reductions_and_kernel)
template <
typename KernelName = detail::unnamed_kernel,
typename... ReductionsAndKernel,
std::enable_if_t<
detail::is_reductions_and_kernel_v<
ReductionsAndKernel...>,
int> = 0>
void parallel_for(
size_t global_range,
size_t global_offset,
ReductionsAndKernel&&... reductions_and_kernel)
Declared at: include/handler.h:340
Template Parameters
- KernelName = detail::unnamed_kernel
- ReductionsAndKernel
- std::enable_if_t<detail::is_reductions_and_kernel_v<ReductionsAndKernel...>, int> = 0
Parameters
- size_t global_range
- size_t global_offset
- ReductionsAndKernel&&... reductions_and_kernel
¶template <
typename KernelName = detail::unnamed_kernel,
typename... ReductionsAndKernel,
std::enable_if_t<
detail::is_reductions_and_kernel_v<
ReductionsAndKernel...>,
int> = 0>
void parallel_for(
size_t global_range,
ReductionsAndKernel&&... reductions_and_kernel)
template <
typename KernelName = detail::unnamed_kernel,
typename... ReductionsAndKernel,
std::enable_if_t<
detail::is_reductions_and_kernel_v<
ReductionsAndKernel...>,
int> = 0>
void parallel_for(
size_t global_range,
ReductionsAndKernel&&... reductions_and_kernel)
Declared at: include/handler.h:334
Template Parameters
- KernelName = detail::unnamed_kernel
- ReductionsAndKernel
- std::enable_if_t<detail::is_reductions_and_kernel_v<ReductionsAndKernel...>, int> = 0
Parameters
- size_t global_range
- ReductionsAndKernel&&... reductions_and_kernel
¶template <
typename KernelName = detail::unnamed_kernel,
int Dims,
typename... ReductionsAndKernel,
std::enable_if_t<
detail::is_reductions_and_kernel_v<
ReductionsAndKernel...>,
int> = 0>
void parallel_for(
range<Dims> global_range,
id<Dims> global_offset,
ReductionsAndKernel&&... reductions_and_kernel)
template <
typename KernelName = detail::unnamed_kernel,
int Dims,
typename... ReductionsAndKernel,
std::enable_if_t<
detail::is_reductions_and_kernel_v<
ReductionsAndKernel...>,
int> = 0>
void parallel_for(
range<Dims> global_range,
id<Dims> global_offset,
ReductionsAndKernel&&... reductions_and_kernel)
Declared at: include/handler.h:326
Template Parameters
- KernelName = detail::unnamed_kernel
- int Dims
- ReductionsAndKernel
- std::enable_if_t<detail::is_reductions_and_kernel_v<ReductionsAndKernel...>, int> = 0
Parameters
- range<Dims> global_range
- id<Dims> global_offset
- ReductionsAndKernel&&... reductions_and_kernel
¶template <
typename KernelName = detail::unnamed_kernel,
int Dims,
typename... ReductionsAndKernel,
std::enable_if_t<
detail::is_reductions_and_kernel_v<
ReductionsAndKernel...>,
int> = 0>
void parallel_for(
range<Dims> global_range,
ReductionsAndKernel&&... reductions_and_kernel)
template <
typename KernelName = detail::unnamed_kernel,
int Dims,
typename... ReductionsAndKernel,
std::enable_if_t<
detail::is_reductions_and_kernel_v<
ReductionsAndKernel...>,
int> = 0>
void parallel_for(
range<Dims> global_range,
ReductionsAndKernel&&... reductions_and_kernel)
Declared at: include/handler.h:318
Template Parameters
- KernelName = detail::unnamed_kernel
- int Dims
- ReductionsAndKernel
- std::enable_if_t<detail::is_reductions_and_kernel_v<ReductionsAndKernel...>, int> = 0
Parameters
- range<Dims> global_range
- ReductionsAndKernel&&... reductions_and_kernel
¶~handler()
~handler()
Declared at: include/handler.h:314
¶void add_reduction(
const detail::reduction_info& rinfo)
void add_reduction(
const detail::reduction_info& rinfo)
Declared at: include/handler.h:489
Parameters
- const detail::reduction_info& rinfo
¶void add_requirement(
detail::host_object_id hoid,
experimental::side_effect_order order,
bool is_void)
void add_requirement(
detail::host_object_id hoid,
experimental::side_effect_order order,
bool is_void)
Declared at: include/handler.h:483
Parameters
- detail::host_object_id hoid
- experimental::side_effect_order order
- bool is_void
¶[[nodiscard]] detail::hydration_id
add_requirement(
detail::buffer_id bid,
access_mode mode,
std::unique_ptr<detail::range_mapper_base> rm)
[[nodiscard]] detail::hydration_id
add_requirement(
detail::buffer_id bid,
access_mode mode,
std::unique_ptr<detail::range_mapper_base> rm)
Declared at: include/handler.h:477
Parameters
- detail::buffer_id bid
- access_mode mode
- std::unique_ptr<detail::range_mapper_base> rm
¶template <int Dims>
void experimental_constrain_split(
const range<Dims>& constraint)
template <int Dims>
void experimental_constrain_split(
const range<Dims>& constraint)
Declared at: include/handler.h:495
Template Parameters
- int Dims
Parameters
- const range<Dims>& constraint
¶template <typename Hint>
void experimental_hint(Hint&& hint)
template <typename Hint>
void experimental_hint(Hint&& hint)
Declared at: include/handler.h:501
Template Parameters
- Hint
Parameters
- Hint&& hint
¶template <int Dims>
range<3> get_constrained_granularity(
const range<Dims>& global_size,
const range<Dims>& granularity) const
template <int Dims>
range<3> get_constrained_granularity(
const range<Dims>& global_size,
const range<Dims>& granularity) const
Declared at: include/handler.h:514
Template Parameters
- int Dims
Parameters
- const range<Dims>& global_size
- const range<Dims>& granularity
¶explicit handler(
detail::raw_command_group& out_cg)
explicit handler(
detail::raw_command_group& out_cg)
Declared at: include/handler.h:444
Parameters
- detail::raw_command_group& out_cg
¶template <typename KernelFlavor,
typename KernelName,
int Dims,
typename Kernel,
size_t... ReductionIndices,
typename... Reductions>
detail::device_kernel_launcher
make_device_kernel_launcher(
const range<Dims>& global_range,
const id<Dims>& global_offset,
typename detail::kernel_flavor_traits<
KernelFlavor,
Dims>::local_size_type local_range,
Kernel&& kernel,
std::index_sequence<ReductionIndices...>,
Reductions... reductions)
template <typename KernelFlavor,
typename KernelName,
int Dims,
typename Kernel,
size_t... ReductionIndices,
typename... Reductions>
detail::device_kernel_launcher
make_device_kernel_launcher(
const range<Dims>& global_range,
const id<Dims>& global_offset,
typename detail::kernel_flavor_traits<
KernelFlavor,
Dims>::local_size_type local_range,
Kernel&& kernel,
std::index_sequence<ReductionIndices...>,
Reductions... reductions)
Declared at: include/handler.h:529
Template Parameters
- KernelFlavor
- KernelName
- int Dims
- Kernel
- size_t ReductionIndices
- Reductions
Parameters
- const range<Dims>& global_range
- const id<Dims>& global_offset
- typename detail::kernel_flavor_traits< KernelFlavor, Dims>::local_size_type local_range
- Kernel&& kernel
- std::index_sequence<ReductionIndices...>
- Reductions... reductions
¶template <int Dims,
bool Collective,
typename Kernel>
detail::host_task_launcher
make_host_task_launcher(Kernel&& kernel)
template <int Dims,
bool Collective,
typename Kernel>
detail::host_task_launcher
make_host_task_launcher(Kernel&& kernel)
Declared at: include/handler.h:559
Template Parameters
- int Dims
- bool Collective
- Kernel
Parameters
- Kernel&& kernel
¶template <typename KernelFlavor,
typename KernelName,
int Dims,
typename Kernel,
typename... Reductions>
void parallel_for_kernel_and_reductions(
range<Dims> global_range,
id<Dims> global_offset,
typename detail::kernel_flavor_traits<
KernelFlavor,
Dims>::local_size_type local_range,
Kernel&& kernel,
Reductions&... reductions)
template <typename KernelFlavor,
typename KernelName,
int Dims,
typename Kernel,
typename... Reductions>
void parallel_for_kernel_and_reductions(
range<Dims> global_range,
id<Dims> global_offset,
typename detail::kernel_flavor_traits<
KernelFlavor,
Dims>::local_size_type local_range,
Kernel&& kernel,
Reductions&... reductions)
Declared at: include/handler.h:457
Template Parameters
- KernelFlavor
- KernelName
- int Dims
- Kernel
- Reductions
Parameters
- range<Dims> global_range
- id<Dims> global_offset
- typename detail::kernel_flavor_traits< KernelFlavor, Dims>::local_size_type local_range
- Kernel&& kernel
- Reductions&... reductions
¶template <typename KernelFlavor,
typename KernelName,
int Dims,
typename... ReductionsAndKernel,
size_t... ReductionIndices>
void parallel_for_reductions_and_kernel(
range<Dims> global_range,
id<Dims> global_offset,
typename detail::kernel_flavor_traits<
KernelFlavor,
Dims>::local_size_type local_size,
std::index_sequence<ReductionIndices...>
indices,
ReductionsAndKernel&&... kernel_and_reductions)
template <typename KernelFlavor,
typename KernelName,
int Dims,
typename... ReductionsAndKernel,
size_t... ReductionIndices>
void parallel_for_reductions_and_kernel(
range<Dims> global_range,
id<Dims> global_offset,
typename detail::kernel_flavor_traits<
KernelFlavor,
Dims>::local_size_type local_size,
std::index_sequence<ReductionIndices...>
indices,
ReductionsAndKernel&&... kernel_and_reductions)
Declared at: include/handler.h:447
Template Parameters
- KernelFlavor
- KernelName
- int Dims
- ReductionsAndKernel
- size_t ReductionIndices
Parameters
- range<Dims> global_range
- id<Dims> global_offset
- typename detail::kernel_flavor_traits< KernelFlavor, Dims>::local_size_type local_size
- std::index_sequence<ReductionIndices...> indices
- ReductionsAndKernel&&... kernel_and_reductions