Functions | |
template<TaskMode B, GlobalCompletionEvent * C, typename TF = decltype(nullptr)> | |
void | Grappa::spawn (TF tf) |
Synchronizing private task spawn. More... | |
template<typename TF > | |
void | Grappa::privateTask (TF tf) |
Spawn a task visible to this Core only. More... | |
template<typename TF > | |
void | Grappa::publicTask (TF tf) |
Spawn a task that may be stolen between cores. More... | |
template<typename TF > | |
void | Grappa::spawn_worker (TF &&tf) |
internal More... | |
template<TaskMode B = TaskMode::Bound, typename F = decltype(nullptr)> | |
void | Grappa::spawn (F f) |
template<typename FP > | |
void | Grappa::run (FP fp) |
void Grappa::privateTask | ( | TF | tf | ) |
Spawn a task visible to this Core only.
The task is specified as a functor or lambda. If it is 24 bytes or less, it is copied directly into the task queue. If it is larger, a copy is allocated on the heap. This copy will be deallocated after the task completes.
TF | type of task functor |
tf | functor the new task. |
Example:
Shove copy of functor into space used for task arguments.
// if not, substitute this:
Definition at line 121 of file Tasking.hpp.
void Grappa::publicTask | ( | TF | tf | ) |
Spawn a task that may be stolen between cores.
The task is specified as a functor or lambda, and must be 24 bytes or less (currently).
Definition at line 150 of file Tasking.hpp.
void Grappa::run | ( | FP | fp | ) |
Definition at line 184 of file Tasking.hpp.
void Grappa::spawn | ( | F | f | ) |
Definition at line 175 of file Tasking.hpp.
void Grappa::spawn | ( | TF | tf | ) |
Synchronizing private task spawn.
Overload.
Automatically enrolls task with GlobalCompletionEvent and does local complete
when done (if GCE is non-null). In this version, GCE is a template parameter to avoid taking up space in the task's args.
Definition at line 337 of file GlobalCompletionEvent.hpp.
void Grappa::spawn_worker | ( | TF && | tf | ) |
internal
Definition at line 164 of file Tasking.hpp.