interoperability.doxy 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2018 Inria
  4. *
  5. * StarPU is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU Lesser General Public License as published by
  7. * the Free Software Foundation; either version 2.1 of the License, or (at
  8. * your option) any later version.
  9. *
  10. * StarPU is distributed in the hope that it will be useful, but
  11. * WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. *
  14. * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  15. */
  16. /*! \defgroup API_Interop_Support Interoperability Support
  17. \brief This section describes the interface supplied by StarPU to interoperate with other runtime systems.
  18. \enum e_starpurm_drs_ret
  19. \ingroup API_Interop_Support
  20. StarPU Resource Manager return type.
  21. \var starpurm_drs_ret::starpurm_DRS_SUCCESS
  22. Dynamic resource sharing operation succeeded.
  23. \var starpurm_drs_ret::starpurm_DRS_DISABLD
  24. Dynamic resource sharing is disabled.
  25. \var starpurm_drs_ret::starpurm_DRS_PERM
  26. Dynamic resource sharing operation is not authorized or implemented.
  27. \var starpurm_drs_ret::starpurm_DRS_EINVAL
  28. Dynamic resource sharing operation has been called with one or more invalid parameters.
  29. @name Initialisation
  30. \ingroup API_Interop_Support
  31. \fn void starpurm_initialize(void)
  32. \ingroup API_Interop_Support
  33. Initialize StarPU and the StarPU-RM resource management module. The \ref starpu_init function should not have been called before the call to \c starpurm_initialize. The \c starpurm_initialize function will take care of this
  34. \fn void starpurm_shutdown(void)
  35. \ingroup API_Interop_Support
  36. Shutdown StarPU-RM and StarPU. The \ref starpu_shutdown function should not be called before. The \c starpurm_shutdown function will take care of this.
  37. @name Spawn
  38. \ingroup API_Interop_Support
  39. \fn void starpurm_spawn_kernel_on_cpus(void *data, void(*f)(void *), void *args, hwloc_cpuset_t cpuset)
  40. \ingroup API_Interop_Support
  41. Allocate a temporary context spanning the units selected in the cpuset bitmap,
  42. set it as the default context for the current thread, and call user function \c f.
  43. Upon the return of user function \c f, the temporary context is freed and the previous
  44. default context for the current thread is restored.
  45. \fn void starpurm_spawn_kernel_on_cpus_callback(void *data, void(*f)(void *), void *args, hwloc_cpuset_t cpuset, void(*cb_f)(void *), void *cb_args)
  46. \ingroup API_Interop_Support
  47. Spawn a POSIX thread and returns immediately. The thread spawned will allocate
  48. a temporary context spanning the units selected in the cpuset bitmap, set it as
  49. the default context for the current thread, and call user function \c f. Upon
  50. the return of user function \c f, the temporary context will be freed and the
  51. previous default context for the current thread restored. A user specified callback \c cb_f
  52. will be called just before the termination of the thread.
  53. @name DynamicResourceSharing
  54. \ingroup API_Interop_Support
  55. \fn starpurm_drs_ret_t starpurm_set_drs_enable(starpurm_drs_desc_t *spd)
  56. \ingroup API_Interop_Support
  57. TODO.
  58. \fn starpurm_drs_ret_t starpurm_set_drs_disable(starpurm_drs_desc_t *spd)
  59. \ingroup API_Interop_Support
  60. TODO.
  61. \fn int starpurm_drs_enabled_p(void)
  62. \ingroup API_Interop_Support
  63. TODO.
  64. \fn starpurm_drs_ret_t starpurm_set_max_parallelism(starpurm_drs_desc_t *spd, int max)
  65. \ingroup API_Interop_Support
  66. TODO.
  67. \fn starpurm_drs_ret_t starpurm_callback_set(starpurm_drs_desc_t *spd, starpurm_drs_cbs_t which, starpurm_drs_cb_t callback)
  68. \ingroup API_Interop_Support
  69. TODO.
  70. \fn starpurm_drs_ret_t starpurm_callback_get(starpurm_drs_desc_t *spd, starpurm_drs_cbs_t which, starpurm_drs_cb_t *callback)
  71. \ingroup API_Interop_Support
  72. TODO.
  73. \fn starpurm_drs_ret_t starpurm_assign_cpu_to_starpu(starpurm_drs_desc_t *spd, int cpuid)
  74. \ingroup API_Interop_Support
  75. TODO.
  76. \fn starpurm_drs_ret_t starpurm_assign_cpus_to_starpu(starpurm_drs_desc_t *spd, int ncpus)
  77. \ingroup API_Interop_Support
  78. TODO.
  79. \fn starpurm_drs_ret_t starpurm_assign_cpu_mask_to_starpu(starpurm_drs_desc_t *spd, const hwloc_cpuset_t mask)
  80. \ingroup API_Interop_Support
  81. TODO.
  82. \fn starpurm_drs_ret_t starpurm_assign_all_cpus_to_starpu(starpurm_drs_desc_t *spd)
  83. \ingroup API_Interop_Support
  84. TODO.
  85. \fn starpurm_drs_ret_t starpurm_withdraw_cpu_from_starpu(starpurm_drs_desc_t *spd, int cpuid)
  86. \ingroup API_Interop_Support
  87. TODO.
  88. \fn starpurm_drs_ret_t starpurm_withdraw_cpus_from_starpu(starpurm_drs_desc_t *spd, int ncpus)
  89. \ingroup API_Interop_Support
  90. TODO.
  91. \fn starpurm_drs_ret_t starpurm_withdraw_cpu_mask_from_starpu(starpurm_drs_desc_t *spd, const hwloc_cpuset_t mask)
  92. \ingroup API_Interop_Support
  93. TODO.
  94. \fn starpurm_drs_ret_t starpurm_withdraw_all_cpus_from_starpu(starpurm_drs_desc_t *spd)
  95. \ingroup API_Interop_Support
  96. TODO.
  97. \fn starpurm_drs_ret_t starpurm_lend(starpurm_drs_desc_t *spd)
  98. \ingroup API_Interop_Support
  99. TODO.
  100. \fn starpurm_drs_ret_t starpurm_lend_cpu(starpurm_drs_desc_t *spd, int cpuid)
  101. \ingroup API_Interop_Support
  102. TODO.
  103. \fn starpurm_drs_ret_t starpurm_lend_cpus(starpurm_drs_desc_t *spd, int ncpus)
  104. \ingroup API_Interop_Support
  105. TODO.
  106. \fn starpurm_drs_ret_t starpurm_lend_cpu_mask(starpurm_drs_desc_t *spd, const hwloc_cpuset_t mask)
  107. \ingroup API_Interop_Support
  108. TODO.
  109. \fn starpurm_drs_ret_t starpurm_reclaim(starpurm_drs_desc_t *spd)
  110. \ingroup API_Interop_Support
  111. TODO.
  112. \fn starpurm_drs_ret_t starpurm_reclaim_cpu(starpurm_drs_desc_t *spd, int cpuid)
  113. \ingroup API_Interop_Support
  114. TODO.
  115. \fn starpurm_drs_ret_t starpurm_reclaim_cpus(starpurm_drs_desc_t *spd, int ncpus)
  116. \ingroup API_Interop_Support
  117. TODO.
  118. \fn starpurm_drs_ret_t starpurm_reclaim_cpu_mask(starpurm_drs_desc_t *spd, const hwloc_cpuset_t mask)
  119. \ingroup API_Interop_Support
  120. TODO.
  121. \fn starpurm_drs_ret_t starpurm_acquire(starpurm_drs_desc_t *spd)
  122. \ingroup API_Interop_Support
  123. TODO.
  124. \fn starpurm_drs_ret_t starpurm_acquire_cpu(starpurm_drs_desc_t *spd, int cpuid)
  125. \ingroup API_Interop_Support
  126. TODO.
  127. \fn starpurm_drs_ret_t starpurm_acquire_cpus(starpurm_drs_desc_t *spd, int ncpus)
  128. \ingroup API_Interop_Support
  129. TODO.
  130. \fn starpurm_drs_ret_t starpurm_acquire_cpu_mask(starpurm_drs_desc_t *spd, const hwloc_cpuset_t mask)
  131. \ingroup API_Interop_Support
  132. TODO.
  133. \fn starpurm_drs_ret_t starpurm_return_all(starpurm_drs_desc_t *spd)
  134. \ingroup API_Interop_Support
  135. TODO.
  136. \fn starpurm_drs_ret_t starpurm_return_cpu(starpurm_drs_desc_t *spd, int cpuid)
  137. \ingroup API_Interop_Support
  138. TODO.
  139. @name Devices
  140. \ingroup API_Interop_Support
  141. \fn int starpurm_get_device_type_id(const char *type_str)
  142. \ingroup API_Interop_Support
  143. TODO.
  144. \fn const char *starpurm_get_device_type_name(int type_id)
  145. \ingroup API_Interop_Support
  146. TODO.
  147. \fn int starpurm_get_nb_devices_by_type(int type_id)
  148. \ingroup API_Interop_Support
  149. TODO.
  150. \fn int starpurm_get_device_id(int type_id, int device_rank)
  151. \ingroup API_Interop_Support
  152. TODO.
  153. \fn starpurm_drs_ret_t starpurm_assign_device_to_starpu(starpurm_drs_desc_t *spd, int type_id, int unit_rank)
  154. \ingroup API_Interop_Support
  155. TODO.
  156. \fn starpurm_drs_ret_t starpurm_assign_devices_to_starpu(starpurm_drs_desc_t *spd, int type_id, int ndevices)
  157. \ingroup API_Interop_Support
  158. TODO.
  159. \fn starpurm_drs_ret_t starpurm_assign_device_mask_to_starpu(starpurm_drs_desc_t *spd, const hwloc_cpuset_t mask)
  160. \ingroup API_Interop_Support
  161. TODO.
  162. \fn starpurm_drs_ret_t starpurm_assign_all_devices_to_starpu(starpurm_drs_desc_t *spd, int type_id)
  163. \ingroup API_Interop_Support
  164. TODO.
  165. \fn starpurm_drs_ret_t starpurm_withdraw_device_from_starpu(starpurm_drs_desc_t *spd, int type_id, int unit_rank)
  166. \ingroup API_Interop_Support
  167. TODO.
  168. \fn starpurm_drs_ret_t starpurm_withdraw_devices_from_starpu(starpurm_drs_desc_t *spd, int type_id, int ndevices)
  169. \ingroup API_Interop_Support
  170. TODO.
  171. \fn starpurm_drs_ret_t starpurm_withdraw_device_mask_from_starpu(starpurm_drs_desc_t *spd, const hwloc_cpuset_t mask)
  172. \ingroup API_Interop_Support
  173. TODO.
  174. \fn starpurm_drs_ret_t starpurm_withdraw_all_devices_from_starpu(starpurm_drs_desc_t *spd, int type_id)
  175. \ingroup API_Interop_Support
  176. TODO.
  177. \fn starpurm_drs_ret_t starpurm_lend_device(starpurm_drs_desc_t *spd, int type_id, int unit_rank)
  178. \ingroup API_Interop_Support
  179. TODO.
  180. \fn starpurm_drs_ret_t starpurm_lend_devices(starpurm_drs_desc_t *spd, int type_id, int ndevices)
  181. \ingroup API_Interop_Support
  182. TODO.
  183. \fn starpurm_drs_ret_t starpurm_lend_device_mask(starpurm_drs_desc_t *spd, const hwloc_cpuset_t mask)
  184. \ingroup API_Interop_Support
  185. TODO.
  186. \fn starpurm_drs_ret_t starpurm_lend_all_devices(starpurm_drs_desc_t *spd, int type_id)
  187. \ingroup API_Interop_Support
  188. TODO.
  189. \fn starpurm_drs_ret_t starpurm_reclaim_device(starpurm_drs_desc_t *spd, int type_id, int unit_rank)
  190. \ingroup API_Interop_Support
  191. TODO.
  192. \fn starpurm_drs_ret_t starpurm_reclaim_devices(starpurm_drs_desc_t *spd, int type_id, int ndevices)
  193. \ingroup API_Interop_Support
  194. TODO.
  195. \fn starpurm_drs_ret_t starpurm_reclaim_device_mask(starpurm_drs_desc_t *spd, const hwloc_cpuset_t mask)
  196. \ingroup API_Interop_Support
  197. TODO.
  198. \fn starpurm_drs_ret_t starpurm_reclaim_all_devices(starpurm_drs_desc_t *spd, int type_id)
  199. \ingroup API_Interop_Support
  200. TODO.
  201. \fn starpurm_drs_ret_t starpurm_acquire_device(starpurm_drs_desc_t *spd, int type_id, int unit_rank)
  202. \ingroup API_Interop_Support
  203. TODO.
  204. \fn starpurm_drs_ret_t starpurm_acquire_devices(starpurm_drs_desc_t *spd, int type_id, int ndevices)
  205. \ingroup API_Interop_Support
  206. TODO.
  207. \fn starpurm_drs_ret_t starpurm_acquire_device_mask(starpurm_drs_desc_t *spd, const hwloc_cpuset_t mask)
  208. \ingroup API_Interop_Support
  209. TODO.
  210. \fn starpurm_drs_ret_t starpurm_acquire_all_devices(starpurm_drs_desc_t *spd, int type_id)
  211. \ingroup API_Interop_Support
  212. TODO.
  213. \fn starpurm_drs_ret_t starpurm_return_all_devices(starpurm_drs_desc_t *spd, int type_id)
  214. \ingroup API_Interop_Support
  215. TODO.
  216. \fn starpurm_drs_ret_t starpurm_return_device(starpurm_drs_desc_t *spd, int type_id, int unit_rank)
  217. \ingroup API_Interop_Support
  218. TODO.
  219. @name CpusetsQueries
  220. \ingroup API_Interop_Support
  221. \fn hwloc_cpuset_t starpurm_get_device_worker_cpuset(int type_id, int unit_rank)
  222. \ingroup API_Interop_Support
  223. TODO.
  224. \fn hwloc_cpuset_t starpurm_get_global_cpuset(void)
  225. \ingroup API_Interop_Support
  226. TODO.
  227. \fn hwloc_cpuset_t starpurm_get_selected_cpuset(void)
  228. \ingroup API_Interop_Support
  229. TODO.
  230. \fn hwloc_cpuset_t starpurm_get_all_cpu_workers_cpuset(void)
  231. \ingroup API_Interop_Support
  232. TODO.
  233. \fn hwloc_cpuset_t starpurm_get_all_device_workers_cpuset(void)
  234. \ingroup API_Interop_Support
  235. TODO.
  236. \fn hwloc_cpuset_t starpurm_get_all_device_workers_cpuset_by_type(int typeid)
  237. \ingroup API_Interop_Support
  238. TODO.
  239. */