xref: /freebsd/contrib/llvm-project/openmp/runtime/src/kmp_config.h.cmake (revision ba3c1f5972d7b90feb6e6da47905ff2757e0fe57)
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_OMPD_SUPPORT
48#define OMPD_SUPPORT LIBOMP_OMPD_SUPPORT
49#cmakedefine01 LIBOMP_PROFILING_SUPPORT
50#define OMP_PROFILING_SUPPORT LIBOMP_PROFILING_SUPPORT
51#cmakedefine01 LIBOMP_OMPT_OPTIONAL
52#define OMPT_OPTIONAL LIBOMP_OMPT_OPTIONAL
53#cmakedefine01 LIBOMP_USE_ADAPTIVE_LOCKS
54#define KMP_USE_ADAPTIVE_LOCKS LIBOMP_USE_ADAPTIVE_LOCKS
55#define KMP_DEBUG_ADAPTIVE_LOCKS 0
56#cmakedefine01 LIBOMP_USE_INTERNODE_ALIGNMENT
57#define KMP_USE_INTERNODE_ALIGNMENT LIBOMP_USE_INTERNODE_ALIGNMENT
58#cmakedefine01 LIBOMP_ENABLE_ASSERTIONS
59#define KMP_USE_ASSERT LIBOMP_ENABLE_ASSERTIONS
60#cmakedefine01 LIBOMP_USE_HIER_SCHED
61#define KMP_USE_HIER_SCHED LIBOMP_USE_HIER_SCHED
62#cmakedefine01 STUBS_LIBRARY
63#cmakedefine01 LIBOMP_USE_HWLOC
64#define KMP_USE_HWLOC LIBOMP_USE_HWLOC
65#cmakedefine01 LIBOMP_ENABLE_SHARED
66#define KMP_DYNAMIC_LIB LIBOMP_ENABLE_SHARED
67#define KMP_ARCH_STR "@LIBOMP_LEGAL_ARCH@"
68#define KMP_LIBRARY_FILE "@LIBOMP_LIB_FILE@"
69#define KMP_VERSION_MAJOR @LIBOMP_VERSION_MAJOR@
70#define KMP_VERSION_MINOR @LIBOMP_VERSION_MINOR@
71#cmakedefine01 MSVC
72#define KMP_MSVC_COMPAT MSVC
73#cmakedefine01 LIBOMP_HAVE_WAITPKG_INTRINSICS
74#define KMP_HAVE_WAITPKG_INTRINSICS LIBOMP_HAVE_WAITPKG_INTRINSICS
75#cmakedefine01 LIBOMP_HAVE_RTM_INTRINSICS
76#define KMP_HAVE_RTM_INTRINSICS LIBOMP_HAVE_RTM_INTRINSICS
77#cmakedefine01 LIBOMP_HAVE_IMMINTRIN_H
78#define KMP_HAVE_IMMINTRIN_H LIBOMP_HAVE_IMMINTRIN_H
79#cmakedefine01 LIBOMP_HAVE_INTRIN_H
80#define KMP_HAVE_INTRIN_H LIBOMP_HAVE_INTRIN_H
81#cmakedefine01 LIBOMP_HAVE_ATTRIBUTE_WAITPKG
82#define KMP_HAVE_ATTRIBUTE_WAITPKG LIBOMP_HAVE_ATTRIBUTE_WAITPKG
83#cmakedefine01 LIBOMP_HAVE_ATTRIBUTE_RTM
84#define KMP_HAVE_ATTRIBUTE_RTM LIBOMP_HAVE_ATTRIBUTE_RTM
85#cmakedefine01 LIBOMP_ARCH_AARCH64_A64FX
86#define KMP_ARCH_AARCH64_A64FX LIBOMP_ARCH_AARCH64_A64FX
87#cmakedefine01 LIBOMP_HAVE_XMMINTRIN_H
88#define KMP_HAVE_XMMINTRIN_H LIBOMP_HAVE_XMMINTRIN_H
89#cmakedefine01 LIBOMP_HAVE__MM_MALLOC
90#define KMP_HAVE__MM_MALLOC LIBOMP_HAVE__MM_MALLOC
91#cmakedefine01 LIBOMP_HAVE_ALIGNED_ALLOC
92#define KMP_HAVE_ALIGNED_ALLOC LIBOMP_HAVE_ALIGNED_ALLOC
93#cmakedefine01 LIBOMP_HAVE_POSIX_MEMALIGN
94#define KMP_HAVE_POSIX_MEMALIGN LIBOMP_HAVE_POSIX_MEMALIGN
95#cmakedefine01 LIBOMP_HAVE__ALIGNED_MALLOC
96#define KMP_HAVE__ALIGNED_MALLOC LIBOMP_HAVE__ALIGNED_MALLOC
97#cmakedefine01 OPENMP_ENABLE_LIBOMPTARGET
98#define ENABLE_LIBOMPTARGET OPENMP_ENABLE_LIBOMPTARGET
99
100// Configured cache line based on architecture
101#if KMP_ARCH_PPC64
102# define CACHE_LINE 128
103#elif KMP_ARCH_AARCH64_A64FX
104# define CACHE_LINE 256
105#else
106# define CACHE_LINE 64
107#endif
108
109#if ! KMP_32_BIT_ARCH
110# define BUILD_I8 1
111#endif
112
113#define KMP_NESTED_HOT_TEAMS 1
114#define KMP_ADJUST_BLOCKTIME 1
115#define BUILD_PARALLEL_ORDERED 1
116#define KMP_ASM_INTRINS 1
117#define USE_ITT_BUILD LIBOMP_USE_ITT_NOTIFY
118#define INTEL_ITTNOTIFY_PREFIX __kmp_itt_
119#if ! KMP_MIC
120# define USE_LOAD_BALANCE 1
121#endif
122#if ! (KMP_OS_WINDOWS || KMP_OS_DARWIN)
123# define KMP_TDATA_GTID 1
124#endif
125#if STUBS_LIBRARY
126# define KMP_STUB 1
127#endif
128#if DEBUG_BUILD || RELWITHDEBINFO_BUILD
129# define KMP_DEBUG 1
130#endif
131
132#if KMP_OS_WINDOWS
133# define KMP_WIN_CDECL
134#else
135# define BUILD_TV
136# define KMP_GOMP_COMPAT
137#endif
138
139// use shared memory with dynamic library (except Android, where shm_*
140// functions don't exist).
141#if KMP_OS_UNIX && KMP_DYNAMIC_LIB && !__ANDROID__
142#define KMP_USE_SHM
143#endif
144#endif // KMP_CONFIG_H
145