1 ! Copyright (C) 2005, 2007, 2008, 2009 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_integer_kind
= 4
28 integer, parameter :: omp_logical_kind
= 4
29 integer, parameter :: omp_lock_kind
= @OMP_LOCK_KIND@
30 integer, parameter :: omp_nest_lock_kind
= @OMP_NEST_LOCK_KIND@
31 integer, parameter :: omp_sched_kind
= 4
37 integer, parameter :: openmp_version
= 200805
38 integer (omp_sched_kind
), parameter :: omp_sched_static
= 1
39 integer (omp_sched_kind
), parameter :: omp_sched_dynamic
= 2
40 integer (omp_sched_kind
), parameter :: omp_sched_guided
= 3
41 integer (omp_sched_kind
), parameter :: omp_sched_auto
= 4
44 subroutine omp_init_lock (lock
)
46 integer (omp_lock_kind
), intent (out
) :: lock
47 end subroutine omp_init_lock
51 subroutine omp_init_nest_lock (lock
)
53 integer (omp_nest_lock_kind
), intent (out
) :: lock
54 end subroutine omp_init_nest_lock
58 subroutine omp_destroy_lock (lock
)
60 integer (omp_lock_kind
), intent (inout
) :: lock
61 end subroutine omp_destroy_lock
65 subroutine omp_destroy_nest_lock (lock
)
67 integer (omp_nest_lock_kind
), intent (inout
) :: lock
68 end subroutine omp_destroy_nest_lock
72 subroutine omp_set_lock (lock
)
74 integer (omp_lock_kind
), intent (inout
) :: lock
75 end subroutine omp_set_lock
79 subroutine omp_set_nest_lock (lock
)
81 integer (omp_nest_lock_kind
), intent (inout
) :: lock
82 end subroutine omp_set_nest_lock
86 subroutine omp_unset_lock (lock
)
88 integer (omp_lock_kind
), intent (inout
) :: lock
89 end subroutine omp_unset_lock
93 subroutine omp_unset_nest_lock (lock
)
95 integer (omp_nest_lock_kind
), intent (inout
) :: lock
96 end subroutine omp_unset_nest_lock
99 interface omp_set_dynamic
100 subroutine omp_set_dynamic (set
)
101 logical (4), intent (in
) :: set
102 end subroutine omp_set_dynamic
103 subroutine omp_set_dynamic_8 (set
)
104 logical (8), intent (in
) :: set
105 end subroutine omp_set_dynamic_8
108 interface omp_set_nested
109 subroutine omp_set_nested (set
)
110 logical (4), intent (in
) :: set
111 end subroutine omp_set_nested
112 subroutine omp_set_nested_8 (set
)
113 logical (8), intent (in
) :: set
114 end subroutine omp_set_nested_8
117 interface omp_set_num_threads
118 subroutine omp_set_num_threads (set
)
119 integer (4), intent (in
) :: set
120 end subroutine omp_set_num_threads
121 subroutine omp_set_num_threads_8 (set
)
122 integer (8), intent (in
) :: set
123 end subroutine omp_set_num_threads_8
127 function omp_get_dynamic ()
129 logical (omp_logical_kind
) :: omp_get_dynamic
130 end function omp_get_dynamic
134 function omp_get_nested ()
136 logical (omp_logical_kind
) :: omp_get_nested
137 end function omp_get_nested
141 function omp_in_parallel ()
143 logical (omp_logical_kind
) :: omp_in_parallel
144 end function omp_in_parallel
148 function omp_test_lock (lock
)
150 logical (omp_logical_kind
) :: omp_test_lock
151 integer (omp_lock_kind
), intent (inout
) :: lock
152 end function omp_test_lock
156 function omp_get_max_threads ()
158 integer (omp_integer_kind
) :: omp_get_max_threads
159 end function omp_get_max_threads
163 function omp_get_num_procs ()
165 integer (omp_integer_kind
) :: omp_get_num_procs
166 end function omp_get_num_procs
170 function omp_get_num_threads ()
172 integer (omp_integer_kind
) :: omp_get_num_threads
173 end function omp_get_num_threads
177 function omp_get_thread_num ()
179 integer (omp_integer_kind
) :: omp_get_thread_num
180 end function omp_get_thread_num
184 function omp_test_nest_lock (lock
)
186 integer (omp_integer_kind
) :: omp_test_nest_lock
187 integer (omp_nest_lock_kind
), intent (inout
) :: lock
188 end function omp_test_nest_lock
192 function omp_get_wtick ()
193 double precision :: omp_get_wtick
194 end function omp_get_wtick
198 function omp_get_wtime ()
199 double precision :: omp_get_wtime
200 end function omp_get_wtime
203 interface omp_set_schedule
204 subroutine omp_set_schedule (kind
, modifier
)
206 integer (omp_sched_kind
), intent (in
) :: kind
207 integer (4), intent (in
) :: modifier
208 end subroutine omp_set_schedule
209 subroutine omp_set_schedule_8 (kind
, modifier
)
211 integer (omp_sched_kind
), intent (in
) :: kind
212 integer (8), intent (in
) :: modifier
213 end subroutine omp_set_schedule_8
216 interface omp_get_schedule
217 subroutine omp_get_schedule (kind
, modifier
)
219 integer (omp_sched_kind
), intent (out
) :: kind
220 integer (4), intent (out
) :: modifier
221 end subroutine omp_get_schedule
222 subroutine omp_get_schedule_8 (kind
, modifier
)
224 integer (omp_sched_kind
), intent (out
) :: kind
225 integer (8), intent (out
) :: modifier
226 end subroutine omp_get_schedule_8
230 function omp_get_thread_limit ()
232 integer (omp_integer_kind
) :: omp_get_thread_limit
233 end function omp_get_thread_limit
236 interface omp_set_max_active_levels
237 subroutine omp_set_max_active_levels (max_levels
)
239 integer (4), intent (in
) :: max_levels
240 end subroutine omp_set_max_active_levels
241 subroutine omp_set_max_active_levels_8 (max_levels
)
243 integer (8), intent (in
) :: max_levels
244 end subroutine omp_set_max_active_levels_8
248 function omp_get_max_active_levels ()
250 integer (omp_integer_kind
) :: omp_get_max_active_levels
251 end function omp_get_max_active_levels
255 function omp_get_level ()
257 integer (omp_integer_kind
) :: omp_get_level
258 end function omp_get_level
261 interface omp_get_ancestor_thread_num
262 function omp_get_ancestor_thread_num (level
)
264 integer (4), intent (in
) :: level
265 integer (omp_integer_kind
) :: omp_get_ancestor_thread_num
266 end function omp_get_ancestor_thread_num
267 function omp_get_ancestor_thread_num_8 (level
)
269 integer (8), intent (in
) :: level
270 integer (omp_integer_kind
) :: omp_get_ancestor_thread_num_8
271 end function omp_get_ancestor_thread_num_8
274 interface omp_get_team_size
275 function omp_get_team_size (level
)
277 integer (4), intent (in
) :: level
278 integer (omp_integer_kind
) :: omp_get_team_size
279 end function omp_get_team_size
280 function omp_get_team_size_8 (level
)
282 integer (8), intent (in
) :: level
283 integer (omp_integer_kind
) :: omp_get_team_size_8
284 end function omp_get_team_size_8
288 function omp_get_active_level ()
290 integer (omp_integer_kind
) :: omp_get_active_level
291 end function omp_get_active_level