]>
Commit | Line | Data |
---|---|---|
5624e564 | 1 | ! Copyright (C) 2005-2015 Free Software Foundation, Inc. |
953ff289 DN |
2 | ! Contributed by Jakub Jelinek <jakub@redhat.com>. |
3 | ||
4 | ! This file is part of the GNU OpenMP Library (libgomp). | |
5 | ||
6 | ! Libgomp is free software; you can redistribute it and/or modify it | |
748086b7 JJ |
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) | |
9 | ! any later version. | |
953ff289 DN |
10 | |
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 | |
748086b7 | 13 | ! FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
953ff289 DN |
14 | ! more details. |
15 | ||
748086b7 JJ |
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. | |
953ff289 | 19 | |
748086b7 JJ |
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/>. | |
953ff289 DN |
24 | |
25 | module omp_lib_kinds | |
b896f9fd | 26 | implicit none |
03b8fe49 PB |
27 | integer, parameter :: omp_lock_kind = @OMP_LOCK_KIND@ |
28 | integer, parameter :: omp_nest_lock_kind = @OMP_NEST_LOCK_KIND@ | |
a68ab351 | 29 | integer, parameter :: omp_sched_kind = 4 |
acf0174b JJ |
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 | |
953ff289 DN |
40 | end module |
41 | ||
42 | module omp_lib | |
43 | use omp_lib_kinds | |
b896f9fd | 44 | implicit none |
f014c653 | 45 | integer, parameter :: openmp_version = 201307 |
953ff289 DN |
46 | |
47 | interface | |
4fed6b25 | 48 | subroutine omp_init_lock (svar) |
953ff289 | 49 | use omp_lib_kinds |
4fed6b25 | 50 | integer (omp_lock_kind), intent (out) :: svar |
953ff289 DN |
51 | end subroutine omp_init_lock |
52 | end interface | |
53 | ||
54 | interface | |
4fed6b25 | 55 | subroutine omp_init_nest_lock (nvar) |
953ff289 | 56 | use omp_lib_kinds |
4fed6b25 | 57 | integer (omp_nest_lock_kind), intent (out) :: nvar |
953ff289 DN |
58 | end subroutine omp_init_nest_lock |
59 | end interface | |
60 | ||
61 | interface | |
4fed6b25 | 62 | subroutine omp_destroy_lock (svar) |
953ff289 | 63 | use omp_lib_kinds |
4fed6b25 | 64 | integer (omp_lock_kind), intent (inout) :: svar |
953ff289 DN |
65 | end subroutine omp_destroy_lock |
66 | end interface | |
67 | ||
68 | interface | |
4fed6b25 | 69 | subroutine omp_destroy_nest_lock (nvar) |
953ff289 | 70 | use omp_lib_kinds |
4fed6b25 | 71 | integer (omp_nest_lock_kind), intent (inout) :: nvar |
953ff289 DN |
72 | end subroutine omp_destroy_nest_lock |
73 | end interface | |
74 | ||
75 | interface | |
4fed6b25 | 76 | subroutine omp_set_lock (svar) |
953ff289 | 77 | use omp_lib_kinds |
4fed6b25 | 78 | integer (omp_lock_kind), intent (inout) :: svar |
953ff289 DN |
79 | end subroutine omp_set_lock |
80 | end interface | |
81 | ||
82 | interface | |
4fed6b25 | 83 | subroutine omp_set_nest_lock (nvar) |
953ff289 | 84 | use omp_lib_kinds |
4fed6b25 | 85 | integer (omp_nest_lock_kind), intent (inout) :: nvar |
953ff289 DN |
86 | end subroutine omp_set_nest_lock |
87 | end interface | |
88 | ||
89 | interface | |
4fed6b25 | 90 | subroutine omp_unset_lock (svar) |
953ff289 | 91 | use omp_lib_kinds |
4fed6b25 | 92 | integer (omp_lock_kind), intent (inout) :: svar |
953ff289 DN |
93 | end subroutine omp_unset_lock |
94 | end interface | |
95 | ||
96 | interface | |
4fed6b25 | 97 | subroutine omp_unset_nest_lock (nvar) |
953ff289 | 98 | use omp_lib_kinds |
4fed6b25 | 99 | integer (omp_nest_lock_kind), intent (inout) :: nvar |
953ff289 DN |
100 | end subroutine omp_unset_nest_lock |
101 | end interface | |
102 | ||
103 | interface omp_set_dynamic | |
4fed6b25 TB |
104 | subroutine omp_set_dynamic (dynamic_threads) |
105 | logical (4), intent (in) :: dynamic_threads | |
953ff289 | 106 | end subroutine omp_set_dynamic |
4fed6b25 TB |
107 | subroutine omp_set_dynamic_8 (dynamic_threads) |
108 | logical (8), intent (in) :: dynamic_threads | |
953ff289 DN |
109 | end subroutine omp_set_dynamic_8 |
110 | end interface | |
111 | ||
112 | interface omp_set_nested | |
4fed6b25 TB |
113 | subroutine omp_set_nested (nested) |
114 | logical (4), intent (in) :: nested | |
953ff289 | 115 | end subroutine omp_set_nested |
4fed6b25 TB |
116 | subroutine omp_set_nested_8 (nested) |
117 | logical (8), intent (in) :: nested | |
953ff289 DN |
118 | end subroutine omp_set_nested_8 |
119 | end interface | |
120 | ||
121 | interface omp_set_num_threads | |
4fed6b25 TB |
122 | subroutine omp_set_num_threads (num_threads) |
123 | integer (4), intent (in) :: num_threads | |
953ff289 | 124 | end subroutine omp_set_num_threads |
4fed6b25 TB |
125 | subroutine omp_set_num_threads_8 (num_threads) |
126 | integer (8), intent (in) :: num_threads | |
953ff289 DN |
127 | end subroutine omp_set_num_threads_8 |
128 | end interface | |
129 | ||
130 | interface | |
131 | function omp_get_dynamic () | |
20906c66 | 132 | logical (4) :: omp_get_dynamic |
953ff289 DN |
133 | end function omp_get_dynamic |
134 | end interface | |
135 | ||
136 | interface | |
137 | function omp_get_nested () | |
20906c66 | 138 | logical (4) :: omp_get_nested |
953ff289 DN |
139 | end function omp_get_nested |
140 | end interface | |
141 | ||
142 | interface | |
143 | function omp_in_parallel () | |
20906c66 | 144 | logical (4) :: omp_in_parallel |
953ff289 DN |
145 | end function omp_in_parallel |
146 | end interface | |
147 | ||
148 | interface | |
4fed6b25 | 149 | function omp_test_lock (svar) |
953ff289 | 150 | use omp_lib_kinds |
20906c66 | 151 | logical (4) :: omp_test_lock |
4fed6b25 | 152 | integer (omp_lock_kind), intent (inout) :: svar |
953ff289 DN |
153 | end function omp_test_lock |
154 | end interface | |
155 | ||
156 | interface | |
157 | function omp_get_max_threads () | |
20906c66 | 158 | integer (4) :: omp_get_max_threads |
953ff289 DN |
159 | end function omp_get_max_threads |
160 | end interface | |
161 | ||
162 | interface | |
163 | function omp_get_num_procs () | |
20906c66 | 164 | integer (4) :: omp_get_num_procs |
953ff289 DN |
165 | end function omp_get_num_procs |
166 | end interface | |
167 | ||
168 | interface | |
169 | function omp_get_num_threads () | |
20906c66 | 170 | integer (4) :: omp_get_num_threads |
953ff289 DN |
171 | end function omp_get_num_threads |
172 | end interface | |
173 | ||
174 | interface | |
175 | function omp_get_thread_num () | |
20906c66 | 176 | integer (4) :: omp_get_thread_num |
953ff289 DN |
177 | end function omp_get_thread_num |
178 | end interface | |
179 | ||
180 | interface | |
4fed6b25 | 181 | function omp_test_nest_lock (nvar) |
953ff289 | 182 | use omp_lib_kinds |
20906c66 | 183 | integer (4) :: omp_test_nest_lock |
4fed6b25 | 184 | integer (omp_nest_lock_kind), intent (inout) :: nvar |
953ff289 DN |
185 | end function omp_test_nest_lock |
186 | end interface | |
187 | ||
188 | interface | |
189 | function omp_get_wtick () | |
190 | double precision :: omp_get_wtick | |
191 | end function omp_get_wtick | |
192 | end interface | |
193 | ||
194 | interface | |
195 | function omp_get_wtime () | |
196 | double precision :: omp_get_wtime | |
197 | end function omp_get_wtime | |
198 | end interface | |
199 | ||
a68ab351 JJ |
200 | interface omp_set_schedule |
201 | subroutine omp_set_schedule (kind, modifier) | |
202 | use omp_lib_kinds | |
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) | |
207 | use omp_lib_kinds | |
208 | integer (omp_sched_kind), intent (in) :: kind | |
209 | integer (8), intent (in) :: modifier | |
210 | end subroutine omp_set_schedule_8 | |
211 | end interface | |
212 | ||
213 | interface omp_get_schedule | |
214 | subroutine omp_get_schedule (kind, modifier) | |
215 | use omp_lib_kinds | |
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) | |
220 | use omp_lib_kinds | |
221 | integer (omp_sched_kind), intent (out) :: kind | |
222 | integer (8), intent (out) :: modifier | |
223 | end subroutine omp_get_schedule_8 | |
224 | end interface | |
225 | ||
226 | interface | |
227 | function omp_get_thread_limit () | |
20906c66 | 228 | integer (4) :: omp_get_thread_limit |
a68ab351 JJ |
229 | end function omp_get_thread_limit |
230 | end interface | |
231 | ||
232 | interface omp_set_max_active_levels | |
233 | subroutine omp_set_max_active_levels (max_levels) | |
a68ab351 JJ |
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) | |
a68ab351 JJ |
237 | integer (8), intent (in) :: max_levels |
238 | end subroutine omp_set_max_active_levels_8 | |
239 | end interface | |
240 | ||
241 | interface | |
242 | function omp_get_max_active_levels () | |
20906c66 | 243 | integer (4) :: omp_get_max_active_levels |
a68ab351 JJ |
244 | end function omp_get_max_active_levels |
245 | end interface | |
246 | ||
247 | interface | |
248 | function omp_get_level () | |
20906c66 | 249 | integer (4) :: omp_get_level |
a68ab351 JJ |
250 | end function omp_get_level |
251 | end interface | |
252 | ||
253 | interface omp_get_ancestor_thread_num | |
254 | function omp_get_ancestor_thread_num (level) | |
a68ab351 | 255 | integer (4), intent (in) :: level |
20906c66 | 256 | integer (4) :: omp_get_ancestor_thread_num |
a68ab351 JJ |
257 | end function omp_get_ancestor_thread_num |
258 | function omp_get_ancestor_thread_num_8 (level) | |
a68ab351 | 259 | integer (8), intent (in) :: level |
20906c66 | 260 | integer (4) :: omp_get_ancestor_thread_num_8 |
a68ab351 JJ |
261 | end function omp_get_ancestor_thread_num_8 |
262 | end interface | |
263 | ||
264 | interface omp_get_team_size | |
265 | function omp_get_team_size (level) | |
a68ab351 | 266 | integer (4), intent (in) :: level |
20906c66 | 267 | integer (4) :: omp_get_team_size |
a68ab351 JJ |
268 | end function omp_get_team_size |
269 | function omp_get_team_size_8 (level) | |
a68ab351 | 270 | integer (8), intent (in) :: level |
20906c66 | 271 | integer (4) :: omp_get_team_size_8 |
a68ab351 JJ |
272 | end function omp_get_team_size_8 |
273 | end interface | |
274 | ||
275 | interface | |
276 | function omp_get_active_level () | |
20906c66 | 277 | integer (4) :: omp_get_active_level |
a68ab351 JJ |
278 | end function omp_get_active_level |
279 | end interface | |
280 | ||
20906c66 JJ |
281 | interface |
282 | function omp_in_final () | |
20906c66 JJ |
283 | logical (4) :: omp_in_final |
284 | end function omp_in_final | |
285 | end interface | |
286 | ||
acf0174b JJ |
287 | interface |
288 | function omp_get_cancellation () | |
289 | logical (4) :: omp_get_cancellation | |
290 | end function omp_get_cancellation | |
291 | end interface | |
292 | ||
293 | interface | |
294 | function omp_get_proc_bind () | |
295 | use omp_lib_kinds | |
296 | integer (omp_proc_bind_kind) :: omp_get_proc_bind | |
297 | end function omp_get_proc_bind | |
298 | end interface | |
299 | ||
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 | |
307 | end interface | |
308 | ||
309 | interface | |
310 | function omp_get_default_device () | |
311 | integer (4) :: omp_get_default_device | |
312 | end function omp_get_default_device | |
313 | end interface | |
314 | ||
315 | interface | |
316 | function omp_get_num_devices () | |
317 | integer (4) :: omp_get_num_devices | |
318 | end function omp_get_num_devices | |
319 | end interface | |
320 | ||
321 | interface | |
322 | function omp_get_num_teams () | |
323 | integer (4) :: omp_get_num_teams | |
324 | end function omp_get_num_teams | |
325 | end interface | |
326 | ||
327 | interface | |
328 | function omp_get_team_num () | |
329 | integer (4) :: omp_get_team_num | |
330 | end function omp_get_team_num | |
331 | end interface | |
332 | ||
333 | interface | |
334 | function omp_is_initial_device () | |
335 | logical (4) :: omp_is_initial_device | |
336 | end function omp_is_initial_device | |
337 | end interface | |
338 | ||
953ff289 | 339 | end module omp_lib |