Skip to content

Commit ea4fa5d

Browse files
committedMay 7, 2015
D9306 omp 4.1 async offload support (partial): added version 4.1 headers.
llvm-svn: 236744
1 parent 5b373ca commit ea4fa5d

File tree

6 files changed

+2201
-0
lines changed

6 files changed

+2201
-0
lines changed
 
+106
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
/*
2+
* include/41/iomp.h.var
3+
*/
4+
5+
6+
//===----------------------------------------------------------------------===//
7+
//
8+
// The LLVM Compiler Infrastructure
9+
//
10+
// This file is dual licensed under the MIT and the University of Illinois Open
11+
// Source Licenses. See LICENSE.txt for details.
12+
//
13+
//===----------------------------------------------------------------------===//
14+
15+
16+
#ifndef __IOMP_H
17+
# define __IOMP_H
18+
19+
# define KMP_VERSION_MAJOR $KMP_VERSION_MAJOR
20+
# define KMP_VERSION_MINOR $KMP_VERSION_MINOR
21+
# define KMP_VERSION_BUILD $KMP_VERSION_BUILD
22+
# define KMP_BUILD_DATE "$KMP_BUILD_DATE"
23+
24+
# ifdef __cplusplus
25+
extern "C" {
26+
# endif
27+
28+
# define kmp_set_stacksize kmpc_set_stacksize
29+
# define kmp_set_stacksize_s kmpc_set_stacksize_s
30+
# define kmp_set_blocktime kmpc_set_blocktime
31+
# define kmp_set_library kmpc_set_library
32+
# define kmp_set_defaults kmpc_set_defaults
33+
# define kmp_set_affinity_mask_proc kmpc_set_affinity_mask_proc
34+
# define kmp_unset_affinity_mask_proc kmpc_unset_affinity_mask_proc
35+
# define kmp_get_affinity_mask_proc kmpc_get_affinity_mask_proc
36+
37+
# define kmp_malloc kmpc_malloc
38+
# define kmp_calloc kmpc_calloc
39+
# define kmp_realloc kmpc_realloc
40+
# define kmp_free kmpc_free
41+
42+
# if defined(_WIN32)
43+
# define __KAI_KMPC_CONVENTION __cdecl
44+
# else
45+
# define __KAI_KMPC_CONVENTION
46+
# endif
47+
48+
# include <stdlib.h>
49+
/* kmp API functions */
50+
extern int __KAI_KMPC_CONVENTION kmp_get_stacksize (void);
51+
extern void __KAI_KMPC_CONVENTION kmp_set_stacksize (int);
52+
extern size_t __KAI_KMPC_CONVENTION kmp_get_stacksize_s (void);
53+
extern void __KAI_KMPC_CONVENTION kmp_set_stacksize_s (size_t);
54+
extern int __KAI_KMPC_CONVENTION kmp_get_blocktime (void);
55+
extern int __KAI_KMPC_CONVENTION kmp_get_library (void);
56+
extern void __KAI_KMPC_CONVENTION kmp_set_blocktime (int);
57+
extern void __KAI_KMPC_CONVENTION kmp_set_library (int);
58+
extern void __KAI_KMPC_CONVENTION kmp_set_library_serial (void);
59+
extern void __KAI_KMPC_CONVENTION kmp_set_library_turnaround (void);
60+
extern void __KAI_KMPC_CONVENTION kmp_set_library_throughput (void);
61+
extern void __KAI_KMPC_CONVENTION kmp_set_defaults (char const *);
62+
63+
/* affinity API functions */
64+
typedef void * kmp_affinity_mask_t;
65+
66+
extern int __KAI_KMPC_CONVENTION kmp_set_affinity (kmp_affinity_mask_t *);
67+
extern int __KAI_KMPC_CONVENTION kmp_get_affinity (kmp_affinity_mask_t *);
68+
extern int __KAI_KMPC_CONVENTION kmp_get_affinity_max_proc (void);
69+
extern void __KAI_KMPC_CONVENTION kmp_create_affinity_mask (kmp_affinity_mask_t *);
70+
extern void __KAI_KMPC_CONVENTION kmp_destroy_affinity_mask (kmp_affinity_mask_t *);
71+
extern int __KAI_KMPC_CONVENTION kmp_set_affinity_mask_proc (int, kmp_affinity_mask_t *);
72+
extern int __KAI_KMPC_CONVENTION kmp_unset_affinity_mask_proc (int, kmp_affinity_mask_t *);
73+
extern int __KAI_KMPC_CONVENTION kmp_get_affinity_mask_proc (int, kmp_affinity_mask_t *);
74+
75+
extern void * __KAI_KMPC_CONVENTION kmp_malloc (size_t);
76+
extern void * __KAI_KMPC_CONVENTION kmp_calloc (size_t, size_t);
77+
extern void * __KAI_KMPC_CONVENTION kmp_realloc (void *, size_t);
78+
extern void __KAI_KMPC_CONVENTION kmp_free (void *);
79+
80+
extern void __KAI_KMPC_CONVENTION kmp_set_warnings_on(void);
81+
extern void __KAI_KMPC_CONVENTION kmp_set_warnings_off(void);
82+
83+
/* schedule kind constants */
84+
typedef enum kmp_cancel_kind_t {
85+
kmp_cancel_parallel = 1,
86+
kmp_cancel_loop = 2,
87+
kmp_cancel_sections = 3,
88+
kmp_cancel_taskgroup = 4
89+
} kmp_cancel_kind_t;
90+
91+
extern int __KAI_KMPC_CONVENTION kmp_get_cancellation_status(kmp_cancel_kind_t);
92+
93+
# undef __KAI_KMPC_CONVENTION
94+
95+
/* Warning:
96+
The following typedefs are not standard, deprecated and will be removed in a future release.
97+
*/
98+
typedef int omp_int_t;
99+
typedef double omp_wtime_t;
100+
101+
# ifdef __cplusplus
102+
}
103+
# endif
104+
105+
#endif /* __IOMP_H */
106+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
! include/41/iomp_lib.h.var
2+
3+
!
4+
!//===----------------------------------------------------------------------===//
5+
!//
6+
!// The LLVM Compiler Infrastructure
7+
!//
8+
!// This file is dual licensed under the MIT and the University of Illinois Open
9+
!// Source Licenses. See LICENSE.txt for details.
10+
!//
11+
!//===----------------------------------------------------------------------===//
12+
!
13+
14+
!***
15+
!*** omp_integer_kind and omp_logical_kind appear to be predefined by gcc and
16+
!*** gfortran (definitions do not appear in the omp.h / omp_lib.h /omp_lib.f).
17+
!*** omp_real_kind is not predefined, however.
18+
!***
19+
20+
integer, parameter :: kmp_version_major = $KMP_VERSION_MAJOR
21+
integer, parameter :: kmp_version_minor = $KMP_VERSION_MINOR
22+
integer, parameter :: kmp_version_build = $KMP_VERSION_BUILD
23+
character(*) kmp_build_date
24+
parameter( kmp_build_date = '$KMP_BUILD_DATE' )
25+
26+
integer, parameter :: omp_real_kind = 4
27+
28+
!***
29+
!*** kmp_* type extensions
30+
!***
31+
32+
integer, parameter :: kmp_pointer_kind = $KMP_INT_PTR_KIND
33+
integer, parameter :: kmp_size_t_kind = $KMP_INT_PTR_KIND
34+
integer, parameter :: kmp_affinity_mask_kind = $KMP_INT_PTR_KIND
35+
36+
!***
37+
!*** kmp_* entry points
38+
!***
39+
40+
external kmp_set_stacksize
41+
external kmp_set_stacksize_s
42+
external kmp_set_blocktime
43+
external kmp_set_library_serial
44+
external kmp_set_library_turnaround
45+
external kmp_set_library_throughput
46+
external kmp_set_library
47+
external kmp_set_defaults
48+
external kmp_get_stacksize
49+
integer kmp_get_stacksize
50+
external kmp_get_stacksize_s
51+
integer (kind = kmp_size_t_kind) kmp_get_stacksize_s
52+
external kmp_get_blocktime
53+
integer kmp_get_blocktime
54+
external kmp_get_library
55+
integer kmp_get_library
56+
external kmp_set_affinity
57+
integer kmp_set_affinity
58+
external kmp_get_affinity
59+
integer kmp_get_affinity
60+
external kmp_get_affinity_max_proc
61+
integer kmp_get_affinity_max_proc
62+
external kmp_create_affinity_mask
63+
external kmp_destroy_affinity_mask
64+
external kmp_set_affinity_mask_proc
65+
integer kmp_set_affinity_mask_proc
66+
external kmp_unset_affinity_mask_proc
67+
integer kmp_unset_affinity_mask_proc
68+
external kmp_get_affinity_mask_proc
69+
integer kmp_get_affinity_mask_proc
70+
external kmp_malloc
71+
integer (kind = kmp_pointer_kind) kmp_malloc
72+
external kmp_calloc
73+
integer (kind = kmp_pointer_kind) kmp_calloc
74+
external kmp_realloc
75+
integer (kind = kmp_pointer_kind) kmp_realloc
76+
external kmp_free
77+
78+
external kmp_set_warnings_on
79+
external kmp_set_warnings_off
80+
81+
+174
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
/*
2+
* include/41/omp.h.var
3+
*/
4+
5+
6+
//===----------------------------------------------------------------------===//
7+
//
8+
// The LLVM Compiler Infrastructure
9+
//
10+
// This file is dual licensed under the MIT and the University of Illinois Open
11+
// Source Licenses. See LICENSE.txt for details.
12+
//
13+
//===----------------------------------------------------------------------===//
14+
15+
16+
#ifndef __OMP_H
17+
# define __OMP_H
18+
19+
# define KMP_VERSION_MAJOR $KMP_VERSION_MAJOR
20+
# define KMP_VERSION_MINOR $KMP_VERSION_MINOR
21+
# define KMP_VERSION_BUILD $KMP_VERSION_BUILD
22+
# define KMP_BUILD_DATE "$KMP_BUILD_DATE"
23+
24+
# ifdef __cplusplus
25+
extern "C" {
26+
# endif
27+
28+
# if defined(_WIN32)
29+
# define __KAI_KMPC_CONVENTION __cdecl
30+
# else
31+
# define __KAI_KMPC_CONVENTION
32+
# endif
33+
34+
/* schedule kind constants */
35+
typedef enum omp_sched_t {
36+
omp_sched_static = 1,
37+
omp_sched_dynamic = 2,
38+
omp_sched_guided = 3,
39+
omp_sched_auto = 4
40+
} omp_sched_t;
41+
42+
/* set API functions */
43+
extern void __KAI_KMPC_CONVENTION omp_set_num_threads (int);
44+
extern void __KAI_KMPC_CONVENTION omp_set_dynamic (int);
45+
extern void __KAI_KMPC_CONVENTION omp_set_nested (int);
46+
extern void __KAI_KMPC_CONVENTION omp_set_max_active_levels (int);
47+
extern void __KAI_KMPC_CONVENTION omp_set_schedule (omp_sched_t, int);
48+
49+
/* query API functions */
50+
extern int __KAI_KMPC_CONVENTION omp_get_num_threads (void);
51+
extern int __KAI_KMPC_CONVENTION omp_get_dynamic (void);
52+
extern int __KAI_KMPC_CONVENTION omp_get_nested (void);
53+
extern int __KAI_KMPC_CONVENTION omp_get_max_threads (void);
54+
extern int __KAI_KMPC_CONVENTION omp_get_thread_num (void);
55+
extern int __KAI_KMPC_CONVENTION omp_get_num_procs (void);
56+
extern int __KAI_KMPC_CONVENTION omp_in_parallel (void);
57+
extern int __KAI_KMPC_CONVENTION omp_in_final (void);
58+
extern int __KAI_KMPC_CONVENTION omp_get_active_level (void);
59+
extern int __KAI_KMPC_CONVENTION omp_get_level (void);
60+
extern int __KAI_KMPC_CONVENTION omp_get_ancestor_thread_num (int);
61+
extern int __KAI_KMPC_CONVENTION omp_get_team_size (int);
62+
extern int __KAI_KMPC_CONVENTION omp_get_thread_limit (void);
63+
extern int __KAI_KMPC_CONVENTION omp_get_max_active_levels (void);
64+
extern void __KAI_KMPC_CONVENTION omp_get_schedule (omp_sched_t *, int *);
65+
66+
/* lock API functions */
67+
typedef struct omp_lock_t {
68+
void * _lk;
69+
} omp_lock_t;
70+
71+
extern void __KAI_KMPC_CONVENTION omp_init_lock (omp_lock_t *);
72+
extern void __KAI_KMPC_CONVENTION omp_set_lock (omp_lock_t *);
73+
extern void __KAI_KMPC_CONVENTION omp_unset_lock (omp_lock_t *);
74+
extern void __KAI_KMPC_CONVENTION omp_destroy_lock (omp_lock_t *);
75+
extern int __KAI_KMPC_CONVENTION omp_test_lock (omp_lock_t *);
76+
77+
/* nested lock API functions */
78+
typedef struct omp_nest_lock_t {
79+
void * _lk;
80+
} omp_nest_lock_t;
81+
82+
extern void __KAI_KMPC_CONVENTION omp_init_nest_lock (omp_nest_lock_t *);
83+
extern void __KAI_KMPC_CONVENTION omp_set_nest_lock (omp_nest_lock_t *);
84+
extern void __KAI_KMPC_CONVENTION omp_unset_nest_lock (omp_nest_lock_t *);
85+
extern void __KAI_KMPC_CONVENTION omp_destroy_nest_lock (omp_nest_lock_t *);
86+
extern int __KAI_KMPC_CONVENTION omp_test_nest_lock (omp_nest_lock_t *);
87+
88+
/* lock hint type for dynamic user lock */
89+
typedef enum kmp_lock_hint_t {
90+
kmp_lock_hint_none = 0,
91+
kmp_lock_hint_contended,
92+
kmp_lock_hint_uncontended,
93+
kmp_lock_hint_nonspeculative,
94+
kmp_lock_hint_speculative,
95+
kmp_lock_hint_adaptive,
96+
} kmp_lock_hint_t;
97+
98+
/* hinted lock initializers */
99+
extern void __KAI_KMPC_CONVENTION kmp_init_lock_hinted(omp_lock_t *, kmp_lock_hint_t);
100+
extern void __KAI_KMPC_CONVENTION kmp_init_nest_lock_hinted(omp_nest_lock_t *, kmp_lock_hint_t);
101+
102+
/* time API functions */
103+
extern double __KAI_KMPC_CONVENTION omp_get_wtime (void);
104+
extern double __KAI_KMPC_CONVENTION omp_get_wtick (void);
105+
106+
/* OpenMP 4.0 */
107+
extern int __KAI_KMPC_CONVENTION omp_get_default_device (void);
108+
extern void __KAI_KMPC_CONVENTION omp_set_default_device (int);
109+
extern int __KAI_KMPC_CONVENTION omp_is_initial_device (void);
110+
extern int __KAI_KMPC_CONVENTION omp_get_num_devices (void);
111+
extern int __KAI_KMPC_CONVENTION omp_get_num_teams (void);
112+
extern int __KAI_KMPC_CONVENTION omp_get_team_num (void);
113+
extern int __KAI_KMPC_CONVENTION omp_get_cancellation (void);
114+
115+
# include <stdlib.h>
116+
/* kmp API functions */
117+
extern int __KAI_KMPC_CONVENTION kmp_get_stacksize (void);
118+
extern void __KAI_KMPC_CONVENTION kmp_set_stacksize (int);
119+
extern size_t __KAI_KMPC_CONVENTION kmp_get_stacksize_s (void);
120+
extern void __KAI_KMPC_CONVENTION kmp_set_stacksize_s (size_t);
121+
extern int __KAI_KMPC_CONVENTION kmp_get_blocktime (void);
122+
extern int __KAI_KMPC_CONVENTION kmp_get_library (void);
123+
extern void __KAI_KMPC_CONVENTION kmp_set_blocktime (int);
124+
extern void __KAI_KMPC_CONVENTION kmp_set_library (int);
125+
extern void __KAI_KMPC_CONVENTION kmp_set_library_serial (void);
126+
extern void __KAI_KMPC_CONVENTION kmp_set_library_turnaround (void);
127+
extern void __KAI_KMPC_CONVENTION kmp_set_library_throughput (void);
128+
extern void __KAI_KMPC_CONVENTION kmp_set_defaults (char const *);
129+
130+
/* Intel affinity API */
131+
typedef void * kmp_affinity_mask_t;
132+
133+
extern int __KAI_KMPC_CONVENTION kmp_set_affinity (kmp_affinity_mask_t *);
134+
extern int __KAI_KMPC_CONVENTION kmp_get_affinity (kmp_affinity_mask_t *);
135+
extern int __KAI_KMPC_CONVENTION kmp_get_affinity_max_proc (void);
136+
extern void __KAI_KMPC_CONVENTION kmp_create_affinity_mask (kmp_affinity_mask_t *);
137+
extern void __KAI_KMPC_CONVENTION kmp_destroy_affinity_mask (kmp_affinity_mask_t *);
138+
extern int __KAI_KMPC_CONVENTION kmp_set_affinity_mask_proc (int, kmp_affinity_mask_t *);
139+
extern int __KAI_KMPC_CONVENTION kmp_unset_affinity_mask_proc (int, kmp_affinity_mask_t *);
140+
extern int __KAI_KMPC_CONVENTION kmp_get_affinity_mask_proc (int, kmp_affinity_mask_t *);
141+
142+
/* OpenMP 4.0 affinity API */
143+
typedef enum omp_proc_bind_t {
144+
omp_proc_bind_false = 0,
145+
omp_proc_bind_true = 1,
146+
omp_proc_bind_master = 2,
147+
omp_proc_bind_close = 3,
148+
omp_proc_bind_spread = 4
149+
} omp_proc_bind_t;
150+
151+
extern omp_proc_bind_t __KAI_KMPC_CONVENTION omp_get_proc_bind (void);
152+
153+
extern void * __KAI_KMPC_CONVENTION kmp_malloc (size_t);
154+
extern void * __KAI_KMPC_CONVENTION kmp_calloc (size_t, size_t);
155+
extern void * __KAI_KMPC_CONVENTION kmp_realloc (void *, size_t);
156+
extern void __KAI_KMPC_CONVENTION kmp_free (void *);
157+
158+
extern void __KAI_KMPC_CONVENTION kmp_set_warnings_on(void);
159+
extern void __KAI_KMPC_CONVENTION kmp_set_warnings_off(void);
160+
161+
# undef __KAI_KMPC_CONVENTION
162+
163+
/* Warning:
164+
The following typedefs are not standard, deprecated and will be removed in a future release.
165+
*/
166+
typedef int omp_int_t;
167+
typedef double omp_wtime_t;
168+
169+
# ifdef __cplusplus
170+
}
171+
# endif
172+
173+
#endif /* __OMP_H */
174+

‎openmp/runtime/src/include/41/omp_lib.f.var

+790
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,468 @@
1+
! include/41/omp_lib.f90.var
2+
3+
!
4+
!//===----------------------------------------------------------------------===//
5+
!//
6+
!// The LLVM Compiler Infrastructure
7+
!//
8+
!// This file is dual licensed under the MIT and the University of Illinois Open
9+
!// Source Licenses. See LICENSE.txt for details.
10+
!//
11+
!//===----------------------------------------------------------------------===//
12+
!
13+
14+
module omp_lib_kinds
15+
16+
use, intrinsic :: iso_c_binding
17+
18+
integer, parameter :: omp_integer_kind = c_int
19+
integer, parameter :: omp_logical_kind = 4
20+
integer, parameter :: omp_real_kind = c_float
21+
integer, parameter :: kmp_double_kind = c_double
22+
integer, parameter :: omp_lock_kind = c_intptr_t
23+
integer, parameter :: omp_nest_lock_kind = c_intptr_t
24+
integer, parameter :: omp_sched_kind = omp_integer_kind
25+
integer, parameter :: omp_proc_bind_kind = omp_integer_kind
26+
integer, parameter :: kmp_pointer_kind = c_intptr_t
27+
integer, parameter :: kmp_size_t_kind = c_size_t
28+
integer, parameter :: kmp_affinity_mask_kind = c_intptr_t
29+
integer, parameter :: kmp_cancel_kind = omp_integer_kind
30+
integer, parameter :: kmp_lock_hint_kind = omp_integer_kind
31+
32+
end module omp_lib_kinds
33+
34+
module omp_lib
35+
36+
use omp_lib_kinds
37+
38+
integer (kind=omp_integer_kind), parameter :: openmp_version = $OMP_VERSION
39+
integer (kind=omp_integer_kind), parameter :: kmp_version_major = $KMP_VERSION_MAJOR
40+
integer (kind=omp_integer_kind), parameter :: kmp_version_minor = $KMP_VERSION_MINOR
41+
integer (kind=omp_integer_kind), parameter :: kmp_version_build = $KMP_VERSION_BUILD
42+
character(*) kmp_build_date
43+
parameter( kmp_build_date = '$KMP_BUILD_DATE' )
44+
45+
integer(kind=omp_sched_kind), parameter :: omp_sched_static = 1
46+
integer(kind=omp_sched_kind), parameter :: omp_sched_dynamic = 2
47+
integer(kind=omp_sched_kind), parameter :: omp_sched_guided = 3
48+
integer(kind=omp_sched_kind), parameter :: omp_sched_auto = 4
49+
50+
51+
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_false = 0
52+
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_true = 1
53+
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_master = 2
54+
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_close = 3
55+
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_spread = 4
56+
57+
integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_parallel = 1
58+
integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_loop = 2
59+
integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_sections = 3
60+
integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_taskgroup = 4
61+
62+
integer (kind=kmp_lock_hint_kind), parameter :: kmp_lock_hint_none = 0
63+
integer (kind=kmp_lock_hint_kind), parameter :: kmp_lock_hint_uncontended = 1
64+
integer (kind=kmp_lock_hint_kind), parameter :: kmp_lock_hint_contended = 2
65+
integer (kind=kmp_lock_hint_kind), parameter :: kmp_lock_hint_nonspeculative = 3
66+
integer (kind=kmp_lock_hint_kind), parameter :: kmp_lock_hint_speculative = 4
67+
integer (kind=kmp_lock_hint_kind), parameter :: kmp_lock_hint_adaptive = 5
68+
69+
interface
70+
71+
! ***
72+
! *** omp_* entry points
73+
! ***
74+
75+
subroutine omp_set_num_threads(nthreads) bind(c)
76+
use omp_lib_kinds
77+
integer (kind=omp_integer_kind), value :: nthreads
78+
end subroutine omp_set_num_threads
79+
80+
subroutine omp_set_dynamic(enable) bind(c)
81+
use omp_lib_kinds
82+
logical (kind=omp_logical_kind), value :: enable
83+
end subroutine omp_set_dynamic
84+
85+
subroutine omp_set_nested(enable) bind(c)
86+
use omp_lib_kinds
87+
logical (kind=omp_logical_kind), value :: enable
88+
end subroutine omp_set_nested
89+
90+
function omp_get_num_threads() bind(c)
91+
use omp_lib_kinds
92+
integer (kind=omp_integer_kind) omp_get_num_threads
93+
end function omp_get_num_threads
94+
95+
function omp_get_max_threads() bind(c)
96+
use omp_lib_kinds
97+
integer (kind=omp_integer_kind) omp_get_max_threads
98+
end function omp_get_max_threads
99+
100+
function omp_get_thread_num() bind(c)
101+
use omp_lib_kinds
102+
integer (kind=omp_integer_kind) omp_get_thread_num
103+
end function omp_get_thread_num
104+
105+
function omp_get_num_procs() bind(c)
106+
use omp_lib_kinds
107+
integer (kind=omp_integer_kind) omp_get_num_procs
108+
end function omp_get_num_procs
109+
110+
function omp_in_parallel() bind(c)
111+
use omp_lib_kinds
112+
logical (kind=omp_logical_kind) omp_in_parallel
113+
end function omp_in_parallel
114+
115+
function omp_in_final() bind(c)
116+
use omp_lib_kinds
117+
logical (kind=omp_logical_kind) omp_in_final
118+
end function omp_in_final
119+
120+
function omp_get_dynamic() bind(c)
121+
use omp_lib_kinds
122+
logical (kind=omp_logical_kind) omp_get_dynamic
123+
end function omp_get_dynamic
124+
125+
function omp_get_nested() bind(c)
126+
use omp_lib_kinds
127+
logical (kind=omp_logical_kind) omp_get_nested
128+
end function omp_get_nested
129+
130+
function omp_get_thread_limit() bind(c)
131+
use omp_lib_kinds
132+
integer (kind=omp_integer_kind) omp_get_thread_limit
133+
end function omp_get_thread_limit
134+
135+
subroutine omp_set_max_active_levels(max_levels) bind(c)
136+
use omp_lib_kinds
137+
integer (kind=omp_integer_kind), value :: max_levels
138+
end subroutine omp_set_max_active_levels
139+
140+
function omp_get_max_active_levels() bind(c)
141+
use omp_lib_kinds
142+
integer (kind=omp_integer_kind) omp_get_max_active_levels
143+
end function omp_get_max_active_levels
144+
145+
function omp_get_level() bind(c)
146+
use omp_lib_kinds
147+
integer (kind=omp_integer_kind) omp_get_level
148+
end function omp_get_level
149+
150+
function omp_get_active_level() bind(c)
151+
use omp_lib_kinds
152+
integer (kind=omp_integer_kind) omp_get_active_level
153+
end function omp_get_active_level
154+
155+
function omp_get_ancestor_thread_num(level) bind(c)
156+
use omp_lib_kinds
157+
integer (kind=omp_integer_kind) omp_get_ancestor_thread_num
158+
integer (kind=omp_integer_kind), value :: level
159+
end function omp_get_ancestor_thread_num
160+
161+
function omp_get_team_size(level) bind(c)
162+
use omp_lib_kinds
163+
integer (kind=omp_integer_kind) omp_get_team_size
164+
integer (kind=omp_integer_kind), value :: level
165+
end function omp_get_team_size
166+
167+
subroutine omp_set_schedule(kind, modifier) bind(c)
168+
use omp_lib_kinds
169+
integer (kind=omp_sched_kind), value :: kind
170+
integer (kind=omp_integer_kind), value :: modifier
171+
end subroutine omp_set_schedule
172+
173+
subroutine omp_get_schedule(kind, modifier) bind(c)
174+
use omp_lib_kinds
175+
integer (kind=omp_sched_kind) kind
176+
integer (kind=omp_integer_kind) modifier
177+
end subroutine omp_get_schedule
178+
179+
function omp_get_proc_bind() bind(c)
180+
use omp_lib_kinds
181+
integer (kind=omp_proc_bind_kind) omp_get_proc_bind
182+
end function omp_get_proc_bind
183+
184+
function omp_get_wtime() bind(c)
185+
use omp_lib_kinds
186+
real (kind=kmp_double_kind) omp_get_wtime
187+
end function omp_get_wtime
188+
189+
function omp_get_wtick() bind(c)
190+
use omp_lib_kinds
191+
real (kind=kmp_double_kind) omp_get_wtick
192+
end function omp_get_wtick
193+
194+
function omp_get_default_device() bind(c)
195+
use omp_lib_kinds
196+
integer (kind=omp_integer_kind) omp_get_default_device
197+
end function omp_get_default_device
198+
199+
subroutine omp_set_default_device(dflt_device) bind(c)
200+
use omp_lib_kinds
201+
integer (kind=omp_integer_kind), value :: dflt_device
202+
end subroutine omp_set_default_device
203+
204+
function omp_get_num_devices() bind(c)
205+
use omp_lib_kinds
206+
integer (kind=omp_integer_kind) omp_get_num_devices
207+
end function omp_get_num_devices
208+
209+
function omp_get_num_teams() bind(c)
210+
use omp_lib_kinds
211+
integer (kind=omp_integer_kind) omp_get_num_teams
212+
end function omp_get_num_teams
213+
214+
function omp_get_team_num() bind(c)
215+
use omp_lib_kinds
216+
integer (kind=omp_integer_kind) omp_get_team_num
217+
end function omp_get_team_num
218+
219+
function omp_get_cancellation() bind(c)
220+
use omp_lib_kinds
221+
integer (kind=omp_integer_kind) omp_get_cancellation
222+
end function omp_get_cancellation
223+
224+
function omp_is_initial_device() bind(c)
225+
use omp_lib_kinds
226+
logical (kind=omp_logical_kind) omp_is_initial_device
227+
end function omp_is_initial_device
228+
229+
subroutine omp_init_lock(lockvar) bind(c)
230+
!DIR$ IF(__INTEL_COMPILER.GE.1400)
231+
!DIR$ attributes known_intrinsic :: omp_init_lock
232+
!DIR$ ENDIF
233+
use omp_lib_kinds
234+
integer (kind=omp_lock_kind) lockvar
235+
end subroutine omp_init_lock
236+
237+
subroutine omp_destroy_lock(lockvar) bind(c)
238+
!DIR$ IF(__INTEL_COMPILER.GE.1400)
239+
!DIR$ attributes known_intrinsic :: omp_destroy_lock
240+
!DIR$ ENDIF
241+
use omp_lib_kinds
242+
integer (kind=omp_lock_kind) lockvar
243+
end subroutine omp_destroy_lock
244+
245+
subroutine omp_set_lock(lockvar) bind(c)
246+
!DIR$ IF(__INTEL_COMPILER.GE.1400)
247+
!DIR$ attributes known_intrinsic :: omp_set_lock
248+
!DIR$ ENDIF
249+
use omp_lib_kinds
250+
integer (kind=omp_lock_kind) lockvar
251+
end subroutine omp_set_lock
252+
253+
subroutine omp_unset_lock(lockvar) bind(c)
254+
!DIR$ IF(__INTEL_COMPILER.GE.1400)
255+
!DIR$ attributes known_intrinsic :: omp_unset_lock
256+
!DIR$ ENDIF
257+
use omp_lib_kinds
258+
integer (kind=omp_lock_kind) lockvar
259+
end subroutine omp_unset_lock
260+
261+
function omp_test_lock(lockvar) bind(c)
262+
!DIR$ IF(__INTEL_COMPILER.GE.1400)
263+
!DIR$ attributes known_intrinsic :: omp_test_lock
264+
!DIR$ ENDIF
265+
use omp_lib_kinds
266+
logical (kind=omp_logical_kind) omp_test_lock
267+
integer (kind=omp_lock_kind) lockvar
268+
end function omp_test_lock
269+
270+
subroutine omp_init_nest_lock(lockvar) bind(c)
271+
!DIR$ IF(__INTEL_COMPILER.GE.1400)
272+
!DIR$ attributes known_intrinsic :: omp_init_nest_lock
273+
!DIR$ ENDIF
274+
use omp_lib_kinds
275+
integer (kind=omp_nest_lock_kind) lockvar
276+
end subroutine omp_init_nest_lock
277+
278+
subroutine omp_destroy_nest_lock(lockvar) bind(c)
279+
!DIR$ IF(__INTEL_COMPILER.GE.1400)
280+
!DIR$ attributes known_intrinsic :: omp_destroy_nest_lock
281+
!DIR$ ENDIF
282+
use omp_lib_kinds
283+
integer (kind=omp_nest_lock_kind) lockvar
284+
end subroutine omp_destroy_nest_lock
285+
286+
subroutine omp_set_nest_lock(lockvar) bind(c)
287+
!DIR$ IF(__INTEL_COMPILER.GE.1400)
288+
!DIR$ attributes known_intrinsic :: omp_set_nest_lock
289+
!DIR$ ENDIF
290+
use omp_lib_kinds
291+
integer (kind=omp_nest_lock_kind) lockvar
292+
end subroutine omp_set_nest_lock
293+
294+
subroutine omp_unset_nest_lock(lockvar) bind(c)
295+
!DIR$ IF(__INTEL_COMPILER.GE.1400)
296+
!DIR$ attributes known_intrinsic :: omp_unset_nest_lock
297+
!DIR$ ENDIF
298+
use omp_lib_kinds
299+
integer (kind=omp_nest_lock_kind) lockvar
300+
end subroutine omp_unset_nest_lock
301+
302+
function omp_test_nest_lock(lockvar) bind(c)
303+
!DIR$ IF(__INTEL_COMPILER.GE.1400)
304+
!DIR$ attributes known_intrinsic :: omp_test_nest_lock
305+
!DIR$ ENDIF
306+
use omp_lib_kinds
307+
integer (kind=omp_integer_kind) omp_test_nest_lock
308+
integer (kind=omp_nest_lock_kind) lockvar
309+
end function omp_test_nest_lock
310+
311+
! ***
312+
! *** kmp_* entry points
313+
! ***
314+
315+
subroutine kmp_set_stacksize(size) bind(c)
316+
use omp_lib_kinds
317+
integer (kind=omp_integer_kind), value :: size
318+
end subroutine kmp_set_stacksize
319+
320+
subroutine kmp_set_stacksize_s(size) bind(c)
321+
use omp_lib_kinds
322+
integer (kind=kmp_size_t_kind), value :: size
323+
end subroutine kmp_set_stacksize_s
324+
325+
subroutine kmp_set_blocktime(msec) bind(c)
326+
use omp_lib_kinds
327+
integer (kind=omp_integer_kind), value :: msec
328+
end subroutine kmp_set_blocktime
329+
330+
subroutine kmp_set_library_serial() bind(c)
331+
end subroutine kmp_set_library_serial
332+
333+
subroutine kmp_set_library_turnaround() bind(c)
334+
end subroutine kmp_set_library_turnaround
335+
336+
subroutine kmp_set_library_throughput() bind(c)
337+
end subroutine kmp_set_library_throughput
338+
339+
subroutine kmp_set_library(libnum) bind(c)
340+
use omp_lib_kinds
341+
integer (kind=omp_integer_kind), value :: libnum
342+
end subroutine kmp_set_library
343+
344+
subroutine kmp_set_defaults(string) bind(c)
345+
use, intrinsic :: iso_c_binding
346+
character (kind=c_char) :: string(*)
347+
end subroutine kmp_set_defaults
348+
349+
function kmp_get_stacksize() bind(c)
350+
use omp_lib_kinds
351+
integer (kind=omp_integer_kind) kmp_get_stacksize
352+
end function kmp_get_stacksize
353+
354+
function kmp_get_stacksize_s() bind(c)
355+
use omp_lib_kinds
356+
integer (kind=kmp_size_t_kind) kmp_get_stacksize_s
357+
end function kmp_get_stacksize_s
358+
359+
function kmp_get_blocktime() bind(c)
360+
use omp_lib_kinds
361+
integer (kind=omp_integer_kind) kmp_get_blocktime
362+
end function kmp_get_blocktime
363+
364+
function kmp_get_library() bind(c)
365+
use omp_lib_kinds
366+
integer (kind=omp_integer_kind) kmp_get_library
367+
end function kmp_get_library
368+
369+
function kmp_set_affinity(mask) bind(c)
370+
use omp_lib_kinds
371+
integer (kind=omp_integer_kind) kmp_set_affinity
372+
integer (kind=kmp_affinity_mask_kind) mask
373+
end function kmp_set_affinity
374+
375+
function kmp_get_affinity(mask) bind(c)
376+
use omp_lib_kinds
377+
integer (kind=omp_integer_kind) kmp_get_affinity
378+
integer (kind=kmp_affinity_mask_kind) mask
379+
end function kmp_get_affinity
380+
381+
function kmp_get_affinity_max_proc() bind(c)
382+
use omp_lib_kinds
383+
integer (kind=omp_integer_kind) kmp_get_affinity_max_proc
384+
end function kmp_get_affinity_max_proc
385+
386+
subroutine kmp_create_affinity_mask(mask) bind(c)
387+
use omp_lib_kinds
388+
integer (kind=kmp_affinity_mask_kind) mask
389+
end subroutine kmp_create_affinity_mask
390+
391+
subroutine kmp_destroy_affinity_mask(mask) bind(c)
392+
use omp_lib_kinds
393+
integer (kind=kmp_affinity_mask_kind) mask
394+
end subroutine kmp_destroy_affinity_mask
395+
396+
function kmp_set_affinity_mask_proc(proc, mask) bind(c)
397+
use omp_lib_kinds
398+
integer (kind=omp_integer_kind) kmp_set_affinity_mask_proc
399+
integer (kind=omp_integer_kind), value :: proc
400+
integer (kind=kmp_affinity_mask_kind) mask
401+
end function kmp_set_affinity_mask_proc
402+
403+
function kmp_unset_affinity_mask_proc(proc, mask) bind(c)
404+
use omp_lib_kinds
405+
integer (kind=omp_integer_kind) kmp_unset_affinity_mask_proc
406+
integer (kind=omp_integer_kind), value :: proc
407+
integer (kind=kmp_affinity_mask_kind) mask
408+
end function kmp_unset_affinity_mask_proc
409+
410+
function kmp_get_affinity_mask_proc(proc, mask) bind(c)
411+
use omp_lib_kinds
412+
integer (kind=omp_integer_kind) kmp_get_affinity_mask_proc
413+
integer (kind=omp_integer_kind), value :: proc
414+
integer (kind=kmp_affinity_mask_kind) mask
415+
end function kmp_get_affinity_mask_proc
416+
417+
function kmp_malloc(size) bind(c)
418+
use omp_lib_kinds
419+
integer (kind=kmp_pointer_kind) kmp_malloc
420+
integer (kind=kmp_size_t_kind), value :: size
421+
end function kmp_malloc
422+
423+
function kmp_calloc(nelem, elsize) bind(c)
424+
use omp_lib_kinds
425+
integer (kind=kmp_pointer_kind) kmp_calloc
426+
integer (kind=kmp_size_t_kind), value :: nelem
427+
integer (kind=kmp_size_t_kind), value :: elsize
428+
end function kmp_calloc
429+
430+
function kmp_realloc(ptr, size) bind(c)
431+
use omp_lib_kinds
432+
integer (kind=kmp_pointer_kind) kmp_realloc
433+
integer (kind=kmp_pointer_kind), value :: ptr
434+
integer (kind=kmp_size_t_kind), value :: size
435+
end function kmp_realloc
436+
437+
subroutine kmp_free(ptr) bind(c)
438+
use omp_lib_kinds
439+
integer (kind=kmp_pointer_kind), value :: ptr
440+
end subroutine kmp_free
441+
442+
subroutine kmp_set_warnings_on() bind(c)
443+
end subroutine kmp_set_warnings_on
444+
445+
subroutine kmp_set_warnings_off() bind(c)
446+
end subroutine kmp_set_warnings_off
447+
448+
function kmp_get_cancellation_status(cancelkind) bind(c)
449+
use omp_lib_kinds
450+
integer (kind=kmp_cancel_kind), value :: cancelkind
451+
logical (kind=omp_logical_kind) kmp_get_cancellation_status
452+
end function kmp_get_cancellation_status
453+
454+
subroutine kmp_init_lock_hinted(lockvar, lockhint) bind(c)
455+
use omp_lib_kinds
456+
integer (kind=omp_lock_kind) lockvar
457+
integer (kind=kmp_lock_hint_kind), value :: lockhint
458+
end subroutine kmp_init_lock_hinted
459+
460+
subroutine kmp_init_nest_lock_hinted(lockvar, lockhint) bind(c)
461+
use omp_lib_kinds
462+
integer (kind=omp_lock_kind) lockvar
463+
integer (kind=kmp_lock_hint_kind), value :: lockhint
464+
end subroutine kmp_init_nest_lock_hinted
465+
466+
end interface
467+
468+
end module omp_lib

‎openmp/runtime/src/include/41/omp_lib.h.var

+582
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.