omp_lib.f90.in 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  1. ! Copyright (C) 2005-2015 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. implicit none
  22. integer, parameter :: omp_lock_kind = @OMP_LOCK_KIND@
  23. integer, parameter :: omp_nest_lock_kind = @OMP_NEST_LOCK_KIND@
  24. integer, parameter :: omp_sched_kind = 4
  25. integer, parameter :: omp_proc_bind_kind = 4
  26. integer (omp_sched_kind), parameter :: omp_sched_static = 1
  27. integer (omp_sched_kind), parameter :: omp_sched_dynamic = 2
  28. integer (omp_sched_kind), parameter :: omp_sched_guided = 3
  29. integer (omp_sched_kind), parameter :: omp_sched_auto = 4
  30. integer (omp_proc_bind_kind), parameter :: omp_proc_bind_false = 0
  31. integer (omp_proc_bind_kind), parameter :: omp_proc_bind_true = 1
  32. integer (omp_proc_bind_kind), parameter :: omp_proc_bind_master = 2
  33. integer (omp_proc_bind_kind), parameter :: omp_proc_bind_close = 3
  34. integer (omp_proc_bind_kind), parameter :: omp_proc_bind_spread = 4
  35. end module
  36. module omp_lib
  37. use omp_lib_kinds
  38. implicit none
  39. integer, parameter :: openmp_version = 201307
  40. interface
  41. subroutine omp_init_lock (svar)
  42. use omp_lib_kinds
  43. integer (omp_lock_kind), intent (out) :: svar
  44. end subroutine omp_init_lock
  45. end interface
  46. interface
  47. subroutine omp_init_nest_lock (nvar)
  48. use omp_lib_kinds
  49. integer (omp_nest_lock_kind), intent (out) :: nvar
  50. end subroutine omp_init_nest_lock
  51. end interface
  52. interface
  53. subroutine omp_destroy_lock (svar)
  54. use omp_lib_kinds
  55. integer (omp_lock_kind), intent (inout) :: svar
  56. end subroutine omp_destroy_lock
  57. end interface
  58. interface
  59. subroutine omp_destroy_nest_lock (nvar)
  60. use omp_lib_kinds
  61. integer (omp_nest_lock_kind), intent (inout) :: nvar
  62. end subroutine omp_destroy_nest_lock
  63. end interface
  64. interface
  65. subroutine omp_set_lock (svar)
  66. use omp_lib_kinds
  67. integer (omp_lock_kind), intent (inout) :: svar
  68. end subroutine omp_set_lock
  69. end interface
  70. interface
  71. subroutine omp_set_nest_lock (nvar)
  72. use omp_lib_kinds
  73. integer (omp_nest_lock_kind), intent (inout) :: nvar
  74. end subroutine omp_set_nest_lock
  75. end interface
  76. interface
  77. subroutine omp_unset_lock (svar)
  78. use omp_lib_kinds
  79. integer (omp_lock_kind), intent (inout) :: svar
  80. end subroutine omp_unset_lock
  81. end interface
  82. interface
  83. subroutine omp_unset_nest_lock (nvar)
  84. use omp_lib_kinds
  85. integer (omp_nest_lock_kind), intent (inout) :: nvar
  86. end subroutine omp_unset_nest_lock
  87. end interface
  88. interface omp_set_dynamic
  89. subroutine omp_set_dynamic (dynamic_threads)
  90. logical (4), intent (in) :: dynamic_threads
  91. end subroutine omp_set_dynamic
  92. subroutine omp_set_dynamic_8 (dynamic_threads)
  93. logical (8), intent (in) :: dynamic_threads
  94. end subroutine omp_set_dynamic_8
  95. end interface
  96. interface omp_set_nested
  97. subroutine omp_set_nested (nested)
  98. logical (4), intent (in) :: nested
  99. end subroutine omp_set_nested
  100. subroutine omp_set_nested_8 (nested)
  101. logical (8), intent (in) :: nested
  102. end subroutine omp_set_nested_8
  103. end interface
  104. interface omp_set_num_threads
  105. subroutine omp_set_num_threads (num_threads)
  106. integer (4), intent (in) :: num_threads
  107. end subroutine omp_set_num_threads
  108. subroutine omp_set_num_threads_8 (num_threads)
  109. integer (8), intent (in) :: num_threads
  110. end subroutine omp_set_num_threads_8
  111. end interface
  112. interface
  113. function omp_get_dynamic ()
  114. logical (4) :: omp_get_dynamic
  115. end function omp_get_dynamic
  116. end interface
  117. interface
  118. function omp_get_nested ()
  119. logical (4) :: omp_get_nested
  120. end function omp_get_nested
  121. end interface
  122. interface
  123. function omp_in_parallel ()
  124. logical (4) :: omp_in_parallel
  125. end function omp_in_parallel
  126. end interface
  127. interface
  128. function omp_test_lock (svar)
  129. use omp_lib_kinds
  130. logical (4) :: omp_test_lock
  131. integer (omp_lock_kind), intent (inout) :: svar
  132. end function omp_test_lock
  133. end interface
  134. interface
  135. function omp_get_max_threads ()
  136. integer (4) :: omp_get_max_threads
  137. end function omp_get_max_threads
  138. end interface
  139. interface
  140. function omp_get_num_procs ()
  141. integer (4) :: omp_get_num_procs
  142. end function omp_get_num_procs
  143. end interface
  144. interface
  145. function omp_get_num_threads ()
  146. integer (4) :: omp_get_num_threads
  147. end function omp_get_num_threads
  148. end interface
  149. interface
  150. function omp_get_thread_num ()
  151. integer (4) :: omp_get_thread_num
  152. end function omp_get_thread_num
  153. end interface
  154. interface
  155. function omp_test_nest_lock (nvar)
  156. use omp_lib_kinds
  157. integer (4) :: omp_test_nest_lock
  158. integer (omp_nest_lock_kind), intent (inout) :: nvar
  159. end function omp_test_nest_lock
  160. end interface
  161. interface
  162. function omp_get_wtick ()
  163. double precision :: omp_get_wtick
  164. end function omp_get_wtick
  165. end interface
  166. interface
  167. function omp_get_wtime ()
  168. double precision :: omp_get_wtime
  169. end function omp_get_wtime
  170. end interface
  171. interface omp_set_schedule
  172. subroutine omp_set_schedule (kind, modifier)
  173. use omp_lib_kinds
  174. integer (omp_sched_kind), intent (in) :: kind
  175. integer (4), intent (in) :: modifier
  176. end subroutine omp_set_schedule
  177. subroutine omp_set_schedule_8 (kind, modifier)
  178. use omp_lib_kinds
  179. integer (omp_sched_kind), intent (in) :: kind
  180. integer (8), intent (in) :: modifier
  181. end subroutine omp_set_schedule_8
  182. end interface
  183. interface omp_get_schedule
  184. subroutine omp_get_schedule (kind, modifier)
  185. use omp_lib_kinds
  186. integer (omp_sched_kind), intent (out) :: kind
  187. integer (4), intent (out) :: modifier
  188. end subroutine omp_get_schedule
  189. subroutine omp_get_schedule_8 (kind, modifier)
  190. use omp_lib_kinds
  191. integer (omp_sched_kind), intent (out) :: kind
  192. integer (8), intent (out) :: modifier
  193. end subroutine omp_get_schedule_8
  194. end interface
  195. interface
  196. function omp_get_thread_limit ()
  197. integer (4) :: omp_get_thread_limit
  198. end function omp_get_thread_limit
  199. end interface
  200. interface omp_set_max_active_levels
  201. subroutine omp_set_max_active_levels (max_levels)
  202. integer (4), intent (in) :: max_levels
  203. end subroutine omp_set_max_active_levels
  204. subroutine omp_set_max_active_levels_8 (max_levels)
  205. integer (8), intent (in) :: max_levels
  206. end subroutine omp_set_max_active_levels_8
  207. end interface
  208. interface
  209. function omp_get_max_active_levels ()
  210. integer (4) :: omp_get_max_active_levels
  211. end function omp_get_max_active_levels
  212. end interface
  213. interface
  214. function omp_get_level ()
  215. integer (4) :: omp_get_level
  216. end function omp_get_level
  217. end interface
  218. interface omp_get_ancestor_thread_num
  219. function omp_get_ancestor_thread_num (level)
  220. integer (4), intent (in) :: level
  221. integer (4) :: omp_get_ancestor_thread_num
  222. end function omp_get_ancestor_thread_num
  223. function omp_get_ancestor_thread_num_8 (level)
  224. integer (8), intent (in) :: level
  225. integer (4) :: omp_get_ancestor_thread_num_8
  226. end function omp_get_ancestor_thread_num_8
  227. end interface
  228. interface omp_get_team_size
  229. function omp_get_team_size (level)
  230. integer (4), intent (in) :: level
  231. integer (4) :: omp_get_team_size
  232. end function omp_get_team_size
  233. function omp_get_team_size_8 (level)
  234. integer (8), intent (in) :: level
  235. integer (4) :: omp_get_team_size_8
  236. end function omp_get_team_size_8
  237. end interface
  238. interface
  239. function omp_get_active_level ()
  240. integer (4) :: omp_get_active_level
  241. end function omp_get_active_level
  242. end interface
  243. interface
  244. function omp_in_final ()
  245. logical (4) :: omp_in_final
  246. end function omp_in_final
  247. end interface
  248. interface
  249. function omp_get_cancellation ()
  250. logical (4) :: omp_get_cancellation
  251. end function omp_get_cancellation
  252. end interface
  253. interface
  254. function omp_get_proc_bind ()
  255. use omp_lib_kinds
  256. integer (omp_proc_bind_kind) :: omp_get_proc_bind
  257. end function omp_get_proc_bind
  258. end interface
  259. interface omp_set_default_device
  260. subroutine omp_set_default_device (device_num)
  261. integer (4), intent (in) :: device_num
  262. end subroutine omp_set_default_device
  263. subroutine omp_set_default_device_8 (device_num)
  264. integer (8), intent (in) :: device_num
  265. end subroutine omp_set_default_device_8
  266. end interface
  267. interface
  268. function omp_get_default_device ()
  269. integer (4) :: omp_get_default_device
  270. end function omp_get_default_device
  271. end interface
  272. interface
  273. function omp_get_num_devices ()
  274. integer (4) :: omp_get_num_devices
  275. end function omp_get_num_devices
  276. end interface
  277. interface
  278. function omp_get_num_teams ()
  279. integer (4) :: omp_get_num_teams
  280. end function omp_get_num_teams
  281. end interface
  282. interface
  283. function omp_get_team_num ()
  284. integer (4) :: omp_get_team_num
  285. end function omp_get_team_num
  286. end interface
  287. interface
  288. function omp_is_initial_device ()
  289. logical (4) :: omp_is_initial_device
  290. end function omp_is_initial_device
  291. end interface
  292. end module omp_lib