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.
30 integer, parameter :: omp_integer_kind
= 4
31 integer, parameter :: omp_logical_kind
= 4
32 integer, parameter :: omp_lock_kind
= @OMP_LOCK_KIND@
33 integer, parameter :: omp_nest_lock_kind
= @OMP_NEST_LOCK_KIND@
34 integer, parameter :: omp_sched_kind
= 4
40 integer, parameter :: openmp_version
= 200805
41 integer (omp_sched_kind
), parameter :: omp_sched_static
= 1
42 integer (omp_sched_kind
), parameter :: omp_sched_dynamic
= 2
43 integer (omp_sched_kind
), parameter :: omp_sched_guided
= 3
44 integer (omp_sched_kind
), parameter :: omp_sched_auto
= 4
47 subroutine omp_init_lock (lock
)
49 integer (omp_lock_kind
), intent (out
) :: lock
50 end subroutine omp_init_lock
54 subroutine omp_init_nest_lock (lock
)
56 integer (omp_nest_lock_kind
), intent (out
) :: lock
57 end subroutine omp_init_nest_lock
61 subroutine omp_destroy_lock (lock
)
63 integer (omp_lock_kind
), intent (inout
) :: lock
64 end subroutine omp_destroy_lock
68 subroutine omp_destroy_nest_lock (lock
)
70 integer (omp_nest_lock_kind
), intent (inout
) :: lock
71 end subroutine omp_destroy_nest_lock
75 subroutine omp_set_lock (lock
)
77 integer (omp_lock_kind
), intent (inout
) :: lock
78 end subroutine omp_set_lock
82 subroutine omp_set_nest_lock (lock
)
84 integer (omp_nest_lock_kind
), intent (inout
) :: lock
85 end subroutine omp_set_nest_lock
89 subroutine omp_unset_lock (lock
)
91 integer (omp_lock_kind
), intent (inout
) :: lock
92 end subroutine omp_unset_lock
96 subroutine omp_unset_nest_lock (lock
)
98 integer (omp_nest_lock_kind
), intent (inout
) :: lock
99 end subroutine omp_unset_nest_lock
102 interface omp_set_dynamic
103 subroutine omp_set_dynamic (set
)
104 logical (4), intent (in
) :: set
105 end subroutine omp_set_dynamic
106 subroutine omp_set_dynamic_8 (set
)
107 logical (8), intent (in
) :: set
108 end subroutine omp_set_dynamic_8
111 interface omp_set_nested
112 subroutine omp_set_nested (set
)
113 logical (4), intent (in
) :: set
114 end subroutine omp_set_nested
115 subroutine omp_set_nested_8 (set
)
116 logical (8), intent (in
) :: set
117 end subroutine omp_set_nested_8
120 interface omp_set_num_threads
121 subroutine omp_set_num_threads (set
)
122 integer (4), intent (in
) :: set
123 end subroutine omp_set_num_threads
124 subroutine omp_set_num_threads_8 (set
)
125 integer (8), intent (in
) :: set
126 end subroutine omp_set_num_threads_8
130 function omp_get_dynamic ()
132 logical (omp_logical_kind
) :: omp_get_dynamic
133 end function omp_get_dynamic
137 function omp_get_nested ()
139 logical (omp_logical_kind
) :: omp_get_nested
140 end function omp_get_nested
144 function omp_in_parallel ()
146 logical (omp_logical_kind
) :: omp_in_parallel
147 end function omp_in_parallel
151 function omp_test_lock (lock
)
153 logical (omp_logical_kind
) :: omp_test_lock
154 integer (omp_lock_kind
), intent (inout
) :: lock
155 end function omp_test_lock
159 function omp_get_max_threads ()
161 integer (omp_integer_kind
) :: omp_get_max_threads
162 end function omp_get_max_threads
166 function omp_get_num_procs ()
168 integer (omp_integer_kind
) :: omp_get_num_procs
169 end function omp_get_num_procs
173 function omp_get_num_threads ()
175 integer (omp_integer_kind
) :: omp_get_num_threads
176 end function omp_get_num_threads
180 function omp_get_thread_num ()
182 integer (omp_integer_kind
) :: omp_get_thread_num
183 end function omp_get_thread_num
187 function omp_test_nest_lock (lock
)
189 integer (omp_integer_kind
) :: omp_test_nest_lock
190 integer (omp_nest_lock_kind
), intent (inout
) :: lock
191 end function omp_test_nest_lock
195 function omp_get_wtick ()
196 double precision :: omp_get_wtick
197 end function omp_get_wtick
201 function omp_get_wtime ()
202 double precision :: omp_get_wtime
203 end function omp_get_wtime
206 interface omp_set_schedule
207 subroutine omp_set_schedule (kind
, modifier
)
209 integer (omp_sched_kind
), intent (in
) :: kind
210 integer (4), intent (in
) :: modifier
211 end subroutine omp_set_schedule
212 subroutine omp_set_schedule_8 (kind
, modifier
)
214 integer (omp_sched_kind
), intent (in
) :: kind
215 integer (8), intent (in
) :: modifier
216 end subroutine omp_set_schedule_8
219 interface omp_get_schedule
220 subroutine omp_get_schedule (kind
, modifier
)
222 integer (omp_sched_kind
), intent (out
) :: kind
223 integer (4), intent (out
) :: modifier
224 end subroutine omp_get_schedule
225 subroutine omp_get_schedule_8 (kind
, modifier
)
227 integer (omp_sched_kind
), intent (out
) :: kind
228 integer (8), intent (out
) :: modifier
229 end subroutine omp_get_schedule_8
233 function omp_get_thread_limit ()
235 integer (omp_integer_kind
) :: omp_get_thread_limit
236 end function omp_get_thread_limit
239 interface omp_set_max_active_levels
240 subroutine omp_set_max_active_levels (max_levels
)
242 integer (4), intent (in
) :: max_levels
243 end subroutine omp_set_max_active_levels
244 subroutine omp_set_max_active_levels_8 (max_levels
)
246 integer (8), intent (in
) :: max_levels
247 end subroutine omp_set_max_active_levels_8
251 function omp_get_max_active_levels ()
253 integer (omp_integer_kind
) :: omp_get_max_active_levels
254 end function omp_get_max_active_levels
258 function omp_get_level ()
260 integer (omp_integer_kind
) :: omp_get_level
261 end function omp_get_level
264 interface omp_get_ancestor_thread_num
265 function omp_get_ancestor_thread_num (level
)
267 integer (4), intent (in
) :: level
268 integer (omp_integer_kind
) :: omp_get_ancestor_thread_num
269 end function omp_get_ancestor_thread_num
270 function omp_get_ancestor_thread_num_8 (level
)
272 integer (8), intent (in
) :: level
273 integer (omp_integer_kind
) :: omp_get_ancestor_thread_num_8
274 end function omp_get_ancestor_thread_num_8
277 interface omp_get_team_size
278 function omp_get_team_size (level
)
280 integer (4), intent (in
) :: level
281 integer (omp_integer_kind
) :: omp_get_team_size
282 end function omp_get_team_size
283 function omp_get_team_size_8 (level
)
285 integer (8), intent (in
) :: level
286 integer (omp_integer_kind
) :: omp_get_team_size_8
287 end function omp_get_team_size_8
291 function omp_get_active_level ()
293 integer (omp_integer_kind
) :: omp_get_active_level
294 end function omp_get_active_level