fstarpu_mod.f90 145 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392
  1. ! StarPU --- Runtime system for heterogeneous multicore architectures.
  2. !
  3. ! Copyright (C) 2017, 2018 CNRS
  4. ! Copyright (C) 2016-2017 Inria
  5. ! Copyright (C) 2016-2017 Université de Bordeaux
  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. module fstarpu_mod
  19. use iso_c_binding
  20. implicit none
  21. ! Note: Constants truly are intptr_t, but are declared as c_ptr to be
  22. ! readily usable in c_ptr arrays to mimic variadic functions.
  23. ! Note: Bitwise or operator is provided by the .ior. overloaded operator
  24. type(c_ptr), bind(C) :: FSTARPU_R
  25. type(c_ptr), bind(C) :: FSTARPU_W
  26. type(c_ptr), bind(C) :: FSTARPU_RW
  27. type(c_ptr), bind(C) :: FSTARPU_SCRATCH
  28. type(c_ptr), bind(C) :: FSTARPU_REDUX
  29. type(c_ptr), bind(C) :: FSTARPU_COMMUTE
  30. type(c_ptr), bind(C) :: FSTARPU_SSEND
  31. type(c_ptr), bind(C) :: FSTARPU_LOCALITY
  32. type(c_ptr), bind(C) :: FSTARPU_DATA_ARRAY
  33. type(c_ptr), bind(C) :: FSTARPU_DATA_MODE_ARRAY
  34. type(c_ptr), bind(C) :: FSTARPU_CL_ARGS
  35. type(c_ptr), bind(C) :: FSTARPU_CL_ARGS_NFREE
  36. type(c_ptr), bind(C) :: FSTARPU_TASK_DEPS_ARRAY
  37. type(c_ptr), bind(C) :: FSTARPU_CALLBACK
  38. type(c_ptr), bind(C) :: FSTARPU_CALLBACK_WITH_ARG
  39. type(c_ptr), bind(C) :: FSTARPU_CALLBACK_ARG
  40. type(c_ptr), bind(C) :: FSTARPU_PROLOGUE_CALLBACK
  41. type(c_ptr), bind(C) :: FSTARPU_PROLOGUE_CALLBACK_ARG
  42. type(c_ptr), bind(C) :: FSTARPU_PROLOGUE_CALLBACK_POP
  43. type(c_ptr), bind(C) :: FSTARPU_PROLOGUE_CALLBACK_POP_ARG
  44. type(c_ptr), bind(C) :: FSTARPU_PRIORITY
  45. type(c_ptr), bind(C) :: FSTARPU_EXECUTE_ON_NODE
  46. type(c_ptr), bind(C) :: FSTARPU_EXECUTE_ON_DATA
  47. type(c_ptr), bind(C) :: FSTARPU_EXECUTE_ON_WORKER
  48. type(c_ptr), bind(C) :: FSTARPU_WORKER_ORDER
  49. type(c_ptr), bind(C) :: FSTARPU_EXECUTE_WHERE
  50. type(c_ptr), bind(C) :: FSTARPU_HYPERVISOR_TAG
  51. type(c_ptr), bind(C) :: FSTARPU_POSSIBLY_PARALLEL
  52. type(c_ptr), bind(C) :: FSTARPU_FLOPS
  53. type(c_ptr), bind(C) :: FSTARPU_TAG
  54. type(c_ptr), bind(C) :: FSTARPU_TAG_ONLY
  55. type(c_ptr), bind(C) :: FSTARPU_NAME
  56. type(c_ptr), bind(C) :: FSTARPU_TASK_COLOR
  57. type(c_ptr), bind(C) :: FSTARPU_TASK_SYNCHRONOUS
  58. type(c_ptr), bind(C) :: FSTARPU_HANDLES_SEQUENTIAL_CONSISTENCY
  59. type(c_ptr), bind(C) :: FSTARPU_NODE_SELECTION_POLICY
  60. type(c_ptr), bind(C) :: FSTARPU_VALUE
  61. type(c_ptr), bind(C) :: FSTARPU_SCHED_CTX
  62. type(c_ptr), bind(C) :: FSTARPU_CPU_WORKER
  63. type(c_ptr), bind(C) :: FSTARPU_CUDA_WORKER
  64. type(c_ptr), bind(C) :: FSTARPU_OPENCL_WORKER
  65. type(c_ptr), bind(C) :: FSTARPU_MIC_WORKER
  66. type(c_ptr), bind(C) :: FSTARPU_SCC_WORKER
  67. type(c_ptr), bind(C) :: FSTARPU_ANY_WORKER
  68. integer(c_int), bind(C) :: FSTARPU_NMAXBUFS
  69. type(c_ptr), bind(C) :: FSTARPU_SCHED_CTX_POLICY_NAME
  70. type(c_ptr), bind(C) :: FSTARPU_SCHED_CTX_POLICY_STRUCT
  71. type(c_ptr), bind(C) :: FSTARPU_SCHED_CTX_POLICY_MIN_PRIO
  72. type(c_ptr), bind(C) :: FSTARPU_SCHED_CTX_POLICY_MAX_PRIO
  73. type(c_ptr), bind(C) :: FSTARPU_SCHED_CTX_HIERARCHY_LEVEL
  74. type(c_ptr), bind(C) :: FSTARPU_SCHED_CTX_NESTED
  75. type(c_ptr), bind(C) :: FSTARPU_SCHED_CTX_AWAKE_WORKERS
  76. type(c_ptr), bind(C) :: FSTARPU_SCHED_CTX_POLICY_INIT
  77. type(c_ptr), bind(C) :: FSTARPU_SCHED_CTX_USER_DATA
  78. type(c_ptr), bind(C) :: FSTARPU_NOWHERE
  79. type(c_ptr), bind(C) :: FSTARPU_CPU
  80. type(c_ptr), bind(C) :: FSTARPU_CUDA
  81. type(c_ptr), bind(C) :: FSTARPU_OPENCL
  82. type(c_ptr), bind(C) :: FSTARPU_MIC
  83. type(c_ptr), bind(C) :: FSTARPU_SCC
  84. type(c_ptr), bind(C) :: FSTARPU_CODELET_SIMGRID_EXECUTE
  85. type(c_ptr), bind(C) :: FSTARPU_CODELET_SIMGRID_EXECUTE_AND_INJECT
  86. type(c_ptr), bind(C) :: FSTARPU_CUDA_ASYNC
  87. type(c_ptr), bind(C) :: FSTARPU_OPENCL_ASYNC
  88. ! (some) portable iso_c_binding types
  89. type(c_ptr), bind(C) :: FSTARPU_SZ_C_DOUBLE
  90. type(c_ptr), bind(C) :: FSTARPU_SZ_C_FLOAT
  91. type(c_ptr), bind(C) :: FSTARPU_SZ_C_CHAR
  92. type(c_ptr), bind(C) :: FSTARPU_SZ_C_INT
  93. type(c_ptr), bind(C) :: FSTARPU_SZ_C_INTPTR_T
  94. type(c_ptr), bind(C) :: FSTARPU_SZ_C_PTR
  95. type(c_ptr), bind(C) :: FSTARPU_SZ_C_SIZE_T
  96. ! (some) native Fortran types
  97. type(c_ptr), bind(C) :: FSTARPU_SZ_CHARACTER
  98. type(c_ptr), bind(C) :: FSTARPU_SZ_INTEGER
  99. type(c_ptr), bind(C) :: FSTARPU_SZ_INT4
  100. type(c_ptr), bind(C) :: FSTARPU_SZ_INT8
  101. type(c_ptr), bind(C) :: FSTARPU_SZ_REAL
  102. type(c_ptr), bind(C) :: FSTARPU_SZ_REAL4
  103. type(c_ptr), bind(C) :: FSTARPU_SZ_REAL8
  104. type(c_ptr), bind(C) :: FSTARPU_SZ_DOUBLE_PRECISION
  105. type(c_ptr), bind(C) :: FSTARPU_SZ_COMPLEX
  106. type(c_ptr), bind(C) :: FSTARPU_SZ_COMPLEX4
  107. type(c_ptr), bind(C) :: FSTARPU_SZ_COMPLEX8
  108. interface operator (.ior.)
  109. procedure or_cptrs
  110. end interface operator (.ior.)
  111. interface
  112. ! == starpu.h ==
  113. ! void starpu_conf_init(struct starpu_conf *conf);
  114. subroutine fstarpu_conf_init (conf) bind(C,name="starpu_conf_init")
  115. use iso_c_binding, only: c_ptr
  116. type(c_ptr), value, intent(in) :: conf
  117. end subroutine fstarpu_conf_init
  118. function fstarpu_conf_allocate () bind(C)
  119. use iso_c_binding, only: c_ptr
  120. type(c_ptr) :: fstarpu_conf_allocate
  121. end function fstarpu_conf_allocate
  122. subroutine fstarpu_conf_free (conf) bind(C)
  123. use iso_c_binding, only: c_ptr
  124. type(c_ptr), value, intent(in) :: conf
  125. end subroutine fstarpu_conf_free
  126. subroutine fstarpu_conf_set_sched_policy_name (conf, policy_name) bind(C)
  127. use iso_c_binding, only: c_ptr, c_char
  128. type(c_ptr), value, intent(in) :: conf
  129. character(c_char), intent(in) :: policy_name
  130. end subroutine fstarpu_conf_set_sched_policy_name
  131. subroutine fstarpu_conf_set_min_prio (conf, min_prio) bind(C)
  132. use iso_c_binding, only: c_ptr, c_int
  133. type(c_ptr), value, intent(in) :: conf
  134. integer(c_int), value, intent(in) :: min_prio
  135. end subroutine fstarpu_conf_set_min_prio
  136. subroutine fstarpu_conf_set_max_prio (conf, max_prio) bind(C)
  137. use iso_c_binding, only: c_ptr, c_int
  138. type(c_ptr), value, intent(in) :: conf
  139. integer(c_int), value, intent(in) :: max_prio
  140. end subroutine fstarpu_conf_set_max_prio
  141. subroutine fstarpu_conf_set_ncpu (conf, ncpu) bind(C)
  142. use iso_c_binding, only: c_ptr, c_int
  143. type(c_ptr), value, intent(in) :: conf
  144. integer(c_int), value, intent(in) :: ncpu
  145. end subroutine fstarpu_conf_set_ncpu
  146. subroutine fstarpu_conf_set_ncuda (conf, ncuda) bind(C)
  147. use iso_c_binding, only: c_ptr, c_int
  148. type(c_ptr), value, intent(in) :: conf
  149. integer(c_int), value, intent(in) :: ncuda
  150. end subroutine fstarpu_conf_set_ncuda
  151. subroutine fstarpu_conf_set_nopencl (conf, nopencl) bind(C)
  152. use iso_c_binding, only: c_ptr, c_int
  153. type(c_ptr), value, intent(in) :: conf
  154. integer(c_int), value, intent(in) :: nopencl
  155. end subroutine fstarpu_conf_set_nopencl
  156. subroutine fstarpu_conf_set_nmic (conf, nmic) bind(C)
  157. use iso_c_binding, only: c_ptr, c_int
  158. type(c_ptr), value, intent(in) :: conf
  159. integer(c_int), value, intent(in) :: nmic
  160. end subroutine fstarpu_conf_set_nmic
  161. subroutine fstarpu_conf_set_nscc (conf, nscc) bind(C)
  162. use iso_c_binding, only: c_ptr, c_int
  163. type(c_ptr), value, intent(in) :: conf
  164. integer(c_int), value, intent(in) :: nscc
  165. end subroutine fstarpu_conf_set_nscc
  166. ! starpu_init: see fstarpu_init
  167. ! starpu_initialize: see fstarpu_init
  168. ! void starpu_pause(void);
  169. subroutine fstarpu_pause() bind(C,name="starpu_pause")
  170. end subroutine fstarpu_pause
  171. ! void starpu_resume(void);
  172. subroutine fstarpu_resume() bind(C,name="starpu_resume")
  173. end subroutine fstarpu_resume
  174. ! void starpu_shutdown(void);
  175. subroutine fstarpu_shutdown () bind(C,name="starpu_shutdown")
  176. end subroutine fstarpu_shutdown
  177. ! starpu_topology_print
  178. subroutine fstarpu_topology_print () bind(C)
  179. end subroutine fstarpu_topology_print
  180. ! int starpu_asynchronous_copy_disabled(void);
  181. function fstarpu_asynchronous_copy_disabled() bind(C,name="starpu_asynchronous_copy_disabled")
  182. use iso_c_binding, only: c_int
  183. integer(c_int) :: fstarpu_asynchronous_copy_disabled
  184. end function fstarpu_asynchronous_copy_disabled
  185. ! int starpu_asynchronous_cuda_copy_disabled(void);
  186. function fstarpu_asynchronous_cuda_copy_disabled() bind(C,name="starpu_asynchronous_cuda_copy_disabled")
  187. use iso_c_binding, only: c_int
  188. integer(c_int) :: fstarpu_asynchronous_cuda_copy_disabled
  189. end function fstarpu_asynchronous_cuda_copy_disabled
  190. ! int starpu_asynchronous_opencl_copy_disabled(void);
  191. function fstarpu_asynchronous_opencl_copy_disabled() bind(C,name="starpu_asynchronous_opencl_copy_disabled")
  192. use iso_c_binding, only: c_int
  193. integer(c_int) :: fstarpu_asynchronous_opencl_copy_disabled
  194. end function fstarpu_asynchronous_opencl_copy_disabled
  195. ! int starpu_asynchronous_mic_copy_disabled(void);
  196. function fstarpu_asynchronous_mic_copy_disabled() bind(C,name="starpu_asynchronous_mic_copy_disabled")
  197. use iso_c_binding, only: c_int
  198. integer(c_int) :: fstarpu_asynchronous_mic_copy_disabled
  199. end function fstarpu_asynchronous_mic_copy_disabled
  200. ! void starpu_display_stats();
  201. subroutine fstarpu_display_stats() bind(C,name="starpu_display_stats")
  202. end subroutine fstarpu_display_stats
  203. ! void starpu_get_version(int *major, int *minor, int *release);
  204. subroutine fstarpu_get_version(major,minor,release) bind(C,name="starpu_get_version")
  205. use iso_c_binding, only: c_int
  206. integer(c_int), intent(out) :: major,minor,release
  207. end subroutine fstarpu_get_version
  208. ! == starpu_worker.h ==
  209. ! unsigned starpu_worker_get_count(void);
  210. function fstarpu_worker_get_count() bind(C,name="starpu_worker_get_count")
  211. use iso_c_binding, only: c_int
  212. integer(c_int) :: fstarpu_worker_get_count
  213. end function fstarpu_worker_get_count
  214. ! unsigned starpu_combined_worker_get_count(void);
  215. function fstarpu_combined_worker_get_count() bind(C,name="starpu_combined_worker_get_count")
  216. use iso_c_binding, only: c_int
  217. integer(c_int) :: fstarpu_combined_worker_get_count
  218. end function fstarpu_combined_worker_get_count
  219. ! unsigned starpu_worker_is_combined_worker(int id);
  220. function fstarpu_worker_is_combined_worker(id) bind(C,name="starpu_worker_is_combined_worker")
  221. use iso_c_binding, only: c_int
  222. integer(c_int) :: fstarpu_worker_is_combined_worker
  223. integer(c_int), value, intent(in) :: id
  224. end function fstarpu_worker_is_combined_worker
  225. ! unsigned starpu_cpu_worker_get_count(void);
  226. function fstarpu_cpu_worker_get_count() bind(C,name="starpu_cpu_worker_get_count")
  227. use iso_c_binding, only: c_int
  228. integer(c_int) :: fstarpu_cpu_worker_get_count
  229. end function fstarpu_cpu_worker_get_count
  230. ! unsigned starpu_cuda_worker_get_count(void);
  231. function fstarpu_cuda_worker_get_count() bind(C,name="starpu_cuda_worker_get_count")
  232. use iso_c_binding, only: c_int
  233. integer(c_int) :: fstarpu_cuda_worker_get_count
  234. end function fstarpu_cuda_worker_get_count
  235. ! unsigned starpu_opencl_worker_get_count(void);
  236. function fstarpu_opencl_worker_get_count() bind(C,name="starpu_opencl_worker_get_count")
  237. use iso_c_binding, only: c_int
  238. integer(c_int) :: fstarpu_opencl_worker_get_count
  239. end function fstarpu_opencl_worker_get_count
  240. ! unsigned starpu_mic_worker_get_count(void);
  241. function fstarpu_mic_worker_get_count() bind(C,name="starpu_mic_worker_get_count")
  242. use iso_c_binding, only: c_int
  243. integer(c_int) :: fstarpu_mic_worker_get_count
  244. end function fstarpu_mic_worker_get_count
  245. ! unsigned starpu_scc_worker_get_count(void);
  246. function fstarpu_scc_worker_get_count() bind(C,name="starpu_scc_worker_get_count")
  247. use iso_c_binding, only: c_int
  248. integer(c_int) :: fstarpu_scc_worker_get_count
  249. end function fstarpu_scc_worker_get_count
  250. ! int starpu_worker_get_id(void);
  251. function fstarpu_worker_get_id() bind(C,name="starpu_worker_get_id")
  252. use iso_c_binding, only: c_int
  253. integer(c_int) :: fstarpu_worker_get_id
  254. end function fstarpu_worker_get_id
  255. ! _starpu_worker_get_id_check
  256. ! starpu_worker_get_id_check
  257. ! int starpu_worker_get_bindid(int workerid);
  258. function fstarpu_worker_get_bindid(id) bind(C,name="starpu_worker_get_bindid")
  259. use iso_c_binding, only: c_int
  260. integer(c_int) :: fstarpu_worker_get_bindid
  261. integer(c_int), value, intent(in) :: id
  262. end function fstarpu_worker_get_bindid
  263. ! int starpu_combined_worker_get_id(void);
  264. function fstarpu_combined_worker_get_id() bind(C,name="starpu_combined_worker_get_id")
  265. use iso_c_binding, only: c_int
  266. integer(c_int) :: fstarpu_combined_worker_get_id
  267. end function fstarpu_combined_worker_get_id
  268. ! int starpu_combined_worker_get_size(void);
  269. function fstarpu_combined_worker_get_size() bind(C,name="starpu_combined_worker_get_size")
  270. use iso_c_binding, only: c_int
  271. integer(c_int) :: fstarpu_combined_worker_get_size
  272. end function fstarpu_combined_worker_get_size
  273. ! int starpu_combined_worker_get_rank(void);
  274. function fstarpu_combined_worker_get_rank() bind(C,name="starpu_combined_worker_get_rank")
  275. use iso_c_binding, only: c_int
  276. integer(c_int) :: fstarpu_combined_worker_get_rank
  277. end function fstarpu_combined_worker_get_rank
  278. ! enum starpu_worker_archtype starpu_worker_get_type(int id);
  279. function fstarpu_worker_get_type(id) bind(C)
  280. use iso_c_binding, only: c_int, c_ptr
  281. type(c_ptr) :: fstarpu_worker_get_type ! C function returns c_intptr_t
  282. integer(c_int),value,intent(in) :: id
  283. end function fstarpu_worker_get_type
  284. ! int starpu_worker_get_count_by_type(enum starpu_worker_archtype type);
  285. function fstarpu_worker_get_count_by_type(typeid) bind(C)
  286. use iso_c_binding, only: c_int, c_ptr
  287. integer(c_int) :: fstarpu_worker_get_count_by_type
  288. type(c_ptr),value,intent(in) :: typeid ! c_intptr_t expected by C func
  289. end function fstarpu_worker_get_count_by_type
  290. ! int starpu_worker_get_ids_by_type(enum starpu_worker_archtype type, int *workerids, int maxsize);
  291. function fstarpu_worker_get_ids_by_type(typeid, workerids, maxsize) bind(C)
  292. use iso_c_binding, only: c_int, c_ptr
  293. integer(c_int) :: fstarpu_worker_get_ids_by_type
  294. type(c_ptr),value,intent(in) :: typeid ! c_intptr_t expected by C func
  295. integer(c_int),intent(out) :: workerids(*)
  296. integer(c_int),value,intent(in) :: maxsize
  297. end function fstarpu_worker_get_ids_by_type
  298. ! int starpu_worker_get_by_type(enum starpu_worker_archtype type, int num);
  299. function fstarpu_worker_get_by_type(typeid, num) bind(C)
  300. use iso_c_binding, only: c_int, c_ptr
  301. integer(c_int) :: fstarpu_worker_get_by_type
  302. type(c_ptr),value,intent(in) :: typeid ! c_intptr_t expected by C func
  303. integer(c_int),value,intent(in) :: num
  304. end function fstarpu_worker_get_by_type
  305. ! int starpu_worker_get_by_devid(enum starpu_worker_archtype type, int devid);
  306. function fstarpu_worker_get_by_devid(typeid, devid) bind(C)
  307. use iso_c_binding, only: c_int, c_ptr
  308. integer(c_int) :: fstarpu_worker_get_by_type
  309. type(c_ptr),value,intent(in) :: typeid ! c_intptr_t expected by C func
  310. integer(c_int),value,intent(in) :: devid
  311. end function fstarpu_worker_get_by_devid
  312. ! void starpu_worker_get_name(int id, char *dst, size_t maxlen);
  313. subroutine fstarpu_worker_get_name(id, dst, maxlen) bind(C,name="starpu_worker_get_name")
  314. use iso_c_binding, only: c_int, c_char, c_size_t
  315. integer(c_int),value,intent(in) :: id
  316. character(c_char),intent(out) :: dst(*)
  317. integer(c_size_t),value,intent(in) :: maxlen
  318. end subroutine fstarpu_worker_get_name
  319. ! int starpu_worker_get_devid(int id);
  320. function fstarpu_worker_get_devid(id) bind(C,name="starpu_worker_get_devid")
  321. use iso_c_binding, only: c_int
  322. integer(c_int) :: fstarpu_worker_get_devid
  323. integer(c_int), value, intent(in) :: id
  324. end function fstarpu_worker_get_devid
  325. ! int starpu_worker_get_mp_nodeid(int id);
  326. function fstarpu_worker_get_mp_nodeid(id) bind(C,name="starpu_worker_get_mp_nodeid")
  327. use iso_c_binding, only: c_int
  328. integer(c_int) :: fstarpu_worker_get_mp_nodeid
  329. integer(c_int), value, intent(in) :: id
  330. end function fstarpu_worker_get_mp_nodeid
  331. ! struct starpu_tree* starpu_workers_get_tree(void);
  332. ! unsigned starpu_worker_get_sched_ctx_list(int worker, unsigned **sched_ctx);
  333. ! unsigned starpu_worker_is_blocked(int workerid);
  334. function fstarpu_worker_is_blocked(id) bind(C,name="starpu_worker_is_blocked")
  335. use iso_c_binding, only: c_int
  336. integer(c_int) :: fstarpu_worker_is_blocked
  337. integer(c_int), value, intent(in) :: id
  338. end function fstarpu_worker_is_blocked
  339. ! unsigned starpu_worker_is_slave_somewhere(int workerid);
  340. function fstarpu_worker_is_slave_somewhere(id) bind(C,name="starpu_worker_is_slave_somewhere")
  341. use iso_c_binding, only: c_int
  342. integer(c_int) :: fstarpu_worker_is_slave_somewhere
  343. integer(c_int), value, intent(in) :: id
  344. end function fstarpu_worker_is_slave_somewhere
  345. ! char *starpu_worker_get_type_as_string(enum starpu_worker_archtype type);
  346. subroutine fstarpu_worker_get_type_as_string(typeid,dst,maxlen) bind(C)
  347. use iso_c_binding, only: c_ptr, c_char, c_size_t
  348. type(c_ptr),value,intent(in) :: typeid ! c_intptr_t expected by C func
  349. character(c_char),intent(out) :: dst(*)
  350. integer(c_size_t),value,intent(in) :: maxlen
  351. end subroutine fstarpu_worker_get_type_as_string
  352. ! int starpu_bindid_get_workerids(int bindid, int **workerids);
  353. ! == starpu_task.h ==
  354. ! void starpu_tag_declare_deps(starpu_tag_t id, unsigned ndeps, ...);
  355. ! void starpu_tag_declare_deps_array(starpu_tag_t id, unsigned ndeps, starpu_tag_t *array);
  356. subroutine fstarpu_tag_declare_deps_array(id,ndeps,tag_array) bind(C,name="starpu_tag_declare_deps_array")
  357. use iso_c_binding, only: c_int, c_long_long
  358. integer(c_int), value, intent(in) :: id
  359. integer(c_int), value, intent(in) :: ndeps
  360. integer(c_long_long), intent(in) :: tag_array(*)
  361. end subroutine fstarpu_tag_declare_deps_array
  362. ! void starpu_task_declare_deps_array(struct starpu_task *task, unsigned ndeps, struct starpu_task *task_array[]);
  363. subroutine fstarpu_task_declare_deps_array(task,ndeps,task_array) bind(C,name="starpu_task_declare_deps_array")
  364. use iso_c_binding, only: c_int, c_ptr
  365. type(c_ptr), value, intent(in) :: task
  366. integer(c_int), value, intent(in) :: ndeps
  367. type(c_ptr), intent(in) :: task_array(*)
  368. end subroutine fstarpu_task_declare_deps_array
  369. ! int starpu_tag_wait(starpu_tag_t id);
  370. function fstarpu_tag_wait(id) bind(C,name="starpu_tag_wait")
  371. use iso_c_binding, only: c_int, c_long_long
  372. integer(c_int) :: fstarpu_tag_wait
  373. integer(c_long_long), value, intent(in) :: id
  374. end function fstarpu_tag_wait
  375. ! int starpu_tag_wait_array(unsigned ntags, starpu_tag_t *id);
  376. function fstarpu_tag_wait_array(ntags,tag_array) bind(C,name="starpu_tag_wait_array")
  377. use iso_c_binding, only: c_int, c_long_long
  378. integer(c_int) :: fstarpu_tag_wait_array
  379. integer(c_int), value, intent(in) :: ntags
  380. integer(c_long_long), intent(in) :: tag_array(*)
  381. end function fstarpu_tag_wait_array
  382. ! void starpu_tag_notify_from_apps(starpu_tag_t id);
  383. subroutine fstarpu_tag_notify_from_apps(id) bind(C,name="starpu_tag_notify_from_apps")
  384. use iso_c_binding, only: c_long_long
  385. integer(c_long_long), value, intent(in) :: id
  386. end subroutine fstarpu_tag_notify_from_apps
  387. ! void starpu_tag_restart(starpu_tag_t id);
  388. subroutine fstarpu_tag_restart(id) bind(C,name="starpu_tag_restart")
  389. use iso_c_binding, only: c_long_long
  390. integer(c_long_long), value, intent(in) :: id
  391. end subroutine fstarpu_tag_restart
  392. ! void starpu_tag_remove(starpu_tag_t id);
  393. subroutine fstarpu_tag_remove(id) bind(C,name="starpu_tag_remove")
  394. use iso_c_binding, only: c_long_long
  395. integer(c_long_long), value, intent(in) :: id
  396. end subroutine fstarpu_tag_remove
  397. ! struct starpu_task *starpu_tag_get_task(starpu_tag_t id);
  398. function fstarpu_tag_get_task(id) bind(C,name="starpu_tag_get_task")
  399. use iso_c_binding, only: c_ptr, c_long_long
  400. type(c_ptr) :: fstarpu_tag_get_task
  401. integer(c_long_long), value, intent(in) :: id
  402. end function fstarpu_tag_get_task
  403. ! void starpu_task_init(struct starpu_task *task);
  404. subroutine fstarpu_task_init (task) bind(C,name="starpu_task_init")
  405. use iso_c_binding, only: c_ptr
  406. type(c_ptr), value, intent(in) :: task
  407. end subroutine fstarpu_task_init
  408. ! void starpu_task_clean(struct starpu_task *task);
  409. subroutine fstarpu_task_clean (task) bind(C,name="starpu_task_clean")
  410. use iso_c_binding, only: c_ptr
  411. type(c_ptr), value, intent(in) :: task
  412. end subroutine fstarpu_task_clean
  413. ! struct starpu_task *starpu_task_create(void) STARPU_ATTRIBUTE_MALLOC;
  414. function fstarpu_task_create () bind(C,name="starpu_task_create")
  415. use iso_c_binding, only: c_ptr
  416. type(c_ptr) :: fstarpu_task_create
  417. end function fstarpu_task_create
  418. ! void starpu_task_destroy(struct starpu_task *task);
  419. subroutine fstarpu_task_destroy (task) bind(C,name="starpu_task_destroy")
  420. use iso_c_binding, only: c_ptr
  421. type(c_ptr), value, intent(in) :: task
  422. end subroutine fstarpu_task_destroy
  423. ! int starpu_task_submit(struct starpu_task *task) STARPU_WARN_UNUSED_RESULT;
  424. function fstarpu_task_submit (task) bind(C,name="starpu_task_submit")
  425. use iso_c_binding, only: c_int,c_ptr
  426. integer(c_int) :: fstarpu_task_submit
  427. type(c_ptr), value, intent(in) :: task
  428. end function fstarpu_task_submit
  429. ! int starpu_task_submit_to_ctx(struct starpu_task *task, unsigned sched_ctx_id);
  430. function fstarpu_task_submit_to_ctx (task,sched_ctx_id) bind(C,name="starpu_task_submit_to_ctx")
  431. use iso_c_binding, only: c_int,c_ptr
  432. integer(c_int) :: fstarpu_task_submit_to_ctx
  433. type(c_ptr), value, intent(in) :: task
  434. integer(c_int), value, intent(in) :: sched_ctx_id
  435. end function fstarpu_task_submit_to_ctx
  436. ! int starpu_task_finished(struct starpu_task *task) STARPU_WARN_UNUSED_RESULT;
  437. function fstarpu_task_finished (task) bind(C,name="starpu_task_finished")
  438. use iso_c_binding, only: c_int,c_ptr
  439. integer(c_int) :: fstarpu_task_finished
  440. type(c_ptr), value, intent(in) :: task
  441. end function fstarpu_task_finished
  442. ! int starpu_task_wait(struct starpu_task *task) STARPU_WARN_UNUSED_RESULT;
  443. function fstarpu_task_wait (task) bind(C,name="starpu_task_wait")
  444. use iso_c_binding, only: c_int,c_ptr
  445. integer(c_int) :: fstarpu_task_wait
  446. type(c_ptr), value, intent(in) :: task
  447. end function fstarpu_task_wait
  448. ! int starpu_task_wait_array(struct starpu_task **tasks, unsigned nb_tasks) STARPU_WARN_UNUSED_RESULT;
  449. function fstarpu_task_wait_array(task_array,ntasks) bind(C,name="starpu_task_wait_array")
  450. use iso_c_binding, only: c_int, c_ptr
  451. integer(c_int) :: fstarpu_task_wait_array
  452. integer(c_int), value, intent(in) :: ntasks
  453. type(c_ptr), intent(in) :: task_array
  454. end function fstarpu_task_wait_array
  455. ! int starpu_task_wait_for_all(void);
  456. subroutine fstarpu_task_wait_for_all () bind(C,name="starpu_task_wait_for_all")
  457. end subroutine fstarpu_task_wait_for_all
  458. ! int starpu_task_wait_for_n_submitted(unsigned n);
  459. subroutine fstarpu_task_wait_for_n_submitted (n) bind(C,name="starpu_task_wait_for_n_submitted")
  460. use iso_c_binding, only: c_int
  461. integer(c_int), value, intent(in) :: n
  462. end subroutine fstarpu_task_wait_for_n_submitted
  463. ! int starpu_task_wait_for_all_in_ctx(unsigned sched_ctx_id);
  464. subroutine fstarpu_task_wait_for_all_in_ctx (ctx) bind(C,name="starpu_task_wait_for_all_in_ctx")
  465. use iso_c_binding, only: c_int
  466. integer(c_int), value, intent(in) :: ctx
  467. end subroutine fstarpu_task_wait_for_all_in_ctx
  468. ! int starpu_task_wait_for_n_submitted_in_ctx(unsigned sched_ctx_id, unsigned n);
  469. subroutine fstarpu_task_wait_for_n_submitted_in_ctx (ctx,n) bind(C,name="starpu_task_wait_for_n_submitted_in_ctx")
  470. use iso_c_binding, only: c_int
  471. integer(c_int), value, intent(in) :: ctx
  472. integer(c_int), value, intent(in) :: n
  473. end subroutine fstarpu_task_wait_for_n_submitted_in_ctx
  474. ! int starpu_task_wait_for_no_ready(void);
  475. function fstarpu_task_wait_for_no_ready () bind(C,name="starpu_task_wait_for_no_ready")
  476. use iso_c_binding, only: c_int
  477. integer(c_int) :: fstarpu_task_wait_for_no_ready
  478. end function fstarpu_task_wait_for_no_ready
  479. ! int starpu_task_nready(void);
  480. function fstarpu_task_nready () bind(C,name="starpu_task_nready")
  481. use iso_c_binding, only: c_int
  482. integer(c_int) :: fstarpu_task_nready
  483. end function fstarpu_task_nready
  484. ! int starpu_task_nsubmitted(void);
  485. function fstarpu_task_nsubmitted () bind(C,name="starpu_task_nsubmitted")
  486. use iso_c_binding, only: c_int
  487. integer(c_int) :: fstarpu_task_nsubmitted
  488. end function fstarpu_task_nsubmitted
  489. ! void starpu_do_schedule(void);
  490. subroutine fstarpu_do_schedule () bind(C,name="starpu_do_schedule")
  491. end subroutine fstarpu_do_schedule
  492. ! starpu_codelet_init
  493. subroutine fstarpu_codelet_init (codelet) bind(C,name="starpu_codelet_init")
  494. use iso_c_binding, only: c_ptr
  495. type(c_ptr), value, intent(in) :: codelet
  496. end subroutine fstarpu_codelet_init
  497. ! starpu_codelet_display_stats
  498. subroutine fstarpu_codelet_display_stats (codelet) bind(C,name="starpu_codelet_display_stats")
  499. use iso_c_binding, only: c_ptr
  500. type(c_ptr), value, intent(in) :: codelet
  501. end subroutine fstarpu_codelet_display_stats
  502. ! struct starpu_task *starpu_task_get_current(void);
  503. function fstarpu_task_get_current () bind(C,name="starpu_task_get_current")
  504. use iso_c_binding, only: c_ptr
  505. type(c_ptr) :: fstarpu_task_get_current
  506. end function fstarpu_task_get_current
  507. ! void starpu_parallel_task_barrier_init(struct starpu_task *task, int workerid);
  508. subroutine fstarpu_parallel_task_barrier_init_init (task,id) &
  509. bind(C,name="starpu_parallel_task_barrier_init_init")
  510. use iso_c_binding, only: c_ptr, c_int
  511. type(c_ptr), value, intent(in) :: task
  512. integer(c_int), value, intent(in) :: id
  513. end subroutine fstarpu_parallel_task_barrier_init_init
  514. ! void starpu_parallel_task_barrier_init_n(struct starpu_task *task, int worker_size);
  515. subroutine fstarpu_parallel_task_barrier_init_n_init_n (task,sz) &
  516. bind(C,name="starpu_parallel_task_barrier_init_n_init_n")
  517. use iso_c_binding, only: c_ptr, c_int
  518. type(c_ptr), value, intent(in) :: task
  519. integer(c_int), value, intent(in) :: sz
  520. end subroutine fstarpu_parallel_task_barrier_init_n_init_n
  521. ! struct starpu_task *starpu_task_dup(struct starpu_task *task);
  522. function fstarpu_task_dup (task) bind(C,name="starpu_task_dup")
  523. use iso_c_binding, only: c_ptr
  524. type(c_ptr) :: fstarpu_task_dup
  525. type(c_ptr), value, intent(in) :: task
  526. end function fstarpu_task_dup
  527. ! void starpu_task_set_implementation(struct starpu_task *task, unsigned impl);
  528. subroutine fstarpu_task_set_implementation (task,impl) &
  529. bind(C,name="starpu_task_set_implementation")
  530. use iso_c_binding, only: c_ptr,c_int
  531. type(c_ptr), value, intent(in) :: task
  532. integer(c_int), value, intent(in) :: impl
  533. end subroutine fstarpu_task_set_implementation
  534. ! unsigned starpu_task_get_implementation(struct starpu_task *task);
  535. function fstarpu_task_get_implementation (task) &
  536. bind(C,name="starpu_task_get_implementation")
  537. use iso_c_binding, only: c_ptr,c_int
  538. type(c_ptr), value, intent(in) :: task
  539. integer(c_int) :: fstarpu_task_get_implementation
  540. end function fstarpu_task_get_implementation
  541. ! --
  542. function fstarpu_codelet_allocate () bind(C)
  543. use iso_c_binding, only: c_ptr
  544. type(c_ptr) :: fstarpu_codelet_allocate
  545. end function fstarpu_codelet_allocate
  546. subroutine fstarpu_codelet_free (cl) bind(C)
  547. use iso_c_binding, only: c_ptr
  548. type(c_ptr), value, intent(in) :: cl
  549. end subroutine fstarpu_codelet_free
  550. subroutine fstarpu_codelet_set_name (cl, cl_name) bind(C)
  551. use iso_c_binding, only: c_ptr, c_char
  552. type(c_ptr), value, intent(in) :: cl
  553. character(c_char), intent(in) :: cl_name
  554. end subroutine fstarpu_codelet_set_name
  555. subroutine fstarpu_codelet_add_cpu_func (cl, f_ptr) bind(C)
  556. use iso_c_binding, only: c_ptr, c_funptr
  557. type(c_ptr), value, intent(in) :: cl
  558. type(c_funptr), value, intent(in) :: f_ptr
  559. end subroutine fstarpu_codelet_add_cpu_func
  560. subroutine fstarpu_codelet_add_cuda_func (cl, f_ptr) bind(C)
  561. use iso_c_binding, only: c_ptr, c_funptr
  562. type(c_ptr), value, intent(in) :: cl
  563. type(c_funptr), value, intent(in) :: f_ptr
  564. end subroutine fstarpu_codelet_add_cuda_func
  565. subroutine fstarpu_codelet_add_cuda_flags (cl, flags) bind(C)
  566. use iso_c_binding, only: c_ptr
  567. type(c_ptr), value, intent(in) :: cl
  568. type(c_ptr), value, intent(in) :: flags ! C function expects an intptr_t
  569. end subroutine fstarpu_codelet_add_cuda_flags
  570. subroutine fstarpu_codelet_add_opencl_func (cl, f_ptr) bind(C)
  571. use iso_c_binding, only: c_ptr, c_funptr
  572. type(c_ptr), value, intent(in) :: cl
  573. type(c_funptr), value, intent(in) :: f_ptr
  574. end subroutine fstarpu_codelet_add_opencl_func
  575. subroutine fstarpu_codelet_add_opencl_flags (cl, flags) bind(C)
  576. use iso_c_binding, only: c_ptr
  577. type(c_ptr), value, intent(in) :: cl
  578. type(c_ptr), value, intent(in) :: flags ! C function expects an intptr_t
  579. end subroutine fstarpu_codelet_add_opencl_flags
  580. subroutine fstarpu_codelet_add_mic_func (cl, f_ptr) bind(C)
  581. use iso_c_binding, only: c_ptr, c_funptr
  582. type(c_ptr), value, intent(in) :: cl
  583. type(c_funptr), value, intent(in) :: f_ptr
  584. end subroutine fstarpu_codelet_add_mic_func
  585. subroutine fstarpu_codelet_add_scc_func (cl, f_ptr) bind(C)
  586. use iso_c_binding, only: c_ptr, c_funptr
  587. type(c_ptr), value, intent(in) :: cl
  588. type(c_funptr), value, intent(in) :: f_ptr
  589. end subroutine fstarpu_codelet_add_scc_func
  590. subroutine fstarpu_codelet_add_buffer (cl, mode) bind(C)
  591. use iso_c_binding, only: c_ptr
  592. type(c_ptr), value, intent(in) :: cl
  593. type(c_ptr), value, intent(in) :: mode ! C function expects an intptr_t
  594. end subroutine fstarpu_codelet_add_buffer
  595. subroutine fstarpu_codelet_set_variable_nbuffers (cl) bind(C)
  596. use iso_c_binding, only: c_ptr,c_int
  597. type(c_ptr), value, intent(in) :: cl
  598. end subroutine fstarpu_codelet_set_variable_nbuffers
  599. subroutine fstarpu_codelet_set_nbuffers (cl, nbuffers) bind(C)
  600. use iso_c_binding, only: c_ptr,c_int
  601. type(c_ptr), value, intent(in) :: cl
  602. integer(c_int), value, intent(in) :: nbuffers
  603. end subroutine fstarpu_codelet_set_nbuffers
  604. subroutine fstarpu_codelet_set_flags (cl, flags) bind(C)
  605. use iso_c_binding, only: c_ptr
  606. type(c_ptr), value, intent(in) :: cl
  607. type(c_ptr), value, intent(in) :: flags ! C function expects an intptr_t
  608. end subroutine fstarpu_codelet_set_flags
  609. subroutine fstarpu_codelet_set_where (cl, where) bind(C)
  610. use iso_c_binding, only: c_ptr
  611. type(c_ptr), value, intent(in) :: cl
  612. type(c_ptr), value, intent(in) :: where ! C function expects an intptr_t
  613. end subroutine fstarpu_codelet_set_where
  614. ! == starpu_data_interface.h ==
  615. ! uintptr_t starpu_malloc_on_node_flags(unsigned dst_node, size_t size, int flags);
  616. ! uintptr_t starpu_malloc_on_node(unsigned dst_node, size_t size);
  617. function fstarpu_malloc_on_node(node,sz) bind(C,name="starpu_malloc_on_node")
  618. use iso_c_binding, only: c_int,c_intptr_t,c_size_t
  619. integer(c_intptr_t) :: fstarpu_malloc_on_node
  620. integer(c_int), value, intent(in) :: node
  621. integer(c_size_t), value, intent(in) :: sz
  622. end function fstarpu_malloc_on_node
  623. ! void starpu_free_on_node_flags(unsigned dst_node, uintptr_t addr, size_t size, int flags);
  624. ! void starpu_free_on_node(unsigned dst_node, uintptr_t addr, size_t size);
  625. subroutine fstarpu_free_on_node(node,addr,sz) bind(C,name="starpu_free_on_node")
  626. use iso_c_binding, only: c_int,c_intptr_t,c_size_t
  627. integer(c_int), value, intent(in) :: node
  628. integer(c_intptr_t), value, intent(in) :: addr
  629. integer(c_size_t), value, intent(in) :: sz
  630. end subroutine fstarpu_free_on_node
  631. ! void starpu_malloc_on_node_set_default_flags(unsigned node, int flags);
  632. ! int starpu_data_interface_get_next_id(void);
  633. ! void starpu_data_register(starpu_data_handle_t *handleptr, unsigned home_node, void *data_interface, struct starpu_data_interface_ops *ops);
  634. ! void starpu_data_ptr_register(starpu_data_handle_t handle, unsigned node);
  635. subroutine fstarpug_data_ptr_register (dh,node) bind(C,name="starpu_data_ptr_register")
  636. use iso_c_binding, only: c_ptr, c_int
  637. type(c_ptr), value, intent(in) :: dh
  638. integer(c_int), value, intent(in) :: node
  639. end subroutine fstarpug_data_ptr_register
  640. ! void starpu_data_register_same(starpu_data_handle_t *handledst, starpu_data_handle_t handlesrc);
  641. subroutine fstarpu_data_register_same (dh_dst,dh_src) bind(C,name="starpu_data_register_same")
  642. use iso_c_binding, only: c_ptr
  643. type(c_ptr), intent(out) :: dh_dst
  644. type(c_ptr), value, intent(in) :: dh_src
  645. end subroutine fstarpu_data_register_same
  646. ! void *starpu_data_handle_to_pointer(starpu_data_handle_t handle, unsigned node);
  647. function fstarpu_data_handle_to_pointer (dh,node) bind(C,name="starpu_data_handle_to_pointer")
  648. use iso_c_binding, only: c_ptr, c_int
  649. type(c_ptr) :: fstarpu_data_handle_to_pointer
  650. type(c_ptr), value, intent(in) :: dh
  651. integer(c_int), value, intent(in) :: node
  652. end function fstarpu_data_handle_to_pointer
  653. ! void *starpu_data_get_local_ptr(starpu_data_handle_t handle);
  654. function fstarpu_data_get_local_ptr (dh) bind(C,name="starpu_data_get_local_ptr")
  655. use iso_c_binding, only: c_ptr, c_int
  656. type(c_ptr) :: fstarpu_data_get_local_ptr
  657. type(c_ptr), value, intent(in) :: dh
  658. end function fstarpu_data_get_local_ptr
  659. ! void *starpu_data_get_interface_on_node(starpu_data_handle_t handle, unsigned memory_node);
  660. ! == starpu_data_interface.h: block ==
  661. ! void starpu_block_data_register(starpu_data_handle_t *handle, unsigned home_node, uintptr_t ptr, uint32_t ldy, uint32_t ldz, uint32_t nx, uint32_t ny, uint32_t nz, size_t elemsize);
  662. subroutine fstarpu_block_data_register(dh, home_node, ptr, ldy, ldz, nx, ny, nz, elt_size) &
  663. bind(C,name="starpu_block_data_register")
  664. use iso_c_binding, only: c_ptr, c_int, c_size_t
  665. type(c_ptr), intent(out) :: dh
  666. integer(c_int), value, intent(in) :: home_node
  667. type(c_ptr), value, intent(in) :: ptr
  668. integer(c_int), value, intent(in) :: ldy
  669. integer(c_int), value, intent(in) :: ldz
  670. integer(c_int), value, intent(in) :: nx
  671. integer(c_int), value, intent(in) :: ny
  672. integer(c_int), value, intent(in) :: nz
  673. integer(c_size_t), value, intent(in) :: elt_size
  674. end subroutine fstarpu_block_data_register
  675. ! void starpu_block_ptr_register(starpu_data_handle_t handle, unsigned node, uintptr_t ptr, uintptr_t dev_handle, size_t offset, uint32_t ldy, uint32_t ldz);
  676. subroutine fstarpu_block_ptr_register(dh, node, ptr, dev_handle, offset, ldy, ldz) &
  677. bind(C,name="starpu_block_ptr_register")
  678. use iso_c_binding, only: c_ptr, c_int, c_size_t
  679. type(c_ptr), intent(out) :: dh
  680. integer(c_int), value, intent(in) :: node
  681. type(c_ptr), value, intent(in) :: ptr
  682. type(c_ptr), value, intent(in) :: dev_handle
  683. integer(c_size_t), value, intent(in) :: offset
  684. integer(c_int), value, intent(in) :: ldy
  685. integer(c_int), value, intent(in) :: ldz
  686. end subroutine fstarpu_block_ptr_register
  687. function fstarpu_block_get_ptr(buffers, i) bind(C)
  688. use iso_c_binding, only: c_ptr, c_int
  689. type(c_ptr) :: fstarpu_block_get_ptr
  690. type(c_ptr), value, intent(in) :: buffers
  691. integer(c_int), value, intent(in) :: i
  692. end function fstarpu_block_get_ptr
  693. function fstarpu_block_get_ldy(buffers, i) bind(C)
  694. use iso_c_binding, only: c_ptr, c_int
  695. integer(c_int) :: fstarpu_block_get_ldy
  696. type(c_ptr), value, intent(in) :: buffers
  697. integer(c_int), value, intent(in) :: i
  698. end function fstarpu_block_get_ldy
  699. function fstarpu_block_get_ldz(buffers, i) bind(C)
  700. use iso_c_binding, only: c_ptr, c_int
  701. integer(c_int) :: fstarpu_block_get_ldz
  702. type(c_ptr), value, intent(in) :: buffers
  703. integer(c_int), value, intent(in) :: i
  704. end function fstarpu_block_get_ldz
  705. function fstarpu_block_get_nx(buffers, i) bind(C)
  706. use iso_c_binding, only: c_ptr, c_int
  707. integer(c_int) :: fstarpu_block_get_nx
  708. type(c_ptr), value, intent(in) :: buffers
  709. integer(c_int), value, intent(in) :: i
  710. end function fstarpu_block_get_nx
  711. function fstarpu_block_get_ny(buffers, i) bind(C)
  712. use iso_c_binding, only: c_ptr, c_int
  713. integer(c_int) :: fstarpu_block_get_ny
  714. type(c_ptr), value, intent(in) :: buffers
  715. integer(c_int), value, intent(in) :: i
  716. end function fstarpu_block_get_ny
  717. function fstarpu_block_get_nz(buffers, i) bind(C)
  718. use iso_c_binding, only: c_ptr, c_int
  719. integer(c_int) :: fstarpu_block_get_nz
  720. type(c_ptr), value, intent(in) :: buffers
  721. integer(c_int), value, intent(in) :: i
  722. end function fstarpu_block_get_nz
  723. ! == starpu_data_interface.h: matrix ==
  724. ! void starpu_matrix_data_register(starpu_data_handle_t *handle, unsigned home_node, uintptr_t ptr, uint32_t ld, uint32_t nx, uint32_t ny, size_t elemsize);
  725. subroutine fstarpu_matrix_data_register(dh, home_node, ptr, ld, nx, ny, elt_size) &
  726. bind(C,name="starpu_matrix_data_register")
  727. use iso_c_binding, only: c_ptr, c_int, c_size_t
  728. type(c_ptr), intent(out) :: dh
  729. integer(c_int), value, intent(in) :: home_node
  730. type(c_ptr), value, intent(in) :: ptr
  731. integer(c_int), value, intent(in) :: ld
  732. integer(c_int), value, intent(in) :: nx
  733. integer(c_int), value, intent(in) :: ny
  734. integer(c_size_t), value, intent(in) :: elt_size
  735. end subroutine fstarpu_matrix_data_register
  736. ! void starpu_matrix_ptr_register(starpu_data_handle_t handle, unsigned node, uintptr_t ptr, uintptr_t dev_handle, size_t offset, uint32_t ld);
  737. subroutine fstarpu_matrix_ptr_register(dh, node, ptr, dev_handle, offset, ld) &
  738. bind(C,name="starpu_matrix_ptr_register")
  739. use iso_c_binding, only: c_ptr, c_int, c_size_t
  740. type(c_ptr), intent(out) :: dh
  741. integer(c_int), value, intent(in) :: node
  742. type(c_ptr), value, intent(in) :: ptr
  743. type(c_ptr), value, intent(in) :: dev_handle
  744. integer(c_size_t), value, intent(in) :: offset
  745. integer(c_int), value, intent(in) :: ld
  746. end subroutine fstarpu_matrix_ptr_register
  747. function fstarpu_matrix_get_ptr(buffers, i) bind(C)
  748. use iso_c_binding, only: c_ptr, c_int
  749. type(c_ptr) :: fstarpu_matrix_get_ptr
  750. type(c_ptr), value, intent(in) :: buffers
  751. integer(c_int), value, intent(in) :: i
  752. end function fstarpu_matrix_get_ptr
  753. function fstarpu_matrix_get_ld(buffers, i) bind(C)
  754. use iso_c_binding, only: c_ptr, c_int
  755. integer(c_int) :: fstarpu_matrix_get_ld
  756. type(c_ptr), value, intent(in) :: buffers
  757. integer(c_int), value, intent(in) :: i
  758. end function fstarpu_matrix_get_ld
  759. function fstarpu_matrix_get_nx(buffers, i) bind(C)
  760. use iso_c_binding, only: c_ptr, c_int
  761. integer(c_int) :: fstarpu_matrix_get_nx
  762. type(c_ptr), value, intent(in) :: buffers
  763. integer(c_int), value, intent(in) :: i
  764. end function fstarpu_matrix_get_nx
  765. function fstarpu_matrix_get_ny(buffers, i) bind(C)
  766. use iso_c_binding, only: c_ptr, c_int
  767. integer(c_int) :: fstarpu_matrix_get_ny
  768. type(c_ptr), value, intent(in) :: buffers
  769. integer(c_int), value, intent(in) :: i
  770. end function fstarpu_matrix_get_ny
  771. ! == starpu_data_interface.h: vector ==
  772. ! void starpu_vector_data_register(starpu_data_handle_t *handle, unsigned home_node, uintptr_t ptr, uint32_t nx, size_t elemsize);
  773. subroutine fstarpu_vector_data_register(dh, home_node, ptr,nx, elt_size) &
  774. bind(C,name="starpu_vector_data_register")
  775. use iso_c_binding, only: c_ptr, c_int, c_size_t
  776. type(c_ptr), intent(out) :: dh
  777. integer(c_int), value, intent(in) :: home_node
  778. type(c_ptr), value, intent(in) :: ptr
  779. integer(c_int), value, intent(in) :: nx
  780. integer(c_size_t), value, intent(in) :: elt_size
  781. end subroutine fstarpu_vector_data_register
  782. ! void starpu_vector_ptr_register(starpu_data_handle_t handle, unsigned node, uintptr_t ptr, uintptr_t dev_handle, size_t offset);
  783. subroutine fstarpu_vector_ptr_register(dh, node, ptr, dev_handle, offset, ld) &
  784. bind(C,name="starpu_vector_ptr_register")
  785. use iso_c_binding, only: c_ptr, c_int, c_size_t
  786. type(c_ptr), intent(out) :: dh
  787. integer(c_int), value, intent(in) :: node
  788. type(c_ptr), value, intent(in) :: ptr
  789. type(c_ptr), value, intent(in) :: dev_handle
  790. integer(c_size_t), value, intent(in) :: offset
  791. end subroutine fstarpu_vector_ptr_register
  792. function fstarpu_vector_get_ptr(buffers, i) bind(C)
  793. use iso_c_binding, only: c_ptr, c_int
  794. type(c_ptr) :: fstarpu_vector_get_ptr
  795. type(c_ptr), value, intent(in) :: buffers
  796. integer(c_int), value, intent(in) :: i
  797. end function fstarpu_vector_get_ptr
  798. function fstarpu_vector_get_nx(buffers, i) bind(C)
  799. use iso_c_binding, only: c_ptr, c_int
  800. integer(c_int) :: fstarpu_vector_get_nx
  801. type(c_ptr), value, intent(in) :: buffers
  802. integer(c_int), value, intent(in) :: i
  803. end function fstarpu_vector_get_nx
  804. ! == starpu_data_interface.h: variable ==
  805. ! void starpu_variable_data_register(starpu_data_handle_t *handle, unsigned home_node, uintptr_t ptr, size_t size);
  806. subroutine fstarpu_variable_data_register(dh, home_node, ptr, elt_size) &
  807. bind(C,name="starpu_variable_data_register")
  808. use iso_c_binding, only: c_ptr, c_int, c_size_t
  809. type(c_ptr), intent(out) :: dh
  810. integer(c_int), value, intent(in) :: home_node
  811. type(c_ptr), value, intent(in) :: ptr
  812. integer(c_size_t), value, intent(in) :: elt_size
  813. end subroutine fstarpu_variable_data_register
  814. ! void starpu_variable_ptr_register(starpu_data_handle_t handle, unsigned node, uintptr_t ptr, uintptr_t dev_handle, size_t offset);
  815. subroutine fstarpu_variable_ptr_register(dh, node, ptr, dev_handle, offset, ld) &
  816. bind(C,name="starpu_variable_ptr_register")
  817. use iso_c_binding, only: c_ptr, c_int, c_size_t
  818. type(c_ptr), intent(out) :: dh
  819. integer(c_int), value, intent(in) :: node
  820. type(c_ptr), value, intent(in) :: ptr
  821. type(c_ptr), value, intent(in) :: dev_handle
  822. integer(c_size_t), value, intent(in) :: offset
  823. end subroutine fstarpu_variable_ptr_register
  824. function fstarpu_variable_get_ptr(buffers, i) bind(C)
  825. use iso_c_binding, only: c_ptr, c_int
  826. type(c_ptr) :: fstarpu_variable_get_ptr
  827. type(c_ptr), value, intent(in) :: buffers
  828. integer(c_int), value, intent(in) :: i
  829. end function fstarpu_variable_get_ptr
  830. ! == starpu_data_interface.h: void ==
  831. ! void starpu_void_data_register(starpu_data_handle_t *handle);
  832. subroutine fstarpu_void_data_register(dh) &
  833. bind(C,name="starpu_void_data_register")
  834. use iso_c_binding, only: c_ptr, c_int, c_size_t
  835. type(c_ptr), intent(out) :: dh
  836. end subroutine fstarpu_void_data_register
  837. ! == starpu_data_filter.h ==
  838. function fstarpu_data_filter_allocate () bind(C)
  839. use iso_c_binding, only: c_ptr
  840. type(c_ptr) :: fstarpu_data_filter_allocate
  841. end function fstarpu_data_filter_allocate
  842. subroutine fstarpu_data_filter_free (filter) bind(C)
  843. use iso_c_binding, only: c_ptr
  844. type(c_ptr), value, intent(in) :: filter
  845. end subroutine fstarpu_data_filter_free
  846. ! Note: use fstarpu_df_alloc_ prefix instead of fstarpu_data_filter_allocate_
  847. ! to fit within the Fortran id length limit */
  848. function fstarpu_df_alloc_bcsr_filter_canonical_block () bind(C)
  849. use iso_c_binding, only: c_ptr
  850. type(c_ptr) :: fstarpu_df_alloc_bcsr_filter_canonical_block
  851. end function fstarpu_df_alloc_bcsr_filter_canonical_block
  852. function fstarpu_df_alloc_csr_filter_vertical_block () bind(C)
  853. use iso_c_binding, only: c_ptr
  854. type(c_ptr) :: fstarpu_df_alloc_csr_filter_vertical_block
  855. end function fstarpu_df_alloc_csr_filter_vertical_block
  856. function fstarpu_df_alloc_matrix_filter_block () bind(C)
  857. use iso_c_binding, only: c_ptr
  858. type(c_ptr) :: fstarpu_df_alloc_matrix_filter_block
  859. end function fstarpu_df_alloc_matrix_filter_block
  860. function fstarpu_df_alloc_matrix_filter_block_shadow () bind(C)
  861. use iso_c_binding, only: c_ptr
  862. type(c_ptr) :: fstarpu_df_alloc_matrix_filter_block_shadow
  863. end function fstarpu_df_alloc_matrix_filter_block_shadow
  864. function fstarpu_df_alloc_matrix_filter_vertical_block () bind(C)
  865. use iso_c_binding, only: c_ptr
  866. type(c_ptr) :: fstarpu_df_alloc_matrix_filter_vertical_block
  867. end function fstarpu_df_alloc_matrix_filter_vertical_block
  868. function fstarpu_df_alloc_matrix_filter_vertical_block_shadow () bind(C)
  869. use iso_c_binding, only: c_ptr
  870. type(c_ptr) :: fstarpu_df_alloc_matrix_filter_vertical_block_shadow
  871. end function fstarpu_df_alloc_matrix_filter_vertical_block_shadow
  872. function fstarpu_df_alloc_vector_filter_block () bind(C)
  873. use iso_c_binding, only: c_ptr
  874. type(c_ptr) :: fstarpu_df_alloc_vector_filter_block
  875. end function fstarpu_df_alloc_vector_filter_block
  876. function fstarpu_df_alloc_vector_filter_block_shadow () bind(C)
  877. use iso_c_binding, only: c_ptr
  878. type(c_ptr) :: fstarpu_df_alloc_vector_filter_block_shadow
  879. end function fstarpu_df_alloc_vector_filter_block_shadow
  880. function fstarpu_df_alloc_vector_filter_list () bind(C)
  881. use iso_c_binding, only: c_ptr
  882. type(c_ptr) :: fstarpu_df_alloc_vector_filter_list
  883. end function fstarpu_df_alloc_vector_filter_list
  884. function fstarpu_df_alloc_vector_filter_divide_in_2 () bind(C)
  885. use iso_c_binding, only: c_ptr
  886. type(c_ptr) :: fstarpu_df_alloc_vector_filter_divide_in_2
  887. end function fstarpu_df_alloc_vector_filter_divide_in_2
  888. function fstarpu_df_alloc_block_filter_block () bind(C)
  889. use iso_c_binding, only: c_ptr
  890. type(c_ptr) :: fstarpu_df_alloc_block_filter_block
  891. end function fstarpu_df_alloc_block_filter_block
  892. function fstarpu_df_alloc_block_filter_block_shadow () bind(C)
  893. use iso_c_binding, only: c_ptr
  894. type(c_ptr) :: fstarpu_df_alloc_block_filter_block_shadow
  895. end function fstarpu_df_alloc_block_filter_block_shadow
  896. function fstarpu_df_alloc_block_filter_vertical_block () bind(C)
  897. use iso_c_binding, only: c_ptr
  898. type(c_ptr) :: fstarpu_df_alloc_block_filter_vertical_block
  899. end function fstarpu_df_alloc_block_filter_vertical_block
  900. function fstarpu_df_alloc_block_filter_vertical_block_shadow () bind(C)
  901. use iso_c_binding, only: c_ptr
  902. type(c_ptr) :: fstarpu_df_alloc_block_filter_vertical_block_shadow
  903. end function fstarpu_df_alloc_block_filter_vertical_block_shadow
  904. subroutine fstarpu_data_filter_set_filter_func (filter, f_ptr) bind(C)
  905. use iso_c_binding, only: c_ptr, c_funptr
  906. type(c_ptr), value, intent(in) :: filter
  907. type(c_funptr), value, intent(in) :: f_ptr
  908. end subroutine fstarpu_data_filter_set_filter_func
  909. subroutine fstarpu_data_filter_set_nchildren (filter, nchildren) bind(C)
  910. use iso_c_binding, only: c_ptr, c_int
  911. type(c_ptr), value, intent(in) :: filter
  912. integer(c_int), value, intent(in) :: nchildren
  913. end subroutine fstarpu_data_filter_set_nchildren
  914. subroutine fstarpu_data_filter_set_get_nchildren_func (filter, f_ptr) bind(C)
  915. use iso_c_binding, only: c_ptr, c_funptr
  916. type(c_ptr), value, intent(in) :: filter
  917. type(c_funptr), value, intent(in) :: f_ptr
  918. end subroutine fstarpu_data_filter_set_get_nchildren_func
  919. subroutine fstarpu_data_filter_set_get_child_ops_func (filter, f_ptr) bind(C)
  920. use iso_c_binding, only: c_ptr, c_funptr
  921. type(c_ptr), value, intent(in) :: filter
  922. type(c_funptr), value, intent(in) :: f_ptr
  923. end subroutine fstarpu_data_filter_set_get_child_ops_func
  924. subroutine fstarpu_data_filter_set_filter_arg (filter, filter_arg) bind(C)
  925. use iso_c_binding, only: c_ptr, c_int
  926. type(c_ptr), value, intent(in) :: filter
  927. integer(c_int), value, intent(in) :: filter_arg
  928. end subroutine fstarpu_data_filter_set_filter_arg
  929. subroutine fstarpu_data_filter_set_filter_arg_ptr (filter, filter_arg_ptr) bind(C)
  930. use iso_c_binding, only: c_ptr
  931. type(c_ptr), value, intent(in) :: filter
  932. type(c_ptr), value, intent(in) :: filter_arg_ptr
  933. end subroutine fstarpu_data_filter_set_filter_arg_ptr
  934. ! void starpu_data_partition(starpu_data_handle_t initial_handle, struct starpu_data_filter *f);
  935. subroutine fstarpu_data_partition (dh,filter) bind(C,name="starpu_data_partition")
  936. use iso_c_binding, only: c_ptr
  937. type(c_ptr), value, intent(in) :: dh
  938. type(c_ptr), value, intent(in) :: filter
  939. end subroutine fstarpu_data_partition
  940. ! void starpu_data_unpartition(starpu_data_handle_t root_data, unsigned gathering_node);
  941. subroutine fstarpu_data_unpartition (root_dh,gathering_node) bind(C,name="starpu_data_unpartition")
  942. use iso_c_binding, only: c_ptr, c_int
  943. type(c_ptr), value, intent(in) :: root_dh
  944. integer(c_int), value, intent(in) :: gathering_node
  945. end subroutine fstarpu_data_unpartition
  946. ! void starpu_data_partition_plan(starpu_data_handle_t initial_handle, struct starpu_data_filter *f, starpu_data_handle_t *children);
  947. subroutine fstarpu_data_partition_plan (dh,filter,children) &
  948. bind(C,name="starpu_data_partition_plan")
  949. use iso_c_binding, only: c_ptr
  950. type(c_ptr), value, intent(in) :: dh
  951. type(c_ptr), value, intent(in) :: filter
  952. type(c_ptr), intent(in) :: children(*)
  953. end subroutine fstarpu_data_partition_plan
  954. ! void starpu_data_partition_submit(starpu_data_handle_t initial_handle, unsigned nparts, starpu_data_handle_t *children);
  955. subroutine fstarpu_data_partition_submit (dh,nparts,children) &
  956. bind(C,name="starpu_data_partition_submit")
  957. use iso_c_binding, only: c_ptr, c_int
  958. type(c_ptr), value, intent(in) :: dh
  959. integer(c_int), value, intent(in) :: nparts
  960. type(c_ptr), intent(in) :: children(*)
  961. end subroutine fstarpu_data_partition_submit
  962. ! void starpu_data_partition_readonly_submit(starpu_data_handle_t initial_handle, unsigned nparts, starpu_data_handle_t *children);
  963. subroutine fstarpu_data_partition_readonly_submit (dh,nparts,children) &
  964. bind(C,name="starpu_data_partition_readonly_submit")
  965. use iso_c_binding, only: c_ptr, c_int
  966. type(c_ptr), value, intent(in) :: dh
  967. integer(c_int), value, intent(in) :: nparts
  968. type(c_ptr), intent(in) :: children(*)
  969. end subroutine fstarpu_data_partition_readonly_submit
  970. ! void starpu_data_partition_readwrite_upgrade_submit(starpu_data_handle_t initial_handle, unsigned nparts, starpu_data_handle_t *children);
  971. subroutine fstarpu_data_partition_readwrite_upgrade_submit (dh,nparts,children) &
  972. bind(C,name="starpu_data_partition_readwrite_upgrade_submit")
  973. use iso_c_binding, only: c_ptr, c_int
  974. type(c_ptr), value, intent(in) :: dh
  975. integer(c_int), value, intent(in) :: nparts
  976. type(c_ptr), intent(in) :: children(*)
  977. end subroutine fstarpu_data_partition_readwrite_upgrade_submit
  978. ! void starpu_data_unpartition_submit(starpu_data_handle_t initial_handle, unsigned nparts, starpu_data_handle_t *children, int gathering_node);
  979. subroutine fstarpu_data_unpartition_submit (dh,nparts,children,gathering_node) &
  980. bind(C,name="starpu_data_unpartition_submit")
  981. use iso_c_binding, only: c_ptr, c_int
  982. type(c_ptr), value, intent(in) :: dh
  983. integer(c_int), value, intent(in) :: nparts
  984. type(c_ptr), intent(in) :: children(*)
  985. integer(c_int), value, intent(in) :: gathering_node
  986. end subroutine fstarpu_data_unpartition_submit
  987. ! void starpu_data_unpartition_readonly_submit(starpu_data_handle_t initial_handle, unsigned nparts, starpu_data_handle_t *children, int gathering_node);
  988. subroutine fstarpu_data_unpartition_readonly_submit (dh,nparts,children,gathering_node) &
  989. bind(C,name="starpu_data_unpartition_readonly_submit")
  990. use iso_c_binding, only: c_ptr, c_int
  991. type(c_ptr), value, intent(in) :: dh
  992. integer(c_int), value, intent(in) :: nparts
  993. type(c_ptr), intent(in) :: children(*)
  994. integer(c_int), value, intent(in) :: gathering_node
  995. end subroutine fstarpu_data_unpartition_readonly_submit
  996. ! void starpu_data_partition_clean(starpu_data_handle_t root_data, unsigned nparts, starpu_data_handle_t *children);
  997. subroutine fstarpu_data_partition_clean (dh,nparts,children) &
  998. bind(C,name="starpu_data_partition_clean")
  999. use iso_c_binding, only: c_ptr, c_int
  1000. type(c_ptr), value, intent(in) :: dh
  1001. integer(c_int), value, intent(in) :: nparts
  1002. type(c_ptr), intent(in) :: children(*)
  1003. end subroutine fstarpu_data_partition_clean
  1004. ! int starpu_data_get_nb_children(starpu_data_handle_t handle);
  1005. function fstarpu_data_get_nb_children(dh) bind(C,name="starpu_data_get_nb_children")
  1006. use iso_c_binding, only: c_ptr, c_int
  1007. integer(c_int) :: fstarpu_data_get_nb_children
  1008. type(c_ptr), value, intent(in) :: dh
  1009. end function fstarpu_data_get_nb_children
  1010. ! starpu_data_handle_t starpu_data_get_child(starpu_data_handle_t handle, unsigned i);
  1011. function fstarpu_data_get_child(dh,i) bind(C,name="starpu_data_get_child")
  1012. use iso_c_binding, only: c_ptr, c_int
  1013. type(c_ptr) :: fstarpu_data_get_child
  1014. type(c_ptr), value, intent(in) :: dh
  1015. integer(c_int), value, intent(in) :: i
  1016. end function fstarpu_data_get_child
  1017. ! starpu_data_handle_t starpu_data_get_sub_data(starpu_data_handle_t root_data, unsigned depth, ... );
  1018. ! . see: fstarpu_data_get_sub_data
  1019. ! starpu_data_handle_t starpu_data_vget_sub_data(starpu_data_handle_t root_data, unsigned depth, va_list pa);
  1020. ! . see: fstarpu_data_get_sub_data
  1021. ! note: defined in filters.c
  1022. function fstarpu_data_get_sub_data (root_dh,depth,indices) bind(C)
  1023. use iso_c_binding, only: c_ptr, c_int
  1024. type(c_ptr) :: fstarpu_data_get_sub_data
  1025. type(c_ptr), value, intent(in) :: root_dh
  1026. integer(c_int), value, intent(in) :: depth
  1027. integer(c_int), intent(in) :: indices(*)
  1028. end function fstarpu_data_get_sub_data
  1029. ! void starpu_data_map_filters(starpu_data_handle_t root_data, unsigned nfilters, ...);
  1030. ! . see fstarpu_data_map_filters
  1031. ! void starpu_data_vmap_filters(starpu_data_handle_t root_data, unsigned nfilters, va_list pa);
  1032. ! . see fstarpu_data_map_filters
  1033. ! note: defined in filters.c
  1034. subroutine fstarpu_data_map_filters (root_dh,nfilters,filters) bind(C)
  1035. use iso_c_binding, only: c_ptr, c_int
  1036. type(c_ptr), value, intent(in) :: root_dh
  1037. integer(c_int), value, intent(in) :: nfilters
  1038. type(c_ptr), intent(in) :: filters(*)
  1039. end subroutine fstarpu_data_map_filters
  1040. ! void starpu_matrix_filter_block(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
  1041. subroutine fstarpu_matrix_filter_block (father_interface,child_interface,filter,id,nparts) &
  1042. bind(C,name="starpu_matrix_filter_block")
  1043. use iso_c_binding, only: c_ptr
  1044. type(c_ptr), value, intent(in) :: father_interface
  1045. type(c_ptr), value, intent(in) :: child_interface
  1046. type(c_ptr), value, intent(in) :: filter
  1047. type(c_ptr), value, intent(in) :: id
  1048. type(c_ptr), value, intent(in) :: nparts
  1049. end subroutine fstarpu_matrix_filter_block
  1050. ! void starpu_matrix_filter_block_shadow(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
  1051. subroutine fstarpu_matrix_filter_block_shadow (father_interface,child_interface,filter,id,nparts) &
  1052. bind(C,name="starpu_matrix_filter_block_shadow")
  1053. use iso_c_binding, only: c_ptr
  1054. type(c_ptr), value, intent(in) :: father_interface
  1055. type(c_ptr), value, intent(in) :: child_interface
  1056. type(c_ptr), value, intent(in) :: filter
  1057. type(c_ptr), value, intent(in) :: id
  1058. type(c_ptr), value, intent(in) :: nparts
  1059. end subroutine fstarpu_matrix_filter_block_shadow
  1060. ! void starpu_matrix_filter_vertical_block(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
  1061. subroutine fstarpu_matrix_filter_vertical_block (father_interface,child_interface,filter,id,nparts) &
  1062. bind(C,name="starpu_matrix_filter_vertical_block")
  1063. use iso_c_binding, only: c_ptr
  1064. type(c_ptr), value, intent(in) :: father_interface
  1065. type(c_ptr), value, intent(in) :: child_interface
  1066. type(c_ptr), value, intent(in) :: filter
  1067. type(c_ptr), value, intent(in) :: id
  1068. type(c_ptr), value, intent(in) :: nparts
  1069. end subroutine fstarpu_matrix_filter_vertical_block
  1070. ! void starpu_matrix_filter_vertical_block_shadow(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
  1071. subroutine fstarpu_matrix_filter_vertical_block_shadow (father_interface,child_interface,filter,id,nparts) &
  1072. bind(C,name="starpu_matrix_filter_vertical_block_shadow")
  1073. use iso_c_binding, only: c_ptr
  1074. type(c_ptr), value, intent(in) :: father_interface
  1075. type(c_ptr), value, intent(in) :: child_interface
  1076. type(c_ptr), value, intent(in) :: filter
  1077. type(c_ptr), value, intent(in) :: id
  1078. type(c_ptr), value, intent(in) :: nparts
  1079. end subroutine fstarpu_matrix_filter_vertical_block_shadow
  1080. ! void starpu_vector_filter_block(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
  1081. subroutine fstarpu_vector_filter_block (father_interface,child_interface,filter,id,nparts) &
  1082. bind(C,name="starpu_vector_filter_block")
  1083. use iso_c_binding, only: c_ptr
  1084. type(c_ptr), value, intent(in) :: father_interface
  1085. type(c_ptr), value, intent(in) :: child_interface
  1086. type(c_ptr), value, intent(in) :: filter
  1087. type(c_ptr), value, intent(in) :: id
  1088. type(c_ptr), value, intent(in) :: nparts
  1089. end subroutine fstarpu_vector_filter_block
  1090. ! void starpu_vector_filter_block_shadow(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
  1091. subroutine fstarpu_vector_filter_block_shadow (father_interface,child_interface,filter,id,nparts) &
  1092. bind(C,name="starpu_vector_filter_block_shadow")
  1093. use iso_c_binding, only: c_ptr
  1094. type(c_ptr), value, intent(in) :: father_interface
  1095. type(c_ptr), value, intent(in) :: child_interface
  1096. type(c_ptr), value, intent(in) :: filter
  1097. type(c_ptr), value, intent(in) :: id
  1098. type(c_ptr), value, intent(in) :: nparts
  1099. end subroutine fstarpu_vector_filter_block_shadow
  1100. ! void starpu_vector_filter_list_long(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
  1101. subroutine fstarpu_vector_filter_list_long (father_interface,child_interface,filter,id,nparts) &
  1102. bind(C,name="starpu_vector_filter_list_long")
  1103. use iso_c_binding, only: c_ptr
  1104. type(c_ptr), value, intent(in) :: father_interface
  1105. type(c_ptr), value, intent(in) :: child_interface
  1106. type(c_ptr), value, intent(in) :: filter
  1107. type(c_ptr), value, intent(in) :: id
  1108. type(c_ptr), value, intent(in) :: nparts
  1109. end subroutine fstarpu_vector_filter_list_long
  1110. ! void starpu_vector_filter_list(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
  1111. subroutine fstarpu_vector_filter_list (father_interface,child_interface,filter,id,nparts) &
  1112. bind(C,name="starpu_vector_filter_list")
  1113. use iso_c_binding, only: c_ptr
  1114. type(c_ptr), value, intent(in) :: father_interface
  1115. type(c_ptr), value, intent(in) :: child_interface
  1116. type(c_ptr), value, intent(in) :: filter
  1117. type(c_ptr), value, intent(in) :: id
  1118. type(c_ptr), value, intent(in) :: nparts
  1119. end subroutine fstarpu_vector_filter_list
  1120. ! void starpu_vector_filter_divide_in_2(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
  1121. subroutine fstarpu_vector_divide_in_2 (father_interface,child_interface,filter,id,nparts) &
  1122. bind(C,name="starpu_vector_divide_in_2")
  1123. use iso_c_binding, only: c_ptr
  1124. type(c_ptr), value, intent(in) :: father_interface
  1125. type(c_ptr), value, intent(in) :: child_interface
  1126. type(c_ptr), value, intent(in) :: filter
  1127. type(c_ptr), value, intent(in) :: id
  1128. type(c_ptr), value, intent(in) :: nparts
  1129. end subroutine fstarpu_vector_divide_in_2
  1130. ! void starpu_block_filter_block(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
  1131. subroutine fstarpu_block_filter_block (father_interface,child_interface,filter,id,nparts) &
  1132. bind(C,name="starpu_block_filter_block")
  1133. use iso_c_binding, only: c_ptr
  1134. type(c_ptr), value, intent(in) :: father_interface
  1135. type(c_ptr), value, intent(in) :: child_interface
  1136. type(c_ptr), value, intent(in) :: filter
  1137. type(c_ptr), value, intent(in) :: id
  1138. type(c_ptr), value, intent(in) :: nparts
  1139. end subroutine fstarpu_block_filter_block
  1140. ! void starpu_block_filter_block_shadow(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
  1141. subroutine fstarpu_block_filter_block_shadow (father_interface,child_interface,filter,id,nparts) &
  1142. bind(C,name="starpu_block_filter_block_shadow")
  1143. use iso_c_binding, only: c_ptr
  1144. type(c_ptr), value, intent(in) :: father_interface
  1145. type(c_ptr), value, intent(in) :: child_interface
  1146. type(c_ptr), value, intent(in) :: filter
  1147. type(c_ptr), value, intent(in) :: id
  1148. type(c_ptr), value, intent(in) :: nparts
  1149. end subroutine fstarpu_block_filter_block_shadow
  1150. ! void starpu_block_filter_vertical_block(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
  1151. subroutine fstarpu_block_filter_vertical_block (father_interface,child_interface,filter,id,nparts) &
  1152. bind(C,name="starpu_block_filter_vertical_block")
  1153. use iso_c_binding, only: c_ptr
  1154. type(c_ptr), value, intent(in) :: father_interface
  1155. type(c_ptr), value, intent(in) :: child_interface
  1156. type(c_ptr), value, intent(in) :: filter
  1157. type(c_ptr), value, intent(in) :: id
  1158. type(c_ptr), value, intent(in) :: nparts
  1159. end subroutine fstarpu_block_filter_vertical_block
  1160. ! void starpu_block_filter_vertical_block_shadow(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
  1161. subroutine fstarpu_block_filter_vertical_block_shadow (father_interface,child_interface,filter,id,nparts) &
  1162. bind(C,name="starpu_block_filter_vertical_block_shadow")
  1163. use iso_c_binding, only: c_ptr
  1164. type(c_ptr), value, intent(in) :: father_interface
  1165. type(c_ptr), value, intent(in) :: child_interface
  1166. type(c_ptr), value, intent(in) :: filter
  1167. type(c_ptr), value, intent(in) :: id
  1168. type(c_ptr), value, intent(in) :: nparts
  1169. end subroutine fstarpu_block_filter_vertical_block_shadow
  1170. ! void starpu_block_filter_depth_block(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
  1171. subroutine fstarpu_block_filter_depth_block (father_interface,child_interface,filter,id,nparts) &
  1172. bind(C,name="starpu_block_filter_depth_block")
  1173. use iso_c_binding, only: c_ptr
  1174. type(c_ptr), value, intent(in) :: father_interface
  1175. type(c_ptr), value, intent(in) :: child_interface
  1176. type(c_ptr), value, intent(in) :: filter
  1177. type(c_ptr), value, intent(in) :: id
  1178. type(c_ptr), value, intent(in) :: nparts
  1179. end subroutine fstarpu_block_filter_depth_block
  1180. ! void starpu_block_filter_depth_block_shadow(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
  1181. subroutine fstarpu_block_filter_depth_block_shadow (father_interface,child_interface,filter,id,nparts) &
  1182. bind(C,name="starpu_block_filter_depth_block_shadow")
  1183. use iso_c_binding, only: c_ptr
  1184. type(c_ptr), value, intent(in) :: father_interface
  1185. type(c_ptr), value, intent(in) :: child_interface
  1186. type(c_ptr), value, intent(in) :: filter
  1187. type(c_ptr), value, intent(in) :: id
  1188. type(c_ptr), value, intent(in) :: nparts
  1189. end subroutine fstarpu_block_filter_depth_block_shadow
  1190. ! == starpu_data.h ==
  1191. ! void starpu_data_unregister(starpu_data_handle_t handle);
  1192. subroutine fstarpu_data_unregister (dh) bind(C,name="starpu_data_unregister")
  1193. use iso_c_binding, only: c_ptr
  1194. type(c_ptr), value, intent(in) :: dh
  1195. end subroutine fstarpu_data_unregister
  1196. ! void starpu_data_unregister_no_coherency(starpu_data_handle_t handle);
  1197. subroutine fstarpu_data_unregister_no_coherency (dh) bind(C,name="starpu_data_unregister_no_coherency")
  1198. use iso_c_binding, only: c_ptr
  1199. type(c_ptr), value, intent(in) :: dh
  1200. end subroutine fstarpu_data_unregister_no_coherency
  1201. ! void starpu_data_unregister_submit(starpu_data_handle_t handle);
  1202. subroutine fstarpu_data_unregister_submit (dh) bind(C,name="starpu_data_unregister_submit")
  1203. use iso_c_binding, only: c_ptr
  1204. type(c_ptr), value, intent(in) :: dh
  1205. end subroutine fstarpu_data_unregister_submit
  1206. ! void starpu_data_invalidate(starpu_data_handle_t handle);
  1207. subroutine fstarpu_data_invalidate (dh) bind(C,name="starpu_data_invalidate")
  1208. use iso_c_binding, only: c_ptr
  1209. type(c_ptr), value, intent(in) :: dh
  1210. end subroutine fstarpu_data_invalidate
  1211. ! void starpu_data_invalidate_submit(starpu_data_handle_t handle);
  1212. subroutine fstarpu_data_invalidate_submit (dh) bind(C,name="starpu_data_invalidate_submit")
  1213. use iso_c_binding, only: c_ptr
  1214. type(c_ptr), value, intent(in) :: dh
  1215. end subroutine fstarpu_data_invalidate_submit
  1216. ! void starpu_data_advise_as_important(starpu_data_handle_t handle, unsigned is_important);
  1217. subroutine fstarpu_data_advise_as_important (dh,is_important) bind(C,name="starpu_data_advise_as_important")
  1218. use iso_c_binding, only: c_ptr,c_int
  1219. type(c_ptr), value, intent(in) :: dh
  1220. integer(c_int), value, intent(in) :: is_important
  1221. end subroutine fstarpu_data_advise_as_important
  1222. ! starpu_data_acquire: see fstarpu_data_acquire
  1223. subroutine fstarpu_data_acquire (dh, mode) bind(C)
  1224. use iso_c_binding, only: c_ptr
  1225. type(c_ptr), value, intent(in) :: dh
  1226. type(c_ptr), value, intent(in) :: mode ! C function expects an intptr_t
  1227. end subroutine fstarpu_data_acquire
  1228. ! int starpu_data_acquire_on_node(starpu_data_handle_t handle, int node, enum starpu_data_access_mode mode);
  1229. ! int starpu_data_acquire_cb(starpu_data_handle_t handle, enum starpu_data_access_mode mode, void (*callback)(void *), void *arg);
  1230. ! int starpu_data_acquire_on_node_cb(starpu_data_handle_t handle, int node, enum starpu_data_access_mode mode, void (*callback)(void *), void *arg);
  1231. ! int starpu_data_acquire_cb_sequential_consistency(starpu_data_handle_t handle, enum starpu_data_access_mode mode, void (*callback)(void *), void *arg, int sequential_consistency);
  1232. ! int starpu_data_acquire_on_node_cb_sequential_consistency(starpu_data_handle_t handle, int node, enum starpu_data_access_mode mode, void (*callback)(void *), void *arg, int sequential_consistency);
  1233. ! void starpu_data_release(starpu_data_handle_t handle);
  1234. subroutine fstarpu_data_release (dh) bind(C,name="starpu_data_release")
  1235. use iso_c_binding, only: c_ptr
  1236. type(c_ptr), value, intent(in) :: dh
  1237. end subroutine fstarpu_data_release
  1238. ! void starpu_data_release_on_node(starpu_data_handle_t handle, int node);
  1239. subroutine fstarpu_data_release_on_node (dh, node) bind(C,name="starpu_data_release_on_node")
  1240. use iso_c_binding, only: c_ptr, c_int
  1241. type(c_ptr), value, intent(in) :: dh
  1242. integer(c_int), value, intent(in) :: node
  1243. end subroutine fstarpu_data_release_on_node
  1244. ! starpu_arbiter_t starpu_arbiter_create(void) STARPU_ATTRIBUTE_MALLOC;
  1245. function fstarpu_arbiter_create () bind(C,name="starpu_arbiter_create")
  1246. use iso_c_binding, only: c_ptr
  1247. type(c_ptr) :: fstarpu_arbiter_create
  1248. end function fstarpu_arbiter_create
  1249. ! void starpu_data_assign_arbiter(starpu_data_handle_t handle, starpu_arbiter_t arbiter);
  1250. subroutine fstarpu_data_assign_arbiter (dh,arbiter) bind(C,name="starpu_data_assign_arbiter")
  1251. use iso_c_binding, only: c_ptr
  1252. type(c_ptr), intent(out) :: dh
  1253. type(c_ptr), value, intent(in) :: arbiter
  1254. end subroutine fstarpu_data_assign_arbiter
  1255. ! void starpu_arbiter_destroy(starpu_arbiter_t arbiter);
  1256. subroutine fstarpu_data_arbiter_destroy (arbiter) bind(C,name="starpu_data_arbiter_destroy")
  1257. use iso_c_binding, only: c_ptr
  1258. type(c_ptr), value, intent(in) :: arbiter
  1259. end subroutine fstarpu_data_arbiter_destroy
  1260. ! void starpu_data_display_memory_stats();
  1261. subroutine fstarpu_display_memory_stats() bind(C,name="starpu_display_memory_stats")
  1262. end subroutine fstarpu_display_memory_stats
  1263. ! int starpu_data_request_allocation(starpu_data_handle_t handle, unsigned node);
  1264. subroutine fstarpu_data_request_allocation (dh, node) &
  1265. bind(C,name="starpu_data_request_allocation")
  1266. use iso_c_binding, only: c_ptr, c_int
  1267. type(c_ptr), value, intent(in) :: dh
  1268. integer(c_int), value, intent(in) :: node
  1269. end subroutine fstarpu_data_request_allocation
  1270. ! int starpu_data_fetch_on_node(starpu_data_handle_t handle, unsigned node, unsigned async);
  1271. subroutine fstarpu_data_fetch_on_node (dh, node, async) &
  1272. bind(C,name="starpu_data_fetch_on_node")
  1273. use iso_c_binding, only: c_ptr, c_int
  1274. type(c_ptr), value, intent(in) :: dh
  1275. integer(c_int), value, intent(in) :: node
  1276. integer(c_int), value, intent(in) :: async
  1277. end subroutine fstarpu_data_fetch_on_node
  1278. ! int starpu_data_prefetch_on_node(starpu_data_handle_t handle, unsigned node, unsigned async);
  1279. subroutine fstarpu_data_prefetch_on_node (dh, node, async) &
  1280. bind(C,name="starpu_data_prefetch_on_node")
  1281. use iso_c_binding, only: c_ptr, c_int
  1282. type(c_ptr), value, intent(in) :: dh
  1283. integer(c_int), value, intent(in) :: node
  1284. integer(c_int), value, intent(in) :: async
  1285. end subroutine fstarpu_data_prefetch_on_node
  1286. ! int starpu_data_prefetch_on_node_prio(starpu_data_handle_t handle, unsigned node, unsigned async, int prio);
  1287. subroutine fstarpu_data_prefetch_on_node_prio (dh, node, async, prio) &
  1288. bind(C,name="starpu_data_prefetch_on_node_prio")
  1289. use iso_c_binding, only: c_ptr, c_int
  1290. type(c_ptr), value, intent(in) :: dh
  1291. integer(c_int), value, intent(in) :: node
  1292. integer(c_int), value, intent(in) :: async
  1293. integer(c_int), value, intent(in) :: prio
  1294. end subroutine fstarpu_data_prefetch_on_node_prio
  1295. ! int starpu_data_idle_prefetch_on_node(starpu_data_handle_t handle, unsigned node, unsigned async);
  1296. subroutine fstarpu_data_idle_prefetch_on_node (dh, node, async) &
  1297. bind(C,name="starpu_data_idle_prefetch_on_node")
  1298. use iso_c_binding, only: c_ptr, c_int
  1299. type(c_ptr), value, intent(in) :: dh
  1300. integer(c_int), value, intent(in) :: node
  1301. integer(c_int), value, intent(in) :: async
  1302. end subroutine fstarpu_data_idle_prefetch_on_node
  1303. ! int starpu_data_idle_prefetch_on_node_prio(starpu_data_handle_t handle, unsigned node, unsigned async, int prio);
  1304. subroutine fstarpu_data_idle_prefetch_on_node_prio (dh, node, async, prio) &
  1305. bind(C,name="starpu_data_idle_prefetch_on_node_prio")
  1306. use iso_c_binding, only: c_ptr, c_int
  1307. type(c_ptr), value, intent(in) :: dh
  1308. integer(c_int), value, intent(in) :: node
  1309. integer(c_int), value, intent(in) :: async
  1310. integer(c_int), value, intent(in) :: prio
  1311. end subroutine fstarpu_data_idle_prefetch_on_node_prio
  1312. ! void starpu_data_wont_use(starpu_data_handle_t handle);
  1313. subroutine fstarpu_data_wont_use (dh) bind(c,name="starpu_data_wont_use")
  1314. use iso_c_binding, only: c_ptr
  1315. type(c_ptr), value, intent(in) :: dh
  1316. end subroutine fstarpu_data_wont_use
  1317. ! unsigned starpu_worker_get_memory_node(unsigned workerid);
  1318. function fstarpu_worker_get_memory_node(id) bind(C,name="starpu_worker_get_memory_node")
  1319. use iso_c_binding, only: c_int
  1320. integer(c_int) :: fstarpu_worker_get_memory_node
  1321. integer(c_int), value, intent(in) :: id
  1322. end function fstarpu_worker_get_memory_node
  1323. ! unsigned starpu_memory_nodes_get_count(void);
  1324. function fstarpu_memory_nodes_get_count() bind(C,name="starpu_memory_nodes_get_count")
  1325. use iso_c_binding, only: c_int
  1326. integer(c_int) :: fstarpu_memory_nodes_get_count
  1327. end function fstarpu_memory_nodes_get_count
  1328. ! enum starpu_node_kind starpu_node_get_kind(unsigned node);
  1329. ! void starpu_data_set_wt_mask(starpu_data_handle_t handle, uint32_t wt_mask);
  1330. ! void starpu_data_set_sequential_consistency_flag(starpu_data_handle_t handle, unsigned flag);
  1331. ! unsigned starpu_data_get_sequential_consistency_flag(starpu_data_handle_t handle);
  1332. ! unsigned starpu_data_get_default_sequential_consistency_flag(void);
  1333. ! void starpu_data_set_default_sequential_consistency_flag(unsigned flag);
  1334. ! void starpu_data_query_status(starpu_data_handle_t handle, int memory_node, int *is_allocated, int *is_valid, int *is_requested);
  1335. ! void starpu_data_set_reduction_methods(starpu_data_handle_t handle, struct starpu_codelet *redux_cl, struct starpu_codelet *init_cl);
  1336. subroutine fstarpu_data_set_reduction_methods (dh,redux_cl,init_cl) bind(C,name="starpu_data_set_reduction_methods")
  1337. use iso_c_binding, only: c_ptr
  1338. type(c_ptr), value, intent(in) :: dh
  1339. type(c_ptr), value, intent(in) :: redux_cl
  1340. type(c_ptr), value, intent(in) :: init_cl
  1341. end subroutine fstarpu_data_set_reduction_methods
  1342. ! struct starpu_data_interface_ops* starpu_data_get_interface_ops(starpu_data_handle_t handle);
  1343. ! unsigned starpu_data_test_if_allocated_on_node(starpu_data_handle_t handle, unsigned memory_node);
  1344. function fstarpu_data_test_if_allocated_on_node(dh,mem_node) bind(C,name="starpu_data_test_if_allocated_on_node")
  1345. use iso_c_binding, only: c_ptr, c_int
  1346. integer(c_int) :: fstarpu_data_test_if_allocated_on_node
  1347. type(c_ptr), value, intent(in) :: dh
  1348. integer(c_int), value, intent(in) :: mem_node
  1349. end function fstarpu_data_test_if_allocated_on_node
  1350. ! void starpu_memchunk_tidy(unsigned memory_node);
  1351. subroutine fstarpu_memchunk_tidy (mem_node) bind(c,name="starpu_memchunk_tidy")
  1352. use iso_c_binding, only: c_int
  1353. integer(c_int), value, intent(in) :: mem_node
  1354. end subroutine fstarpu_memchunk_tidy
  1355. ! == starpu_task_util.h ==
  1356. ! starpu_data_handle_t *fstarpu_data_handle_array_alloc(int nb);
  1357. function fstarpu_data_handle_array_alloc (nb) bind(C)
  1358. use iso_c_binding, only: c_ptr, c_int
  1359. type(c_ptr) :: fstarpu_data_handle_array_alloc
  1360. integer(c_int), value, intent(in) :: nb
  1361. end function fstarpu_data_handle_array_alloc
  1362. ! void fstarpu_data_handle_array_free(starpu_data_handle_t *handles);
  1363. subroutine fstarpu_data_handle_array_free (handles) bind(C)
  1364. use iso_c_binding, only: c_ptr
  1365. type(c_ptr), value, intent(in) :: handles
  1366. end subroutine fstarpu_data_handle_array_free
  1367. ! void fstarpu_data_handle_array_set(starpu_data_handle_t *handles, int i, starpu_data_handle_t handle);
  1368. subroutine fstarpu_data_handle_array_set (handles, i, handle) bind(C)
  1369. use iso_c_binding, only: c_ptr, c_int
  1370. type(c_ptr), value, intent(in) :: handles
  1371. integer(c_int), value, intent(in) :: i
  1372. type(c_ptr), value, intent(in) :: handle
  1373. end subroutine fstarpu_data_handle_array_set
  1374. ! struct starpu_data_descr *fstarpu_data_descr_array_alloc(int nb);
  1375. function fstarpu_data_descr_array_alloc (nb) bind(C)
  1376. use iso_c_binding, only: c_ptr, c_int
  1377. type(c_ptr) :: fstarpu_data_descr_array_alloc
  1378. integer(c_int), value, intent(in) :: nb
  1379. end function fstarpu_data_descr_array_alloc
  1380. ! struct starpu_data_descr *fstarpu_data_descr_alloc(void);
  1381. function fstarpu_data_descr_alloc (nb) bind(C)
  1382. use iso_c_binding, only: c_ptr
  1383. type(c_ptr) :: fstarpu_data_descr_alloc
  1384. end function fstarpu_data_descr_alloc
  1385. ! void fstarpu_data_descr_array_free(struct starpu_data_descr *descrs);
  1386. subroutine fstarpu_data_descr_array_free (descrs) bind(C)
  1387. use iso_c_binding, only: c_ptr
  1388. type(c_ptr), value, intent(in) :: descrs
  1389. end subroutine fstarpu_data_descr_array_free
  1390. ! void fstarpu_data_descr_free(struct starpu_data_descr *descr);
  1391. subroutine fstarpu_data_descrg_free (descr) bind(C)
  1392. use iso_c_binding, only: c_ptr
  1393. type(c_ptr), value, intent(in) :: descr
  1394. end subroutine fstarpu_data_descrg_free
  1395. ! void fstarpu_data_descr_array_set(struct starpu_data_descr *descrs, int i, starpu_data_handle_t handle, intptr_t mode);
  1396. subroutine fstarpu_data_descr_array_set (descrs, i, handle, mode) bind(C)
  1397. use iso_c_binding, only: c_ptr, c_int, c_intptr_t
  1398. type(c_ptr), value, intent(in) :: descrs
  1399. integer(c_int), value, intent(in) :: i
  1400. type(c_ptr), value, intent(in) :: handle
  1401. type(c_ptr), value, intent(in) :: mode ! C func expects c_intptr_t
  1402. end subroutine fstarpu_data_descr_array_set
  1403. ! void fstarpu_data_descr_set(struct starpu_data_descr *descr, starpu_data_handle_t handle, intptr_t mode);
  1404. subroutine fstarpu_data_descr_set (descr, handle, mode) bind(C)
  1405. use iso_c_binding, only: c_ptr, c_intptr_t
  1406. type(c_ptr), value, intent(in) :: descr
  1407. type(c_ptr), value, intent(in) :: handle
  1408. type(c_ptr), value, intent(in) :: mode ! C func expects c_intptr_t
  1409. end subroutine fstarpu_data_descr_set
  1410. subroutine fstarpu_task_insert(arglist) bind(C)
  1411. use iso_c_binding, only: c_ptr
  1412. type(c_ptr), dimension(*), intent(in) :: arglist
  1413. end subroutine fstarpu_task_insert
  1414. subroutine fstarpu_insert_task(arglist) bind(C,name="fstarpu_task_insert")
  1415. use iso_c_binding, only: c_ptr
  1416. type(c_ptr), dimension(*), intent(in) :: arglist
  1417. end subroutine fstarpu_insert_task
  1418. subroutine fstarpu_unpack_arg(cl_arg,bufferlist) bind(C)
  1419. use iso_c_binding, only: c_ptr
  1420. type(c_ptr), value, intent(in) :: cl_arg
  1421. type(c_ptr), dimension(*), intent(in) :: bufferlist
  1422. end subroutine fstarpu_unpack_arg
  1423. ! == starpu_sched_ctx.h ==
  1424. ! starpu_sched_ctx_create: see fstarpu_sched_ctx_create
  1425. function fstarpu_sched_ctx_create(workers_array,nworkers,ctx_name, arglist) bind(C)
  1426. use iso_c_binding, only: c_int, c_char, c_ptr
  1427. integer(c_int) :: fstarpu_sched_ctx_create
  1428. integer(c_int), intent(in) :: workers_array(*)
  1429. integer(c_int), value, intent(in) :: nworkers
  1430. character(c_char), intent(in) :: ctx_name
  1431. type(c_ptr), dimension(*), intent(in) :: arglist
  1432. end function fstarpu_sched_ctx_create
  1433. ! unsigned starpu_sched_ctx_create_inside_interval(const char *policy_name, const char *sched_ctx_name, int min_ncpus, int max_ncpus, int min_ngpus, int max_ngpus, unsigned allow_overlap);
  1434. function fstarpu_sched_ctx_create_inside_interval(policy_name, sched_ctx_name, &
  1435. min_ncpus, max_ncpus, min_ngpus, max_ngpus, allow_overlap) &
  1436. bind(C,name="starpu_sched_ctx_create_inside_interval")
  1437. use iso_c_binding, only: c_int, c_char
  1438. integer(c_int) :: fstarpu_sched_ctx_create_inside_interval
  1439. character(c_char), intent(in) :: policy_name
  1440. character(c_char), intent(in) :: sched_ctx_name
  1441. integer(c_int), value, intent(in) :: min_ncpus
  1442. integer(c_int), value, intent(in) :: max_ncpus
  1443. integer(c_int), value, intent(in) :: min_ngpus
  1444. integer(c_int), value, intent(in) :: max_ngpus
  1445. integer(c_int), value, intent(in) :: allow_overlap
  1446. end function fstarpu_sched_ctx_create_inside_interval
  1447. ! void starpu_sched_ctx_register_close_callback(unsigned sched_ctx_id, void (*close_callback)(unsigned sched_ctx_id, void* args), void *args);
  1448. subroutine fstarpu_sched_ctx_register_close_callback (sched_ctx_id, close_callback, args) &
  1449. bind(c,name="starpu_sched_ctx_register_close_callback")
  1450. use iso_c_binding, only: c_ptr, c_funptr, c_int
  1451. integer(c_int), value, intent(in) :: sched_ctx_id
  1452. type(c_funptr), value, intent(in) :: close_callback
  1453. type(c_ptr), value, intent(in) :: args
  1454. end subroutine fstarpu_sched_ctx_register_close_callback
  1455. ! void starpu_sched_ctx_add_workers(int *workerids_ctx, int nworkers_ctx, unsigned sched_ctx_id);
  1456. subroutine fstarpu_sched_ctx_add_workers(workerids,nworkers,ctx) bind(C,name="starpu_sched_ctx_add_workers")
  1457. use iso_c_binding, only: c_int
  1458. integer(c_int), intent(in) :: workerids (*)
  1459. integer(c_int), value, intent(in) :: nworkers
  1460. integer(c_int), value, intent(in) :: ctx
  1461. end subroutine fstarpu_sched_ctx_add_workers
  1462. ! void starpu_sched_ctx_remove_workers(int *workerids_ctx, int nworkers_ctx, unsigned sched_ctx_id);
  1463. subroutine fstarpu_sched_ctx_remove_workers(workerids,nworkers,ctx) bind(C,name="starpu_sched_ctx_remove_workers")
  1464. use iso_c_binding, only: c_int
  1465. integer(c_int), intent(in) :: workerids (*)
  1466. integer(c_int), value, intent(in) :: nworkers
  1467. integer(c_int), value, intent(in) :: ctx
  1468. end subroutine fstarpu_sched_ctx_remove_workers
  1469. ! starpu_sched_ctx_display_workers: see fstarpu_sched_ctx_display_workers
  1470. subroutine fstarpu_sched_ctx_display_workers (ctx) bind(C)
  1471. use iso_c_binding, only: c_int
  1472. integer(c_int), value, intent(in) :: ctx
  1473. end subroutine fstarpu_sched_ctx_display_workers
  1474. ! void starpu_sched_ctx_delete(unsigned sched_ctx_id);
  1475. subroutine fstarpu_sched_ctx_delete (ctx) bind(C,name="starpu_sched_ctx_delete")
  1476. use iso_c_binding, only: c_int
  1477. integer(c_int), value, intent(in) :: ctx
  1478. end subroutine fstarpu_sched_ctx_delete
  1479. ! void starpu_sched_ctx_set_inheritor(unsigned sched_ctx_id, unsigned inheritor);
  1480. subroutine fstarpu_sched_ctx_set_inheritor (ctx,inheritor) bind(C,name="starpu_sched_ctx_set_inheritor")
  1481. use iso_c_binding, only: c_int
  1482. integer(c_int), value, intent(in) :: ctx
  1483. integer(c_int), value, intent(in) :: inheritor
  1484. end subroutine fstarpu_sched_ctx_set_inheritor
  1485. ! unsigned starpu_sched_ctx_get_inheritor(unsigned sched_ctx_id);
  1486. function fstarpu_sched_ctx_get_inheritor (ctx) bind(C,name="starpu_sched_ctx_get_inheritor")
  1487. use iso_c_binding, only: c_int
  1488. integer(c_int) :: fstarpu_sched_ctx_get_inheritor
  1489. integer(c_int), value, intent(in) :: ctx
  1490. end function fstarpu_sched_ctx_get_inheritor
  1491. ! unsigned starpu_sched_ctx_get_hierarchy_level(unsigned sched_ctx_id);
  1492. function fstarpu_sched_ctx_get_hierarchy_level (ctx) bind(C,name="starpu_sched_ctx_get_hierarchy_level")
  1493. use iso_c_binding, only: c_int
  1494. integer(c_int) :: fstarpu_sched_ctx_get_hierarchy_level
  1495. integer(c_int), value, intent(in) :: ctx
  1496. end function fstarpu_sched_ctx_get_hierarchy_level
  1497. ! void starpu_sched_ctx_set_context(unsigned *sched_ctx_id);
  1498. subroutine fstarpu_sched_ctx_set_context (ctx_ptr) bind(C,name="starpu_sched_ctx_set_context")
  1499. use iso_c_binding, only: c_ptr
  1500. type(c_ptr), value, intent(in) :: ctx_ptr
  1501. end subroutine fstarpu_sched_ctx_set_context
  1502. ! unsigned starpu_sched_ctx_get_context(void);
  1503. function fstarpu_sched_ctx_get_context () bind(C,name="starpu_sched_ctx_get_context")
  1504. use iso_c_binding, only: c_int
  1505. integer(c_int) :: fstarpu_sched_ctx_get_context
  1506. end function fstarpu_sched_ctx_get_context
  1507. ! void starpu_sched_ctx_stop_task_submission(void);
  1508. subroutine fstarpu_sched_ctx_stop_task_submission () bind(c,name="starpu_sched_ctx_stop_task_submission")
  1509. use iso_c_binding
  1510. end subroutine fstarpu_sched_ctx_stop_task_submission
  1511. ! void starpu_sched_ctx_finished_submit(unsigned sched_ctx_id);
  1512. subroutine fstarpu_sched_ctx_finished_submit (sched_ctx_id) bind(c,name="starpu_sched_ctx_finished_submit")
  1513. use iso_c_binding, only: c_int
  1514. integer(c_int), value, intent(in) :: sched_ctx_id
  1515. end subroutine fstarpu_sched_ctx_finished_submit
  1516. ! unsigned starpu_sched_ctx_get_workers_list(unsigned sched_ctx_id, int **workerids);
  1517. ! unsigned starpu_sched_ctx_get_workers_list_raw(unsigned sched_ctx_id, int **workerids);
  1518. ! unsigned starpu_sched_ctx_get_nworkers(unsigned sched_ctx_id);
  1519. function fstarpu_sched_ctx_get_nworkers (sched_ctx_id) &
  1520. bind(c,name="starpu_sched_ctx_get_nworkers")
  1521. use iso_c_binding, only: c_int
  1522. integer(c_int) :: fstarpu_sched_ctx_get_nworkers
  1523. integer(c_int), value, intent(in) :: sched_ctx_id
  1524. end function fstarpu_sched_ctx_get_nworkers
  1525. ! unsigned starpu_sched_ctx_get_nshared_workers(unsigned sched_ctx_id, unsigned sched_ctx_id2);
  1526. function fstarpu_sched_ctx_get_nshared_workers (sched_ctx_id, sched_ctx_id2) &
  1527. bind(c,name="starpu_sched_ctx_get_nshared_workers")
  1528. use iso_c_binding, only: c_int
  1529. integer(c_int) :: fstarpu_sched_ctx_get_nshared_workers
  1530. integer(c_int), value, intent(in) :: sched_ctx_id
  1531. integer(c_int), value, intent(in) :: sched_ctx_id2
  1532. end function fstarpu_sched_ctx_get_nshared_workers
  1533. ! unsigned starpu_sched_ctx_contains_worker(int workerid, unsigned sched_ctx_id);
  1534. function fstarpu_sched_ctx_contains_worker (workerid, sched_ctx_id) &
  1535. bind(c,name="starpu_sched_ctx_contains_worker")
  1536. use iso_c_binding, only: c_int
  1537. integer(c_int) :: fstarpu_sched_ctx_contains_worker
  1538. integer(c_int), value, intent(in) :: workerid
  1539. integer(c_int), value, intent(in) :: sched_ctx_id
  1540. end function fstarpu_sched_ctx_contains_worker
  1541. ! unsigned starpu_sched_ctx_contains_type_of_worker(enum starpu_worker_archtype arch, unsigned sched_ctx_id);
  1542. function fstarpu_sched_ctx_contains_type_of_worker (arch, sched_ctx_id) &
  1543. bind(c,name="starpu_sched_ctx_contains_type_of_worker")
  1544. use iso_c_binding, only: c_int
  1545. integer(c_int) :: fstarpu_sched_ctx_contains_type_of_worker
  1546. integer(c_int), value, intent(in) :: arch
  1547. integer(c_int), value, intent(in) :: sched_ctx_id
  1548. end function fstarpu_sched_ctx_contains_type_of_worker
  1549. ! unsigned starpu_sched_ctx_worker_get_id(unsigned sched_ctx_id);
  1550. function fstarpu_sched_ctx_worker_get_id (sched_ctx_id) &
  1551. bind(c,name="starpu_sched_ctx_worker_get_id")
  1552. use iso_c_binding, only: c_int
  1553. integer(c_int) :: fstarpu_sched_ctx_worker_get_id
  1554. integer(c_int), value, intent(in) :: sched_ctx_id
  1555. end function fstarpu_sched_ctx_worker_get_id
  1556. ! unsigned starpu_sched_ctx_get_ctx_for_task(struct starpu_task *task);
  1557. function fstarpu_sched_ctx_get_ctx_for_task (task) &
  1558. bind(c,name="starpu_sched_ctx_get_ctx_for_task")
  1559. use iso_c_binding, only: c_int, c_ptr
  1560. integer(c_int) :: fstarpu_sched_ctx_get_ctx_for_task
  1561. type(c_ptr), value, intent(in) :: task
  1562. end function fstarpu_sched_ctx_get_ctx_for_task
  1563. ! unsigned starpu_sched_ctx_overlapping_ctxs_on_worker(int workerid);
  1564. function fstarpu_sched_ctx_overlapping_ctxs_on_worker (workerid) &
  1565. bind(c,name="starpu_sched_ctx_overlapping_ctxs_on_worker")
  1566. use iso_c_binding, only: c_int
  1567. integer(c_int) :: fstarpu_sched_ctx_overlapping_ctxs_on_worker
  1568. integer(c_int), value, intent(in) :: workerid
  1569. end function fstarpu_sched_ctx_overlapping_ctxs_on_worker
  1570. ! int starpu_sched_get_min_priority(void);
  1571. function fstarpu_sched_get_min_priority () &
  1572. bind(c,name="starpu_sched_get_min_priority")
  1573. use iso_c_binding, only: c_int
  1574. integer(c_int) :: fstarpu_sched_get_min_priority
  1575. end function fstarpu_sched_get_min_priority
  1576. ! int starpu_sched_get_max_priority(void);
  1577. function fstarpu_sched_get_max_priority () &
  1578. bind(c,name="starpu_sched_get_max_priority")
  1579. use iso_c_binding, only: c_int
  1580. integer(c_int) :: fstarpu_sched_get_max_priority
  1581. end function fstarpu_sched_get_max_priority
  1582. ! int starpu_sched_set_min_priority(int min_prio);
  1583. function fstarpu_sched_set_min_priority (min_prio) &
  1584. bind(c,name="starpu_sched_set_min_priority")
  1585. use iso_c_binding, only: c_int
  1586. integer(c_int) :: fstarpu_sched_set_min_priority
  1587. integer(c_int), value, intent(in) :: min_prio
  1588. end function fstarpu_sched_set_min_priority
  1589. ! int starpu_sched_set_max_priority(int max_prio);
  1590. function fstarpu_sched_set_max_priority (max_prio) &
  1591. bind(c,name="starpu_sched_set_max_priority")
  1592. use iso_c_binding, only: c_int
  1593. integer(c_int) :: fstarpu_sched_set_max_priority
  1594. integer(c_int), value, intent(in) :: max_prio
  1595. end function fstarpu_sched_set_max_priority
  1596. ! int starpu_sched_ctx_get_min_priority(unsigned sched_ctx_id);
  1597. function fstarpu_sched_ctx_get_min_priority (sched_ctx_id) &
  1598. bind(c,name="starpu_sched_ctx_get_min_priority")
  1599. use iso_c_binding, only: c_int
  1600. integer(c_int) :: fstarpu_sched_ctx_get_min_priority
  1601. integer(c_int), value, intent(in) :: sched_ctx_id
  1602. end function fstarpu_sched_ctx_get_min_priority
  1603. ! int starpu_sched_ctx_get_max_priority(unsigned sched_ctx_id);
  1604. function fstarpu_sched_ctx_get_max_priority (sched_ctx_id) &
  1605. bind(c,name="starpu_sched_ctx_get_max_priority")
  1606. use iso_c_binding, only: c_int
  1607. integer(c_int) :: fstarpu_sched_ctx_get_max_priority
  1608. integer(c_int), value, intent(in) :: sched_ctx_id
  1609. end function fstarpu_sched_ctx_get_max_priority
  1610. ! int starpu_sched_ctx_set_min_priority(unsigned sched_ctx_id, int min_prio);
  1611. function fstarpu_sched_ctx_set_min_priority (sched_ctx_id, min_prio) &
  1612. bind(c,name="starpu_sched_ctx_set_min_priority")
  1613. use iso_c_binding, only: c_int
  1614. integer(c_int) :: fstarpu_sched_ctx_set_min_priority
  1615. integer(c_int), value, intent(in) :: sched_ctx_id
  1616. integer(c_int), value, intent(in) :: min_prio
  1617. end function fstarpu_sched_ctx_set_min_priority
  1618. ! int starpu_sched_ctx_set_max_priority(unsigned sched_ctx_id, int max_prio);
  1619. function fstarpu_sched_ctx_set_max_priority (sched_ctx_id, max_prio) &
  1620. bind(c,name="starpu_sched_ctx_set_max_priority")
  1621. use iso_c_binding, only: c_int
  1622. integer(c_int) :: fstarpu_sched_ctx_set_max_priority
  1623. integer(c_int), value, intent(in) :: sched_ctx_id
  1624. integer(c_int), value, intent(in) :: max_prio
  1625. end function fstarpu_sched_ctx_set_max_priority
  1626. ! int starpu_sched_ctx_min_priority_is_set(unsigned sched_ctx_id);
  1627. function fstarpu_sched_ctx_min_priority_is_set (sched_ctx_id) &
  1628. bind(c,name="starpu_sched_ctx_min_priority_is_set")
  1629. use iso_c_binding, only: c_int
  1630. integer(c_int) :: fstarpu_sched_ctx_min_priority_is_set
  1631. integer(c_int), value, intent(in) :: sched_ctx_id
  1632. end function fstarpu_sched_ctx_min_priority_is_set
  1633. ! int starpu_sched_ctx_max_priority_is_set(unsigned sched_ctx_id);
  1634. function fstarpu_sched_ctx_max_priority_is_set (sched_ctx_id) &
  1635. bind(c,name="starpu_sched_ctx_max_priority_is_set")
  1636. use iso_c_binding, only: c_int
  1637. integer(c_int) :: fstarpu_sched_ctx_max_priority_is_set
  1638. integer(c_int), value, intent(in) :: sched_ctx_id
  1639. end function fstarpu_sched_ctx_max_priority_is_set
  1640. ! void *starpu_sched_ctx_get_user_data(unsigned sched_ctx_id);
  1641. function fstarpu_sched_ctx_get_user_data(sched_ctx_id) &
  1642. bind(c,name="starpu_sched_ctx_get_user_data")
  1643. use iso_c_binding, only: c_int, c_ptr
  1644. integer(c_int), value, intent(in) :: sched_ctx_id
  1645. type(c_ptr) :: fstarpu_sched_ctx_get_user_data
  1646. end function fstarpu_sched_ctx_get_user_data
  1647. ! struct starpu_worker_collection *starpu_sched_ctx_create_worker_collection(unsigned sched_ctx_id, enum starpu_worker_collection_type type) STARPU_ATTRIBUTE_MALLOC;
  1648. ! void starpu_sched_ctx_delete_worker_collection(unsigned sched_ctx_id);
  1649. subroutine fstarpu_sched_ctx_delete_worker_collection (sched_ctx_id) &
  1650. bind(c,name="starpu_sched_ctx_delete_worker_collection")
  1651. use iso_c_binding, only: c_int
  1652. integer(c_int), value, intent(in) :: sched_ctx_id
  1653. end subroutine fstarpu_sched_ctx_delete_worker_collection
  1654. ! struct starpu_worker_collection *starpu_sched_ctx_get_worker_collection(unsigned sched_ctx_id);
  1655. ! void starpu_sched_ctx_set_policy_data(unsigned sched_ctx_id, void *policy_data);
  1656. subroutine fstarpu_sched_ctx_set_policy_data (sched_ctx_id, policy_data) &
  1657. bind(c,name="starpu_sched_ctx_set_policy_data")
  1658. use iso_c_binding, only: c_int, c_ptr
  1659. integer(c_int), value, intent(in) :: sched_ctx_id
  1660. type(c_ptr), value, intent(in) :: policy_data
  1661. end subroutine fstarpu_sched_ctx_set_policy_data
  1662. ! void *starpu_sched_ctx_get_policy_data(unsigned sched_ctx_id);
  1663. function fstarpu_sched_ctx_get_policy_data (sched_ctx_id) &
  1664. bind(c,name="starpu_sched_ctx_get_policy_data")
  1665. use iso_c_binding, only: c_int, c_ptr
  1666. type(c_ptr) :: fstarpu_sched_ctx_get_policy_data
  1667. integer(c_int), value, intent(in) :: sched_ctx_id
  1668. end function fstarpu_sched_ctx_get_policy_data
  1669. ! void *starpu_sched_ctx_exec_parallel_code(void* (*func)(void*), void *param, unsigned sched_ctx_id);
  1670. function fstarpu_sched_ctx_exec_parallel_code (func, param, sched_ctx_id) &
  1671. bind(c,name="starpu_sched_ctx_exec_parallel_code")
  1672. use iso_c_binding, only: c_int, c_funptr, c_ptr
  1673. type(c_ptr) :: fstarpu_sched_ctx_exec_parallel_code
  1674. type(c_funptr), value, intent(in) :: func
  1675. type(c_ptr), value, intent(in) :: param
  1676. integer(c_int), value, intent(in) :: sched_ctx_id
  1677. end function fstarpu_sched_ctx_exec_parallel_code
  1678. ! int starpu_sched_ctx_get_nready_tasks(unsigned sched_ctx_id);
  1679. function fstarpu_sched_ctx_get_nready_tasks (sched_ctx_id) &
  1680. bind(c,name="starpu_sched_ctx_get_nready_tasks")
  1681. use iso_c_binding, only: c_int
  1682. integer(c_int) :: fstarpu_sched_ctx_get_nready_tasks
  1683. integer(c_int), value, intent(in) :: sched_ctx_id
  1684. end function fstarpu_sched_ctx_get_nready_tasks
  1685. ! double starpu_sched_ctx_get_nready_flops(unsigned sched_ctx_id);
  1686. function fstarpu_sched_ctx_get_nready_flops (sched_ctx_id) &
  1687. bind(c,name="starpu_sched_ctx_get_nready_flops")
  1688. use iso_c_binding, only: c_int, c_double
  1689. real(c_double) :: fstarpu_sched_ctx_get_nready_flops
  1690. integer(c_int), value, intent(in) :: sched_ctx_id
  1691. end function fstarpu_sched_ctx_get_nready_flops
  1692. ! void starpu_sched_ctx_list_task_counters_increment(unsigned sched_ctx_id, int workerid);
  1693. subroutine fstarpu_sched_ctx_list_task_counters_increment (sched_ctx_id, workerid) &
  1694. bind(c,name="starpu_sched_ctx_list_task_counters_increment")
  1695. use iso_c_binding, only: c_int
  1696. integer(c_int), value, intent(in) :: sched_ctx_id
  1697. integer(c_int), value, intent(in) :: workerid
  1698. end subroutine fstarpu_sched_ctx_list_task_counters_increment
  1699. ! void starpu_sched_ctx_list_task_counters_decrement(unsigned sched_ctx_id, int workerid);
  1700. subroutine fstarpu_sched_ctx_list_task_counters_decrement (sched_ctx_id, workerid) &
  1701. bind(c,name="starpu_sched_ctx_list_task_counters_decrement")
  1702. use iso_c_binding, only: c_int
  1703. integer(c_int), value, intent(in) :: sched_ctx_id
  1704. integer(c_int), value, intent(in) :: workerid
  1705. end subroutine fstarpu_sched_ctx_list_task_counters_decrement
  1706. ! void starpu_sched_ctx_list_task_counters_reset(unsigned sched_ctx_id, int workerid);
  1707. subroutine fstarpu_sched_ctx_list_task_counters_reset (sched_ctx_id, workerid) &
  1708. bind(c,name="starpu_sched_ctx_list_task_counters_reset")
  1709. use iso_c_binding, only: c_int
  1710. integer(c_int), value, intent(in) :: sched_ctx_id
  1711. integer(c_int), value, intent(in) :: workerid
  1712. end subroutine fstarpu_sched_ctx_list_task_counters_reset
  1713. ! void starpu_sched_ctx_list_task_counters_increment_all(struct starpu_task *task, unsigned sched_ctx_id);
  1714. subroutine fstarpu_sched_ctx_list_task_counters_increment_all (task, sched_ctx_id) &
  1715. bind(c,name="starpu_sched_ctx_list_task_counters_increment_all")
  1716. use iso_c_binding, only: c_ptr, c_int
  1717. type(c_ptr), value, intent(in) :: task
  1718. integer(c_int), value, intent(in) :: sched_ctx_id
  1719. end subroutine fstarpu_sched_ctx_list_task_counters_increment_all
  1720. ! void starpu_sched_ctx_list_task_counters_decrement_all(struct starpu_task *task, unsigned sched_ctx_id);
  1721. subroutine fstarpu_sched_ctx_list_task_counters_decrement_all (task, sched_ctx_id) &
  1722. bind(c,name="starpu_sched_ctx_list_task_counters_decrement_all")
  1723. use iso_c_binding, only: c_ptr, c_int
  1724. type(c_ptr), value, intent(in) :: task
  1725. integer(c_int), value, intent(in) :: sched_ctx_id
  1726. end subroutine fstarpu_sched_ctx_list_task_counters_decrement_all
  1727. ! void starpu_sched_ctx_list_task_counters_reset_all(struct starpu_task *task, unsigned sched_ctx_id);
  1728. subroutine fstarpu_sched_ctx_list_task_counters_reset_all (task, sched_ctx_id) &
  1729. bind(c,name="starpu_sched_ctx_list_task_counters_reset_all")
  1730. use iso_c_binding, only: c_ptr, c_int
  1731. type(c_ptr), value, intent(in) :: task
  1732. integer(c_int), value, intent(in) :: sched_ctx_id
  1733. end subroutine fstarpu_sched_ctx_list_task_counters_reset_all
  1734. ! unsigned starpu_sched_ctx_get_priority(int worker, unsigned sched_ctx_id);
  1735. function fstarpu_sched_ctx_get_priority (worker, sched_ctx_id) &
  1736. bind(c,name="starpu_sched_ctx_get_priority")
  1737. use iso_c_binding, only: c_int
  1738. integer(c_int) :: fstarpu_sched_ctx_get_priority
  1739. integer(c_int), value, intent(in) :: worker
  1740. integer(c_int), value, intent(in) :: sched_ctx_id
  1741. end function fstarpu_sched_ctx_get_priority
  1742. ! void starpu_sched_ctx_get_available_cpuids(unsigned sched_ctx_id, int **cpuids, int *ncpuids);
  1743. ! void starpu_sched_ctx_bind_current_thread_to_cpuid(unsigned cpuid);
  1744. subroutine fstarpu_sched_ctx_bind_current_thread_to_cpuid (cpuid) &
  1745. bind(c,name="starpu_sched_ctx_bind_current_thread_to_cpuid")
  1746. use iso_c_binding, only: c_int
  1747. integer(c_int), value, intent(in) :: cpuid
  1748. end subroutine fstarpu_sched_ctx_bind_current_thread_to_cpuid
  1749. ! int starpu_sched_ctx_book_workers_for_task(unsigned sched_ctx_id, int *workerids, int nworkers);
  1750. function fstarpu_sched_ctx_book_workers_for_task (sched_ctx_id, workerids, nworkers) &
  1751. bind(c,name="starpu_sched_ctx_book_workers_for_task")
  1752. use iso_c_binding, only: c_int
  1753. integer(c_int) :: fstarpu_sched_ctx_book_workers_for_task
  1754. integer(c_int), value, intent(in) :: sched_ctx_id
  1755. integer(c_int), intent(in) :: workerids(*)
  1756. integer(c_int), value, intent(in) :: nworkers
  1757. end function fstarpu_sched_ctx_book_workers_for_task
  1758. ! void starpu_sched_ctx_unbook_workers_for_task(unsigned sched_ctx_id, int master);
  1759. subroutine fstarpu_sched_ctx_unbook_workers_for_task (sched_ctx_id, master) &
  1760. bind(c,name="starpu_sched_ctx_unbook_workers_for_task")
  1761. use iso_c_binding, only: c_int
  1762. integer(c_int), value, intent(in) :: sched_ctx_id
  1763. integer(c_int), value, intent(in) :: master
  1764. end subroutine fstarpu_sched_ctx_unbook_workers_for_task
  1765. ! unsigned starpu_sched_ctx_worker_is_master_for_child_ctx(int workerid, unsigned sched_ctx_id);
  1766. function fstarpu_sched_ctx_worker_is_master_for_child_ctx (workerid, sched_ctx_id) &
  1767. bind(c,name="starpu_sched_ctx_worker_is_master_for_child_ctx")
  1768. use iso_c_binding, only: c_int
  1769. integer(c_int) :: fstarpu_sched_ctx_worker_is_master_for_child_ctx
  1770. integer(c_int), value, intent(in) :: workerid
  1771. integer(c_int), value, intent(in) :: sched_ctx_id
  1772. end function fstarpu_sched_ctx_worker_is_master_for_child_ctx
  1773. ! unsigned starpu_sched_ctx_master_get_context(int masterid);
  1774. function fstarpu_sched_ctx_master_get_context (masterid) &
  1775. bind(c,name="starpu_sched_ctx_master_get_context")
  1776. use iso_c_binding, only: c_int
  1777. integer(c_int) :: fstarpu_sched_ctx_master_get_context
  1778. integer(c_int), value, intent(in) :: masterid
  1779. end function fstarpu_sched_ctx_master_get_context
  1780. ! void starpu_sched_ctx_revert_task_counters(unsigned sched_ctx_id, double flops);
  1781. subroutine fstarpu_sched_ctx_revert_task_counters (sched_ctx_id, flops) &
  1782. bind(c,name="starpu_sched_ctx_revert_task_counters")
  1783. use iso_c_binding, only: c_int, c_double
  1784. integer(c_int), value, intent(in) :: sched_ctx_id
  1785. real(c_double), value, intent(in) :: flops
  1786. end subroutine fstarpu_sched_ctx_revert_task_counters
  1787. ! void starpu_sched_ctx_move_task_to_ctx(struct starpu_task *task, unsigned sched_ctx, unsigned manage_mutex);
  1788. subroutine fstarpu_sched_ctx_move_task_to_ctx (task, sched_ctx, manage_mutex) &
  1789. bind(c,name="starpu_sched_ctx_move_task_to_ctx")
  1790. use iso_c_binding, only: c_ptr, c_int
  1791. type(c_ptr), value, intent(in) :: task
  1792. integer(c_int), value, intent(in) :: sched_ctx
  1793. integer(c_int), value, intent(in) :: manage_mutex
  1794. end subroutine fstarpu_sched_ctx_move_task_to_ctx
  1795. ! int starpu_sched_ctx_get_worker_rank(unsigned sched_ctx_id);
  1796. function fstarpu_sched_ctx_get_worker_rank (sched_ctx_id) &
  1797. bind(c,name="starpu_sched_ctx_get_worker_rank")
  1798. use iso_c_binding, only: c_int
  1799. integer(c_int) :: fstarpu_sched_ctx_get_worker_rank
  1800. integer(c_int), value, intent(in) :: sched_ctx_id
  1801. end function fstarpu_sched_ctx_get_worker_rank
  1802. ! unsigned starpu_sched_ctx_has_starpu_scheduler(unsigned sched_ctx_id, unsigned *awake_workers);
  1803. ! void starpu_sched_ctx_call_pushed_task_cb(int workerid, unsigned sched_ctx_id);
  1804. subroutine fstarpu_sched_ctx_call_pushed_task_cb (workerid, sched_ctx_id) &
  1805. bind(c,name="starpu_sched_ctx_call_pushed_task_cb")
  1806. use iso_c_binding, only: c_int
  1807. integer(c_int), value, intent(in) :: workerid
  1808. integer(c_int), value, intent(in) :: sched_ctx_id
  1809. end subroutine fstarpu_sched_ctx_call_pushed_task_cb
  1810. ! == starpu_fxt.h ==
  1811. ! void starpu_fxt_options_init(struct starpu_fxt_options *options);
  1812. subroutine fstarpu_fxt_options_init (fxt_options) bind(C,name="starpu_fxt_options_init")
  1813. use iso_c_binding, only: c_ptr
  1814. type(c_ptr), value, intent(in) :: fxt_options
  1815. end subroutine fstarpu_fxt_options_init
  1816. ! void starpu_fxt_generate_trace(struct starpu_fxt_options *options);
  1817. subroutine fstarpu_fxt_generate_trace (fxt_options) bind(C,name="starpu_fxt_generate_trace")
  1818. use iso_c_binding, only: c_ptr
  1819. type(c_ptr), value, intent(in) :: fxt_options
  1820. end subroutine fstarpu_fxt_generate_trace
  1821. ! void starpu_fxt_autostart_profiling(int autostart);
  1822. subroutine fstarpu_fxt_autostart_profiling (autostart) bind(c,name="starpu_fxt_autostart_profiling")
  1823. use iso_c_binding, only: c_int
  1824. integer(c_int), value, intent(in) :: autostart
  1825. end subroutine fstarpu_fxt_autostart_profiling
  1826. ! void starpu_fxt_start_profiling(void);
  1827. subroutine fstarpu_fxt_start_profiling () bind(c,name="starpu_fxt_start_profiling")
  1828. use iso_c_binding
  1829. end subroutine fstarpu_fxt_start_profiling
  1830. ! void starpu_fxt_stop_profiling(void);
  1831. subroutine fstarpu_fxt_stop_profiling () bind(c,name="starpu_fxt_stop_profiling")
  1832. use iso_c_binding
  1833. end subroutine fstarpu_fxt_stop_profiling
  1834. ! void starpu_fxt_write_data_trace(char *filename_in);
  1835. subroutine fstarpu_fxt_write_data_trace (filename) bind(c,name="starpu_fxt_write_data_trace")
  1836. use iso_c_binding, only: c_char
  1837. character(c_char), intent(in) :: filename
  1838. end subroutine fstarpu_fxt_write_data_trace
  1839. ! void starpu_fxt_trace_user_event(unsigned long code);
  1840. subroutine fstarpu_trace_user_event (code) bind(c,name="starpu_trace_user_event")
  1841. use iso_c_binding, only: c_long
  1842. integer(c_long), value, intent(in) :: code
  1843. end subroutine fstarpu_trace_user_event
  1844. end interface
  1845. contains
  1846. function or_cptrs(op1,op2)
  1847. type(c_ptr) :: or_cptrs
  1848. type(c_ptr),intent(in) :: op1,op2
  1849. integer(c_intptr_t) :: i_op1,i_op2
  1850. i_op1 = transfer(op1,0_c_intptr_t)
  1851. i_op2 = transfer(op2,0_c_intptr_t)
  1852. or_cptrs = transfer(ior(i_op1,i_op2), C_NULL_PTR)
  1853. end function
  1854. function ip_to_p(i) bind(C)
  1855. use iso_c_binding, only: c_ptr,c_intptr_t,C_NULL_PTR
  1856. type(c_ptr) :: ip_to_p
  1857. integer(c_intptr_t), value, intent(in) :: i
  1858. ip_to_p = transfer(i,C_NULL_PTR)
  1859. end function ip_to_p
  1860. function p_to_ip(p) bind(C)
  1861. use iso_c_binding, only: c_ptr,c_intptr_t
  1862. integer(c_intptr_t) :: p_to_ip
  1863. type(c_ptr), value, intent(in) :: p
  1864. p_to_ip = transfer(p,0_c_intptr_t)
  1865. end function p_to_ip
  1866. function sz_to_p(sz) bind(C)
  1867. use iso_c_binding, only: c_ptr,c_size_t,c_intptr_t
  1868. type(c_ptr) :: sz_to_p
  1869. integer(c_size_t), value, intent(in) :: sz
  1870. sz_to_p = ip_to_p(int(sz,kind=c_intptr_t))
  1871. end function sz_to_p
  1872. function fstarpu_init (conf) bind(C)
  1873. use iso_c_binding
  1874. integer(c_int) :: fstarpu_init
  1875. type(c_ptr), value, intent(in) :: conf
  1876. real(c_double) :: FSTARPU_SZ_C_DOUBLE_dummy
  1877. real(c_float) :: FSTARPU_SZ_C_FLOAT_dummy
  1878. character(c_char) :: FSTARPU_SZ_C_CHAR_dummy
  1879. integer(c_int) :: FSTARPU_SZ_C_INT_dummy
  1880. integer(c_intptr_t) :: FSTARPU_SZ_C_INTPTR_T_dummy
  1881. type(c_ptr) :: FSTARPU_SZ_C_PTR_dummy
  1882. integer(c_size_t) :: FSTARPU_SZ_C_SIZE_T_dummy
  1883. character :: FSTARPU_SZ_CHARACTER_dummy
  1884. integer :: FSTARPU_SZ_INTEGER_dummy
  1885. integer(4) :: FSTARPU_SZ_INT4_dummy
  1886. integer(8) :: FSTARPU_SZ_INT8_dummy
  1887. real :: FSTARPU_SZ_REAL_dummy
  1888. real(4) :: FSTARPU_SZ_REAL4_dummy
  1889. real(8) :: FSTARPU_SZ_REAL8_dummy
  1890. double precision :: FSTARPU_SZ_DOUBLE_PRECISION_dummy
  1891. complex :: FSTARPU_SZ_COMPLEX_dummy
  1892. complex(4) :: FSTARPU_SZ_COMPLEX4_dummy
  1893. complex(8) :: FSTARPU_SZ_COMPLEX8_dummy
  1894. ! Note: Referencing global C constants from Fortran has
  1895. ! been found unreliable on some architectures, notably
  1896. ! on Darwin. The get_integer/get_pointer_constant
  1897. ! scheme is a workaround to that issue.
  1898. interface
  1899. ! These functions are not exported to the end user
  1900. function fstarpu_get_constant(s) bind(C)
  1901. use iso_c_binding, only: c_ptr,c_char
  1902. type(c_ptr) :: fstarpu_get_constant ! C function returns an intptr_t
  1903. character(kind=c_char) :: s
  1904. end function fstarpu_get_constant
  1905. function fstarpu_init_internal (conf) bind(C,name="starpu_init")
  1906. use iso_c_binding, only: c_ptr,c_int
  1907. integer(c_int) :: fstarpu_init_internal
  1908. type(c_ptr), value :: conf
  1909. end function fstarpu_init_internal
  1910. end interface
  1911. ! Initialize Fortran constants from C peers
  1912. FSTARPU_R = fstarpu_get_constant(C_CHAR_"FSTARPU_R"//C_NULL_CHAR)
  1913. FSTARPU_W = fstarpu_get_constant(C_CHAR_"FSTARPU_W"//C_NULL_CHAR)
  1914. FSTARPU_RW = fstarpu_get_constant(C_CHAR_"FSTARPU_RW"//C_NULL_CHAR)
  1915. FSTARPU_SCRATCH = fstarpu_get_constant(C_CHAR_"FSTARPU_SCRATCH"//C_NULL_CHAR)
  1916. FSTARPU_REDUX = fstarpu_get_constant(C_CHAR_"FSTARPU_REDUX"//C_NULL_CHAR)
  1917. FSTARPU_COMMUTE = fstarpu_get_constant(C_CHAR_"FSTARPU_COMMUTE"//C_NULL_CHAR)
  1918. FSTARPU_SSEND = fstarpu_get_constant(C_CHAR_"FSTARPU_SSEND"//C_NULL_CHAR)
  1919. FSTARPU_LOCALITY = fstarpu_get_constant(C_CHAR_"FSTARPU_LOCALITY"//C_NULL_CHAR)
  1920. FSTARPU_DATA_ARRAY = fstarpu_get_constant(C_CHAR_"FSTARPU_DATA_ARRAY"//C_NULL_CHAR)
  1921. FSTARPU_DATA_MODE_ARRAY = fstarpu_get_constant(C_CHAR_"FSTARPU_DATA_MODE_ARRAY"//C_NULL_CHAR)
  1922. FSTARPU_CL_ARGS = fstarpu_get_constant(C_CHAR_"FSTARPU_CL_ARGS"//C_NULL_CHAR)
  1923. FSTARPU_CL_ARGS_NFREE = fstarpu_get_constant(C_CHAR_"FSTARPU_CL_ARGS_NFREE"//C_NULL_CHAR)
  1924. FSTARPU_TASK_DEPS_ARRAY = fstarpu_get_constant(C_CHAR_"FSTARPU_TASK_DEPS_ARRAY"//C_NULL_CHAR)
  1925. FSTARPU_CALLBACK = fstarpu_get_constant(C_CHAR_"FSTARPU_CALLBACK"//C_NULL_CHAR)
  1926. FSTARPU_CALLBACK_WITH_ARG = fstarpu_get_constant(C_CHAR_"FSTARPU_CALLBACK_WITH_ARG"//C_NULL_CHAR)
  1927. FSTARPU_CALLBACK_ARG = fstarpu_get_constant(C_CHAR_"FSTARPU_CALLBACK_ARG"//C_NULL_CHAR)
  1928. FSTARPU_PROLOGUE_CALLBACK = fstarpu_get_constant(C_CHAR_"FSTARPU_PROLOGUE_CALLBACK"//C_NULL_CHAR)
  1929. FSTARPU_PROLOGUE_CALLBACK_ARG = fstarpu_get_constant(C_CHAR_"FSTARPU_PROLOGUE_CALLBACK_ARG"//C_NULL_CHAR)
  1930. FSTARPU_PROLOGUE_CALLBACK_POP = fstarpu_get_constant(C_CHAR_"FSTARPU_PROLOGUE_CALLBACK_POP"//C_NULL_CHAR)
  1931. FSTARPU_PROLOGUE_CALLBACK_POP_ARG = &
  1932. fstarpu_get_constant(C_CHAR_"FSTARPU_PROLOGUE_CALLBACK_POP_ARG"//C_NULL_CHAR)
  1933. FSTARPU_PRIORITY = fstarpu_get_constant(C_CHAR_"FSTARPU_PRIORITY"//C_NULL_CHAR)
  1934. FSTARPU_EXECUTE_ON_NODE = fstarpu_get_constant(C_CHAR_"FSTARPU_EXECUTE_ON_NODE"//C_NULL_CHAR)
  1935. FSTARPU_EXECUTE_ON_DATA = fstarpu_get_constant(C_CHAR_"FSTARPU_EXECUTE_ON_DATA"//C_NULL_CHAR)
  1936. FSTARPU_EXECUTE_ON_WORKER = fstarpu_get_constant(C_CHAR_"FSTARPU_EXECUTE_ON_WORKER"//C_NULL_CHAR)
  1937. FSTARPU_WORKER_ORDER = fstarpu_get_constant(C_CHAR_"FSTARPU_WORKER_ORDER"//C_NULL_CHAR)
  1938. FSTARPU_EXECUTE_WHERE = fstarpu_get_constant(C_CHAR_"FSTARPU_EXECUTE_WHERE"//C_NULL_CHAR)
  1939. FSTARPU_HYPERVISOR_TAG = fstarpu_get_constant(C_CHAR_"FSTARPU_HYPERVISOR_TAG"//C_NULL_CHAR)
  1940. FSTARPU_POSSIBLY_PARALLEL = fstarpu_get_constant(C_CHAR_"FSTARPU_POSSIBLY_PARALLEL"//C_NULL_CHAR)
  1941. FSTARPU_FLOPS = fstarpu_get_constant(C_CHAR_"FSTARPU_FLOPS"//C_NULL_CHAR)
  1942. FSTARPU_TAG = fstarpu_get_constant(C_CHAR_"FSTARPU_TAG"//C_NULL_CHAR)
  1943. FSTARPU_TAG_ONLY = fstarpu_get_constant(C_CHAR_"FSTARPU_TAG_ONLY"//C_NULL_CHAR)
  1944. FSTARPU_NAME = fstarpu_get_constant(C_CHAR_"FSTARPU_NAME"//C_NULL_CHAR)
  1945. FSTARPU_NODE_SELECTION_POLICY = fstarpu_get_constant(C_CHAR_"FSTARPU_NODE_SELECTION_POLICY"//C_NULL_CHAR)
  1946. FSTARPU_VALUE = fstarpu_get_constant(C_CHAR_"FSTARPU_VALUE"//C_NULL_CHAR)
  1947. FSTARPU_SCHED_CTX = fstarpu_get_constant(C_CHAR_"FSTARPU_SCHED_CTX"//C_NULL_CHAR)
  1948. FSTARPU_CPU_WORKER = fstarpu_get_constant(C_CHAR_"FSTARPU_CPU_WORKER"//C_NULL_CHAR)
  1949. FSTARPU_CUDA_WORKER = fstarpu_get_constant(C_CHAR_"FSTARPU_CUDA_WORKER"//C_NULL_CHAR)
  1950. FSTARPU_OPENCL_WORKER = fstarpu_get_constant(C_CHAR_"FSTARPU_OPENCL_WORKER"//C_NULL_CHAR)
  1951. FSTARPU_MIC_WORKER = fstarpu_get_constant(C_CHAR_"FSTARPU_MIC_WORKER"//C_NULL_CHAR)
  1952. FSTARPU_SCC_WORKER = fstarpu_get_constant(C_CHAR_"FSTARPU_SCC_WORKER"//C_NULL_CHAR)
  1953. FSTARPU_ANY_WORKER = fstarpu_get_constant(C_CHAR_"FSTARPU_ANY_WORKER"//C_NULL_CHAR)
  1954. FSTARPU_NMAXBUFS = int(p_to_ip(fstarpu_get_constant(C_CHAR_"FSTARPU_NMAXBUFS"//C_NULL_CHAR)),c_int)
  1955. FSTARPU_SCHED_CTX_POLICY_NAME = &
  1956. fstarpu_get_constant(C_CHAR_"FSTARPU_SCHED_CTX_POLICY_NAME"//C_NULL_CHAR)
  1957. FSTARPU_SCHED_CTX_POLICY_STRUCT = &
  1958. fstarpu_get_constant(C_CHAR_"FSTARPU_SCHED_CTX_POLICY_STRUCT"//C_NULL_CHAR)
  1959. FSTARPU_SCHED_CTX_POLICY_MIN_PRIO = &
  1960. fstarpu_get_constant(C_CHAR_"FSTARPU_SCHED_CTX_POLICY_MIN_PRIO"//C_NULL_CHAR)
  1961. FSTARPU_SCHED_CTX_POLICY_MAX_PRIO = &
  1962. fstarpu_get_constant(C_CHAR_"FSTARPU_SCHED_CTX_POLICY_MAX_PRIO"//C_NULL_CHAR)
  1963. FSTARPU_SCHED_CTX_HIERARCHY_LEVEL = &
  1964. fstarpu_get_constant(C_CHAR_"FSTARPU_SCHED_CTX_HIERARCHY_LEVEL"//C_NULL_CHAR)
  1965. FSTARPU_SCHED_CTX_NESTED = &
  1966. fstarpu_get_constant(C_CHAR_"FSTARPU_SCHED_CTX_NESTED"//C_NULL_CHAR)
  1967. FSTARPU_SCHED_CTX_AWAKE_WORKERS = &
  1968. fstarpu_get_constant(C_CHAR_"FSTARPU_SCHED_CTX_AWAKE_WORKERS"//C_NULL_CHAR)
  1969. FSTARPU_SCHED_CTX_POLICY_INIT = &
  1970. fstarpu_get_constant(C_CHAR_"FSTARPU_SCHED_CTX_POLICY_INIT"//C_NULL_CHAR)
  1971. FSTARPU_SCHED_CTX_USER_DATA = &
  1972. fstarpu_get_constant(C_CHAR_"FSTARPU_SCHED_CTX_USER_DATA"//C_NULL_CHAR)
  1973. FSTARPU_NOWHERE = &
  1974. fstarpu_get_constant(C_CHAR_"FSTARPU_NOWHERE"//C_NULL_CHAR)
  1975. FSTARPU_CPU = &
  1976. fstarpu_get_constant(C_CHAR_"FSTARPU_CPU"//C_NULL_CHAR)
  1977. FSTARPU_CUDA = &
  1978. fstarpu_get_constant(C_CHAR_"FSTARPU_CUDA"//C_NULL_CHAR)
  1979. FSTARPU_OPENCL = &
  1980. fstarpu_get_constant(C_CHAR_"FSTARPU_OPENCL"//C_NULL_CHAR)
  1981. FSTARPU_MIC = &
  1982. fstarpu_get_constant(C_CHAR_"FSTARPU_MIC"//C_NULL_CHAR)
  1983. FSTARPU_SCC = &
  1984. fstarpu_get_constant(C_CHAR_"FSTARPU_SCC"//C_NULL_CHAR)
  1985. FSTARPU_CODELET_SIMGRID_EXECUTE = &
  1986. fstarpu_get_constant(C_CHAR_"FSTARPU_CODELET_SIMGRID_EXECUTE"//C_NULL_CHAR)
  1987. FSTARPU_CODELET_SIMGRID_EXECUTE_AND_INJECT = &
  1988. fstarpu_get_constant(C_CHAR_"FSTARPU_CODELET_SIMGRID_EXECUTE_AND_INJECT"//C_NULL_CHAR)
  1989. FSTARPU_CUDA_ASYNC = &
  1990. fstarpu_get_constant(C_CHAR_"FSTARPU_CUDA_ASYNC"//C_NULL_CHAR)
  1991. FSTARPU_OPENCL_ASYNC = &
  1992. fstarpu_get_constant(C_CHAR_"FSTARPU_OPENCL_ASYNC"//C_NULL_CHAR)
  1993. ! Initialize size constants as 'c_ptr'
  1994. FSTARPU_SZ_C_DOUBLE = sz_to_p(c_sizeof(FSTARPU_SZ_C_DOUBLE_dummy))
  1995. FSTARPU_SZ_C_FLOAT = sz_to_p(c_sizeof(FSTARPU_SZ_C_FLOAT_dummy))
  1996. FSTARPU_SZ_C_CHAR = sz_to_p(c_sizeof(FSTARPU_SZ_C_CHAR_dummy))
  1997. FSTARPU_SZ_C_INT = sz_to_p(c_sizeof(FSTARPU_SZ_C_INT_dummy))
  1998. FSTARPU_SZ_C_INTPTR_T = sz_to_p(c_sizeof(FSTARPU_SZ_C_INTPTR_T_dummy))
  1999. FSTARPU_SZ_C_PTR = sz_to_p(c_sizeof(FSTARPU_SZ_C_PTR_dummy))
  2000. FSTARPU_SZ_C_SIZE_T = sz_to_p(c_sizeof(FSTARPU_SZ_C_SIZE_T_dummy))
  2001. FSTARPU_SZ_CHARACTER = sz_to_p(c_sizeof(FSTARPU_SZ_CHARACTER_dummy))
  2002. FSTARPU_SZ_INTEGER = sz_to_p(c_sizeof(FSTARPU_SZ_INTEGER_dummy))
  2003. FSTARPU_SZ_INT4 = sz_to_p(c_sizeof(FSTARPU_SZ_INT4_dummy))
  2004. FSTARPU_SZ_INT8 = sz_to_p(c_sizeof(FSTARPU_SZ_INT8_dummy))
  2005. FSTARPU_SZ_REAL = sz_to_p(c_sizeof(FSTARPU_SZ_REAL_dummy))
  2006. FSTARPU_SZ_REAL4 = sz_to_p(c_sizeof(FSTARPU_SZ_REAL4_dummy))
  2007. FSTARPU_SZ_REAL8 = sz_to_p(c_sizeof(FSTARPU_SZ_REAL8_dummy))
  2008. FSTARPU_SZ_DOUBLE_PRECISION = sz_to_p(c_sizeof(FSTARPU_SZ_DOUBLE_PRECISION_dummy))
  2009. FSTARPU_SZ_COMPLEX = sz_to_p(c_sizeof(FSTARPU_SZ_COMPLEX_dummy))
  2010. FSTARPU_SZ_COMPLEX4 = sz_to_p(c_sizeof(FSTARPU_SZ_COMPLEX4_dummy))
  2011. FSTARPU_SZ_COMPLEX8 = sz_to_p(c_sizeof(FSTARPU_SZ_COMPLEX8_dummy))
  2012. ! Initialize StarPU
  2013. if (c_associated(conf)) then
  2014. fstarpu_init = fstarpu_init_internal(conf)
  2015. else
  2016. fstarpu_init = fstarpu_init_internal(C_NULL_PTR)
  2017. end if
  2018. end function fstarpu_init
  2019. function fstarpu_csizet_to_cptr(i) bind(C)
  2020. use iso_c_binding
  2021. type(c_ptr) :: fstarpu_csizet_to_cptr
  2022. integer(c_size_t) :: i
  2023. fstarpu_csizet_to_cptr = transfer(int(i,kind=c_intptr_t),C_NULL_PTR)
  2024. end function fstarpu_csizet_to_cptr
  2025. function fstarpu_int_to_cptr(i) bind(C)
  2026. use iso_c_binding
  2027. type(c_ptr) :: fstarpu_int_to_cptr
  2028. integer :: i
  2029. fstarpu_int_to_cptr = transfer(int(i,kind=c_intptr_t),C_NULL_PTR)
  2030. end function fstarpu_int_to_cptr
  2031. end module fstarpu_mod