fstarpu_mod.f90 145 KB

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