Template Function shad::rt::executeOnAll(FunT&&, const InArgsT&)¶
- Defined in File runtime.h
Function Documentation¶
-
template <typename FunT, typename InArgsT>
voidshad::rt
::
executeOnAll
(FunT &&func, const InArgsT &args) Execute a function on all localities synchronously.
Typical Usage:
struct Args { int a; char b; }; void task(const Args & args) { /* do something */ } Args args { 2, 'a' }; executeOnAll(task, args);
- Template Parameters
FunT
: The type of the function to be executed. The function prototype must be:void(const InArgsT &);
InArgsT
: The type of the argument accepted by the function. The type can be a structure or a class but with the restriction that must be memcopy-able.
- Parameters
func
: The function to execute.args
: The arguments to be passed to the function.