145
|
1 ! Copyright (C) 2005-2020 Free Software Foundation, Inc.
|
0
|
2 ! Contributed by Jakub Jelinek <jakub@redhat.com>.
|
|
3
|
111
|
4 ! This file is part of the GNU Offloading and Multi Processing Library
|
|
5 ! (libgomp).
|
0
|
6
|
|
7 ! Libgomp is free software; you can redistribute it and/or modify it
|
|
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.
|
|
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
|
|
14 ! FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
15 ! more details.
|
|
16
|
|
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.
|
|
20
|
|
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/>.
|
|
25
|
|
26 module omp_lib_kinds
|
|
27 implicit none
|
|
28 integer, parameter :: omp_lock_kind = @OMP_LOCK_KIND@
|
|
29 integer, parameter :: omp_nest_lock_kind = @OMP_NEST_LOCK_KIND@
|
|
30 integer, parameter :: omp_sched_kind = 4
|
111
|
31 integer, parameter :: omp_proc_bind_kind = 4
|
|
32 integer, parameter :: omp_lock_hint_kind = 4
|
145
|
33 integer, parameter :: omp_pause_resource_kind = 4
|
111
|
34 integer (omp_sched_kind), parameter :: omp_sched_static = 1
|
|
35 integer (omp_sched_kind), parameter :: omp_sched_dynamic = 2
|
|
36 integer (omp_sched_kind), parameter :: omp_sched_guided = 3
|
|
37 integer (omp_sched_kind), parameter :: omp_sched_auto = 4
|
|
38 integer (omp_proc_bind_kind), &
|
|
39 parameter :: omp_proc_bind_false = 0
|
|
40 integer (omp_proc_bind_kind), &
|
|
41 parameter :: omp_proc_bind_true = 1
|
|
42 integer (omp_proc_bind_kind), &
|
|
43 parameter :: omp_proc_bind_master = 2
|
|
44 integer (omp_proc_bind_kind), &
|
|
45 parameter :: omp_proc_bind_close = 3
|
|
46 integer (omp_proc_bind_kind), &
|
|
47 parameter :: omp_proc_bind_spread = 4
|
|
48 integer (omp_lock_hint_kind), &
|
|
49 parameter :: omp_lock_hint_none = 0
|
|
50 integer (omp_lock_hint_kind), &
|
|
51 parameter :: omp_lock_hint_uncontended = 1
|
|
52 integer (omp_lock_hint_kind), &
|
|
53 parameter :: omp_lock_hint_contended = 2
|
|
54 integer (omp_lock_hint_kind), &
|
|
55 parameter :: omp_lock_hint_nonspeculative = 4
|
|
56 integer (omp_lock_hint_kind), &
|
|
57 parameter :: omp_lock_hint_speculative = 8
|
145
|
58 integer (kind=omp_pause_resource_kind), &
|
|
59 parameter :: omp_pause_soft = 1
|
|
60 integer (kind=omp_pause_resource_kind), &
|
|
61 parameter :: omp_pause_hard = 2
|
0
|
62 end module
|
|
63
|
|
64 module omp_lib
|
|
65 use omp_lib_kinds
|
|
66 implicit none
|
111
|
67 integer, parameter :: openmp_version = 201511
|
0
|
68
|
|
69 interface
|
111
|
70 subroutine omp_init_lock (svar)
|
0
|
71 use omp_lib_kinds
|
111
|
72 integer (omp_lock_kind), intent (out) :: svar
|
0
|
73 end subroutine omp_init_lock
|
|
74 end interface
|
|
75
|
|
76 interface
|
111
|
77 subroutine omp_init_lock_with_hint (svar, hint)
|
0
|
78 use omp_lib_kinds
|
111
|
79 integer (omp_lock_kind), intent (out) :: svar
|
|
80 integer (omp_lock_hint_kind), intent (in) :: hint
|
|
81 end subroutine omp_init_lock_with_hint
|
|
82 end interface
|
|
83
|
|
84 interface
|
|
85 subroutine omp_init_nest_lock (nvar)
|
|
86 use omp_lib_kinds
|
|
87 integer (omp_nest_lock_kind), intent (out) :: nvar
|
0
|
88 end subroutine omp_init_nest_lock
|
|
89 end interface
|
|
90
|
|
91 interface
|
111
|
92 subroutine omp_init_nest_lock_with_hint (nvar, hint)
|
0
|
93 use omp_lib_kinds
|
111
|
94 integer (omp_nest_lock_kind), intent (out) :: nvar
|
|
95 integer (omp_lock_hint_kind), intent (in) :: hint
|
|
96 end subroutine omp_init_nest_lock_with_hint
|
|
97 end interface
|
|
98
|
|
99 interface
|
|
100 subroutine omp_destroy_lock (svar)
|
|
101 use omp_lib_kinds
|
|
102 integer (omp_lock_kind), intent (inout) :: svar
|
0
|
103 end subroutine omp_destroy_lock
|
|
104 end interface
|
|
105
|
|
106 interface
|
111
|
107 subroutine omp_destroy_nest_lock (nvar)
|
0
|
108 use omp_lib_kinds
|
111
|
109 integer (omp_nest_lock_kind), intent (inout) :: nvar
|
0
|
110 end subroutine omp_destroy_nest_lock
|
|
111 end interface
|
|
112
|
|
113 interface
|
111
|
114 subroutine omp_set_lock (svar)
|
0
|
115 use omp_lib_kinds
|
111
|
116 integer (omp_lock_kind), intent (inout) :: svar
|
0
|
117 end subroutine omp_set_lock
|
|
118 end interface
|
|
119
|
|
120 interface
|
111
|
121 subroutine omp_set_nest_lock (nvar)
|
0
|
122 use omp_lib_kinds
|
111
|
123 integer (omp_nest_lock_kind), intent (inout) :: nvar
|
0
|
124 end subroutine omp_set_nest_lock
|
|
125 end interface
|
|
126
|
|
127 interface
|
111
|
128 subroutine omp_unset_lock (svar)
|
0
|
129 use omp_lib_kinds
|
111
|
130 integer (omp_lock_kind), intent (inout) :: svar
|
0
|
131 end subroutine omp_unset_lock
|
|
132 end interface
|
|
133
|
|
134 interface
|
111
|
135 subroutine omp_unset_nest_lock (nvar)
|
0
|
136 use omp_lib_kinds
|
111
|
137 integer (omp_nest_lock_kind), intent (inout) :: nvar
|
0
|
138 end subroutine omp_unset_nest_lock
|
|
139 end interface
|
|
140
|
|
141 interface omp_set_dynamic
|
111
|
142 subroutine omp_set_dynamic (dynamic_threads)
|
|
143 logical (4), intent (in) :: dynamic_threads
|
0
|
144 end subroutine omp_set_dynamic
|
111
|
145 subroutine omp_set_dynamic_8 (dynamic_threads)
|
|
146 logical (8), intent (in) :: dynamic_threads
|
0
|
147 end subroutine omp_set_dynamic_8
|
|
148 end interface
|
|
149
|
|
150 interface omp_set_nested
|
111
|
151 subroutine omp_set_nested (nested)
|
|
152 logical (4), intent (in) :: nested
|
0
|
153 end subroutine omp_set_nested
|
111
|
154 subroutine omp_set_nested_8 (nested)
|
|
155 logical (8), intent (in) :: nested
|
0
|
156 end subroutine omp_set_nested_8
|
|
157 end interface
|
|
158
|
|
159 interface omp_set_num_threads
|
111
|
160 subroutine omp_set_num_threads (num_threads)
|
|
161 integer (4), intent (in) :: num_threads
|
0
|
162 end subroutine omp_set_num_threads
|
111
|
163 subroutine omp_set_num_threads_8 (num_threads)
|
|
164 integer (8), intent (in) :: num_threads
|
0
|
165 end subroutine omp_set_num_threads_8
|
|
166 end interface
|
|
167
|
|
168 interface
|
|
169 function omp_get_dynamic ()
|
111
|
170 logical (4) :: omp_get_dynamic
|
0
|
171 end function omp_get_dynamic
|
|
172 end interface
|
|
173
|
|
174 interface
|
|
175 function omp_get_nested ()
|
111
|
176 logical (4) :: omp_get_nested
|
0
|
177 end function omp_get_nested
|
|
178 end interface
|
|
179
|
|
180 interface
|
|
181 function omp_in_parallel ()
|
111
|
182 logical (4) :: omp_in_parallel
|
0
|
183 end function omp_in_parallel
|
|
184 end interface
|
|
185
|
|
186 interface
|
111
|
187 function omp_test_lock (svar)
|
0
|
188 use omp_lib_kinds
|
111
|
189 logical (4) :: omp_test_lock
|
|
190 integer (omp_lock_kind), intent (inout) :: svar
|
0
|
191 end function omp_test_lock
|
|
192 end interface
|
|
193
|
|
194 interface
|
|
195 function omp_get_max_threads ()
|
111
|
196 integer (4) :: omp_get_max_threads
|
0
|
197 end function omp_get_max_threads
|
|
198 end interface
|
|
199
|
|
200 interface
|
|
201 function omp_get_num_procs ()
|
111
|
202 integer (4) :: omp_get_num_procs
|
0
|
203 end function omp_get_num_procs
|
|
204 end interface
|
|
205
|
|
206 interface
|
|
207 function omp_get_num_threads ()
|
111
|
208 integer (4) :: omp_get_num_threads
|
0
|
209 end function omp_get_num_threads
|
|
210 end interface
|
|
211
|
|
212 interface
|
|
213 function omp_get_thread_num ()
|
111
|
214 integer (4) :: omp_get_thread_num
|
0
|
215 end function omp_get_thread_num
|
|
216 end interface
|
|
217
|
|
218 interface
|
111
|
219 function omp_test_nest_lock (nvar)
|
0
|
220 use omp_lib_kinds
|
111
|
221 integer (4) :: omp_test_nest_lock
|
|
222 integer (omp_nest_lock_kind), intent (inout) :: nvar
|
0
|
223 end function omp_test_nest_lock
|
|
224 end interface
|
|
225
|
|
226 interface
|
|
227 function omp_get_wtick ()
|
|
228 double precision :: omp_get_wtick
|
|
229 end function omp_get_wtick
|
|
230 end interface
|
|
231
|
|
232 interface
|
|
233 function omp_get_wtime ()
|
|
234 double precision :: omp_get_wtime
|
|
235 end function omp_get_wtime
|
|
236 end interface
|
|
237
|
|
238 interface omp_set_schedule
|
111
|
239 subroutine omp_set_schedule (kind, chunk_size)
|
0
|
240 use omp_lib_kinds
|
|
241 integer (omp_sched_kind), intent (in) :: kind
|
111
|
242 integer (4), intent (in) :: chunk_size
|
0
|
243 end subroutine omp_set_schedule
|
111
|
244 subroutine omp_set_schedule_8 (kind, chunk_size)
|
0
|
245 use omp_lib_kinds
|
|
246 integer (omp_sched_kind), intent (in) :: kind
|
111
|
247 integer (8), intent (in) :: chunk_size
|
0
|
248 end subroutine omp_set_schedule_8
|
|
249 end interface
|
|
250
|
|
251 interface omp_get_schedule
|
111
|
252 subroutine omp_get_schedule (kind, chunk_size)
|
0
|
253 use omp_lib_kinds
|
|
254 integer (omp_sched_kind), intent (out) :: kind
|
111
|
255 integer (4), intent (out) :: chunk_size
|
0
|
256 end subroutine omp_get_schedule
|
111
|
257 subroutine omp_get_schedule_8 (kind, chunk_size)
|
0
|
258 use omp_lib_kinds
|
|
259 integer (omp_sched_kind), intent (out) :: kind
|
111
|
260 integer (8), intent (out) :: chunk_size
|
0
|
261 end subroutine omp_get_schedule_8
|
|
262 end interface
|
|
263
|
|
264 interface
|
|
265 function omp_get_thread_limit ()
|
111
|
266 integer (4) :: omp_get_thread_limit
|
0
|
267 end function omp_get_thread_limit
|
|
268 end interface
|
|
269
|
|
270 interface omp_set_max_active_levels
|
|
271 subroutine omp_set_max_active_levels (max_levels)
|
|
272 integer (4), intent (in) :: max_levels
|
|
273 end subroutine omp_set_max_active_levels
|
|
274 subroutine omp_set_max_active_levels_8 (max_levels)
|
|
275 integer (8), intent (in) :: max_levels
|
|
276 end subroutine omp_set_max_active_levels_8
|
|
277 end interface
|
|
278
|
|
279 interface
|
|
280 function omp_get_max_active_levels ()
|
111
|
281 integer (4) :: omp_get_max_active_levels
|
0
|
282 end function omp_get_max_active_levels
|
|
283 end interface
|
|
284
|
|
285 interface
|
|
286 function omp_get_level ()
|
111
|
287 integer (4) :: omp_get_level
|
0
|
288 end function omp_get_level
|
|
289 end interface
|
|
290
|
|
291 interface omp_get_ancestor_thread_num
|
|
292 function omp_get_ancestor_thread_num (level)
|
|
293 integer (4), intent (in) :: level
|
111
|
294 integer (4) :: omp_get_ancestor_thread_num
|
0
|
295 end function omp_get_ancestor_thread_num
|
|
296 function omp_get_ancestor_thread_num_8 (level)
|
|
297 integer (8), intent (in) :: level
|
111
|
298 integer (4) :: omp_get_ancestor_thread_num_8
|
0
|
299 end function omp_get_ancestor_thread_num_8
|
|
300 end interface
|
|
301
|
|
302 interface omp_get_team_size
|
|
303 function omp_get_team_size (level)
|
|
304 integer (4), intent (in) :: level
|
111
|
305 integer (4) :: omp_get_team_size
|
0
|
306 end function omp_get_team_size
|
|
307 function omp_get_team_size_8 (level)
|
|
308 integer (8), intent (in) :: level
|
111
|
309 integer (4) :: omp_get_team_size_8
|
0
|
310 end function omp_get_team_size_8
|
|
311 end interface
|
|
312
|
|
313 interface
|
|
314 function omp_get_active_level ()
|
111
|
315 integer (4) :: omp_get_active_level
|
0
|
316 end function omp_get_active_level
|
|
317 end interface
|
|
318
|
111
|
319 interface
|
|
320 function omp_in_final ()
|
|
321 logical (4) :: omp_in_final
|
|
322 end function omp_in_final
|
|
323 end interface
|
|
324
|
|
325 interface
|
|
326 function omp_get_cancellation ()
|
|
327 logical (4) :: omp_get_cancellation
|
|
328 end function omp_get_cancellation
|
|
329 end interface
|
|
330
|
|
331 interface
|
|
332 function omp_get_proc_bind ()
|
|
333 use omp_lib_kinds
|
|
334 integer (omp_proc_bind_kind) :: omp_get_proc_bind
|
|
335 end function omp_get_proc_bind
|
|
336 end interface
|
|
337
|
|
338 interface
|
|
339 function omp_get_num_places ()
|
|
340 integer (4) :: omp_get_num_places
|
|
341 end function omp_get_num_places
|
|
342 end interface
|
|
343
|
|
344 interface omp_get_place_num_procs
|
|
345 function omp_get_place_num_procs (place_num)
|
|
346 integer (4), intent(in) :: place_num
|
|
347 integer (4) :: omp_get_place_num_procs
|
|
348 end function omp_get_place_num_procs
|
|
349
|
|
350 function omp_get_place_num_procs_8 (place_num)
|
|
351 integer (8), intent(in) :: place_num
|
|
352 integer (4) :: omp_get_place_num_procs_8
|
|
353 end function omp_get_place_num_procs_8
|
|
354 end interface
|
|
355
|
|
356 interface omp_get_place_proc_ids
|
|
357 subroutine omp_get_place_proc_ids (place_num, ids)
|
|
358 integer (4), intent(in) :: place_num
|
|
359 integer (4), intent(out) :: ids(*)
|
|
360 end subroutine omp_get_place_proc_ids
|
|
361
|
|
362 subroutine omp_get_place_proc_ids_8 (place_num, ids)
|
|
363 integer (8), intent(in) :: place_num
|
|
364 integer (8), intent(out) :: ids(*)
|
|
365 end subroutine omp_get_place_proc_ids_8
|
|
366 end interface
|
|
367
|
|
368 interface
|
|
369 function omp_get_place_num ()
|
|
370 integer (4) :: omp_get_place_num
|
|
371 end function omp_get_place_num
|
|
372 end interface
|
|
373
|
|
374 interface
|
|
375 function omp_get_partition_num_places ()
|
|
376 integer (4) :: omp_get_partition_num_places
|
|
377 end function omp_get_partition_num_places
|
|
378 end interface
|
|
379
|
|
380 interface omp_get_partition_place_nums
|
|
381 subroutine omp_get_partition_place_nums (place_nums)
|
|
382 integer (4), intent(out) :: place_nums(*)
|
|
383 end subroutine omp_get_partition_place_nums
|
|
384
|
|
385 subroutine omp_get_partition_place_nums_8 (place_nums)
|
|
386 integer (8), intent(out) :: place_nums(*)
|
|
387 end subroutine omp_get_partition_place_nums_8
|
|
388 end interface
|
|
389
|
|
390 interface omp_set_default_device
|
|
391 subroutine omp_set_default_device (device_num)
|
|
392 integer (4), intent (in) :: device_num
|
|
393 end subroutine omp_set_default_device
|
|
394 subroutine omp_set_default_device_8 (device_num)
|
|
395 integer (8), intent (in) :: device_num
|
|
396 end subroutine omp_set_default_device_8
|
|
397 end interface
|
|
398
|
|
399 interface
|
|
400 function omp_get_default_device ()
|
|
401 integer (4) :: omp_get_default_device
|
|
402 end function omp_get_default_device
|
|
403 end interface
|
|
404
|
|
405 interface
|
|
406 function omp_get_num_devices ()
|
|
407 integer (4) :: omp_get_num_devices
|
|
408 end function omp_get_num_devices
|
|
409 end interface
|
|
410
|
|
411 interface
|
|
412 function omp_get_num_teams ()
|
|
413 integer (4) :: omp_get_num_teams
|
|
414 end function omp_get_num_teams
|
|
415 end interface
|
|
416
|
|
417 interface
|
|
418 function omp_get_team_num ()
|
|
419 integer (4) :: omp_get_team_num
|
|
420 end function omp_get_team_num
|
|
421 end interface
|
|
422
|
|
423 interface
|
|
424 function omp_is_initial_device ()
|
|
425 logical (4) :: omp_is_initial_device
|
|
426 end function omp_is_initial_device
|
|
427 end interface
|
|
428
|
|
429 interface
|
|
430 function omp_get_initial_device ()
|
|
431 integer (4) :: omp_get_initial_device
|
|
432 end function omp_get_initial_device
|
|
433 end interface
|
|
434
|
|
435 interface
|
|
436 function omp_get_max_task_priority ()
|
|
437 integer (4) :: omp_get_max_task_priority
|
|
438 end function omp_get_max_task_priority
|
|
439 end interface
|
|
440
|
145
|
441 interface
|
|
442 subroutine omp_set_affinity_format (format)
|
|
443 character(len=*), intent(in) :: format
|
|
444 end subroutine omp_set_affinity_format
|
|
445 end interface
|
|
446
|
|
447 interface
|
|
448 function omp_get_affinity_format (buffer)
|
|
449 integer (4) :: omp_get_affinity_format
|
|
450 character(len=*), intent(out) :: buffer
|
|
451 end function omp_get_affinity_format
|
|
452 end interface
|
|
453
|
|
454 interface
|
|
455 subroutine omp_display_affinity (format)
|
|
456 character(len=*), intent(in) :: format
|
|
457 end subroutine omp_display_affinity
|
|
458 end interface
|
|
459
|
|
460 interface
|
|
461 function omp_capture_affinity (buffer, format)
|
|
462 integer (4) :: omp_capture_affinity
|
|
463 character(len=*), intent(out) :: buffer
|
|
464 character(len=*), intent(in) :: format
|
|
465 end function omp_capture_affinity
|
|
466 end interface
|
|
467
|
|
468 interface
|
|
469 function omp_pause_resource (kind, device_num)
|
|
470 use omp_lib_kinds
|
|
471 integer (4) :: omp_pause_resource
|
|
472 integer (kind=omp_pause_resource_kind), &
|
|
473 intent(in) :: kind
|
|
474 integer (4) :: device_num
|
|
475 end function
|
|
476 end interface
|
|
477
|
|
478 interface
|
|
479 function omp_pause_resource_all (kind)
|
|
480 use omp_lib_kinds
|
|
481 integer (4) :: omp_pause_resource_all
|
|
482 integer (kind=omp_pause_resource_kind), &
|
|
483 intent(in) :: kind
|
|
484 end function
|
|
485 end interface
|
|
486
|
0
|
487 end module omp_lib
|