misc_helpers.doxy 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * This file is part of the StarPU Handbook.
  3. * Copyright (C) 2009--2011 Universit@'e de Bordeaux
  4. * Copyright (C) 2010, 2011, 2012, 2013, 2014 CNRS
  5. * Copyright (C) 2011, 2012 INRIA
  6. * See the file version.doxy for copying conditions.
  7. */
  8. /*! \defgroup API_Miscellaneous_Helpers Miscellaneous Helpers
  9. \fn 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)
  10. \ingroup API_Miscellaneous_Helpers
  11. Copy the content of \p src_handle into \p dst_handle. The parameter \p
  12. asynchronous indicates whether the function should block or not. In
  13. the case of an asynchronous call, it is possible to synchronize with
  14. the termination of this operation either by the means of implicit
  15. dependencies (if enabled) or by calling starpu_task_wait_for_all(). If
  16. \p callback_func is not NULL, this callback function is executed after
  17. the handle has been copied, and it is given the pointer \p callback_arg as argument.
  18. \fn void starpu_execute_on_each_worker(void (*func)(void *), void *arg, uint32_t where)
  19. \ingroup API_Miscellaneous_Helpers
  20. This function executes the given function on a subset of workers. When
  21. calling this method, the offloaded function \p func is executed by
  22. every StarPU worker that may execute the function. The argument \p arg
  23. is passed to the offloaded function. The argument \p where specifies
  24. on which types of processing units the function should be executed.
  25. Similarly to the field starpu_codelet::where, it is possible to
  26. specify that the function should be executed on every CUDA device and
  27. every CPU by passing ::STARPU_CPU|::STARPU_CUDA. This function blocks
  28. until the function has been executed on every appropriate processing
  29. units, so that it may not be called from a callback function for
  30. instance.
  31. \fn void starpu_execute_on_each_worker_ex(void (*func)(void *), void *arg, uint32_t where, const char *name)
  32. \ingroup API_Miscellaneous_Helpers
  33. Same as starpu_execute_on_each_worker(), except that the task name is
  34. specified in the argument \p name.
  35. \fn void starpu_execute_on_specific_workers(void (*func)(void*), void *arg, unsigned num_workers, unsigned *workers, const char *name);
  36. \ingroup API_Miscellaneous_Helpers
  37. Call \p func(\p arg) on every worker in the \p workers array. \p
  38. num_workers indicates the number of workers in this array. This
  39. function is synchronous, but the different workers may execute the
  40. function in parallel.
  41. \fn double starpu_timing_now(void)
  42. \ingroup API_Miscellaneous_Helpers
  43. Return the current date in micro-seconds.
  44. */