1 ! Copyright (C) 2005, 2007, 2008 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 Lesser General Public License as published by
8 ! the Free Software Foundation; either version 2.1 of the License, or
9 ! (at your option) 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 Lesser General Public License for
16 ! You should have received a copy of the GNU Lesser General Public License
17 ! along with libgomp; see the file COPYING.LIB. If not, write to the
18 ! Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 ! MA 02110-1301, USA. */
21 ! As a special exception, if you link this library with other files, some
22 ! of which are compiled with GCC, to produce an executable, this library
23 ! does not by itself cause the resulting executable to be covered by the
24 ! GNU General Public License. This exception does not however invalidate
25 ! any other reasons why the executable file might be covered by the GNU
26 ! General Public License.
29 integer, parameter :: omp_integer_kind = 4
30 integer, parameter :: omp_logical_kind = 4
31 integer, parameter :: omp_lock_kind = @OMP_LOCK_KIND@
32 integer, parameter :: omp_nest_lock_kind = @OMP_NEST_LOCK_KIND@
33 integer, parameter :: omp_sched_kind = 4
38 integer, parameter :: openmp_version = 200805
39 integer (omp_sched_kind), parameter :: omp_sched_static = 1
40 integer (omp_sched_kind), parameter :: omp_sched_dynamic = 2
41 integer (omp_sched_kind), parameter :: omp_sched_guided = 3
42 integer (omp_sched_kind), parameter :: omp_sched_auto = 4
45 subroutine omp_init_lock (lock)
47 integer (omp_lock_kind), intent (out) :: lock
48 end subroutine omp_init_lock
52 subroutine omp_init_nest_lock (lock)
54 integer (omp_nest_lock_kind), intent (out) :: lock
55 end subroutine omp_init_nest_lock
59 subroutine omp_destroy_lock (lock)
61 integer (omp_lock_kind), intent (inout) :: lock
62 end subroutine omp_destroy_lock
66 subroutine omp_destroy_nest_lock (lock)
68 integer (omp_nest_lock_kind), intent (inout) :: lock
69 end subroutine omp_destroy_nest_lock
73 subroutine omp_set_lock (lock)
75 integer (omp_lock_kind), intent (inout) :: lock
76 end subroutine omp_set_lock
80 subroutine omp_set_nest_lock (lock)
82 integer (omp_nest_lock_kind), intent (inout) :: lock
83 end subroutine omp_set_nest_lock
87 subroutine omp_unset_lock (lock)
89 integer (omp_lock_kind), intent (inout) :: lock
90 end subroutine omp_unset_lock
94 subroutine omp_unset_nest_lock (lock)
96 integer (omp_nest_lock_kind), intent (inout) :: lock
97 end subroutine omp_unset_nest_lock
100 interface omp_set_dynamic
101 subroutine omp_set_dynamic (set)
102 logical (4), intent (in) :: set
103 end subroutine omp_set_dynamic
104 subroutine omp_set_dynamic_8 (set)
105 logical (8), intent (in) :: set
106 end subroutine omp_set_dynamic_8
109 interface omp_set_nested
110 subroutine omp_set_nested (set)
111 logical (4), intent (in) :: set
112 end subroutine omp_set_nested
113 subroutine omp_set_nested_8 (set)
114 logical (8), intent (in) :: set
115 end subroutine omp_set_nested_8
118 interface omp_set_num_threads
119 subroutine omp_set_num_threads (set)
120 integer (4), intent (in) :: set
121 end subroutine omp_set_num_threads
122 subroutine omp_set_num_threads_8 (set)
123 integer (8), intent (in) :: set
124 end subroutine omp_set_num_threads_8
128 function omp_get_dynamic ()
130 logical (omp_logical_kind) :: omp_get_dynamic
131 end function omp_get_dynamic
135 function omp_get_nested ()
137 logical (omp_logical_kind) :: omp_get_nested
138 end function omp_get_nested
142 function omp_in_parallel ()
144 logical (omp_logical_kind) :: omp_in_parallel
145 end function omp_in_parallel
149 function omp_test_lock (lock)
151 logical (omp_logical_kind) :: omp_test_lock
152 integer (omp_lock_kind), intent (inout) :: lock
153 end function omp_test_lock
157 function omp_get_max_threads ()
159 integer (omp_integer_kind) :: omp_get_max_threads
160 end function omp_get_max_threads
164 function omp_get_num_procs ()
166 integer (omp_integer_kind) :: omp_get_num_procs
167 end function omp_get_num_procs
171 function omp_get_num_threads ()
173 integer (omp_integer_kind) :: omp_get_num_threads
174 end function omp_get_num_threads
178 function omp_get_thread_num ()
180 integer (omp_integer_kind) :: omp_get_thread_num
181 end function omp_get_thread_num
185 function omp_test_nest_lock (lock)
187 integer (omp_integer_kind) :: omp_test_nest_lock
188 integer (omp_nest_lock_kind), intent (inout) :: lock
189 end function omp_test_nest_lock
193 function omp_get_wtick ()
194 double precision :: omp_get_wtick
195 end function omp_get_wtick
199 function omp_get_wtime ()
200 double precision :: omp_get_wtime
201 end function omp_get_wtime
204 interface omp_set_schedule
205 subroutine omp_set_schedule (kind, modifier)
207 integer (omp_sched_kind), intent (in) :: kind
208 integer (4), intent (in) :: modifier
209 end subroutine omp_set_schedule
210 subroutine omp_set_schedule_8 (kind, modifier)
212 integer (omp_sched_kind), intent (in) :: kind
213 integer (8), intent (in) :: modifier
214 end subroutine omp_set_schedule_8
217 interface omp_get_schedule
218 subroutine omp_get_schedule (kind, modifier)
220 integer (omp_sched_kind), intent (out) :: kind
221 integer (4), intent (out) :: modifier
222 end subroutine omp_get_schedule
223 subroutine omp_get_schedule_8 (kind, modifier)
225 integer (omp_sched_kind), intent (out) :: kind
226 integer (8), intent (out) :: modifier
227 end subroutine omp_get_schedule_8
231 function omp_get_thread_limit ()
233 integer (omp_integer_kind) :: omp_get_thread_limit
234 end function omp_get_thread_limit
237 interface omp_set_max_active_levels
238 subroutine omp_set_max_active_levels (max_levels)
240 integer (4), intent (in) :: max_levels
241 end subroutine omp_set_max_active_levels
242 subroutine omp_set_max_active_levels_8 (max_levels)
244 integer (8), intent (in) :: max_levels
245 end subroutine omp_set_max_active_levels_8
249 function omp_get_max_active_levels ()
251 integer (omp_integer_kind) :: omp_get_max_active_levels
252 end function omp_get_max_active_levels
256 function omp_get_level ()
258 integer (omp_integer_kind) :: omp_get_level
259 end function omp_get_level
262 interface omp_get_ancestor_thread_num
263 function omp_get_ancestor_thread_num (level)
265 integer (4), intent (in) :: level
266 integer (omp_integer_kind) :: omp_get_ancestor_thread_num
267 end function omp_get_ancestor_thread_num
268 function omp_get_ancestor_thread_num_8 (level)
270 integer (8), intent (in) :: level
271 integer (omp_integer_kind) :: omp_get_ancestor_thread_num
272 end function omp_get_ancestor_thread_num_8
275 interface omp_get_team_size
276 function omp_get_team_size (level)
278 integer (4), intent (in) :: level
279 integer (omp_integer_kind) :: omp_get_team_size
280 end function omp_get_team_size
281 function omp_get_team_size_8 (level)
283 integer (8), intent (in) :: level
284 integer (omp_integer_kind) :: omp_get_team_size
285 end function omp_get_team_size_8
289 function omp_get_active_level ()
291 integer (omp_integer_kind) :: omp_get_active_level
292 end function omp_get_active_level