|
StarPU Handbook
|
Functions | |
| int | starpu_data_cpy (starpu_data_handle_t dst_handle, starpu_data_handle_t src_handle, int asynchronous, void(*callback_func)(void *), void *callback_arg) |
| void | starpu_execute_on_each_worker (void(*func)(void *), void *arg, uint32_t where) |
| int starpu_data_cpy | ( | starpu_data_handle_t | dst_handle, |
| starpu_data_handle_t | src_handle, | ||
| int | asynchronous, | ||
| void(*)(void *) | callback_func, | ||
| void * | callback_arg | ||
| ) |
Copy the content of src_handle into dst_handle. The parameter asynchronous indicates whether the function should block or not. In the case of an asynchronous call, it is possible to synchronize with the termination of this operation either by the means of implicit dependencies (if enabled) or by calling starpu_task_wait_for_all(). If callback_func is not NULL, this callback function is executed after the handle has been copied, and it is given the pointer callback_arg as argument.
| void starpu_execute_on_each_worker | ( | void(*)(void *) | func, |
| void * | arg, | ||
| uint32_t | where | ||
| ) |
This function executes the given function on a subset of workers. When calling this method, the offloaded function func is executed by every StarPU worker that may execute the function. The argument arg is passed to the offloaded function. The argument where specifies on which types of processing units the function should be executed. Similarly to the field starpu_codelet::where, it is possible to specify that the function should be executed on every CUDA device and every CPU by passing STARPU_CPU|STARPU_CUDA. This function blocks until the function has been executed on every appropriate processing units, so that it may not be called from a callback function for instance.
1.8.1.2