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