scanner.c (skip_free_comments, [...]): Use gfc_warning_now instead of ..._now_1.
[official-gcc.git] / libgomp / omp_lib.f90.in
blob757053c9fbc79573da43709311bf9196b312f000
1 ! Copyright (C) 2005-2014 Free Software Foundation, Inc.
2 ! Contributed by Jakub Jelinek <jakub@redhat.com>.
4 ! This file is part of the GNU OpenMP Library (libgomp).
6 ! Libgomp is free software; you can redistribute it and/or modify it
7 ! under the terms of the GNU General Public License as published by
8 ! the Free Software Foundation; either version 3, or (at your option)
9 ! any later version.
11 ! Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
12 ! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 ! FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 ! more details.
16 ! Under Section 7 of GPL version 3, you are granted additional
17 ! permissions described in the GCC Runtime Library Exception, version
18 ! 3.1, as published by the Free Software Foundation.
20 ! You should have received a copy of the GNU General Public License and
21 ! a copy of the GCC Runtime Library Exception along with this program;
22 ! see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
23 ! <http://www.gnu.org/licenses/>.
25 module omp_lib_kinds
26 implicit none
27 integer, parameter :: omp_lock_kind = @OMP_LOCK_KIND@
28 integer, parameter :: omp_nest_lock_kind = @OMP_NEST_LOCK_KIND@
29 integer, parameter :: omp_sched_kind = 4
30 integer, parameter :: omp_proc_bind_kind = 4
31 integer (omp_sched_kind), parameter :: omp_sched_static = 1
32 integer (omp_sched_kind), parameter :: omp_sched_dynamic = 2
33 integer (omp_sched_kind), parameter :: omp_sched_guided = 3
34 integer (omp_sched_kind), parameter :: omp_sched_auto = 4
35 integer (omp_proc_bind_kind), parameter :: omp_proc_bind_false = 0
36 integer (omp_proc_bind_kind), parameter :: omp_proc_bind_true = 1
37 integer (omp_proc_bind_kind), parameter :: omp_proc_bind_master = 2
38 integer (omp_proc_bind_kind), parameter :: omp_proc_bind_close = 3
39 integer (omp_proc_bind_kind), parameter :: omp_proc_bind_spread = 4
40 end module
42 module omp_lib
43 use omp_lib_kinds
44 implicit none
45 integer, parameter :: openmp_version = 201307
47 interface
48 subroutine omp_init_lock (svar)
49 use omp_lib_kinds
50 integer (omp_lock_kind), intent (out) :: svar
51 end subroutine omp_init_lock
52 end interface
54 interface
55 subroutine omp_init_nest_lock (nvar)
56 use omp_lib_kinds
57 integer (omp_nest_lock_kind), intent (out) :: nvar
58 end subroutine omp_init_nest_lock
59 end interface
61 interface
62 subroutine omp_destroy_lock (svar)
63 use omp_lib_kinds
64 integer (omp_lock_kind), intent (inout) :: svar
65 end subroutine omp_destroy_lock
66 end interface
68 interface
69 subroutine omp_destroy_nest_lock (nvar)
70 use omp_lib_kinds
71 integer (omp_nest_lock_kind), intent (inout) :: nvar
72 end subroutine omp_destroy_nest_lock
73 end interface
75 interface
76 subroutine omp_set_lock (svar)
77 use omp_lib_kinds
78 integer (omp_lock_kind), intent (inout) :: svar
79 end subroutine omp_set_lock
80 end interface
82 interface
83 subroutine omp_set_nest_lock (nvar)
84 use omp_lib_kinds
85 integer (omp_nest_lock_kind), intent (inout) :: nvar
86 end subroutine omp_set_nest_lock
87 end interface
89 interface
90 subroutine omp_unset_lock (svar)
91 use omp_lib_kinds
92 integer (omp_lock_kind), intent (inout) :: svar
93 end subroutine omp_unset_lock
94 end interface
96 interface
97 subroutine omp_unset_nest_lock (nvar)
98 use omp_lib_kinds
99 integer (omp_nest_lock_kind), intent (inout) :: nvar
100 end subroutine omp_unset_nest_lock
101 end interface
103 interface omp_set_dynamic
104 subroutine omp_set_dynamic (dynamic_threads)
105 logical (4), intent (in) :: dynamic_threads
106 end subroutine omp_set_dynamic
107 subroutine omp_set_dynamic_8 (dynamic_threads)
108 logical (8), intent (in) :: dynamic_threads
109 end subroutine omp_set_dynamic_8
110 end interface
112 interface omp_set_nested
113 subroutine omp_set_nested (nested)
114 logical (4), intent (in) :: nested
115 end subroutine omp_set_nested
116 subroutine omp_set_nested_8 (nested)
117 logical (8), intent (in) :: nested
118 end subroutine omp_set_nested_8
119 end interface
121 interface omp_set_num_threads
122 subroutine omp_set_num_threads (num_threads)
123 integer (4), intent (in) :: num_threads
124 end subroutine omp_set_num_threads
125 subroutine omp_set_num_threads_8 (num_threads)
126 integer (8), intent (in) :: num_threads
127 end subroutine omp_set_num_threads_8
128 end interface
130 interface
131 function omp_get_dynamic ()
132 logical (4) :: omp_get_dynamic
133 end function omp_get_dynamic
134 end interface
136 interface
137 function omp_get_nested ()
138 logical (4) :: omp_get_nested
139 end function omp_get_nested
140 end interface
142 interface
143 function omp_in_parallel ()
144 logical (4) :: omp_in_parallel
145 end function omp_in_parallel
146 end interface
148 interface
149 function omp_test_lock (svar)
150 use omp_lib_kinds
151 logical (4) :: omp_test_lock
152 integer (omp_lock_kind), intent (inout) :: svar
153 end function omp_test_lock
154 end interface
156 interface
157 function omp_get_max_threads ()
158 integer (4) :: omp_get_max_threads
159 end function omp_get_max_threads
160 end interface
162 interface
163 function omp_get_num_procs ()
164 integer (4) :: omp_get_num_procs
165 end function omp_get_num_procs
166 end interface
168 interface
169 function omp_get_num_threads ()
170 integer (4) :: omp_get_num_threads
171 end function omp_get_num_threads
172 end interface
174 interface
175 function omp_get_thread_num ()
176 integer (4) :: omp_get_thread_num
177 end function omp_get_thread_num
178 end interface
180 interface
181 function omp_test_nest_lock (nvar)
182 use omp_lib_kinds
183 integer (4) :: omp_test_nest_lock
184 integer (omp_nest_lock_kind), intent (inout) :: nvar
185 end function omp_test_nest_lock
186 end interface
188 interface
189 function omp_get_wtick ()
190 double precision :: omp_get_wtick
191 end function omp_get_wtick
192 end interface
194 interface
195 function omp_get_wtime ()
196 double precision :: omp_get_wtime
197 end function omp_get_wtime
198 end interface
200 interface omp_set_schedule
201 subroutine omp_set_schedule (kind, modifier)
202 use omp_lib_kinds
203 integer (omp_sched_kind), intent (in) :: kind
204 integer (4), intent (in) :: modifier
205 end subroutine omp_set_schedule
206 subroutine omp_set_schedule_8 (kind, modifier)
207 use omp_lib_kinds
208 integer (omp_sched_kind), intent (in) :: kind
209 integer (8), intent (in) :: modifier
210 end subroutine omp_set_schedule_8
211 end interface
213 interface omp_get_schedule
214 subroutine omp_get_schedule (kind, modifier)
215 use omp_lib_kinds
216 integer (omp_sched_kind), intent (out) :: kind
217 integer (4), intent (out) :: modifier
218 end subroutine omp_get_schedule
219 subroutine omp_get_schedule_8 (kind, modifier)
220 use omp_lib_kinds
221 integer (omp_sched_kind), intent (out) :: kind
222 integer (8), intent (out) :: modifier
223 end subroutine omp_get_schedule_8
224 end interface
226 interface
227 function omp_get_thread_limit ()
228 integer (4) :: omp_get_thread_limit
229 end function omp_get_thread_limit
230 end interface
232 interface omp_set_max_active_levels
233 subroutine omp_set_max_active_levels (max_levels)
234 integer (4), intent (in) :: max_levels
235 end subroutine omp_set_max_active_levels
236 subroutine omp_set_max_active_levels_8 (max_levels)
237 integer (8), intent (in) :: max_levels
238 end subroutine omp_set_max_active_levels_8
239 end interface
241 interface
242 function omp_get_max_active_levels ()
243 integer (4) :: omp_get_max_active_levels
244 end function omp_get_max_active_levels
245 end interface
247 interface
248 function omp_get_level ()
249 integer (4) :: omp_get_level
250 end function omp_get_level
251 end interface
253 interface omp_get_ancestor_thread_num
254 function omp_get_ancestor_thread_num (level)
255 integer (4), intent (in) :: level
256 integer (4) :: omp_get_ancestor_thread_num
257 end function omp_get_ancestor_thread_num
258 function omp_get_ancestor_thread_num_8 (level)
259 integer (8), intent (in) :: level
260 integer (4) :: omp_get_ancestor_thread_num_8
261 end function omp_get_ancestor_thread_num_8
262 end interface
264 interface omp_get_team_size
265 function omp_get_team_size (level)
266 integer (4), intent (in) :: level
267 integer (4) :: omp_get_team_size
268 end function omp_get_team_size
269 function omp_get_team_size_8 (level)
270 integer (8), intent (in) :: level
271 integer (4) :: omp_get_team_size_8
272 end function omp_get_team_size_8
273 end interface
275 interface
276 function omp_get_active_level ()
277 integer (4) :: omp_get_active_level
278 end function omp_get_active_level
279 end interface
281 interface
282 function omp_in_final ()
283 logical (4) :: omp_in_final
284 end function omp_in_final
285 end interface
287 interface
288 function omp_get_cancellation ()
289 logical (4) :: omp_get_cancellation
290 end function omp_get_cancellation
291 end interface
293 interface
294 function omp_get_proc_bind ()
295 use omp_lib_kinds
296 integer (omp_proc_bind_kind) :: omp_get_proc_bind
297 end function omp_get_proc_bind
298 end interface
300 interface omp_set_default_device
301 subroutine omp_set_default_device (device_num)
302 integer (4), intent (in) :: device_num
303 end subroutine omp_set_default_device
304 subroutine omp_set_default_device_8 (device_num)
305 integer (8), intent (in) :: device_num
306 end subroutine omp_set_default_device_8
307 end interface
309 interface
310 function omp_get_default_device ()
311 integer (4) :: omp_get_default_device
312 end function omp_get_default_device
313 end interface
315 interface
316 function omp_get_num_devices ()
317 integer (4) :: omp_get_num_devices
318 end function omp_get_num_devices
319 end interface
321 interface
322 function omp_get_num_teams ()
323 integer (4) :: omp_get_num_teams
324 end function omp_get_num_teams
325 end interface
327 interface
328 function omp_get_team_num ()
329 integer (4) :: omp_get_team_num
330 end function omp_get_team_num
331 end interface
333 interface
334 function omp_is_initial_device ()
335 logical (4) :: omp_is_initial_device
336 end function omp_is_initial_device
337 end interface
339 end module omp_lib