omp.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047 #ifndef __OMP_H
00048 # define __OMP_H
00049
00050 # define KMP_VERSION_MAJOR 5
00051 # define KMP_VERSION_MINOR 0
00052 # define KMP_VERSION_BUILD 00000000
00053 # define KMP_BUILD_DATE "2013-08-22 22:37:00 UTC"
00054
00055 # ifdef __cplusplus
00056 extern "C" {
00057 # endif
00058
00059 # define omp_set_num_threads ompc_set_num_threads
00060 # define omp_set_dynamic ompc_set_dynamic
00061 # define omp_set_nested ompc_set_nested
00062 # define omp_set_max_active_levels ompc_set_max_active_levels
00063 # define omp_set_schedule ompc_set_schedule
00064 # define omp_get_ancestor_thread_num ompc_get_ancestor_thread_num
00065 # define omp_get_team_size ompc_get_team_size
00066
00067
00068 # define kmp_set_stacksize kmpc_set_stacksize
00069 # define kmp_set_stacksize_s kmpc_set_stacksize_s
00070 # define kmp_set_blocktime kmpc_set_blocktime
00071 # define kmp_set_library kmpc_set_library
00072 # define kmp_set_defaults kmpc_set_defaults
00073 # define kmp_set_affinity_mask_proc kmpc_set_affinity_mask_proc
00074 # define kmp_unset_affinity_mask_proc kmpc_unset_affinity_mask_proc
00075 # define kmp_get_affinity_mask_proc kmpc_get_affinity_mask_proc
00076
00077 # define kmp_malloc kmpc_malloc
00078 # define kmp_calloc kmpc_calloc
00079 # define kmp_realloc kmpc_realloc
00080 # define kmp_free kmpc_free
00081
00082
00083 # if defined(_WIN32)
00084 # define __KAI_KMPC_CONVENTION __cdecl
00085 # else
00086 # define __KAI_KMPC_CONVENTION
00087 # endif
00088
00089
00090 typedef enum omp_sched_t {
00091 omp_sched_static = 1,
00092 omp_sched_dynamic = 2,
00093 omp_sched_guided = 3,
00094 omp_sched_auto = 4
00095 } omp_sched_t;
00096
00097
00098 extern void __KAI_KMPC_CONVENTION omp_set_num_threads (int);
00099 extern void __KAI_KMPC_CONVENTION omp_set_dynamic (int);
00100 extern void __KAI_KMPC_CONVENTION omp_set_nested (int);
00101 extern void __KAI_KMPC_CONVENTION omp_set_max_active_levels (int);
00102 extern void __KAI_KMPC_CONVENTION omp_set_schedule (omp_sched_t, int);
00103
00104
00105 extern int __KAI_KMPC_CONVENTION omp_get_num_threads (void);
00106 extern int __KAI_KMPC_CONVENTION omp_get_dynamic (void);
00107 extern int __KAI_KMPC_CONVENTION omp_get_nested (void);
00108 extern int __KAI_KMPC_CONVENTION omp_get_max_threads (void);
00109 extern int __KAI_KMPC_CONVENTION omp_get_thread_num (void);
00110 extern int __KAI_KMPC_CONVENTION omp_get_num_procs (void);
00111 extern int __KAI_KMPC_CONVENTION omp_in_parallel (void);
00112 extern int __KAI_KMPC_CONVENTION omp_get_active_level (void);
00113 extern int __KAI_KMPC_CONVENTION omp_get_level (void);
00114 extern int __KAI_KMPC_CONVENTION omp_get_ancestor_thread_num (int);
00115 extern int __KAI_KMPC_CONVENTION omp_get_team_size (int);
00116 extern int __KAI_KMPC_CONVENTION omp_get_thread_limit (void);
00117 extern int __KAI_KMPC_CONVENTION omp_get_max_active_levels (void);
00118 extern void __KAI_KMPC_CONVENTION omp_get_schedule (omp_sched_t *, int *);
00119
00120
00121 typedef struct omp_lock_t {
00122 void * _lk;
00123 } omp_lock_t;
00124
00125 extern void __KAI_KMPC_CONVENTION omp_init_lock (omp_lock_t *);
00126 extern void __KAI_KMPC_CONVENTION omp_set_lock (omp_lock_t *);
00127 extern void __KAI_KMPC_CONVENTION omp_unset_lock (omp_lock_t *);
00128 extern void __KAI_KMPC_CONVENTION omp_destroy_lock (omp_lock_t *);
00129 extern int __KAI_KMPC_CONVENTION omp_test_lock (omp_lock_t *);
00130
00131
00132 typedef struct omp_nest_lock_t {
00133 void * _lk;
00134 } omp_nest_lock_t;
00135
00136 extern void __KAI_KMPC_CONVENTION omp_init_nest_lock (omp_nest_lock_t *);
00137 extern void __KAI_KMPC_CONVENTION omp_set_nest_lock (omp_nest_lock_t *);
00138 extern void __KAI_KMPC_CONVENTION omp_unset_nest_lock (omp_nest_lock_t *);
00139 extern void __KAI_KMPC_CONVENTION omp_destroy_nest_lock (omp_nest_lock_t *);
00140 extern int __KAI_KMPC_CONVENTION omp_test_nest_lock (omp_nest_lock_t *);
00141
00142
00143 extern double __KAI_KMPC_CONVENTION omp_get_wtime (void);
00144 extern double __KAI_KMPC_CONVENTION omp_get_wtick (void);
00145
00146 # include <stdlib.h>
00147
00148 extern int __KAI_KMPC_CONVENTION kmp_get_stacksize (void);
00149 extern void __KAI_KMPC_CONVENTION kmp_set_stacksize (int);
00150 extern size_t __KAI_KMPC_CONVENTION kmp_get_stacksize_s (void);
00151 extern void __KAI_KMPC_CONVENTION kmp_set_stacksize_s (size_t);
00152 extern int __KAI_KMPC_CONVENTION kmp_get_blocktime (void);
00153 extern int __KAI_KMPC_CONVENTION kmp_get_library (void);
00154 extern void __KAI_KMPC_CONVENTION kmp_set_blocktime (int);
00155 extern void __KAI_KMPC_CONVENTION kmp_set_library (int);
00156 extern void __KAI_KMPC_CONVENTION kmp_set_library_serial (void);
00157 extern void __KAI_KMPC_CONVENTION kmp_set_library_turnaround (void);
00158 extern void __KAI_KMPC_CONVENTION kmp_set_library_throughput (void);
00159 extern void __KAI_KMPC_CONVENTION kmp_set_defaults (char const *);
00160
00161
00162 typedef void * kmp_affinity_mask_t;
00163
00164 extern int __KAI_KMPC_CONVENTION kmp_set_affinity (kmp_affinity_mask_t *);
00165 extern int __KAI_KMPC_CONVENTION kmp_get_affinity (kmp_affinity_mask_t *);
00166 extern int __KAI_KMPC_CONVENTION kmp_get_affinity_max_proc (void);
00167 extern void __KAI_KMPC_CONVENTION kmp_create_affinity_mask (kmp_affinity_mask_t *);
00168 extern void __KAI_KMPC_CONVENTION kmp_destroy_affinity_mask (kmp_affinity_mask_t *);
00169 extern int __KAI_KMPC_CONVENTION kmp_set_affinity_mask_proc (int, kmp_affinity_mask_t *);
00170 extern int __KAI_KMPC_CONVENTION kmp_unset_affinity_mask_proc (int, kmp_affinity_mask_t *);
00171 extern int __KAI_KMPC_CONVENTION kmp_get_affinity_mask_proc (int, kmp_affinity_mask_t *);
00172
00173
00174 typedef enum omp_proc_bind_t {
00175 omp_proc_bind_false = 0,
00176 omp_proc_bind_true = 1,
00177 omp_proc_bind_master = 2,
00178 omp_proc_bind_close = 3,
00179 omp_proc_bind_spread = 4
00180 } omp_proc_bind_t;
00181
00182 extern omp_proc_bind_t __KAI_KMPC_CONVENTION omp_get_proc_bind (void);
00183
00184 extern void * __KAI_KMPC_CONVENTION kmp_malloc (size_t);
00185 extern void * __KAI_KMPC_CONVENTION kmp_calloc (size_t, size_t);
00186 extern void * __KAI_KMPC_CONVENTION kmp_realloc (void *, size_t);
00187 extern void __KAI_KMPC_CONVENTION kmp_free (void *);
00188
00189 extern void __KAI_KMPC_CONVENTION kmp_set_warnings_on(void);
00190 extern void __KAI_KMPC_CONVENTION kmp_set_warnings_off(void);
00191
00192 # undef __KAI_KMPC_CONVENTION
00193
00194
00195
00196
00197 typedef int omp_int_t;
00198 typedef double omp_wtime_t;
00199
00200 # ifdef __cplusplus
00201 }
00202 # endif
00203
00204 #endif
00205