1 ! Copyright (C) 2005-2015 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
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)
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
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/>.
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 (omp_sched_kind
), parameter :: omp_sched_static
= 1
33 integer (omp_sched_kind
), parameter :: omp_sched_dynamic
= 2
34 integer (omp_sched_kind
), parameter :: omp_sched_guided
= 3
35 integer (omp_sched_kind
), parameter :: omp_sched_auto
= 4
36 integer (omp_proc_bind_kind
), parameter :: omp_proc_bind_false
= 0
37 integer (omp_proc_bind_kind
), parameter :: omp_proc_bind_true
= 1
38 integer (omp_proc_bind_kind
), parameter :: omp_proc_bind_master
= 2
39 integer (omp_proc_bind_kind
), parameter :: omp_proc_bind_close
= 3
40 integer (omp_proc_bind_kind
), parameter :: omp_proc_bind_spread
= 4
46 integer, parameter :: openmp_version
= 201307
49 subroutine omp_init_lock (svar
)
51 integer (omp_lock_kind
), intent (out
) :: svar
52 end subroutine omp_init_lock
56 subroutine omp_init_nest_lock (nvar
)
58 integer (omp_nest_lock_kind
), intent (out
) :: nvar
59 end subroutine omp_init_nest_lock
63 subroutine omp_destroy_lock (svar
)
65 integer (omp_lock_kind
), intent (inout
) :: svar
66 end subroutine omp_destroy_lock
70 subroutine omp_destroy_nest_lock (nvar
)
72 integer (omp_nest_lock_kind
), intent (inout
) :: nvar
73 end subroutine omp_destroy_nest_lock
77 subroutine omp_set_lock (svar
)
79 integer (omp_lock_kind
), intent (inout
) :: svar
80 end subroutine omp_set_lock
84 subroutine omp_set_nest_lock (nvar
)
86 integer (omp_nest_lock_kind
), intent (inout
) :: nvar
87 end subroutine omp_set_nest_lock
91 subroutine omp_unset_lock (svar
)
93 integer (omp_lock_kind
), intent (inout
) :: svar
94 end subroutine omp_unset_lock
98 subroutine omp_unset_nest_lock (nvar
)
100 integer (omp_nest_lock_kind
), intent (inout
) :: nvar
101 end subroutine omp_unset_nest_lock
104 interface omp_set_dynamic
105 subroutine omp_set_dynamic (dynamic_threads
)
106 logical (4), intent (in
) :: dynamic_threads
107 end subroutine omp_set_dynamic
108 subroutine omp_set_dynamic_8 (dynamic_threads
)
109 logical (8), intent (in
) :: dynamic_threads
110 end subroutine omp_set_dynamic_8
113 interface omp_set_nested
114 subroutine omp_set_nested (nested
)
115 logical (4), intent (in
) :: nested
116 end subroutine omp_set_nested
117 subroutine omp_set_nested_8 (nested
)
118 logical (8), intent (in
) :: nested
119 end subroutine omp_set_nested_8
122 interface omp_set_num_threads
123 subroutine omp_set_num_threads (num_threads
)
124 integer (4), intent (in
) :: num_threads
125 end subroutine omp_set_num_threads
126 subroutine omp_set_num_threads_8 (num_threads
)
127 integer (8), intent (in
) :: num_threads
128 end subroutine omp_set_num_threads_8
132 function omp_get_dynamic ()
133 logical (4) :: omp_get_dynamic
134 end function omp_get_dynamic
138 function omp_get_nested ()
139 logical (4) :: omp_get_nested
140 end function omp_get_nested
144 function omp_in_parallel ()
145 logical (4) :: omp_in_parallel
146 end function omp_in_parallel
150 function omp_test_lock (svar
)
152 logical (4) :: omp_test_lock
153 integer (omp_lock_kind
), intent (inout
) :: svar
154 end function omp_test_lock
158 function omp_get_max_threads ()
159 integer (4) :: omp_get_max_threads
160 end function omp_get_max_threads
164 function omp_get_num_procs ()
165 integer (4) :: omp_get_num_procs
166 end function omp_get_num_procs
170 function omp_get_num_threads ()
171 integer (4) :: omp_get_num_threads
172 end function omp_get_num_threads
176 function omp_get_thread_num ()
177 integer (4) :: omp_get_thread_num
178 end function omp_get_thread_num
182 function omp_test_nest_lock (nvar
)
184 integer (4) :: omp_test_nest_lock
185 integer (omp_nest_lock_kind
), intent (inout
) :: nvar
186 end function omp_test_nest_lock
190 function omp_get_wtick ()
191 double precision :: omp_get_wtick
192 end function omp_get_wtick
196 function omp_get_wtime ()
197 double precision :: omp_get_wtime
198 end function omp_get_wtime
201 interface omp_set_schedule
202 subroutine omp_set_schedule (kind
, modifier
)
204 integer (omp_sched_kind
), intent (in
) :: kind
205 integer (4), intent (in
) :: modifier
206 end subroutine omp_set_schedule
207 subroutine omp_set_schedule_8 (kind
, modifier
)
209 integer (omp_sched_kind
), intent (in
) :: kind
210 integer (8), intent (in
) :: modifier
211 end subroutine omp_set_schedule_8
214 interface omp_get_schedule
215 subroutine omp_get_schedule (kind
, modifier
)
217 integer (omp_sched_kind
), intent (out
) :: kind
218 integer (4), intent (out
) :: modifier
219 end subroutine omp_get_schedule
220 subroutine omp_get_schedule_8 (kind
, modifier
)
222 integer (omp_sched_kind
), intent (out
) :: kind
223 integer (8), intent (out
) :: modifier
224 end subroutine omp_get_schedule_8
228 function omp_get_thread_limit ()
229 integer (4) :: omp_get_thread_limit
230 end function omp_get_thread_limit
233 interface omp_set_max_active_levels
234 subroutine omp_set_max_active_levels (max_levels
)
235 integer (4), intent (in
) :: max_levels
236 end subroutine omp_set_max_active_levels
237 subroutine omp_set_max_active_levels_8 (max_levels
)
238 integer (8), intent (in
) :: max_levels
239 end subroutine omp_set_max_active_levels_8
243 function omp_get_max_active_levels ()
244 integer (4) :: omp_get_max_active_levels
245 end function omp_get_max_active_levels
249 function omp_get_level ()
250 integer (4) :: omp_get_level
251 end function omp_get_level
254 interface omp_get_ancestor_thread_num
255 function omp_get_ancestor_thread_num (level
)
256 integer (4), intent (in
) :: level
257 integer (4) :: omp_get_ancestor_thread_num
258 end function omp_get_ancestor_thread_num
259 function omp_get_ancestor_thread_num_8 (level
)
260 integer (8), intent (in
) :: level
261 integer (4) :: omp_get_ancestor_thread_num_8
262 end function omp_get_ancestor_thread_num_8
265 interface omp_get_team_size
266 function omp_get_team_size (level
)
267 integer (4), intent (in
) :: level
268 integer (4) :: omp_get_team_size
269 end function omp_get_team_size
270 function omp_get_team_size_8 (level
)
271 integer (8), intent (in
) :: level
272 integer (4) :: omp_get_team_size_8
273 end function omp_get_team_size_8
277 function omp_get_active_level ()
278 integer (4) :: omp_get_active_level
279 end function omp_get_active_level
283 function omp_in_final ()
284 logical (4) :: omp_in_final
285 end function omp_in_final
289 function omp_get_cancellation ()
290 logical (4) :: omp_get_cancellation
291 end function omp_get_cancellation
295 function omp_get_proc_bind ()
297 integer (omp_proc_bind_kind
) :: omp_get_proc_bind
298 end function omp_get_proc_bind
301 interface omp_set_default_device
302 subroutine omp_set_default_device (device_num
)
303 integer (4), intent (in
) :: device_num
304 end subroutine omp_set_default_device
305 subroutine omp_set_default_device_8 (device_num
)
306 integer (8), intent (in
) :: device_num
307 end subroutine omp_set_default_device_8
311 function omp_get_default_device ()
312 integer (4) :: omp_get_default_device
313 end function omp_get_default_device
317 function omp_get_num_devices ()
318 integer (4) :: omp_get_num_devices
319 end function omp_get_num_devices
323 function omp_get_num_teams ()
324 integer (4) :: omp_get_num_teams
325 end function omp_get_num_teams
329 function omp_get_team_num ()
330 integer (4) :: omp_get_team_num
331 end function omp_get_team_num
335 function omp_is_initial_device ()
336 logical (4) :: omp_is_initial_device
337 end function omp_is_initial_device