omp_lib.f90.in 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846
  1. ! Copyright (C) 2005-2022 Free Software Foundation, Inc.
  2. ! Contributed by Jakub Jelinek <jakub@redhat.com>.
  3. ! This file is part of the GNU Offloading and Multi Processing Library
  4. ! (libgomp).
  5. ! Libgomp is free software; you can redistribute it and/or modify it
  6. ! under the terms of the GNU General Public License as published by
  7. ! the Free Software Foundation; either version 3, or (at your option)
  8. ! any later version.
  9. ! Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
  10. ! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  11. ! FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  12. ! more details.
  13. ! Under Section 7 of GPL version 3, you are granted additional
  14. ! permissions described in the GCC Runtime Library Exception, version
  15. ! 3.1, as published by the Free Software Foundation.
  16. ! You should have received a copy of the GNU General Public License and
  17. ! a copy of the GCC Runtime Library Exception along with this program;
  18. ! see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  19. ! <http://www.gnu.org/licenses/>.
  20. module omp_lib_kinds
  21. use iso_c_binding, only: c_int, c_intptr_t
  22. implicit none
  23. private :: c_int, c_intptr_t
  24. integer, parameter :: omp_lock_kind = @OMP_LOCK_KIND@
  25. integer, parameter :: omp_nest_lock_kind = @OMP_NEST_LOCK_KIND@
  26. integer, parameter :: omp_sched_kind = 4
  27. integer, parameter :: omp_proc_bind_kind = 4
  28. integer, parameter :: omp_sync_hint_kind = 4
  29. integer, parameter :: omp_lock_hint_kind = omp_sync_hint_kind
  30. integer, parameter :: omp_pause_resource_kind = 4
  31. integer, parameter :: omp_allocator_handle_kind = c_intptr_t
  32. integer, parameter :: omp_alloctrait_key_kind = c_int
  33. integer, parameter :: omp_alloctrait_val_kind = c_intptr_t
  34. integer, parameter :: omp_memspace_handle_kind = c_intptr_t
  35. integer, parameter :: omp_depend_kind = @OMP_DEPEND_KIND@
  36. integer, parameter :: omp_event_handle_kind = c_intptr_t
  37. integer (omp_sched_kind), parameter :: omp_sched_static = 1
  38. integer (omp_sched_kind), parameter :: omp_sched_dynamic = 2
  39. integer (omp_sched_kind), parameter :: omp_sched_guided = 3
  40. integer (omp_sched_kind), parameter :: omp_sched_auto = 4
  41. integer (omp_proc_bind_kind), &
  42. parameter :: omp_proc_bind_false = 0
  43. integer (omp_proc_bind_kind), &
  44. parameter :: omp_proc_bind_true = 1
  45. integer (omp_proc_bind_kind), &
  46. parameter :: omp_proc_bind_primary = 2
  47. integer (omp_proc_bind_kind), &
  48. parameter :: omp_proc_bind_master = 2
  49. integer (omp_proc_bind_kind), &
  50. parameter :: omp_proc_bind_close = 3
  51. integer (omp_proc_bind_kind), &
  52. parameter :: omp_proc_bind_spread = 4
  53. integer (omp_lock_hint_kind), &
  54. parameter :: omp_sync_hint_none = 0
  55. integer (omp_lock_hint_kind), &
  56. parameter :: omp_lock_hint_none = omp_sync_hint_none
  57. integer (omp_lock_hint_kind), &
  58. parameter :: omp_sync_hint_uncontended = 1
  59. integer (omp_lock_hint_kind), &
  60. parameter :: omp_lock_hint_uncontended &
  61. = omp_sync_hint_uncontended
  62. integer (omp_lock_hint_kind), &
  63. parameter :: omp_sync_hint_contended = 2
  64. integer (omp_lock_hint_kind), &
  65. parameter :: omp_lock_hint_contended &
  66. = omp_sync_hint_contended
  67. integer (omp_lock_hint_kind), &
  68. parameter :: omp_sync_hint_nonspeculative = 4
  69. integer (omp_lock_hint_kind), &
  70. parameter :: omp_lock_hint_nonspeculative &
  71. = omp_sync_hint_nonspeculative
  72. integer (omp_lock_hint_kind), &
  73. parameter :: omp_sync_hint_speculative = 8
  74. integer (omp_lock_hint_kind), &
  75. parameter :: omp_lock_hint_speculative &
  76. = omp_sync_hint_speculative
  77. integer (kind=omp_pause_resource_kind), &
  78. parameter :: omp_pause_soft = 1
  79. integer (kind=omp_pause_resource_kind), &
  80. parameter :: omp_pause_hard = 2
  81. integer (kind=omp_alloctrait_key_kind), &
  82. parameter :: omp_atk_sync_hint = 1
  83. integer (kind=omp_alloctrait_key_kind), &
  84. parameter :: omp_atk_alignment = 2
  85. integer (kind=omp_alloctrait_key_kind), &
  86. parameter :: omp_atk_access = 3
  87. integer (kind=omp_alloctrait_key_kind), &
  88. parameter :: omp_atk_pool_size = 4
  89. integer (kind=omp_alloctrait_key_kind), &
  90. parameter :: omp_atk_fallback = 5
  91. integer (kind=omp_alloctrait_key_kind), &
  92. parameter :: omp_atk_fb_data = 6
  93. integer (kind=omp_alloctrait_key_kind), &
  94. parameter :: omp_atk_pinned = 7
  95. integer (kind=omp_alloctrait_key_kind), &
  96. parameter :: omp_atk_partition = 8
  97. integer (kind=omp_alloctrait_val_kind), &
  98. parameter :: omp_atv_default = -1
  99. integer (kind=omp_alloctrait_val_kind), &
  100. parameter :: omp_atv_false = 0
  101. integer (kind=omp_alloctrait_val_kind), &
  102. parameter :: omp_atv_true = 1
  103. integer (kind=omp_alloctrait_val_kind), &
  104. parameter :: omp_atv_contended = 3
  105. integer (kind=omp_alloctrait_val_kind), &
  106. parameter :: omp_atv_uncontended = 4
  107. integer (kind=omp_alloctrait_val_kind), &
  108. parameter :: omp_atv_serialized = 5
  109. integer (kind=omp_alloctrait_val_kind), &
  110. parameter :: omp_atv_sequential = omp_atv_serialized
  111. integer (kind=omp_alloctrait_val_kind), &
  112. parameter :: omp_atv_private = 6
  113. integer (kind=omp_alloctrait_val_kind), &
  114. parameter :: omp_atv_all = 7
  115. integer (kind=omp_alloctrait_val_kind), &
  116. parameter :: omp_atv_thread = 8
  117. integer (kind=omp_alloctrait_val_kind), &
  118. parameter :: omp_atv_pteam = 9
  119. integer (kind=omp_alloctrait_val_kind), &
  120. parameter :: omp_atv_cgroup = 10
  121. integer (kind=omp_alloctrait_val_kind), &
  122. parameter :: omp_atv_default_mem_fb = 11
  123. integer (kind=omp_alloctrait_val_kind), &
  124. parameter :: omp_atv_null_fb = 12
  125. integer (kind=omp_alloctrait_val_kind), &
  126. parameter :: omp_atv_abort_fb = 13
  127. integer (kind=omp_alloctrait_val_kind), &
  128. parameter :: omp_atv_allocator_fb = 14
  129. integer (kind=omp_alloctrait_val_kind), &
  130. parameter :: omp_atv_environment = 15
  131. integer (kind=omp_alloctrait_val_kind), &
  132. parameter :: omp_atv_nearest = 16
  133. integer (kind=omp_alloctrait_val_kind), &
  134. parameter :: omp_atv_blocked = 17
  135. integer (kind=omp_alloctrait_val_kind), &
  136. parameter :: omp_atv_interleaved = 18
  137. integer (kind=omp_allocator_handle_kind), &
  138. parameter :: omp_null_allocator = 0
  139. integer (kind=omp_allocator_handle_kind), &
  140. parameter :: omp_default_mem_alloc = 1
  141. integer (kind=omp_allocator_handle_kind), &
  142. parameter :: omp_large_cap_mem_alloc = 2
  143. integer (kind=omp_allocator_handle_kind), &
  144. parameter :: omp_const_mem_alloc = 3
  145. integer (kind=omp_allocator_handle_kind), &
  146. parameter :: omp_high_bw_mem_alloc = 4
  147. integer (kind=omp_allocator_handle_kind), &
  148. parameter :: omp_low_lat_mem_alloc = 5
  149. integer (kind=omp_allocator_handle_kind), &
  150. parameter :: omp_cgroup_mem_alloc = 6
  151. integer (kind=omp_allocator_handle_kind), &
  152. parameter :: omp_pteam_mem_alloc = 7
  153. integer (kind=omp_allocator_handle_kind), &
  154. parameter :: omp_thread_mem_alloc = 8
  155. integer (omp_memspace_handle_kind), &
  156. parameter :: omp_default_mem_space = 0
  157. integer (omp_memspace_handle_kind), &
  158. parameter :: omp_large_cap_mem_space = 1
  159. integer (omp_memspace_handle_kind), &
  160. parameter :: omp_const_mem_space = 2
  161. integer (omp_memspace_handle_kind), &
  162. parameter :: omp_high_bw_mem_space = 3
  163. integer (omp_memspace_handle_kind), &
  164. parameter :: omp_low_lat_mem_space = 4
  165. type omp_alloctrait
  166. integer (kind=omp_alloctrait_key_kind) key
  167. integer (kind=omp_alloctrait_val_kind) value
  168. end type omp_alloctrait
  169. end module
  170. module omp_lib
  171. use omp_lib_kinds
  172. implicit none
  173. integer, parameter :: openmp_version = 201511
  174. interface
  175. subroutine omp_init_lock (svar)
  176. use omp_lib_kinds
  177. integer (omp_lock_kind), intent (out) :: svar
  178. end subroutine omp_init_lock
  179. end interface
  180. interface
  181. subroutine omp_init_lock_with_hint (svar, hint)
  182. use omp_lib_kinds
  183. integer (omp_lock_kind), intent (out) :: svar
  184. integer (omp_lock_hint_kind), intent (in) :: hint
  185. end subroutine omp_init_lock_with_hint
  186. end interface
  187. interface
  188. subroutine omp_init_nest_lock (nvar)
  189. use omp_lib_kinds
  190. integer (omp_nest_lock_kind), intent (out) :: nvar
  191. end subroutine omp_init_nest_lock
  192. end interface
  193. interface
  194. subroutine omp_init_nest_lock_with_hint (nvar, hint)
  195. use omp_lib_kinds
  196. integer (omp_nest_lock_kind), intent (out) :: nvar
  197. integer (omp_lock_hint_kind), intent (in) :: hint
  198. end subroutine omp_init_nest_lock_with_hint
  199. end interface
  200. interface
  201. subroutine omp_destroy_lock (svar)
  202. use omp_lib_kinds
  203. integer (omp_lock_kind), intent (inout) :: svar
  204. end subroutine omp_destroy_lock
  205. end interface
  206. interface
  207. subroutine omp_destroy_nest_lock (nvar)
  208. use omp_lib_kinds
  209. integer (omp_nest_lock_kind), intent (inout) :: nvar
  210. end subroutine omp_destroy_nest_lock
  211. end interface
  212. interface
  213. subroutine omp_set_lock (svar)
  214. use omp_lib_kinds
  215. integer (omp_lock_kind), intent (inout) :: svar
  216. end subroutine omp_set_lock
  217. end interface
  218. interface
  219. subroutine omp_set_nest_lock (nvar)
  220. use omp_lib_kinds
  221. integer (omp_nest_lock_kind), intent (inout) :: nvar
  222. end subroutine omp_set_nest_lock
  223. end interface
  224. interface
  225. subroutine omp_unset_lock (svar)
  226. use omp_lib_kinds
  227. integer (omp_lock_kind), intent (inout) :: svar
  228. end subroutine omp_unset_lock
  229. end interface
  230. interface
  231. subroutine omp_unset_nest_lock (nvar)
  232. use omp_lib_kinds
  233. integer (omp_nest_lock_kind), intent (inout) :: nvar
  234. end subroutine omp_unset_nest_lock
  235. end interface
  236. interface omp_set_dynamic
  237. subroutine omp_set_dynamic (dynamic_threads)
  238. logical (4), intent (in) :: dynamic_threads
  239. end subroutine omp_set_dynamic
  240. subroutine omp_set_dynamic_8 (dynamic_threads)
  241. logical (8), intent (in) :: dynamic_threads
  242. end subroutine omp_set_dynamic_8
  243. end interface
  244. interface omp_set_nested
  245. subroutine omp_set_nested (nested)
  246. logical (4), intent (in) :: nested
  247. end subroutine omp_set_nested
  248. subroutine omp_set_nested_8 (nested)
  249. logical (8), intent (in) :: nested
  250. end subroutine omp_set_nested_8
  251. end interface
  252. interface omp_set_num_threads
  253. subroutine omp_set_num_threads (num_threads)
  254. integer (4), intent (in) :: num_threads
  255. end subroutine omp_set_num_threads
  256. subroutine omp_set_num_threads_8 (num_threads)
  257. integer (8), intent (in) :: num_threads
  258. end subroutine omp_set_num_threads_8
  259. end interface
  260. interface
  261. function omp_get_dynamic ()
  262. logical (4) :: omp_get_dynamic
  263. end function omp_get_dynamic
  264. end interface
  265. interface
  266. function omp_get_nested ()
  267. logical (4) :: omp_get_nested
  268. end function omp_get_nested
  269. end interface
  270. interface
  271. function omp_in_parallel ()
  272. logical (4) :: omp_in_parallel
  273. end function omp_in_parallel
  274. end interface
  275. interface
  276. function omp_test_lock (svar)
  277. use omp_lib_kinds
  278. logical (4) :: omp_test_lock
  279. integer (omp_lock_kind), intent (inout) :: svar
  280. end function omp_test_lock
  281. end interface
  282. interface
  283. function omp_get_max_threads ()
  284. integer (4) :: omp_get_max_threads
  285. end function omp_get_max_threads
  286. end interface
  287. interface
  288. function omp_get_num_procs ()
  289. integer (4) :: omp_get_num_procs
  290. end function omp_get_num_procs
  291. end interface
  292. interface
  293. function omp_get_num_threads ()
  294. integer (4) :: omp_get_num_threads
  295. end function omp_get_num_threads
  296. end interface
  297. interface
  298. function omp_get_thread_num ()
  299. integer (4) :: omp_get_thread_num
  300. end function omp_get_thread_num
  301. end interface
  302. interface
  303. function omp_test_nest_lock (nvar)
  304. use omp_lib_kinds
  305. integer (4) :: omp_test_nest_lock
  306. integer (omp_nest_lock_kind), intent (inout) :: nvar
  307. end function omp_test_nest_lock
  308. end interface
  309. interface
  310. function omp_get_wtick ()
  311. double precision :: omp_get_wtick
  312. end function omp_get_wtick
  313. end interface
  314. interface
  315. function omp_get_wtime ()
  316. double precision :: omp_get_wtime
  317. end function omp_get_wtime
  318. end interface
  319. interface omp_set_schedule
  320. subroutine omp_set_schedule (kind, chunk_size)
  321. use omp_lib_kinds
  322. integer (omp_sched_kind), intent (in) :: kind
  323. integer (4), intent (in) :: chunk_size
  324. end subroutine omp_set_schedule
  325. subroutine omp_set_schedule_8 (kind, chunk_size)
  326. use omp_lib_kinds
  327. integer (omp_sched_kind), intent (in) :: kind
  328. integer (8), intent (in) :: chunk_size
  329. end subroutine omp_set_schedule_8
  330. end interface
  331. interface omp_get_schedule
  332. subroutine omp_get_schedule (kind, chunk_size)
  333. use omp_lib_kinds
  334. integer (omp_sched_kind), intent (out) :: kind
  335. integer (4), intent (out) :: chunk_size
  336. end subroutine omp_get_schedule
  337. subroutine omp_get_schedule_8 (kind, chunk_size)
  338. use omp_lib_kinds
  339. integer (omp_sched_kind), intent (out) :: kind
  340. integer (8), intent (out) :: chunk_size
  341. end subroutine omp_get_schedule_8
  342. end interface
  343. interface
  344. function omp_get_thread_limit ()
  345. integer (4) :: omp_get_thread_limit
  346. end function omp_get_thread_limit
  347. end interface
  348. interface omp_set_max_active_levels
  349. subroutine omp_set_max_active_levels (max_levels)
  350. integer (4), intent (in) :: max_levels
  351. end subroutine omp_set_max_active_levels
  352. subroutine omp_set_max_active_levels_8 (max_levels)
  353. integer (8), intent (in) :: max_levels
  354. end subroutine omp_set_max_active_levels_8
  355. end interface
  356. interface
  357. function omp_get_max_active_levels ()
  358. integer (4) :: omp_get_max_active_levels
  359. end function omp_get_max_active_levels
  360. end interface
  361. interface
  362. function omp_get_supported_active_levels ()
  363. integer (4) :: omp_get_supported_active_levels
  364. end function omp_get_supported_active_levels
  365. end interface
  366. interface
  367. function omp_get_level ()
  368. integer (4) :: omp_get_level
  369. end function omp_get_level
  370. end interface
  371. interface omp_get_ancestor_thread_num
  372. function omp_get_ancestor_thread_num (level)
  373. integer (4), intent (in) :: level
  374. integer (4) :: omp_get_ancestor_thread_num
  375. end function omp_get_ancestor_thread_num
  376. function omp_get_ancestor_thread_num_8 (level)
  377. integer (8), intent (in) :: level
  378. integer (4) :: omp_get_ancestor_thread_num_8
  379. end function omp_get_ancestor_thread_num_8
  380. end interface
  381. interface omp_get_team_size
  382. function omp_get_team_size (level)
  383. integer (4), intent (in) :: level
  384. integer (4) :: omp_get_team_size
  385. end function omp_get_team_size
  386. function omp_get_team_size_8 (level)
  387. integer (8), intent (in) :: level
  388. integer (4) :: omp_get_team_size_8
  389. end function omp_get_team_size_8
  390. end interface
  391. interface
  392. function omp_get_active_level ()
  393. integer (4) :: omp_get_active_level
  394. end function omp_get_active_level
  395. end interface
  396. interface
  397. function omp_in_final ()
  398. logical (4) :: omp_in_final
  399. end function omp_in_final
  400. end interface
  401. interface
  402. function omp_get_cancellation ()
  403. logical (4) :: omp_get_cancellation
  404. end function omp_get_cancellation
  405. end interface
  406. interface
  407. function omp_get_proc_bind ()
  408. use omp_lib_kinds
  409. integer (omp_proc_bind_kind) :: omp_get_proc_bind
  410. end function omp_get_proc_bind
  411. end interface
  412. interface
  413. function omp_get_num_places ()
  414. integer (4) :: omp_get_num_places
  415. end function omp_get_num_places
  416. end interface
  417. interface omp_get_place_num_procs
  418. function omp_get_place_num_procs (place_num)
  419. integer (4), intent(in) :: place_num
  420. integer (4) :: omp_get_place_num_procs
  421. end function omp_get_place_num_procs
  422. function omp_get_place_num_procs_8 (place_num)
  423. integer (8), intent(in) :: place_num
  424. integer (4) :: omp_get_place_num_procs_8
  425. end function omp_get_place_num_procs_8
  426. end interface
  427. interface omp_get_place_proc_ids
  428. subroutine omp_get_place_proc_ids (place_num, ids)
  429. integer (4), intent(in) :: place_num
  430. integer (4), intent(out) :: ids(*)
  431. end subroutine omp_get_place_proc_ids
  432. subroutine omp_get_place_proc_ids_8 (place_num, ids)
  433. integer (8), intent(in) :: place_num
  434. integer (8), intent(out) :: ids(*)
  435. end subroutine omp_get_place_proc_ids_8
  436. end interface
  437. interface
  438. function omp_get_place_num ()
  439. integer (4) :: omp_get_place_num
  440. end function omp_get_place_num
  441. end interface
  442. interface
  443. function omp_get_partition_num_places ()
  444. integer (4) :: omp_get_partition_num_places
  445. end function omp_get_partition_num_places
  446. end interface
  447. interface omp_get_partition_place_nums
  448. subroutine omp_get_partition_place_nums (place_nums)
  449. integer (4), intent(out) :: place_nums(*)
  450. end subroutine omp_get_partition_place_nums
  451. subroutine omp_get_partition_place_nums_8 (place_nums)
  452. integer (8), intent(out) :: place_nums(*)
  453. end subroutine omp_get_partition_place_nums_8
  454. end interface
  455. interface omp_set_default_device
  456. subroutine omp_set_default_device (device_num)
  457. integer (4), intent (in) :: device_num
  458. end subroutine omp_set_default_device
  459. subroutine omp_set_default_device_8 (device_num)
  460. integer (8), intent (in) :: device_num
  461. end subroutine omp_set_default_device_8
  462. end interface
  463. interface
  464. function omp_get_default_device ()
  465. integer (4) :: omp_get_default_device
  466. end function omp_get_default_device
  467. end interface
  468. interface
  469. function omp_get_num_devices ()
  470. integer (4) :: omp_get_num_devices
  471. end function omp_get_num_devices
  472. end interface
  473. interface
  474. function omp_get_num_teams ()
  475. integer (4) :: omp_get_num_teams
  476. end function omp_get_num_teams
  477. end interface
  478. interface
  479. function omp_get_team_num ()
  480. integer (4) :: omp_get_team_num
  481. end function omp_get_team_num
  482. end interface
  483. interface
  484. function omp_is_initial_device ()
  485. logical (4) :: omp_is_initial_device
  486. end function omp_is_initial_device
  487. end interface
  488. interface
  489. function omp_get_initial_device ()
  490. integer (4) :: omp_get_initial_device
  491. end function omp_get_initial_device
  492. end interface
  493. interface
  494. function omp_get_device_num ()
  495. integer (4) :: omp_get_device_num
  496. end function omp_get_device_num
  497. end interface
  498. interface
  499. function omp_get_max_task_priority ()
  500. integer (4) :: omp_get_max_task_priority
  501. end function omp_get_max_task_priority
  502. end interface
  503. interface omp_set_num_teams
  504. subroutine omp_set_num_teams (num_teams)
  505. integer (4), intent (in) :: num_teams
  506. end subroutine omp_set_num_teams
  507. subroutine omp_set_num_teams_8 (num_teams)
  508. integer (8), intent (in) :: num_teams
  509. end subroutine omp_set_num_teams_8
  510. end interface
  511. interface
  512. function omp_get_max_teams ()
  513. integer (4) :: omp_get_max_teams
  514. end function omp_get_max_teams
  515. end interface
  516. interface omp_set_teams_thread_limit
  517. subroutine omp_set_teams_thread_limit (thread_limit)
  518. integer (4), intent (in) :: thread_limit
  519. end subroutine omp_set_teams_thread_limit
  520. subroutine omp_set_teams_thread_limit_8 (thread_limit)
  521. integer (8), intent (in) :: thread_limit
  522. end subroutine omp_set_teams_thread_limit_8
  523. end interface
  524. interface
  525. function omp_get_teams_thread_limit ()
  526. integer (4) :: omp_get_teams_thread_limit
  527. end function omp_get_teams_thread_limit
  528. end interface
  529. interface
  530. subroutine omp_fulfill_event (event)
  531. use omp_lib_kinds
  532. integer (kind=omp_event_handle_kind), &
  533. value, intent(in) :: event
  534. end subroutine omp_fulfill_event
  535. end interface
  536. interface
  537. subroutine omp_set_affinity_format (format)
  538. character(len=*), intent(in) :: format
  539. end subroutine omp_set_affinity_format
  540. end interface
  541. interface
  542. function omp_get_affinity_format (buffer)
  543. integer (4) :: omp_get_affinity_format
  544. character(len=*), intent(out) :: buffer
  545. end function omp_get_affinity_format
  546. end interface
  547. interface
  548. subroutine omp_display_affinity (format)
  549. character(len=*), intent(in) :: format
  550. end subroutine omp_display_affinity
  551. end interface
  552. interface
  553. function omp_capture_affinity (buffer, format)
  554. integer (4) :: omp_capture_affinity
  555. character(len=*), intent(out) :: buffer
  556. character(len=*), intent(in) :: format
  557. end function omp_capture_affinity
  558. end interface
  559. interface
  560. function omp_pause_resource (kind, device_num)
  561. use omp_lib_kinds
  562. integer (4) :: omp_pause_resource
  563. integer (kind=omp_pause_resource_kind), &
  564. intent(in) :: kind
  565. integer (4) :: device_num
  566. end function
  567. end interface
  568. interface
  569. function omp_pause_resource_all (kind)
  570. use omp_lib_kinds
  571. integer (4) :: omp_pause_resource_all
  572. integer (kind=omp_pause_resource_kind), &
  573. intent(in) :: kind
  574. end function
  575. end interface
  576. interface omp_init_allocator
  577. function omp_init_allocator (memspace, ntraits, traits)
  578. use omp_lib_kinds
  579. integer (kind=omp_allocator_handle_kind) omp_init_allocator
  580. integer (kind=omp_memspace_handle_kind), &
  581. intent(in) :: memspace
  582. integer (4), intent(in) :: ntraits
  583. type (omp_alloctrait), intent(in) :: traits(*)
  584. end function
  585. function omp_init_allocator_8 (memspace, ntraits, traits)
  586. use omp_lib_kinds
  587. integer (kind=omp_allocator_handle_kind) omp_init_allocator_8
  588. integer (kind=omp_memspace_handle_kind), &
  589. intent(in) :: memspace
  590. integer (8), intent(in) :: ntraits
  591. type (omp_alloctrait), intent(in) :: traits(*)
  592. end function
  593. end interface
  594. interface
  595. subroutine omp_destroy_allocator (allocator)
  596. use omp_lib_kinds
  597. integer (kind=omp_allocator_handle_kind), &
  598. intent(in) :: allocator
  599. end subroutine
  600. end interface
  601. interface
  602. subroutine omp_set_default_allocator (allocator)
  603. use omp_lib_kinds
  604. integer (kind=omp_allocator_handle_kind), &
  605. intent(in) :: allocator
  606. end subroutine
  607. end interface
  608. interface
  609. function omp_get_default_allocator ()
  610. use omp_lib_kinds
  611. integer (kind=omp_allocator_handle_kind) &
  612. omp_get_default_allocator
  613. end function
  614. end interface
  615. interface omp_display_env
  616. subroutine omp_display_env (verbose)
  617. logical (4),intent (in) :: verbose
  618. end subroutine omp_display_env
  619. subroutine omp_display_env_8 (verbose)
  620. logical (8),intent (in) :: verbose
  621. end subroutine omp_display_env_8
  622. end interface
  623. interface
  624. function omp_alloc (size, allocator) bind(c)
  625. use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
  626. import :: omp_allocator_handle_kind
  627. type(c_ptr) :: omp_alloc
  628. integer(c_size_t), value :: size
  629. integer(omp_allocator_handle_kind), value :: allocator
  630. end function omp_alloc
  631. end interface
  632. interface
  633. function omp_aligned_alloc (alignment, size, allocator) bind(c)
  634. use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
  635. import :: omp_allocator_handle_kind
  636. type(c_ptr) :: omp_aligned_alloc
  637. integer(c_size_t), value :: alignment, size
  638. integer(omp_allocator_handle_kind), value :: allocator
  639. end function omp_aligned_alloc
  640. end interface
  641. interface
  642. subroutine omp_free(ptr, allocator) bind(c)
  643. use, intrinsic :: iso_c_binding, only : c_ptr
  644. import :: omp_allocator_handle_kind
  645. type(c_ptr), value :: ptr
  646. integer(omp_allocator_handle_kind), value :: allocator
  647. end subroutine omp_free
  648. end interface
  649. interface
  650. function omp_calloc (nmemb, size, allocator) bind(c)
  651. use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
  652. import :: omp_allocator_handle_kind
  653. type(c_ptr) :: omp_calloc
  654. integer(c_size_t), value :: nmemb, size
  655. integer(omp_allocator_handle_kind), value :: allocator
  656. end function omp_calloc
  657. end interface
  658. interface
  659. function omp_aligned_calloc (alignment, nmemb, size, allocator) bind(c)
  660. use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
  661. import :: omp_allocator_handle_kind
  662. type(c_ptr) :: omp_aligned_calloc
  663. integer(c_size_t), value :: alignment, nmemb, size
  664. integer(omp_allocator_handle_kind), value :: allocator
  665. end function omp_aligned_calloc
  666. end interface
  667. interface
  668. function omp_realloc (ptr, size, allocator, free_allocator) bind(c)
  669. use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
  670. import :: omp_allocator_handle_kind
  671. type(c_ptr) :: omp_realloc
  672. type(c_ptr), value :: ptr
  673. integer(c_size_t), value :: size
  674. integer(omp_allocator_handle_kind), value :: allocator, free_allocator
  675. end function omp_realloc
  676. end interface
  677. interface
  678. function omp_target_alloc (size, device_num) bind(c)
  679. use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t, c_int
  680. type(c_ptr) :: omp_target_alloc
  681. integer(c_size_t), value :: size
  682. integer(c_int), value :: device_num
  683. end function omp_target_alloc
  684. end interface
  685. interface
  686. subroutine omp_target_free (device_ptr, device_num) bind(c)
  687. use, intrinsic :: iso_c_binding, only : c_ptr, c_int
  688. type(c_ptr), value :: device_ptr
  689. integer(c_int), value :: device_num
  690. end subroutine omp_target_free
  691. end interface
  692. interface
  693. function omp_target_is_present (ptr, device_num) bind(c)
  694. use, intrinsic :: iso_c_binding, only : c_ptr, c_int
  695. integer(c_int) :: omp_target_is_present
  696. type(c_ptr), value :: ptr
  697. integer(c_int), value :: device_num
  698. end function omp_target_is_present
  699. end interface
  700. interface
  701. function omp_target_memcpy (dst, src, length, dst_offset, &
  702. src_offset, dst_device_num, &
  703. src_device_num) bind(c)
  704. use, intrinsic :: iso_c_binding, only : c_ptr, c_int, c_size_t
  705. integer(c_int) :: omp_target_memcpy
  706. type(c_ptr), value :: dst, src
  707. integer(c_size_t), value :: length, dst_offset, src_offset
  708. integer(c_int), value :: dst_device_num, src_device_num
  709. end function omp_target_memcpy
  710. end interface
  711. interface
  712. function omp_target_memcpy_rect (dst,src,element_size, num_dims, &
  713. volume, dst_offsets, src_offsets, &
  714. dst_dimensions, src_dimensions, &
  715. dst_device_num, src_device_num) &
  716. bind(c)
  717. use, intrinsic :: iso_c_binding, only : c_ptr, c_int, c_size_t
  718. integer(c_int) :: omp_target_memcpy_rect
  719. type(c_ptr), value :: dst, src
  720. integer(c_size_t), value :: element_size
  721. integer(c_int), value :: num_dims, dst_device_num, src_device_num
  722. integer(c_size_t), intent(in) :: volume(*), dst_offsets(*), &
  723. src_offsets(*), dst_dimensions(*), &
  724. src_dimensions(*)
  725. end function omp_target_memcpy_rect
  726. end interface
  727. interface
  728. function omp_target_associate_ptr (host_ptr, device_ptr, size, &
  729. device_offset, device_num) bind(c)
  730. use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t, c_int
  731. integer(c_int) :: omp_target_associate_ptr
  732. type(c_ptr), value :: host_ptr, device_ptr
  733. integer(c_size_t), value :: size, device_offset
  734. integer(c_int), value :: device_num
  735. end function omp_target_associate_ptr
  736. end interface
  737. interface
  738. function omp_target_disassociate_ptr (ptr, device_num) bind(c)
  739. use, intrinsic :: iso_c_binding, only : c_ptr, c_int
  740. integer(c_int) :: omp_target_disassociate_ptr
  741. type(c_ptr), value :: ptr
  742. integer(c_int), value :: device_num
  743. end function omp_target_disassociate_ptr
  744. end interface
  745. #if _OPENMP >= 201811
  746. !GCC$ ATTRIBUTES DEPRECATED :: omp_get_nested, omp_set_nested
  747. #endif
  748. #if _OPENMP >= 202011
  749. !GCC$ ATTRIBUTES DEPRECATED :: omp_proc_bind_master, omp_atv_sequential
  750. #endif
  751. end module omp_lib