codelet_and_tasks.doxy 44 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2009-2011 Universit@'e de Bordeaux
  4. * Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 CNRS
  5. * Copyright (C) 2011, 2012, 2017 Inria
  6. *
  7. * StarPU is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU Lesser General Public License as published by
  9. * the Free Software Foundation; either version 2.1 of the License, or (at
  10. * your option) any later version.
  11. *
  12. * StarPU is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  15. *
  16. * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  17. */
  18. /*! \defgroup API_Codelet_And_Tasks Codelet And Tasks
  19. \brief This section describes the interface to manipulate codelets and tasks.
  20. \enum starpu_codelet_type
  21. \ingroup API_Codelet_And_Tasks
  22. Describes the type of parallel task. See \ref ParallelTasks for details.
  23. \var starpu_codelet_type::STARPU_SEQ
  24. (default) for classical sequential tasks.
  25. \var starpu_codelet_type::STARPU_SPMD
  26. for a parallel task whose threads are handled by StarPU, the code
  27. has to use starpu_combined_worker_get_size() and
  28. starpu_combined_worker_get_rank() to distribute the work.
  29. \var starpu_codelet_type::STARPU_FORKJOIN
  30. for a parallel task whose threads are started by the codelet
  31. function, which has to use starpu_combined_worker_get_size() to
  32. determine how many threads should be started.
  33. \enum starpu_task_status
  34. \ingroup API_Codelet_And_Tasks
  35. Task status
  36. \var starpu_task_status::STARPU_TASK_INVALID
  37. The task has just been initialized.
  38. \var starpu_task_status::STARPU_TASK_BLOCKED
  39. The task has just been submitted, and its dependencies has not
  40. been checked yet.
  41. \var starpu_task_status::STARPU_TASK_READY
  42. The task is ready for execution.
  43. \var starpu_task_status::STARPU_TASK_RUNNING
  44. The task is running on some worker.
  45. \var starpu_task_status::STARPU_TASK_FINISHED
  46. The task is finished executing.
  47. \var starpu_task_status::STARPU_TASK_BLOCKED_ON_TAG
  48. The task is waiting for a tag.
  49. \var starpu_task_status::STARPU_TASK_BLOCKED_ON_TASK
  50. The task is waiting for a task.
  51. \var starpu_task_status::STARPU_TASK_BLOCKED_ON_DATA
  52. The task is waiting for some data.
  53. \var starpu_task_status::STARPU_TASK_STOPPED
  54. The task is stopped.
  55. \def STARPU_NOWHERE
  56. \ingroup API_Codelet_And_Tasks
  57. This macro is used when setting the field starpu_codelet::where
  58. to specify that the codelet has no computation part, and thus does not need
  59. to be scheduled, and data does not need to be actually loaded. This is thus
  60. essentially used for synchronization tasks.
  61. \def STARPU_CPU
  62. \ingroup API_Codelet_And_Tasks
  63. This macro is used when setting the field starpu_codelet::where (or starpu_task::where)
  64. to specify the codelet (or the task) may be executed on a CPU processing unit.
  65. \def STARPU_CUDA
  66. \ingroup API_Codelet_And_Tasks
  67. This macro is used when setting the field starpu_codelet::where (or starpu_task::where)
  68. to specify the codelet (or the task) may be executed on a CUDA processing unit.
  69. \def STARPU_OPENCL
  70. \ingroup API_Codelet_And_Tasks
  71. This macro is used when setting the field starpu_codelet::where (or starpu_task::where) to
  72. specify the codelet (or the task) may be executed on a OpenCL processing unit.
  73. \def STARPU_MIC
  74. \ingroup API_Codelet_And_Tasks
  75. This macro is used when setting the field starpu_codelet::where (or starpu_task::where) to
  76. specify the codelet (or the task) may be executed on a MIC processing unit.
  77. \def STARPU_MPI_MS
  78. \ingroup API_Codelet_And_Tasks
  79. This macro is used when setting the field starpu_codelet::where (or starpu_task::where) to
  80. specify the codelet (or the task) may be executed on a MPI Slave processing unit.
  81. \def STARPU_SCC
  82. \ingroup API_Codelet_And_Tasks
  83. This macro is used when setting the field starpu_codelet::where (or starpu_task::where) to
  84. specify the codelet (or the task) may be executed on an SCC processing unit.
  85. \def STARPU_MAIN_RAM
  86. \ingroup API_Codelet_And_Tasks
  87. This macro is used when the RAM memory node is specified.
  88. \def STARPU_MULTIPLE_CPU_IMPLEMENTATIONS
  89. \deprecated
  90. \ingroup API_Codelet_And_Tasks
  91. Setting the field starpu_codelet::cpu_func with this macro
  92. indicates the codelet will have several implementations. The use of
  93. this macro is deprecated. One should always only define the field
  94. starpu_codelet::cpu_funcs.
  95. \def STARPU_MULTIPLE_CUDA_IMPLEMENTATIONS
  96. \deprecated
  97. \ingroup API_Codelet_And_Tasks
  98. Setting the field starpu_codelet::cuda_func with this macro
  99. indicates the codelet will have several implementations. The use of
  100. this macro is deprecated. One should always only define the field
  101. starpu_codelet::cuda_funcs.
  102. \def STARPU_MULTIPLE_OPENCL_IMPLEMENTATIONS
  103. \deprecated
  104. \ingroup API_Codelet_And_Tasks
  105. Setting the field starpu_codelet::opencl_func with
  106. this macro indicates the codelet will have several implementations.
  107. The use of this macro is deprecated. One should always only define the
  108. field starpu_codelet::opencl_funcs.
  109. \def STARPU_NMAXBUFS
  110. \ingroup API_Codelet_And_Tasks
  111. Defines the maximum number of buffers that tasks will be able to take
  112. as parameters. The default value is 8, it can be changed by using the
  113. configure option \ref enable-maxbuffers "--enable-maxbuffers".
  114. \def STARPU_VARIABLE_NBUFFERS
  115. \ingroup API_Codelet_And_Tasks
  116. Value to set in starpu_codelet::nbuffers to specify that the codelet can accept
  117. a variable number of buffers, specified in starpu_task::nbuffers.
  118. \def STARPU_CUDA_ASYNC
  119. \ingroup API_Codelet_And_Tasks
  120. Value to be set in starpu_codelet::cuda_flags to allow asynchronous CUDA kernel execution.
  121. \def STARPU_OPENCL_ASYNC
  122. \ingroup API_Codelet_And_Tasks
  123. Value to be set in starpu_codelet::opencl_flags to allow asynchronous OpenCL kernel execution.
  124. \def STARPU_CODELET_SIMGRID_EXECUTE
  125. \ingroup API_Codelet_And_Tasks
  126. Value to be set in starpu_codelet::flags to execute the codelet functions even in simgrid mode.
  127. \def STARPU_CODELET_SIMGRID_EXECUTE_AND_INJECT
  128. \ingroup API_Codelet_And_Tasks
  129. Value to be set in starpu_codelet::flags to execute the codelet functions even in simgrid mode,
  130. and later inject the measured timing inside the simulation.
  131. \typedef starpu_cpu_func_t
  132. \ingroup API_Codelet_And_Tasks
  133. CPU implementation of a codelet.
  134. \typedef starpu_cuda_func_t
  135. \ingroup API_Codelet_And_Tasks
  136. CUDA implementation of a codelet.
  137. \typedef starpu_opencl_func_t
  138. \ingroup API_Codelet_And_Tasks
  139. OpenCL implementation of a codelet.
  140. \typedef starpu_mic_func_t
  141. \ingroup API_Codelet_And_Tasks
  142. MIC implementation of a codelet.
  143. \typedef starpu_mpi_ms_func_t
  144. \ingroup API_Codelet_And_Tasks
  145. MPI Master Slave implementation of a codelet.
  146. \typedef starpu_scc_func_t
  147. \ingroup API_Codelet_And_Tasks
  148. SCC implementation of a codelet.
  149. \typedef starpu_mic_kernel_t
  150. \ingroup API_Codelet_And_Tasks
  151. MIC kernel for a codelet
  152. \typedef starpu_mpi_ms_kernel_t
  153. \ingroup API_Codelet_And_Tasks
  154. MPI Master Slave kernel for a codelet
  155. \typedef starpu_scc_kernel_t
  156. \ingroup API_Codelet_And_Tasks
  157. SCC kernel for a codelet
  158. \struct starpu_codelet
  159. \ingroup API_Codelet_And_Tasks
  160. The codelet structure describes a kernel that is possibly
  161. implemented on various targets. For compatibility, make sure to
  162. initialize the whole structure to zero, either by using explicit
  163. memset, or the function starpu_codelet_init(), or by letting the
  164. compiler implicitly do it in e.g. static storage case.
  165. \var uint32_t starpu_codelet::where
  166. Optional field to indicate which types of processing units are
  167. able to execute the codelet. The different values ::STARPU_CPU,
  168. ::STARPU_CUDA, ::STARPU_OPENCL can be combined to specify on which
  169. types of processing units the codelet can be executed.
  170. ::STARPU_CPU|::STARPU_CUDA for instance indicates that the codelet
  171. is implemented for both CPU cores and CUDA devices while
  172. ::STARPU_OPENCL indicates that it is only available on OpenCL
  173. devices. If the field is unset, its value will be automatically
  174. set based on the availability of the XXX_funcs fields defined
  175. below. It can also be set to ::STARPU_NOWHERE to specify that no
  176. computation has to be actually done.
  177. \var int (*starpu_codelet::can_execute)(unsigned workerid, struct starpu_task *task, unsigned nimpl)
  178. Define a function which should return 1 if the worker designated
  179. by \p workerid can execute the \p nimpl -th implementation of \p
  180. task, 0 otherwise.
  181. \var enum starpu_codelet_type starpu_codelet::type
  182. Optional field to specify the type of the codelet. The default is
  183. ::STARPU_SEQ, i.e. usual sequential implementation. Other values
  184. (::STARPU_SPMD or ::STARPU_FORKJOIN declare that a parallel
  185. implementation is also available. See \ref ParallelTasks for
  186. details.
  187. \var int starpu_codelet::max_parallelism
  188. Optional field. If a parallel implementation is available, this
  189. denotes the maximum combined worker size that StarPU will use to
  190. execute parallel tasks for this codelet.
  191. \var starpu_cpu_func_t starpu_codelet::cpu_func
  192. \deprecated
  193. Optional field which has been made deprecated. One should use
  194. instead the field starpu_codelet::cpu_funcs.
  195. \var starpu_cuda_func_t starpu_codelet::cuda_func
  196. \deprecated
  197. Optional field which has been made deprecated. One should use
  198. instead the starpu_codelet::cuda_funcs field.
  199. \var starpu_opencl_func_t starpu_codelet::opencl_func
  200. \deprecated
  201. Optional field which has been made deprecated. One should use
  202. instead the starpu_codelet::opencl_funcs field.
  203. \var starpu_cpu_func_t starpu_codelet::cpu_funcs[STARPU_MAXIMPLEMENTATIONS]
  204. Optional array of function pointers to the CPU implementations of
  205. the codelet. The functions prototype must be:
  206. \code{.c}
  207. void cpu_func(void *buffers[], void *cl_arg)
  208. \endcode
  209. The first argument being the array of data managed by the data
  210. management library, and the second argument is a pointer to the
  211. argument passed from the field starpu_task::cl_arg. If the field
  212. starpu_codelet::where is set, then the field
  213. starpu_codelet::cpu_funcs is ignored if ::STARPU_CPU does not
  214. appear in the field starpu_codelet::where, it must be
  215. non-<c>NULL</c> otherwise.
  216. \var char *starpu_codelet::cpu_funcs_name[STARPU_MAXIMPLEMENTATIONS]
  217. Optional array of strings which provide the name of the CPU
  218. functions referenced in the array starpu_codelet::cpu_funcs. This
  219. can be used when running on MIC devices or the SCC platform, for
  220. StarPU to simply look up the MIC function implementation through
  221. its name.
  222. \var starpu_cuda_func_t starpu_codelet::cuda_funcs[STARPU_MAXIMPLEMENTATIONS]
  223. Optional array of function pointers to the CUDA implementations of
  224. the codelet. The functions must be host-functions written in the
  225. CUDA runtime API. Their prototype must be:
  226. \code{.c}
  227. void cuda_func(void *buffers[], void *cl_arg)
  228. \endcode
  229. If the field starpu_codelet::where is set, then the field
  230. starpu_codelet::cuda_funcs is ignored if ::STARPU_CUDA does not
  231. appear in the field starpu_codelet::where, it must be
  232. non-<c>NULL</c> otherwise.
  233. \var char starpu_codelet::cuda_flags[STARPU_MAXIMPLEMENTATIONS]
  234. Optional array of flags for CUDA execution. They specify some
  235. semantic details about CUDA kernel execution, such as asynchronous
  236. execution.
  237. \var starpu_opencl_func_t starpu_codelet::opencl_funcs[STARPU_MAXIMPLEMENTATIONS]
  238. Optional array of function pointers to the OpenCL implementations
  239. of the codelet. The functions prototype must be:
  240. \code{.c}
  241. void opencl_func(void *buffers[], void *cl_arg)
  242. \endcode
  243. If the field starpu_codelet::where field is set, then the field
  244. starpu_codelet::opencl_funcs is ignored if ::STARPU_OPENCL does
  245. not appear in the field starpu_codelet::where, it must be
  246. non-<c>NULL</c> otherwise.
  247. \var char starpu_codelet::opencl_flags[STARPU_MAXIMPLEMENTATIONS]
  248. Optional array of flags for OpenCL execution. They specify some
  249. semantic details about OpenCL kernel execution, such as
  250. asynchronous execution.
  251. \var starpu_mic_func_t starpu_codelet::mic_funcs[STARPU_MAXIMPLEMENTATIONS]
  252. Optional array of function pointers to a function which returns
  253. the MIC implementation of the codelet. The functions prototype
  254. must be:
  255. \code{.c}
  256. starpu_mic_kernel_t mic_func(struct starpu_codelet *cl, unsigned nimpl)
  257. \endcode
  258. If the field starpu_codelet::where is set, then the field
  259. starpu_codelet::mic_funcs is ignored if ::STARPU_MIC does not
  260. appear in the field starpu_codelet::where. It can be <c>NULL</c>
  261. if starpu_codelet::cpu_funcs_name is non-<c>NULL</c>, in which
  262. case StarPU will simply make a symbol lookup to get the
  263. implementation.
  264. \var starpu_mpi_ms_func_t starpu_codelet::mpi_ms_funcs[STARPU_MAXIMPLEMENTATIONS]
  265. Optional array of function pointers to a function which returns
  266. the MPI Master Slave implementation of the codelet. The functions
  267. prototype must be:
  268. \code{.c}
  269. starpu_mpi_ms_kernel_t mpi_ms_func(struct starpu_codelet *cl, unsigned nimpl)
  270. \endcode
  271. If the field starpu_codelet::where is set, then the field
  272. starpu_codelet::mpi_ms_funcs is ignored if ::STARPU_MPI_MS does
  273. not appear in the field starpu_codelet::where. It can be
  274. <c>NULL</c> if starpu_codelet::cpu_funcs_name is non-<c>NULL</c>,
  275. in which case StarPU will simply make a symbol lookup to get the
  276. implementation.
  277. \var starpu_scc_func_t starpu_codelet::scc_funcs[STARPU_MAXIMPLEMENTATIONS]
  278. Optional array of function pointers to a function which returns
  279. the SCC implementation of the codelet. The functions prototype
  280. must be:
  281. \code{.c}
  282. starpu_scc_kernel_t scc_func(struct starpu_codelet *cl, unsigned nimpl)
  283. \endcode
  284. If the field starpu_codelet::where is set, then the field
  285. starpu_codelet::scc_funcs is ignored if ::STARPU_SCC does not
  286. appear in the field starpu_codelet::where. It can be <c>NULL</c>
  287. if starpu_codelet::cpu_funcs_name is non-<c>NULL</c>, in which
  288. case StarPU will simply make a symbol lookup to get the
  289. implementation.
  290. \var int starpu_codelet::nbuffers
  291. Specify the number of arguments taken by the codelet. These
  292. arguments are managed by the DSM and are accessed from the <c>void
  293. *buffers[]</c> array. The constant argument passed with the field
  294. starpu_task::cl_arg is not counted in this number. This value
  295. should not be above \ref STARPU_NMAXBUFS. It may be set to \ref
  296. STARPU_VARIABLE_NBUFFERS to specify that the number of buffers and
  297. their access modes will be set in starpu_task::nbuffers and
  298. starpu_task::modes or starpu_task::dyn_modes, which thus permits
  299. to define codelets with a varying number of data.
  300. \var enum starpu_data_access_mode starpu_codelet::modes[STARPU_NMAXBUFS]
  301. Is an array of ::starpu_data_access_mode. It describes the
  302. required access modes to the data neeeded by the codelet (e.g.
  303. ::STARPU_RW). The number of entries in this array must be
  304. specified in the field starpu_codelet::nbuffers, and should not
  305. exceed \ref STARPU_NMAXBUFS. If unsufficient, this value can be
  306. set with the configure option
  307. \ref enable-maxbuffers "--enable-maxbuffers".
  308. \var enum starpu_data_access_mode *starpu_codelet::dyn_modes
  309. Is an array of ::starpu_data_access_mode. It describes the
  310. required access modes to the data needed by the codelet (e.g.
  311. ::STARPU_RW). The number of entries in this array must be
  312. specified in the field starpu_codelet::nbuffers. This field should
  313. be used for codelets having a number of datas greater than
  314. \ref STARPU_NMAXBUFS (see \ref SettingManyDataHandlesForATask).
  315. When defining a codelet, one should either define this field or
  316. the field starpu_codelet::modes defined above.
  317. \var unsigned starpu_codelet::specific_nodes
  318. Default value is 0. If this flag is set, StarPU will not
  319. systematically send all data to the memory node where the task will
  320. be executing, it will read the starpu_codelet::nodes or
  321. starpu_codelet::dyn_nodes array to determine, for each data,
  322. whether to send it on the memory node where the task will be
  323. executing (-1), or on a specific node (!= -1).
  324. \var int starpu_codelet::nodes[STARPU_NMAXBUFS]
  325. Optional field. When starpu_codelet::specific_nodes is 1, this
  326. specifies the memory nodes where each data should be sent to for
  327. task execution. The number of entries in this array is
  328. starpu_codelet::nbuffers, and should not exceed \ref STARPU_NMAXBUFS.
  329. \var int *starpu_codelet::dyn_nodes
  330. Optional field. When starpu_codelet::specific_nodes is 1, this
  331. specifies the memory nodes where each data should be sent to for
  332. task execution. The number of entries in this array is
  333. starpu_codelet::nbuffers. This field should be used for codelets
  334. having a number of datas greater than \ref STARPU_NMAXBUFS
  335. (see \ref SettingManyDataHandlesForATask). When defining a
  336. codelet, one should either define this field or the field
  337. starpu_codelet::nodes defined above.
  338. \var struct starpu_perfmodel *starpu_codelet::model
  339. Optional pointer to the task duration performance model associated
  340. to this codelet. This optional field is ignored when set to
  341. <c>NULL</c> or when its field starpu_perfmodel::symbol is not set.
  342. \var struct starpu_perfmodel *starpu_codelet::energy_model
  343. Optional pointer to the task energy consumption performance model
  344. associated to this codelet. This optional field is ignored when
  345. set to <c>NULL</c> or when its field starpu_perfmodel::symbol is
  346. not set. In the case of parallel codelets, this has to account for
  347. all processing units involved in the parallel execution.
  348. \var unsigned long starpu_codelet::per_worker_stats[STARPU_NMAXWORKERS]
  349. Optional array for statistics collected at runtime: this is filled
  350. by StarPU and should not be accessed directly, but for example by
  351. calling the function starpu_codelet_display_stats() (See
  352. starpu_codelet_display_stats() for details).
  353. \var const char *starpu_codelet::name
  354. Optional name of the codelet. This can be useful for debugging
  355. purposes.
  356. \var const char *starpu_codelet::flags
  357. Various flags for the codelet.
  358. \fn void starpu_codelet_init(struct starpu_codelet *cl)
  359. \ingroup API_Codelet_And_Tasks
  360. Initialize \p cl with default values. Codelets should
  361. preferably be initialized statically as shown in
  362. \ref DefiningACodelet. However such a initialisation is not always
  363. possible, e.g. when using C++.
  364. \struct starpu_data_descr
  365. \ingroup API_Codelet_And_Tasks
  366. This type is used to describe a data handle along with an access mode.
  367. \var starpu_data_handle_t starpu_data_descr::handle
  368. describes a data
  369. \var enum starpu_data_access_mode starpu_data_descr::mode
  370. describes its access mode
  371. \struct starpu_task
  372. \ingroup API_Codelet_And_Tasks
  373. The structure describes a task that can be offloaded on the
  374. various processing units managed by StarPU. It instantiates a codelet.
  375. It can either be allocated dynamically with the function
  376. starpu_task_create(), or declared statically. In the latter case, the
  377. programmer has to zero the structure starpu_task and to fill the
  378. different fields properly. The indicated default values correspond to
  379. the configuration of a task allocated with starpu_task_create().
  380. \var const char *starpu_task::name
  381. Optional name of the task. This can be useful for debugging
  382. purposes.
  383. \var struct starpu_codelet *starpu_task::cl
  384. Is a pointer to the corresponding structure starpu_codelet. This
  385. describes where the kernel should be executed, and supplies the
  386. appropriate implementations. When set to <c>NULL</c>, no code is
  387. executed during the tasks, such empty tasks can be useful for
  388. synchronization purposes.
  389. This field has been made deprecated. One should use instead the
  390. field starpu_task::handles to specify the data handles accessed by
  391. the task. The access modes are now defined in the field
  392. starpu_codelet::modes.
  393. \var uint32_t starpu_task::where
  394. When set, specifies where the task is allowed to be executed.
  395. When unset, it takes the value of starpu_codelet::where.
  396. \var int starpu_task::nbuffers
  397. Specifies the number of buffers. This is only used when
  398. starpu_codelet::nbuffers is \ref STARPU_VARIABLE_NBUFFERS.
  399. \var starpu_data_handle_t starpu_task::handles[STARPU_NMAXBUFS]
  400. Is an array of ::starpu_data_handle_t. It specifies the handles to
  401. the different pieces of data accessed by the task. The number of
  402. entries in this array must be specified in the field
  403. starpu_codelet::nbuffers, and should not exceed
  404. \ref STARPU_NMAXBUFS. If unsufficient, this value can be set with
  405. the configure option \ref enable-maxbuffers "--enable-maxbuffers".
  406. \var starpu_data_handle_t *starpu_task::dyn_handles
  407. Is an array of ::starpu_data_handle_t. It specifies the handles to
  408. the different pieces of data accessed by the task. The number of
  409. entries in this array must be specified in the field
  410. starpu_codelet::nbuffers. This field should be used for tasks
  411. having a number of datas greater than \ref STARPU_NMAXBUFS (see
  412. \ref SettingManyDataHandlesForATask).
  413. When defining a task, one should either define this field or the
  414. field starpu_task::handles defined above.
  415. \var void *starpu_task::interfaces[STARPU_NMAXBUFS]
  416. The actual data pointers to the memory node where execution will
  417. happen, managed by the DSM.
  418. \var void **starpu_task::dyn_interfaces
  419. The actual data pointers to the memory node where execution will
  420. happen, managed by the DSM. Is used when the field
  421. starpu_task::dyn_handles is defined.
  422. \var enum starpu_data_access_mode starpu_task::modes[STARPU_NMAXBUFS]
  423. Is used only when starpu_codelet::nbuffers is
  424. \ref STARPU_VARIABLE_NBUFFERS.
  425. It is an array of ::starpu_data_access_mode. It describes the
  426. required access modes to the data neeeded by the codelet (e.g.
  427. ::STARPU_RW). The number of entries in this array must be
  428. specified in the field starpu_task::nbuffers, and should not
  429. exceed \ref STARPU_NMAXBUFS. If unsufficient, this value can be
  430. set with the configure option
  431. \ref enable-maxbuffers "--enable-maxbuffers".
  432. \var enum starpu_data_access_mode *starpu_task::dyn_modes
  433. Is used only when starpu_codelet::nbuffers is \ref
  434. STARPU_VARIABLE_NBUFFERS. It is an array of
  435. ::starpu_data_access_mode. It describes the required access modes
  436. to the data needed by the codelet (e.g. ::STARPU_RW). The number
  437. of entries in this array must be specified in the field
  438. starpu_codelet::nbuffers. This field should be used for codelets
  439. having a number of datas greater than \ref STARPU_NMAXBUFS
  440. (see \ref SettingManyDataHandlesForATask). When defining a
  441. codelet, one should either define this field or the field
  442. starpu_task::modes defined above.
  443. \var void *starpu_task::cl_arg
  444. Optional pointer which is passed to the codelet through the second
  445. argument of the codelet implementation (e.g.
  446. starpu_codelet::cpu_func or starpu_codelet::cuda_func). The
  447. default value is <c>NULL</c>. starpu_codelet_pack_args() and
  448. starpu_codelet_unpack_args() are helpers that can can be used to
  449. respectively pack and unpack data into and from it, but the
  450. application can manage it any way, the only requirement is that
  451. the size of the data must be set in starpu_task::cl_arg_size .
  452. \var size_t starpu_task::cl_arg_size
  453. Optional field. For some specific drivers, the pointer
  454. starpu_task::cl_arg cannot not be directly given to the driver
  455. function. A buffer of size starpu_task::cl_arg_size needs to be
  456. allocated on the driver. This buffer is then filled with the
  457. starpu_task::cl_arg_size bytes starting at address
  458. starpu_task::cl_arg. In this case, the argument given to the
  459. codelet is therefore not the starpu_task::cl_arg pointer, but the
  460. address of the buffer in local store (LS) instead. This field is
  461. ignored for CPU, CUDA and OpenCL codelets, where the
  462. starpu_task::cl_arg pointer is given as such.
  463. \var unsigned starpu_task::cl_arg_free
  464. Optional field. In case starpu_task::cl_arg was allocated by the
  465. application through <c>malloc()</c>, setting
  466. starpu_task::cl_arg_free to 1 makes StarPU automatically call
  467. <c>free(cl_arg)</c> when destroying the task. This saves the user
  468. from defining a callback just for that. This is mostly useful when
  469. targetting MIC or SCC, where the codelet does not execute in the
  470. same memory space as the main thread.
  471. \var void (*starpu_task::callback_func)(void *)
  472. Optional field, the default value is <c>NULL</c>. This is a
  473. function pointer of prototype <c>void (*f)(void *)</c> which
  474. specifies a possible callback. If this pointer is non-<c>NULL</c>,
  475. the callback function is executed on the host after the execution
  476. of the task. Tasks which depend on it might already be executing.
  477. The callback is passed the value contained in the
  478. starpu_task::callback_arg field. No callback is executed if the
  479. field is set to <c>NULL</c>.
  480. \var void *starpu_task::callback_arg (optional) (default: <c>NULL</c>)
  481. Optional field, the default value is <c>NULL</c>. This is the
  482. pointer passed to the callback function. This field is ignored if
  483. the field starpu_task::callback_func is set to <c>NULL</c>.
  484. \var unsigned starpu_task::callback_arg_free
  485. Optional field. In case starpu_task::callback_arg was allocated by
  486. the application through <c>malloc()</c>, setting
  487. starpu_task::callback_arg_free to 1 makes StarPU automatically
  488. call <c>free(callback_arg)</c> when destroying the task.
  489. \var void (*starpu_task::prologue_callback_func)(void *)
  490. Optional field, the default value is <c>NULL</c>. This is a
  491. function pointer of prototype <c>void (*f)(void *)</c> which
  492. specifies a possible callback.
  493. If this pointer is non-<c>NULL</c>, the callback function is
  494. executed on the host when the task becomes ready for execution,
  495. before getting scheduled. The callback is passed the value
  496. contained in the starpu_task::prologue_callback_arg field. No
  497. callback is executed if the field is set to <c>NULL</c>.
  498. \var void *starpu_task::prologue_callback_arg (optional) (default: <c>NULL</c>)
  499. Optional field, the default value is <c>NULL</c>. This is the
  500. pointer passed to the prologue callback function. This field is
  501. ignored if the field starpu_task::prologue_callback_func is set to
  502. <c>NULL</c>.
  503. \var unsigned starpu_task::prologue_callback_arg_free
  504. Optional field. In case starpu_task::prologue_callback_arg was
  505. allocated by the application through <c>malloc()</c>, setting
  506. starpu_task::prologue_callback_arg_free to 1 makes StarPU
  507. automatically call <c>free(prologue_callback_arg)</c> when
  508. destroying the task.
  509. \var void (*starpu_task::prologue_callback_pop_func)(void *)
  510. todo
  511. \var void *starpu_task::prologue_callback_pop_arg (optional) (default: <c>NULL</c>)
  512. todo
  513. \var unsigned starpu_task::prologue_callback_pop_arg_free
  514. todo
  515. \var unsigned starpu_task::use_tag
  516. Optional field, the default value is 0. If set, this flag
  517. indicates that the task should be associated with the tag
  518. contained in the starpu_task::tag_id field. Tag allow the
  519. application to synchronize with the task and to express task
  520. dependencies easily.
  521. \var starpu_tag_t starpu_task::tag_id
  522. This optional field contains the tag associated to the task if the
  523. field starpu_task::use_tag is set, it is ignored otherwise.
  524. \var unsigned starpu_task::sequential_consistency
  525. If this flag is set (which is the default), sequential consistency
  526. is enforced for the data parameters of this task for which
  527. sequential consistency is enabled. Clearing this flag permits to
  528. disable sequential consistency for this task, even if data have it
  529. enabled.
  530. \var unsigned starpu_task::synchronous
  531. If this flag is set, the function starpu_task_submit() is blocking
  532. and returns only when the task has been executed (or if no worker
  533. is able to process the task). Otherwise, starpu_task_submit()
  534. returns immediately.
  535. \var int starpu_task::priority
  536. Optional field, the default value is ::STARPU_DEFAULT_PRIO. This
  537. field indicates a level of priority for the task. This is an
  538. integer value that must be set between the return values of the
  539. function starpu_sched_get_min_priority() for the least important
  540. tasks, and that of the function starpu_sched_get_max_priority()
  541. for the most important tasks (included). The ::STARPU_MIN_PRIO and
  542. ::STARPU_MAX_PRIO macros are provided for convenience and
  543. respectively returns the value of starpu_sched_get_min_priority()
  544. and starpu_sched_get_max_priority(). Default priority is
  545. ::STARPU_DEFAULT_PRIO, which is always defined as 0 in order to
  546. allow static task initialization. Scheduling strategies that take
  547. priorities into account can use this parameter to take better
  548. scheduling decisions, but the scheduling policy may also ignore
  549. it.
  550. \var unsigned starpu_task::execute_on_a_specific_worker
  551. Default value is 0. If this flag is set, StarPU will bypass the
  552. scheduler and directly affect this task to the worker specified by
  553. the field starpu_task::workerid.
  554. \var unsigned starpu_task::workerid
  555. Optional field. If the field
  556. starpu_task::execute_on_a_specific_worker is set, this field
  557. indicates the identifier of the worker that should process this
  558. task (as returned by starpu_worker_get_id()). This field is
  559. ignored if the field starpu_task::execute_on_a_specific_worker is
  560. set to 0.
  561. \var unsigned starpu_task::workerorder
  562. Optional field. If the field
  563. starpu_task::execute_on_a_specific_worker is set, this field
  564. indicates the per-worker consecutive order in which tasks should
  565. be executed on the worker. Tasks will be executed in consecutive
  566. starpu_task::workerorder values, thus ignoring the availability
  567. order or task priority. See \ref StaticScheduling for more
  568. details. This field is ignored if the field
  569. starpu_task::execute_on_a_specific_worker is set to 0.
  570. \var unsigned starpu_task::workerids
  571. Optional field. If the field
  572. starpu_task::workerids_len is different from 0, this field indicates an
  573. array of bits (stored as uint32_t values) which indicate the set of workers
  574. which are allowed to execute the task. starpu_task::workerid takes
  575. precedence over this.
  576. \var unsigned starpu_task::workerids_len
  577. Optional field. This provides the number of uint32_t values in the
  578. starpu_task::workerids array.
  579. \var starpu_task_bundle_t starpu_task::bundle
  580. Optional field. The bundle that includes this task. If no bundle
  581. is used, this should be <c>NULL</c>.
  582. \var unsigned starpu_task::detach
  583. Optional field, default value is 1. If this flag is set, it is not
  584. possible to synchronize with the task by the means of
  585. starpu_task_wait() later on. Internal data structures are only
  586. guaranteed to be freed once starpu_task_wait() is called if the
  587. flag is not set.
  588. \var unsigned starpu_task::destroy
  589. Optional value. Default value is 0 for starpu_task_init(), and 1
  590. for starpu_task_create(). If this flag is set, the task structure
  591. will automatically be freed, either after the execution of the
  592. callback if the task is detached, or during starpu_task_wait()
  593. otherwise. If this flag is not set, dynamically allocated data
  594. structures will not be freed until starpu_task_destroy() is called
  595. explicitly. Setting this flag for a statically allocated task
  596. structure will result in undefined behaviour. The flag is set to 1
  597. when the task is created by calling starpu_task_create(). Note
  598. that starpu_task_wait_for_all() will not free any task.
  599. \var unsigned starpu_task::regenerate
  600. Optional field. If this flag is set, the task will be re-submitted
  601. to StarPU once it has been executed. This flag must not be set if
  602. the flag starpu_task::destroy is set. This flag must be set before
  603. making another task depend on this one.
  604. \var enum starpu_task_status starpu_task::status
  605. Optional field. Current state of the task.
  606. \var struct starpu_profiling_task_info *starpu_task::profiling_info
  607. Optional field. Profiling information for the task.
  608. \var double starpu_task::predicted
  609. Output field. Predicted duration of the task. This field is only
  610. set if the scheduling strategy uses performance models.
  611. \var double starpu_task::predicted_transfer
  612. Optional field. Predicted data transfer duration for the task in
  613. microseconds. This field is only valid if the scheduling strategy
  614. uses performance models.
  615. \var double starpu_task::predicted_start
  616. todo
  617. \var struct starpu_task *starpu_task::prev
  618. \private
  619. A pointer to the previous task. This should only be used by
  620. StarPU.
  621. \var struct starpu_task *starpu_task::next
  622. \private
  623. A pointer to the next task. This should only be used by StarPU.
  624. \var unsigned int starpu_task::mf_skip
  625. \private
  626. This is only used for tasks that use multiformat handle. This
  627. should only be used by StarPU.
  628. \var double starpu_task::flops
  629. This can be set to the number of floating points operations that
  630. the task will have to achieve. This is useful for easily getting
  631. GFlops curves from the tool <c>starpu_perfmodel_plot</c>, and for
  632. the hypervisor load balancing.
  633. \var void *starpu_task::starpu_private
  634. \private
  635. This is private to StarPU, do not modify. If the task is allocated
  636. by hand (without starpu_task_create()), this field should be set
  637. to <c>NULL</c>.
  638. \var int starpu_task::magic
  639. \private
  640. This field is set when initializing a task. The function
  641. starpu_task_submit() will fail if the field does not have the
  642. right value. This will hence avoid submitting tasks which have not
  643. been properly initialised.
  644. \var unsigned starpu_task::sched_ctx
  645. Scheduling context.
  646. \var int starpu_task::hypervisor_tag
  647. Helps the hypervisor monitor the execution of this task.
  648. \var unsigned starpu_task::possibly_parallel
  649. todo
  650. \var unsigned starpu_task::prefetched
  651. todo
  652. \var unsigned starpu_task::scheduled
  653. Whether the scheduler has pushed the task on some queue
  654. \var struct starpu_omp_task *starpu_task::omp_task
  655. todo
  656. \fn void starpu_task_init(struct starpu_task *task)
  657. \ingroup API_Codelet_And_Tasks
  658. Initialize \p task with default values. This function is
  659. implicitly called by starpu_task_create(). By default, tasks initialized
  660. with starpu_task_init() must be deinitialized explicitly with
  661. starpu_task_clean(). Tasks can also be initialized statically, using
  662. ::STARPU_TASK_INITIALIZER.
  663. \def STARPU_TASK_INITIALIZER
  664. \ingroup API_Codelet_And_Tasks
  665. It is possible to initialize statically allocated tasks with
  666. this value. This is equivalent to initializing a structure starpu_task
  667. with the function starpu_task_init().
  668. \def STARPU_TASK_GET_NBUFFERS(task)
  669. \ingroup API_Codelet_And_Tasks
  670. Return the number of buffers for \p task, i.e. starpu_codelet::nbuffers, or
  671. starpu_task::nbuffers if the former is \ref STARPU_VARIABLE_NBUFFERS.
  672. \def STARPU_TASK_GET_HANDLE(task, i)
  673. \ingroup API_Codelet_And_Tasks
  674. Return the \p i -th data handle of \p task. If \p task
  675. is defined with a static or dynamic number of handles, will either
  676. return the \p i -th element of the field starpu_task::handles or the \p
  677. i -th element of the field starpu_task::dyn_handles
  678. (see \ref SettingManyDataHandlesForATask)
  679. \def STARPU_TASK_SET_HANDLE(task, handle, i)
  680. \ingroup API_Codelet_And_Tasks
  681. Set the \p i -th data handle of \p task with \p handle.
  682. If \p task is defined with a static or dynamic number of
  683. handles, will either set the \p i -th element of the field
  684. starpu_task::handles or the \p i -th element of the field
  685. starpu_task::dyn_handles
  686. (see \ref SettingManyDataHandlesForATask)
  687. \def STARPU_CODELET_GET_MODE(codelet, i)
  688. \ingroup API_Codelet_And_Tasks
  689. Return the access mode of the \p i -th data handle of \p codelet.
  690. If \p codelet is defined with a static or dynamic number of
  691. handles, will either return the \p i -th element of the field
  692. starpu_codelet::modes or the \p i -th element of the field
  693. starpu_codelet::dyn_modes
  694. (see \ref SettingManyDataHandlesForATask)
  695. \def STARPU_CODELET_SET_MODE(codelet, mode, i)
  696. \ingroup API_Codelet_And_Tasks
  697. Set the access mode of the \p i -th data handle of \p codelet.
  698. If \p codelet is defined with a static or dynamic number of
  699. handles, will either set the \p i -th element of the field
  700. starpu_codelet::modes or the \p i -th element of the field
  701. starpu_codelet::dyn_modes
  702. (see \ref SettingManyDataHandlesForATask)
  703. \def STARPU_TASK_GET_MODE(task, i)
  704. \ingroup API_Codelet_And_Tasks
  705. Return the access mode of the \p i -th data handle of \p task.
  706. If \p task is defined with a static or dynamic number of
  707. handles, will either return the \p i -th element of the field
  708. starpu_task::modes or the \p i -th element of the field
  709. starpu_task::dyn_modes
  710. (see \ref SettingManyDataHandlesForATask)
  711. \def STARPU_TASK_SET_MODE(task, mode, i)
  712. \ingroup API_Codelet_And_Tasks
  713. Set the access mode of the \p i -th data handle of \p task.
  714. If \p task is defined with a static or dynamic number of
  715. handles, will either set the \p i -th element of the field
  716. starpu_task::modes or the \p i -th element of the field
  717. starpu_task::dyn_modes
  718. (see \ref SettingManyDataHandlesForATask)
  719. \fn struct starpu_task *starpu_task_create(void)
  720. \ingroup API_Codelet_And_Tasks
  721. Allocate a task structure and initialize it with default
  722. values. Tasks allocated dynamically with starpu_task_create() are
  723. automatically freed when the task is terminated. This means that the
  724. task pointer can not be used any more once the task is submitted,
  725. since it can be executed at any time (unless dependencies make it
  726. wait) and thus freed at any time. If the field starpu_task::destroy is
  727. explicitly unset, the resources used by the task have to be freed by
  728. calling starpu_task_destroy().
  729. \fn struct starpu_task *starpu_task_dup(struct starpu_task *task)
  730. \ingroup API_Codelet_And_Tasks
  731. Allocate a task structure which is the exact duplicate of \p task.
  732. \fn void starpu_task_clean(struct starpu_task *task)
  733. \ingroup API_Codelet_And_Tasks
  734. Release all the structures automatically allocated to execute
  735. \p task, but not the task structure itself and values set by the user
  736. remain unchanged. It is thus useful for statically allocated tasks for
  737. instance. It is also useful when users want to execute the same
  738. operation several times with as least overhead as possible. It is
  739. called automatically by starpu_task_destroy(). It has to be called
  740. only after explicitly waiting for the task or after starpu_shutdown()
  741. (waiting for the callback is not enough, since StarPU still
  742. manipulates the task after calling the callback).
  743. \fn void starpu_task_destroy(struct starpu_task *task)
  744. \ingroup API_Codelet_And_Tasks
  745. Free the resource allocated during starpu_task_create() and
  746. associated with \p task. This function is called automatically
  747. after the execution of a task when the field starpu_task::destroy is
  748. set, which is the default for tasks created by starpu_task_create().
  749. Calling this function on a statically allocated task results in an
  750. undefined behaviour.
  751. \fn int starpu_task_wait(struct starpu_task *task)
  752. \ingroup API_Codelet_And_Tasks
  753. Block until \p task has been executed. It is not
  754. possible to synchronize with a task more than once. It is not possible
  755. to wait for synchronous or detached tasks. Upon successful completion,
  756. this function returns 0. Otherwise, <c>-EINVAL</c> indicates that the
  757. specified task was either synchronous or detached.
  758. \fn int starpu_task_wait_array(struct starpu_task **tasks, unsigned nb_tasks)
  759. \ingroup API_Codelet_And_Tasks
  760. Allow to wait for an array of tasks. Upon successful completion,
  761. this function returns 0. Otherwise, <c>-EINVAL</c> indicates that one of the tasks
  762. was either synchronous or detached.
  763. \fn int starpu_task_submit(struct starpu_task *task)
  764. \ingroup API_Codelet_And_Tasks
  765. Submit \p task to StarPU. Calling this function
  766. does not mean that the task will be executed immediately as there can
  767. be data or task (tag) dependencies that are not fulfilled yet: StarPU
  768. will take care of scheduling this task with respect to such
  769. dependencies. This function returns immediately if the field
  770. starpu_task::synchronous is set to 0, and block until the
  771. termination of the task otherwise.
  772. It is also possible to synchronize
  773. the application with asynchronous tasks by the means of tags, using
  774. the function starpu_tag_wait() function for instance. In case of
  775. success, this function returns 0, a return value of <c>-ENODEV</c>
  776. means that there is no worker able to process this task (e.g. there is
  777. no GPU available and this task is only implemented for CUDA devices).
  778. starpu_task_submit() can be called from anywhere, including codelet
  779. functions and callbacks, provided that the field
  780. starpu_task::synchronous is set to 0.
  781. \fn int starpu_task_submit_to_ctx(struct starpu_task *task, unsigned sched_ctx_id)
  782. \ingroup API_Codelet_And_Tasks
  783. Submit \p task to the context \p sched_ctx_id.
  784. By default, starpu_task_submit() submits the task to a global context that is
  785. created automatically by StarPU.
  786. \fn int starpu_task_wait_for_all(void)
  787. \ingroup API_Codelet_And_Tasks
  788. Block until all the tasks that were submitted (to the
  789. current context or the global one if there is no current context) are terminated.
  790. It does not destroy these tasks.
  791. \fn int starpu_task_wait_for_all_in_ctx(unsigned sched_ctx_id)
  792. \ingroup API_Codelet_And_Tasks
  793. Wait until all the tasks that were already submitted to the context \p
  794. sched_ctx_id have been terminated.
  795. \fn int starpu_task_wait_for_n_submitted(unsigned n)
  796. \ingroup API_Codelet_And_Tasks
  797. Block until there are \p n submitted tasks left (to the
  798. current context or the global one if there is no current context) to be executed. It does
  799. not destroy these tasks.
  800. \fn int starpu_task_wait_for_n_submitted_in_ctx(unsigned sched_ctx_id, unsigned n)
  801. \ingroup API_Codelet_And_Tasks
  802. Wait until there are \p n tasks submitted left to be
  803. executed that were already submitted to the context \p sched_ctx_id.
  804. \fn int starpu_task_nready(void)
  805. \ingroup API_Codelet_And_Tasks
  806. TODO
  807. \fn int starpu_task_nsubmitted(void)
  808. \ingroup API_Codelet_And_Tasks
  809. Return the number of submitted tasks which have not completed yet.
  810. \fn int starpu_task_nready(void)
  811. \ingroup API_Codelet_And_Tasks
  812. Return the number of submitted tasks which are ready for
  813. execution are already executing. It thus does not include tasks
  814. waiting for dependencies.
  815. \fn struct starpu_task *starpu_task_get_current(void)
  816. \ingroup API_Codelet_And_Tasks
  817. Return the task currently executed by the
  818. worker, or <c>NULL</c> if it is called either from a thread that is not a
  819. task or simply because there is no task being executed at the moment.
  820. \fn const char *starpu_task_get_name(struct starpu_task *task)
  821. \ingroup API_Codelet_And_Tasks
  822. Return the name of \p task, i.e. either its starpu_task::name field, or
  823. the name of the corresponding performance model.
  824. \fn const char *starpu_task_get_model_name(struct starpu_task *task)
  825. \ingroup API_Codelet_And_Tasks
  826. Return the name of the performance model of \p task.
  827. \fn void starpu_codelet_display_stats(struct starpu_codelet *cl)
  828. \ingroup API_Codelet_And_Tasks
  829. Output on \c stderr some statistics on the codelet \p cl.
  830. \fn int starpu_task_wait_for_no_ready(void)
  831. \ingroup API_Codelet_And_Tasks
  832. Wait until there is no more ready task.
  833. \fn void starpu_task_set_implementation(struct starpu_task *task, unsigned impl)
  834. \ingroup API_Codelet_And_Tasks
  835. This function should be called by schedulers to specify the
  836. codelet implementation to be executed when executing \p task.
  837. \fn unsigned starpu_task_get_implementation(struct starpu_task *task)
  838. \ingroup API_Codelet_And_Tasks
  839. Return the codelet implementation to be executed
  840. when executing \p task.
  841. \fn void starpu_iteration_push(unsigned long iteration)
  842. \ingroup API_Codelet_And_Tasks
  843. Sets the iteration number for all the tasks to be submitted after
  844. this call. This is typically called at the beginning of a task
  845. submission loop. This number will then show up in tracing tools. A
  846. corresponding starpu_iteration_pop() call must be made to match the call to
  847. starpu_iteration_push(), at the end of the same task submission loop, typically.
  848. Nested calls to starpu_iteration_push and starpu_iteration_pop are allowed, to
  849. describe a loop nest for instance, provided that they match properly.
  850. \fn void starpu_iteration_pop(void)
  851. \ingroup API_Codelet_And_Tasks
  852. Drops the iteration number for submitted tasks. This must match a previous
  853. call to starpu_iteration_push(), and is typically called at the end of a task
  854. submission loop.
  855. \fn void starpu_create_sync_task(starpu_tag_t sync_tag, unsigned ndeps, starpu_tag_t *deps, void (*callback)(void *), void *callback_arg)
  856. \ingroup API_Codelet_And_Tasks
  857. Create (and submit) an empty task that unlocks a tag once all its dependencies are fulfilled.
  858. */