xref: /freebsd/contrib/llvm-project/openmp/runtime/src/kmp_config.h.cmake (revision 6be3386466ab79a84b48429ae66244f21526d3df)
1/*
2 * kmp_config.h -- Feature macros
3 */
4//===----------------------------------------------------------------------===//
5//
6// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
7// See https://llvm.org/LICENSE.txt for license information.
8// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
9//
10//===----------------------------------------------------------------------===//
11#ifndef KMP_CONFIG_H
12#define KMP_CONFIG_H
13
14#include "kmp_platform.h"
15
16// cmakedefine01 MACRO will define MACRO as either 0 or 1
17// cmakedefine MACRO 1 will define MACRO as 1 or leave undefined
18#cmakedefine01 DEBUG_BUILD
19#cmakedefine01 RELWITHDEBINFO_BUILD
20#cmakedefine01 LIBOMP_USE_ITT_NOTIFY
21#define USE_ITT_NOTIFY LIBOMP_USE_ITT_NOTIFY
22#if ! LIBOMP_USE_ITT_NOTIFY
23# define INTEL_NO_ITTNOTIFY_API
24#endif
25#cmakedefine01 LIBOMP_USE_VERSION_SYMBOLS
26#if LIBOMP_USE_VERSION_SYMBOLS
27# define KMP_USE_VERSION_SYMBOLS
28#endif
29#cmakedefine01 LIBOMP_HAVE_WEAK_ATTRIBUTE
30#define KMP_HAVE_WEAK_ATTRIBUTE LIBOMP_HAVE_WEAK_ATTRIBUTE
31#cmakedefine01 LIBOMP_HAVE_PSAPI
32#define KMP_HAVE_PSAPI LIBOMP_HAVE_PSAPI
33#cmakedefine01 LIBOMP_STATS
34#define KMP_STATS_ENABLED LIBOMP_STATS
35#cmakedefine01 LIBOMP_HAVE_X86INTRIN_H
36#define KMP_HAVE_X86INTRIN_H LIBOMP_HAVE_X86INTRIN_H
37#cmakedefine01 LIBOMP_HAVE___BUILTIN_READCYCLECOUNTER
38#define KMP_HAVE___BUILTIN_READCYCLECOUNTER LIBOMP_HAVE___BUILTIN_READCYCLECOUNTER
39#cmakedefine01 LIBOMP_HAVE___RDTSC
40#define KMP_HAVE___RDTSC LIBOMP_HAVE___RDTSC
41#cmakedefine01 LIBOMP_USE_DEBUGGER
42#define USE_DEBUGGER LIBOMP_USE_DEBUGGER
43#cmakedefine01 LIBOMP_OMPT_DEBUG
44#define OMPT_DEBUG LIBOMP_OMPT_DEBUG
45#cmakedefine01 LIBOMP_OMPT_SUPPORT
46#define OMPT_SUPPORT LIBOMP_OMPT_SUPPORT
47#cmakedefine01 LIBOMP_OMPT_OPTIONAL
48#define OMPT_OPTIONAL LIBOMP_OMPT_OPTIONAL
49#cmakedefine01 LIBOMP_USE_ADAPTIVE_LOCKS
50#define KMP_USE_ADAPTIVE_LOCKS LIBOMP_USE_ADAPTIVE_LOCKS
51#define KMP_DEBUG_ADAPTIVE_LOCKS 0
52#cmakedefine01 LIBOMP_USE_INTERNODE_ALIGNMENT
53#define KMP_USE_INTERNODE_ALIGNMENT LIBOMP_USE_INTERNODE_ALIGNMENT
54#cmakedefine01 LIBOMP_ENABLE_ASSERTIONS
55#define KMP_USE_ASSERT LIBOMP_ENABLE_ASSERTIONS
56#cmakedefine01 LIBOMP_USE_HIER_SCHED
57#define KMP_USE_HIER_SCHED LIBOMP_USE_HIER_SCHED
58#cmakedefine01 STUBS_LIBRARY
59#cmakedefine01 LIBOMP_USE_HWLOC
60#define KMP_USE_HWLOC LIBOMP_USE_HWLOC
61#cmakedefine01 LIBOMP_ENABLE_SHARED
62#define KMP_DYNAMIC_LIB LIBOMP_ENABLE_SHARED
63#define KMP_ARCH_STR "@LIBOMP_LEGAL_ARCH@"
64#define KMP_LIBRARY_FILE "@LIBOMP_LIB_FILE@"
65#define KMP_VERSION_MAJOR @LIBOMP_VERSION_MAJOR@
66#define KMP_VERSION_MINOR @LIBOMP_VERSION_MINOR@
67#cmakedefine01 LIBOMP_TSAN_SUPPORT
68#if LIBOMP_TSAN_SUPPORT
69#define TSAN_SUPPORT
70#endif
71#cmakedefine01 MSVC
72#define KMP_MSVC_COMPAT MSVC
73
74// Configured cache line based on architecture
75#if KMP_ARCH_PPC64
76# define CACHE_LINE 128
77#else
78# define CACHE_LINE 64
79#endif
80
81#if ! KMP_32_BIT_ARCH
82# define BUILD_I8 1
83#endif
84
85#define KMP_NESTED_HOT_TEAMS 1
86#define KMP_ADJUST_BLOCKTIME 1
87#define BUILD_PARALLEL_ORDERED 1
88#define KMP_ASM_INTRINS 1
89#define USE_ITT_BUILD LIBOMP_USE_ITT_NOTIFY
90#define INTEL_ITTNOTIFY_PREFIX __kmp_itt_
91#if ! KMP_MIC
92# define USE_LOAD_BALANCE 1
93#endif
94#if ! (KMP_OS_WINDOWS || KMP_OS_DARWIN)
95# define KMP_TDATA_GTID 1
96#endif
97#if STUBS_LIBRARY
98# define KMP_STUB 1
99#endif
100#if DEBUG_BUILD || RELWITHDEBINFO_BUILD
101# define KMP_DEBUG 1
102#endif
103
104#if KMP_OS_WINDOWS
105# define KMP_WIN_CDECL
106#else
107# define BUILD_TV
108# define KMP_GOMP_COMPAT
109#endif
110
111#endif // KMP_CONFIG_H
112