blob: aa0a1aa9a500c00621ad07987341d682768c5860 [file] [log] [blame]
Jonathan Peytonff7da34b2015-08-28 19:24:39 +00001/*
2 * kmp_config.h -- Feature macros
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#ifndef KMP_CONFIG_H
13#define KMP_CONFIG_H
14
15#include "kmp_platform.h"
16
17// cmakedefine01 MACRO will define MACRO as either 0 or 1
18// cmakedefine MACRO 1 will define MACRO as 1 or leave undefined
19#cmakedefine01 DEBUG_BUILD
20#cmakedefine01 RELWITHDEBINFO_BUILD
21#cmakedefine01 LIBOMP_USE_ITT_NOTIFY
22#define USE_ITT_NOTIFY LIBOMP_USE_ITT_NOTIFY
23#if ! LIBOMP_USE_ITT_NOTIFY
24# define INTEL_NO_ITTNOTIFY_API
25#endif
26#cmakedefine01 LIBOMP_USE_VERSION_SYMBOLS
27#if LIBOMP_USE_VERSION_SYMBOLS
28# define KMP_USE_VERSION_SYMBOLS
29#endif
Jonathan Peyton69e596a2015-10-29 20:56:24 +000030#cmakedefine01 LIBOMP_HAVE_WEAK_ATTRIBUTE
31#define KMP_HAVE_WEAK_ATTRIBUTE LIBOMP_HAVE_WEAK_ATTRIBUTE
32#cmakedefine01 LIBOMP_HAVE_PSAPI
33#define KMP_HAVE_PSAPI LIBOMP_HAVE_PSAPI
Jonathan Peytonff7da34b2015-08-28 19:24:39 +000034#cmakedefine01 LIBOMP_STATS
35#define KMP_STATS_ENABLED LIBOMP_STATS
36#cmakedefine01 LIBOMP_USE_DEBUGGER
37#define USE_DEBUGGER LIBOMP_USE_DEBUGGER
38#cmakedefine01 LIBOMP_OMPT_SUPPORT
39#define OMPT_SUPPORT LIBOMP_OMPT_SUPPORT
40#cmakedefine01 LIBOMP_OMPT_BLAME
41#define OMPT_BLAME LIBOMP_OMPT_BLAME
42#cmakedefine01 LIBOMP_OMPT_TRACE
43#define OMPT_TRACE LIBOMP_OMPT_TRACE
44#cmakedefine01 LIBOMP_USE_ADAPTIVE_LOCKS
45#define KMP_USE_ADAPTIVE_LOCKS LIBOMP_USE_ADAPTIVE_LOCKS
46#define KMP_DEBUG_ADAPTIVE_LOCKS 0
47#cmakedefine01 LIBOMP_USE_INTERNODE_ALIGNMENT
48#define KMP_USE_INTERNODE_ALIGNMENT LIBOMP_USE_INTERNODE_ALIGNMENT
49#cmakedefine01 LIBOMP_ENABLE_ASSERTIONS
50#define KMP_USE_ASSERT LIBOMP_ENABLE_ASSERTIONS
51#cmakedefine01 STUBS_LIBRARY
52#define KMP_ARCH_STR "@LIBOMP_LEGAL_ARCH@"
53#define KMP_LIBRARY_FILE "@LIBOMP_LIB_FILE@"
54#define KMP_VERSION_MAJOR @LIBOMP_VERSION_MAJOR@
55#define KMP_VERSION_MINOR @LIBOMP_VERSION_MINOR@
56#define LIBOMP_OMP_VERSION @LIBOMP_OMP_VERSION@
57#define OMP_50_ENABLED (LIBOMP_OMP_VERSION >= 50)
58#define OMP_41_ENABLED (LIBOMP_OMP_VERSION >= 41)
59#define OMP_40_ENABLED (LIBOMP_OMP_VERSION >= 40)
60#define OMP_30_ENABLED (LIBOMP_OMP_VERSION >= 30)
61
62// Configured cache line based on architecture
63#if KMP_ARCH_PPC64
64# define CACHE_LINE 128
65#else
66# define CACHE_LINE 64
67#endif
68
69#define KMP_DYNAMIC_LIB 1
70#define KMP_NESTED_HOT_TEAMS 1
71#define KMP_ADJUST_BLOCKTIME 1
72#define BUILD_PARALLEL_ORDERED 1
73#define KMP_ASM_INTRINS 1
74#define USE_ITT_BUILD 1
75#define INTEL_ITTNOTIFY_PREFIX __kmp_itt_
76#if ! KMP_MIC
77# define USE_LOAD_BALANCE 1
78#endif
79#if ! (KMP_OS_WINDOWS || KMP_OS_DARWIN)
80# define KMP_TDATA_GTID 1
81#endif
82#if STUBS_LIBRARY
83# define KMP_STUB 1
84#endif
85#if DEBUG_BUILD || RELWITHDEBINFO_BUILD
86# define KMP_DEBUG 1
87#endif
88
89#if KMP_OS_WINDOWS
90# define KMP_WIN_CDECL
91#else
92# define BUILD_TV
93# define KMP_GOMP_COMPAT
94#endif
95
96#endif // KMP_CONFIG_H