omp.h

Go to the documentation of this file.
00001 /*
00002  * include/40/omp.h.var
00003  * $Revision: 41674 $
00004  * $Date: 2012-06-05 08:33:35 -0500 (Tue, 05 Jun 2012) $
00005  */
00006 
00007 /* <copyright>
00008     Copyright (c) 1985-2013 Intel Corporation.  All Rights Reserved.
00009 
00010     Redistribution and use in source and binary forms, with or without
00011     modification, are permitted provided that the following conditions
00012     are met:
00013 
00014       * Redistributions of source code must retain the above copyright
00015         notice, this list of conditions and the following disclaimer.
00016       * Redistributions in binary form must reproduce the above copyright
00017         notice, this list of conditions and the following disclaimer in the
00018         documentation and/or other materials provided with the distribution.
00019       * Neither the name of Intel Corporation nor the names of its
00020         contributors may be used to endorse or promote products derived
00021         from this software without specific prior written permission.
00022 
00023     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00024     "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00025     LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
00026     A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
00027     HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00028     SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00029     LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00030     DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
00031     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00032     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00033     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00034 
00035 
00036 ------------------------------------------------------------------------
00037 
00038     Portions of this software are protected under the following patents:
00039         U.S. Patent 5,812,852
00040         U.S. Patent 6,792,599
00041         U.S. Patent 7,069,556
00042         U.S. Patent 7,328,433
00043         U.S. Patent 7,500,242
00044 
00045 </copyright> */
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     /* schedule kind constants */
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     /* set API functions */
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     /* query API functions */
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     /* lock API functions */
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     /* nested lock API functions */
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     /* time API functions */
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     /* kmp API functions */
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     /* Intel affinity API */
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     /* OpenMP 4.0 affinity API */
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     /* Warning:
00195        The following typedefs are not standard, deprecated and will be removed in a future release.
00196     */
00197     typedef int     omp_int_t;
00198     typedef double  omp_wtime_t;
00199 
00200 #   ifdef __cplusplus
00201     }
00202 #   endif
00203 
00204 #endif /* __OMP_H */
00205 

Generated on 25 Aug 2013 for libomp_oss by  doxygen 1.6.1