ROSE
0.9.6a
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
omp.h
Go to the documentation of this file.
1
#ifndef _OMP_H_DEF
2
#define _OMP_H_DEF
3
4
/*
5
From the specification 3.0, Chapter 3.1, page 108
6
What to put into this file:
7
* The prototypes of all the runtime library routines, with "C" linkage
8
* The type omp_lock_t
9
* The type omp_nest_lock_t
10
* The type omp_sched_t
11
12
Specification 3.0 page 302
13
D.1 Example of the omp.h Header File
14
* */
15
16
typedef
void
*
omp_lock_t
;
/* represented as a pointer */
17
typedef
void
*
omp_nest_lock_t
;
/* represented as a pointer */
18
19
typedef
enum
omp_sched_t
20
{
21
omp_sched_static
= 1,
22
omp_sched_dynamic
= 2,
23
omp_sched_guided
= 3,
24
omp_sched_auto
= 4
25
}
omp_sched_t
;
26
27
28
#ifdef __cplusplus
29
extern
"C"
{
30
#endif
31
32
/*
33
* Execution Environment Functions
34
*/
35
void
omp_set_num_threads
(
int
num);
36
int
omp_get_num_threads
(
void
);
37
int
omp_get_max_threads
(
void
);
38
int
omp_get_thread_num
(
void
);
39
int
omp_get_num_procs
(
void
);
40
41
int
omp_in_parallel
(
void
);
42
void
omp_set_dynamic
(
int
dynamic_thds);
43
int
omp_get_dynamic
(
void
);
44
45
void
omp_set_nested
(
int
n_nested);
46
int
omp_get_nested
(
void
);
47
48
/*
49
* Timer routine
50
*/
51
double
omp_get_wtime
(
void
);
52
double
omp_get_wtick
(
void
);
53
54
/*
55
* Lock Functions
56
*/
57
void
omp_init_lock
(
omp_lock_t
*lock);
58
void
omp_init_nest_lock
(
omp_nest_lock_t
*lock);
59
void
omp_destroy_lock
(
omp_lock_t
*lock);
60
void
omp_destroy_nest_lock
(
omp_nest_lock_t
*lock);
61
void
omp_set_lock
(
omp_lock_t
*lock);
62
void
omp_set_nest_lock
(
omp_nest_lock_t
*lock);
63
void
omp_unset_lock
(
omp_lock_t
*lock);
64
void
omp_unset_nest_lock
(
omp_nest_lock_t
*lock);
65
int
omp_test_lock
(
omp_lock_t
*lock);
66
int
omp_test_nest_lock
(
omp_nest_lock_t
*lock);
67
68
/*
69
* Other internal variables
70
*/
71
void
omp_set_schedule
(
omp_sched_t
,
int
);
72
void
omp_get_schedule
(
omp_sched_t
*,
int
*);
73
int
omp_get_thread_limit
(
void
);
74
void
omp_set_max_active_levels
(
int
);
75
int
omp_get_max_active_levels
(
void
);
76
int
omp_get_level
(
void
);
77
int
omp_get_ancestor_thread_num
(
int
);
78
int
omp_get_team_size
(
int
);
79
int
omp_get_active_level
(
void
);
80
81
/*
82
* FORTRAN Execution Environment Function Wrappers
83
* Fortran stuff should be handled in omp_lib.h
84
void omp_set_num_threads_(int *num);
85
int omp_get_num_threads_(void);
86
int omp_get_max_threads_(void);
87
int omp_get_thread_num_(void);
88
int omp_get_num_procs_(void);
89
int omp_in_parallel_(void);
90
void omp_set_dynamic_(int *dynamic_thds);
91
int omp_get_dynamic_(void);
92
void omp_set_nested_(int *n_nested);
93
int omp_get_nested_(void);
94
95
* FORTRAN Lock Function Wrappers
96
typedef unsigned int _omf77Lock_t;
97
void omp_init_lock_(_omf77Lock_t *lock);
98
void omp_init_nest_lock_(_omf77Lock_t *lock);
99
void omp_destroy_lock_(_omf77Lock_t *lock);
100
void omp_destroy_nest_lock_(_omf77Lock_t *lock);
101
void omp_set_lock_(_omf77Lock_t *lock);
102
void omp_set_nest_lock_(_omf77Lock_t *lock);
103
void omp_unset_lock_(_omf77Lock_t *lock);
104
void omp_unset_nest_lock_(_omf77Lock_t *lock);
105
int omp_test_lock_(_omf77Lock_t *lock);
106
int omp_test_nest_lock_(_omf77Lock_t *lock);
107
108
*/
109
#ifdef __cplusplus
110
}
/* closing brace for extern "C" */
111
#endif
112
113
#endif
/* _OMP_H_DEF */
114
rose-edg4x
src
frontend
SageIII
omp.h
Generated on Mon May 5 2014 17:29:24 for ROSE by
1.8.4