Fix typo in my last commit's ChangeLog entry
[official-gcc.git] / libgomp / omp_lib.f90.in
blobc4e7c0dff4ad82f917077e05643dd7dd09f9d78a
1 ! Copyright (C) 2005-2019 Free Software Foundation, Inc.
2 ! Contributed by Jakub Jelinek <jakub@redhat.com>.
4 ! This file is part of the GNU Offloading and Multi Processing Library
5 ! (libgomp).
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.
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.
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.
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/>.
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
31 integer, parameter :: omp_proc_bind_kind = 4
32 integer, parameter :: omp_lock_hint_kind = 4
33 integer, parameter :: omp_pause_resource_kind = 4
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
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
62 end module
64 module omp_lib
65 use omp_lib_kinds
66 implicit none
67 integer, parameter :: openmp_version = 201511
69 interface
70 subroutine omp_init_lock (svar)
71 use omp_lib_kinds
72 integer (omp_lock_kind), intent (out) :: svar
73 end subroutine omp_init_lock
74 end interface
76 interface
77 subroutine omp_init_lock_with_hint (svar, hint)
78 use omp_lib_kinds
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
84 interface
85 subroutine omp_init_nest_lock (nvar)
86 use omp_lib_kinds
87 integer (omp_nest_lock_kind), intent (out) :: nvar
88 end subroutine omp_init_nest_lock
89 end interface
91 interface
92 subroutine omp_init_nest_lock_with_hint (nvar, hint)
93 use omp_lib_kinds
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
99 interface
100 subroutine omp_destroy_lock (svar)
101 use omp_lib_kinds
102 integer (omp_lock_kind), intent (inout) :: svar
103 end subroutine omp_destroy_lock
104 end interface
106 interface
107 subroutine omp_destroy_nest_lock (nvar)
108 use omp_lib_kinds
109 integer (omp_nest_lock_kind), intent (inout) :: nvar
110 end subroutine omp_destroy_nest_lock
111 end interface
113 interface
114 subroutine omp_set_lock (svar)
115 use omp_lib_kinds
116 integer (omp_lock_kind), intent (inout) :: svar
117 end subroutine omp_set_lock
118 end interface
120 interface
121 subroutine omp_set_nest_lock (nvar)
122 use omp_lib_kinds
123 integer (omp_nest_lock_kind), intent (inout) :: nvar
124 end subroutine omp_set_nest_lock
125 end interface
127 interface
128 subroutine omp_unset_lock (svar)
129 use omp_lib_kinds
130 integer (omp_lock_kind), intent (inout) :: svar
131 end subroutine omp_unset_lock
132 end interface
134 interface
135 subroutine omp_unset_nest_lock (nvar)
136 use omp_lib_kinds
137 integer (omp_nest_lock_kind), intent (inout) :: nvar
138 end subroutine omp_unset_nest_lock
139 end interface
141 interface omp_set_dynamic
142 subroutine omp_set_dynamic (dynamic_threads)
143 logical (4), intent (in) :: dynamic_threads
144 end subroutine omp_set_dynamic
145 subroutine omp_set_dynamic_8 (dynamic_threads)
146 logical (8), intent (in) :: dynamic_threads
147 end subroutine omp_set_dynamic_8
148 end interface
150 interface omp_set_nested
151 subroutine omp_set_nested (nested)
152 logical (4), intent (in) :: nested
153 end subroutine omp_set_nested
154 subroutine omp_set_nested_8 (nested)
155 logical (8), intent (in) :: nested
156 end subroutine omp_set_nested_8
157 end interface
159 interface omp_set_num_threads
160 subroutine omp_set_num_threads (num_threads)
161 integer (4), intent (in) :: num_threads
162 end subroutine omp_set_num_threads
163 subroutine omp_set_num_threads_8 (num_threads)
164 integer (8), intent (in) :: num_threads
165 end subroutine omp_set_num_threads_8
166 end interface
168 interface
169 function omp_get_dynamic ()
170 logical (4) :: omp_get_dynamic
171 end function omp_get_dynamic
172 end interface
174 interface
175 function omp_get_nested ()
176 logical (4) :: omp_get_nested
177 end function omp_get_nested
178 end interface
180 interface
181 function omp_in_parallel ()
182 logical (4) :: omp_in_parallel
183 end function omp_in_parallel
184 end interface
186 interface
187 function omp_test_lock (svar)
188 use omp_lib_kinds
189 logical (4) :: omp_test_lock
190 integer (omp_lock_kind), intent (inout) :: svar
191 end function omp_test_lock
192 end interface
194 interface
195 function omp_get_max_threads ()
196 integer (4) :: omp_get_max_threads
197 end function omp_get_max_threads
198 end interface
200 interface
201 function omp_get_num_procs ()
202 integer (4) :: omp_get_num_procs
203 end function omp_get_num_procs
204 end interface
206 interface
207 function omp_get_num_threads ()
208 integer (4) :: omp_get_num_threads
209 end function omp_get_num_threads
210 end interface
212 interface
213 function omp_get_thread_num ()
214 integer (4) :: omp_get_thread_num
215 end function omp_get_thread_num
216 end interface
218 interface
219 function omp_test_nest_lock (nvar)
220 use omp_lib_kinds
221 integer (4) :: omp_test_nest_lock
222 integer (omp_nest_lock_kind), intent (inout) :: nvar
223 end function omp_test_nest_lock
224 end interface
226 interface
227 function omp_get_wtick ()
228 double precision :: omp_get_wtick
229 end function omp_get_wtick
230 end interface
232 interface
233 function omp_get_wtime ()
234 double precision :: omp_get_wtime
235 end function omp_get_wtime
236 end interface
238 interface omp_set_schedule
239 subroutine omp_set_schedule (kind, chunk_size)
240 use omp_lib_kinds
241 integer (omp_sched_kind), intent (in) :: kind
242 integer (4), intent (in) :: chunk_size
243 end subroutine omp_set_schedule
244 subroutine omp_set_schedule_8 (kind, chunk_size)
245 use omp_lib_kinds
246 integer (omp_sched_kind), intent (in) :: kind
247 integer (8), intent (in) :: chunk_size
248 end subroutine omp_set_schedule_8
249 end interface
251 interface omp_get_schedule
252 subroutine omp_get_schedule (kind, chunk_size)
253 use omp_lib_kinds
254 integer (omp_sched_kind), intent (out) :: kind
255 integer (4), intent (out) :: chunk_size
256 end subroutine omp_get_schedule
257 subroutine omp_get_schedule_8 (kind, chunk_size)
258 use omp_lib_kinds
259 integer (omp_sched_kind), intent (out) :: kind
260 integer (8), intent (out) :: chunk_size
261 end subroutine omp_get_schedule_8
262 end interface
264 interface
265 function omp_get_thread_limit ()
266 integer (4) :: omp_get_thread_limit
267 end function omp_get_thread_limit
268 end interface
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
279 interface
280 function omp_get_max_active_levels ()
281 integer (4) :: omp_get_max_active_levels
282 end function omp_get_max_active_levels
283 end interface
285 interface
286 function omp_get_level ()
287 integer (4) :: omp_get_level
288 end function omp_get_level
289 end interface
291 interface omp_get_ancestor_thread_num
292 function omp_get_ancestor_thread_num (level)
293 integer (4), intent (in) :: level
294 integer (4) :: omp_get_ancestor_thread_num
295 end function omp_get_ancestor_thread_num
296 function omp_get_ancestor_thread_num_8 (level)
297 integer (8), intent (in) :: level
298 integer (4) :: omp_get_ancestor_thread_num_8
299 end function omp_get_ancestor_thread_num_8
300 end interface
302 interface omp_get_team_size
303 function omp_get_team_size (level)
304 integer (4), intent (in) :: level
305 integer (4) :: omp_get_team_size
306 end function omp_get_team_size
307 function omp_get_team_size_8 (level)
308 integer (8), intent (in) :: level
309 integer (4) :: omp_get_team_size_8
310 end function omp_get_team_size_8
311 end interface
313 interface
314 function omp_get_active_level ()
315 integer (4) :: omp_get_active_level
316 end function omp_get_active_level
317 end interface
319 interface
320 function omp_in_final ()
321 logical (4) :: omp_in_final
322 end function omp_in_final
323 end interface
325 interface
326 function omp_get_cancellation ()
327 logical (4) :: omp_get_cancellation
328 end function omp_get_cancellation
329 end interface
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
454 interface
455 subroutine omp_display_affinity (format)
456 character(len=*), intent(in) :: format
457 end subroutine omp_display_affinity
458 end interface
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
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
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
487 end module omp_lib