| Jonathan Peyton | ff7da34b | 2015-08-28 19:24:39 +0000 | [diff] [blame] | 1 | /* |
| 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 Peyton | 69e596a | 2015-10-29 20:56:24 +0000 | [diff] [blame] | 30 | #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 Peyton | ff7da34b | 2015-08-28 19:24:39 +0000 | [diff] [blame] | 34 | #cmakedefine01 LIBOMP_STATS |
| 35 | #define KMP_STATS_ENABLED LIBOMP_STATS |
| Jonathan Peyton | b9e8326 | 2015-12-18 16:19:35 +0000 | [diff] [blame] | 36 | #cmakedefine01 LIBOMP_HAVE_X86INTRIN_H |
| 37 | #define KMP_HAVE_X86INTRIN_H LIBOMP_HAVE_X86INTRIN_H |
| 38 | #cmakedefine01 LIBOMP_HAVE___BUILTIN_READCYCLECOUNTER |
| 39 | #define KMP_HAVE___BUILTIN_READCYCLECOUNTER LIBOMP_HAVE___BUILTIN_READCYCLECOUNTER |
| 40 | #cmakedefine01 LIBOMP_HAVE___RDTSC |
| 41 | #define KMP_HAVE___RDTSC LIBOMP_HAVE___RDTSC |
| Jonathan Peyton | ff7da34b | 2015-08-28 19:24:39 +0000 | [diff] [blame] | 42 | #cmakedefine01 LIBOMP_USE_DEBUGGER |
| 43 | #define USE_DEBUGGER LIBOMP_USE_DEBUGGER |
| Jonathan Peyton | 95246e7 | 2015-11-05 16:54:55 +0000 | [diff] [blame] | 44 | #cmakedefine01 LIBOMP_OMPT_DEBUG |
| 45 | #define OMPT_DEBUG LIBOMP_OMPT_DEBUG |
| Jonathan Peyton | ff7da34b | 2015-08-28 19:24:39 +0000 | [diff] [blame] | 46 | #cmakedefine01 LIBOMP_OMPT_SUPPORT |
| 47 | #define OMPT_SUPPORT LIBOMP_OMPT_SUPPORT |
| 48 | #cmakedefine01 LIBOMP_OMPT_BLAME |
| 49 | #define OMPT_BLAME LIBOMP_OMPT_BLAME |
| 50 | #cmakedefine01 LIBOMP_OMPT_TRACE |
| 51 | #define OMPT_TRACE LIBOMP_OMPT_TRACE |
| 52 | #cmakedefine01 LIBOMP_USE_ADAPTIVE_LOCKS |
| 53 | #define KMP_USE_ADAPTIVE_LOCKS LIBOMP_USE_ADAPTIVE_LOCKS |
| 54 | #define KMP_DEBUG_ADAPTIVE_LOCKS 0 |
| 55 | #cmakedefine01 LIBOMP_USE_INTERNODE_ALIGNMENT |
| 56 | #define KMP_USE_INTERNODE_ALIGNMENT LIBOMP_USE_INTERNODE_ALIGNMENT |
| 57 | #cmakedefine01 LIBOMP_ENABLE_ASSERTIONS |
| 58 | #define KMP_USE_ASSERT LIBOMP_ENABLE_ASSERTIONS |
| 59 | #cmakedefine01 STUBS_LIBRARY |
| Jonathan Peyton | 01dcf36 | 2015-11-30 20:02:59 +0000 | [diff] [blame] | 60 | #cmakedefine01 LIBOMP_USE_HWLOC |
| 61 | #define KMP_USE_HWLOC LIBOMP_USE_HWLOC |
| Jonathan Peyton | ff7da34b | 2015-08-28 19:24:39 +0000 | [diff] [blame] | 62 | #define KMP_ARCH_STR "@LIBOMP_LEGAL_ARCH@" |
| 63 | #define KMP_LIBRARY_FILE "@LIBOMP_LIB_FILE@" |
| 64 | #define KMP_VERSION_MAJOR @LIBOMP_VERSION_MAJOR@ |
| 65 | #define KMP_VERSION_MINOR @LIBOMP_VERSION_MINOR@ |
| 66 | #define LIBOMP_OMP_VERSION @LIBOMP_OMP_VERSION@ |
| 67 | #define OMP_50_ENABLED (LIBOMP_OMP_VERSION >= 50) |
| Jonathan Peyton | df6818b | 2016-06-14 17:57:47 +0000 | [diff] [blame] | 68 | #define OMP_45_ENABLED (LIBOMP_OMP_VERSION >= 45) |
| Jonathan Peyton | ff7da34b | 2015-08-28 19:24:39 +0000 | [diff] [blame] | 69 | #define OMP_40_ENABLED (LIBOMP_OMP_VERSION >= 40) |
| 70 | #define OMP_30_ENABLED (LIBOMP_OMP_VERSION >= 30) |
| 71 | |
| 72 | // Configured cache line based on architecture |
| 73 | #if KMP_ARCH_PPC64 |
| 74 | # define CACHE_LINE 128 |
| 75 | #else |
| 76 | # define CACHE_LINE 64 |
| 77 | #endif |
| 78 | |
| Jonathan Peyton | 32a1ea1 | 2016-01-04 23:20:26 +0000 | [diff] [blame] | 79 | #if ! KMP_32_BIT_ARCH |
| 80 | # define BUILD_I8 1 |
| 81 | #endif |
| 82 | |
| Jonathan Peyton | ff7da34b | 2015-08-28 19:24:39 +0000 | [diff] [blame] | 83 | #define KMP_DYNAMIC_LIB 1 |
| 84 | #define KMP_NESTED_HOT_TEAMS 1 |
| 85 | #define KMP_ADJUST_BLOCKTIME 1 |
| 86 | #define BUILD_PARALLEL_ORDERED 1 |
| 87 | #define KMP_ASM_INTRINS 1 |
| Jonathan Peyton | 7abf9d5 | 2016-05-26 18:19:10 +0000 | [diff] [blame] | 88 | #define USE_ITT_BUILD LIBOMP_USE_ITT_NOTIFY |
| Jonathan Peyton | ff7da34b | 2015-08-28 19:24:39 +0000 | [diff] [blame] | 89 | #define INTEL_ITTNOTIFY_PREFIX __kmp_itt_ |
| 90 | #if ! KMP_MIC |
| 91 | # define USE_LOAD_BALANCE 1 |
| 92 | #endif |
| 93 | #if ! (KMP_OS_WINDOWS || KMP_OS_DARWIN) |
| 94 | # define KMP_TDATA_GTID 1 |
| 95 | #endif |
| 96 | #if STUBS_LIBRARY |
| 97 | # define KMP_STUB 1 |
| 98 | #endif |
| 99 | #if DEBUG_BUILD || RELWITHDEBINFO_BUILD |
| 100 | # define KMP_DEBUG 1 |
| 101 | #endif |
| 102 | |
| 103 | #if KMP_OS_WINDOWS |
| 104 | # define KMP_WIN_CDECL |
| 105 | #else |
| 106 | # define BUILD_TV |
| 107 | # define KMP_GOMP_COMPAT |
| 108 | #endif |
| 109 | |
| 110 | #endif // KMP_CONFIG_H |