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 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)
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
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/>.
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
45 integer, parameter :: openmp_version
= 201307
48 subroutine omp_init_lock (svar
)
50 integer (omp_lock_kind
), intent (out
) :: svar
51 end subroutine omp_init_lock
55 subroutine omp_init_nest_lock (nvar
)
57 integer (omp_nest_lock_kind
), intent (out
) :: nvar
58 end subroutine omp_init_nest_lock
62 subroutine omp_destroy_lock (svar
)
64 integer (omp_lock_kind
), intent (inout
) :: svar
65 end subroutine omp_destroy_lock
69 subroutine omp_destroy_nest_lock (nvar
)
71 integer (omp_nest_lock_kind
), intent (inout
) :: nvar
72 end subroutine omp_destroy_nest_lock
76 subroutine omp_set_lock (svar
)
78 integer (omp_lock_kind
), intent (inout
) :: svar
79 end subroutine omp_set_lock
83 subroutine omp_set_nest_lock (nvar
)
85 integer (omp_nest_lock_kind
), intent (inout
) :: nvar
86 end subroutine omp_set_nest_lock
90 subroutine omp_unset_lock (svar
)
92 integer (omp_lock_kind
), intent (inout
) :: svar
93 end subroutine omp_unset_lock
97 subroutine omp_unset_nest_lock (nvar
)
99 integer (omp_nest_lock_kind
), intent (inout
) :: nvar
100 end subroutine omp_unset_nest_lock
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
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
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
131 function omp_get_dynamic ()
132 logical (4) :: omp_get_dynamic
133 end function omp_get_dynamic
137 function omp_get_nested ()
138 logical (4) :: omp_get_nested
139 end function omp_get_nested
143 function omp_in_parallel ()
144 logical (4) :: omp_in_parallel
145 end function omp_in_parallel
149 function omp_test_lock (svar
)
151 logical (4) :: omp_test_lock
152 integer (omp_lock_kind
), intent (inout
) :: svar
153 end function omp_test_lock
157 function omp_get_max_threads ()
158 integer (4) :: omp_get_max_threads
159 end function omp_get_max_threads
163 function omp_get_num_procs ()
164 integer (4) :: omp_get_num_procs
165 end function omp_get_num_procs
169 function omp_get_num_threads ()
170 integer (4) :: omp_get_num_threads
171 end function omp_get_num_threads
175 function omp_get_thread_num ()
176 integer (4) :: omp_get_thread_num
177 end function omp_get_thread_num
181 function omp_test_nest_lock (nvar
)
183 integer (4) :: omp_test_nest_lock
184 integer (omp_nest_lock_kind
), intent (inout
) :: nvar
185 end function omp_test_nest_lock
189 function omp_get_wtick ()
190 double precision :: omp_get_wtick
191 end function omp_get_wtick
195 function omp_get_wtime ()
196 double precision :: omp_get_wtime
197 end function omp_get_wtime
200 interface omp_set_schedule
201 subroutine omp_set_schedule (kind
, modifier
)
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
)
208 integer (omp_sched_kind
), intent (in
) :: kind
209 integer (8), intent (in
) :: modifier
210 end subroutine omp_set_schedule_8
213 interface omp_get_schedule
214 subroutine omp_get_schedule (kind
, modifier
)
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
)
221 integer (omp_sched_kind
), intent (out
) :: kind
222 integer (8), intent (out
) :: modifier
223 end subroutine omp_get_schedule_8
227 function omp_get_thread_limit ()
228 integer (4) :: omp_get_thread_limit
229 end function omp_get_thread_limit
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
242 function omp_get_max_active_levels ()
243 integer (4) :: omp_get_max_active_levels
244 end function omp_get_max_active_levels
248 function omp_get_level ()
249 integer (4) :: omp_get_level
250 end function omp_get_level
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
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
276 function omp_get_active_level ()
277 integer (4) :: omp_get_active_level
278 end function omp_get_active_level
282 function omp_in_final ()
283 logical (4) :: omp_in_final
284 end function omp_in_final
288 function omp_get_cancellation ()
289 logical (4) :: omp_get_cancellation
290 end function omp_get_cancellation
294 function omp_get_proc_bind ()
296 integer (omp_proc_bind_kind
) :: omp_get_proc_bind
297 end function omp_get_proc_bind
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
310 function omp_get_default_device ()
311 integer (4) :: omp_get_default_device
312 end function omp_get_default_device
316 function omp_get_num_devices ()
317 integer (4) :: omp_get_num_devices
318 end function omp_get_num_devices
322 function omp_get_num_teams ()
323 integer (4) :: omp_get_num_teams
324 end function omp_get_num_teams
328 function omp_get_team_num ()
329 integer (4) :: omp_get_team_num
330 end function omp_get_team_num
334 function omp_is_initial_device ()
335 logical (4) :: omp_is_initial_device
336 end function omp_is_initial_device