openmp_runtime_support.doxy 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  1. /*
  2. * This file is part of the StarPU Handbook.
  3. * Copyright (C) 2014 Inria
  4. * See the file version.doxy for copying conditions.
  5. */
  6. /*! \defgroup API_OpenMP_Runtime_Support OpenMP Runtime Support
  7. @name Initialisation
  8. \ingroup API_OpenMP_Runtime_Support
  9. \def STARPU_OPENMP
  10. \ingroup API_OpenMP_Runtime_Support
  11. This macro is defined when StarPU has been installed with OpenMP Runtime
  12. support. It should be used in your code to detect the availability of
  13. the runtime support for OpenMP.
  14. \fn int starpu_omp_init(void)
  15. \ingroup API_OpenMP_Runtime_Support
  16. Initializes StarPU and its OpenMP Runtime support.
  17. \fn int starpu_omp_shutdown(void)
  18. \ingroup API_OpenMP_Runtime_Support
  19. Shutdown StarPU and its OpenMP Runtime support.
  20. @name Parallel
  21. \anchor ORS_Parallel
  22. \ingroup API_OpenMP_Runtime_Support
  23. \fn void starpu_omp_parallel_region(const struct starpu_omp_parallel_region_attr *attr)
  24. \ingroup API_OpenMP_Runtime_Support
  25. Generates and launch an OpenMP parallel region and return after its
  26. completion. \p attr specifies the attributes for the generated parallel region.
  27. If this function is called from inside another, generating, parallel region, the
  28. generated parallel region is nested within the generating parallel region. This
  29. function can be used to implement <c>pragma omp parallel</c>.
  30. \fn void starpu_omp_master(void (*f)(void *arg), void *arg)
  31. \ingroup API_OpenMP_Runtime_Support
  32. Executes a function only on the master thread of the OpenMP
  33. parallel region it is called from. When called from a thread that is not the
  34. master of the parallel region it is called from, this function does nothing. \p
  35. f is the function to be called. \p arg is an argument passed to \p arg. This
  36. function can be used to implement <c>pragma omp master</c>.
  37. \fn int starpu_omp_master_inline(void)
  38. \ingroup API_OpenMP_Runtime_Support
  39. Returns whether the calling thread is the master of the OpenMP parallel region
  40. it is called from or not. This function can be used to implement <c>pragma omp
  41. master</c> without code outlining.
  42. @name Synchronization
  43. \anchor ORS_Synchronization
  44. \ingroup API_OpenMP_Runtime_Support
  45. \fn void starpu_omp_barrier(void)
  46. \ingroup API_OpenMP_Runtime_Support
  47. This function .
  48. \fn void starpu_omp_critical(void (*f)(void *arg), void *arg, const char *name)
  49. \ingroup API_OpenMP_Runtime_Support
  50. This function .
  51. \fn void starpu_omp_critical_inline_begin(const char *name)
  52. \ingroup API_OpenMP_Runtime_Support
  53. This function .
  54. \fn void starpu_omp_critical_inline_end(const char *name)
  55. \ingroup API_OpenMP_Runtime_Support
  56. This function .
  57. @name Worksharing
  58. \anchor ORS_Worksharing
  59. \ingroup API_OpenMP_Runtime_Support
  60. \fn void starpu_omp_single(void (*f)(void *arg), void *arg, int nowait)
  61. \ingroup API_OpenMP_Runtime_Support
  62. This function .
  63. \fn int starpu_omp_single_inline(void)
  64. \ingroup API_OpenMP_Runtime_Support
  65. This function .
  66. \fn void starpu_omp_for(void (*f)(unsigned long long _first_i, unsigned long long _nb_i, void *arg), void *arg, unsigned long long nb_iterations, unsigned long long chunk, int schedule, int ordered, int nowait)
  67. \ingroup API_OpenMP_Runtime_Support
  68. This function .
  69. \fn int starpu_omp_for_inline_first(unsigned long long nb_iterations, unsigned long long chunk, int schedule, int ordered, unsigned long long *_first_i, unsigned long long *_nb_i)
  70. \ingroup API_OpenMP_Runtime_Support
  71. This function .
  72. \fn int starpu_omp_for_inline_next(unsigned long long nb_iterations, unsigned long long chunk, int schedule, int ordered, unsigned long long *_first_i, unsigned long long *_nb_i)
  73. \ingroup API_OpenMP_Runtime_Support
  74. This function .
  75. \fn void starpu_omp_for_alt(void (*f)(unsigned long long _begin_i, unsigned long long _end_i, void *arg), void *arg, unsigned long long nb_iterations, unsigned long long chunk, int schedule, int ordered, int nowait)
  76. \ingroup API_OpenMP_Runtime_Support
  77. This function .
  78. \fn int starpu_omp_for_inline_first_alt(unsigned long long nb_iterations, unsigned long long chunk, int schedule, int ordered, unsigned long long *_begin_i, unsigned long long *_end_i)
  79. \ingroup API_OpenMP_Runtime_Support
  80. This function .
  81. \fn int starpu_omp_for_inline_next_alt(unsigned long long nb_iterations, unsigned long long chunk, int schedule, int ordered, unsigned long long *_begin_i, unsigned long long *_end_i)
  82. \ingroup API_OpenMP_Runtime_Support
  83. This function .
  84. \fn void starpu_omp_ordered_inline_begin(void)
  85. \ingroup API_OpenMP_Runtime_Support
  86. This function .
  87. \fn void starpu_omp_ordered_inline_end(void)
  88. \ingroup API_OpenMP_Runtime_Support
  89. This function .
  90. \fn void starpu_omp_ordered(void (*f)(void *arg), void *arg)
  91. \ingroup API_OpenMP_Runtime_Support
  92. This function .
  93. \fn void starpu_omp_sections(unsigned long long nb_sections, void (**section_f)(void *arg), void **section_arg, int nowait)
  94. \ingroup API_OpenMP_Runtime_Support
  95. This function .
  96. \fn void starpu_omp_sections_combined(unsigned long long nb_sections, void (*section_f)(unsigned long long section_num, void *arg), void **section_arg, int nowait)
  97. \ingroup API_OpenMP_Runtime_Support
  98. This function .
  99. @name Task
  100. \anchor ORS_Task
  101. \ingroup API_OpenMP_Runtime_Support
  102. \fn void starpu_omp_task_region(const struct starpu_omp_task_region_attr *attr)
  103. \ingroup API_OpenMP_Runtime_Support
  104. This function .
  105. \fn void starpu_omp_taskwait(void)
  106. \ingroup API_OpenMP_Runtime_Support
  107. This function .
  108. \fn void starpu_omp_taskgroup(void (*f)(void *arg), void *arg)
  109. \ingroup API_OpenMP_Runtime_Support
  110. This function .
  111. @name API
  112. \anchor ORS_API
  113. \ingroup API_OpenMP_Runtime_Support
  114. \fn void starpu_omp_set_num_threads(int threads)
  115. \ingroup API_OpenMP_Runtime_Support
  116. This function .
  117. \fn int starpu_omp_get_num_threads()
  118. \ingroup API_OpenMP_Runtime_Support
  119. This function .
  120. \fn int starpu_omp_get_thread_num()
  121. \ingroup API_OpenMP_Runtime_Support
  122. This function .
  123. \fn int starpu_omp_get_max_threads()
  124. \ingroup API_OpenMP_Runtime_Support
  125. This function .
  126. \fn int starpu_omp_get_num_procs (void)
  127. \ingroup API_OpenMP_Runtime_Support
  128. This function .
  129. \fn int starpu_omp_in_parallel (void)
  130. \ingroup API_OpenMP_Runtime_Support
  131. This function .
  132. \fn void starpu_omp_set_dynamic (int dynamic_threads)
  133. \ingroup API_OpenMP_Runtime_Support
  134. This function .
  135. \fn int starpu_omp_get_dynamic (void)
  136. \ingroup API_OpenMP_Runtime_Support
  137. This function .
  138. \fn void starpu_omp_set_nested (int nested)
  139. \ingroup API_OpenMP_Runtime_Support
  140. This function .
  141. \fn int starpu_omp_get_nested (void)
  142. \ingroup API_OpenMP_Runtime_Support
  143. This function .
  144. \fn int starpu_omp_get_cancellation(void)
  145. \ingroup API_OpenMP_Runtime_Support
  146. This function .
  147. \fn void starpu_omp_set_schedule (enum starpu_omp_sched_value kind, int modifier)
  148. \ingroup API_OpenMP_Runtime_Support
  149. This function .
  150. \fn void starpu_omp_get_schedule (enum starpu_omp_sched_value *kind, int *modifier)
  151. \ingroup API_OpenMP_Runtime_Support
  152. This function .
  153. \fn int starpu_omp_get_thread_limit (void)
  154. \ingroup API_OpenMP_Runtime_Support
  155. This function .
  156. \fn void starpu_omp_set_max_active_levels (int max_levels)
  157. \ingroup API_OpenMP_Runtime_Support
  158. This function .
  159. \fn int starpu_omp_get_max_active_levels (void)
  160. \ingroup API_OpenMP_Runtime_Support
  161. This function .
  162. \fn int starpu_omp_get_level (void)
  163. \ingroup API_OpenMP_Runtime_Support
  164. This function .
  165. \fn int starpu_omp_get_ancestor_thread_num (int level)
  166. \ingroup API_OpenMP_Runtime_Support
  167. This function .
  168. \fn int starpu_omp_get_team_size (int level)
  169. \ingroup API_OpenMP_Runtime_Support
  170. This function .
  171. \fn int starpu_omp_get_active_level (void)
  172. \ingroup API_OpenMP_Runtime_Support
  173. This function .
  174. \fn int starpu_omp_in_final(void)
  175. \ingroup API_OpenMP_Runtime_Support
  176. This function .
  177. \fn enum starpu_omp_proc_bind_value starpu_omp_get_proc_bind(void)
  178. \ingroup API_OpenMP_Runtime_Support
  179. This function .
  180. \fn void starpu_omp_set_default_device(int device_num)
  181. \ingroup API_OpenMP_Runtime_Support
  182. This function .
  183. \fn int starpu_omp_get_default_device(void)
  184. \ingroup API_OpenMP_Runtime_Support
  185. This function .
  186. \fn int starpu_omp_get_num_devices(void)
  187. \ingroup API_OpenMP_Runtime_Support
  188. This function .
  189. \fn int starpu_omp_get_num_teams(void)
  190. \ingroup API_OpenMP_Runtime_Support
  191. This function .
  192. \fn int starpu_omp_get_team_num(void)
  193. \ingroup API_OpenMP_Runtime_Support
  194. This function .
  195. \fn int starpu_omp_is_initial_device(void)
  196. \ingroup API_OpenMP_Runtime_Support
  197. This function .
  198. \fn void starpu_omp_init_lock (starpu_omp_lock_t *lock)
  199. \ingroup API_OpenMP_Runtime_Support
  200. This function .
  201. \fn void starpu_omp_destroy_lock (starpu_omp_lock_t *lock)
  202. \ingroup API_OpenMP_Runtime_Support
  203. This function .
  204. \fn void starpu_omp_set_lock (starpu_omp_lock_t *lock)
  205. \ingroup API_OpenMP_Runtime_Support
  206. This function .
  207. \fn void starpu_omp_unset_lock (starpu_omp_lock_t *lock)
  208. \ingroup API_OpenMP_Runtime_Support
  209. This function .
  210. \fn int starpu_omp_test_lock (starpu_omp_lock_t *lock)
  211. \ingroup API_OpenMP_Runtime_Support
  212. This function .
  213. \fn void starpu_omp_init_nest_lock (starpu_omp_nest_lock_t *lock)
  214. \ingroup API_OpenMP_Runtime_Support
  215. This function .
  216. \fn void starpu_omp_destroy_nest_lock (starpu_omp_nest_lock_t *lock)
  217. \ingroup API_OpenMP_Runtime_Support
  218. This function .
  219. \fn void starpu_omp_set_nest_lock (starpu_omp_nest_lock_t *lock)
  220. \ingroup API_OpenMP_Runtime_Support
  221. This function .
  222. \fn void starpu_omp_unset_nest_lock (starpu_omp_nest_lock_t *lock)
  223. \ingroup API_OpenMP_Runtime_Support
  224. This function .
  225. \fn int starpu_omp_test_nest_lock (starpu_omp_nest_lock_t *lock)
  226. \ingroup API_OpenMP_Runtime_Support
  227. This function .
  228. \fn double starpu_omp_get_wtime (void)
  229. \ingroup API_OpenMP_Runtime_Support
  230. This function .
  231. \fn double starpu_omp_get_wtick (void)
  232. \ingroup API_OpenMP_Runtime_Support
  233. This function .
  234. */