26#define KMP_BUILD_ASSERT(expr) static_assert(expr, "Build condition error")
34extern int __kmp_debug_assert(
char const *expr,
char const *file,
int line);
36#define KMP_ASSERT(cond) \
38 __kmp_debug_assert(#cond, __FILE__, __LINE__); \
40#define KMP_ASSERT2(cond, msg) \
42 __kmp_debug_assert((msg), __FILE__, __LINE__); \
44#define KMP_DEBUG_ASSERT(cond) KMP_ASSERT(cond)
45#define KMP_DEBUG_ASSERT2(cond, msg) KMP_ASSERT2(cond, msg)
46#define KMP_DEBUG_USE_VAR(x)
49#define KMP_ASSERT(cond) \
51 __kmp_debug_assert("assertion failure", __FILE__, __LINE__); \
53#define KMP_ASSERT2(cond, msg) KMP_ASSERT(cond)
54#define KMP_DEBUG_ASSERT(cond)
55#define KMP_DEBUG_ASSERT2(cond, msg)
56#define KMP_DEBUG_USE_VAR(x) ((void)(x))
59#define KMP_ASSERT(cond)
60#define KMP_ASSERT2(cond, msg)
61#define KMP_DEBUG_ASSERT(cond)
62#define KMP_DEBUG_ASSERT2(cond, msg)
63#define KMP_DEBUG_USE_VAR(x) ((void)(x))
67extern void __kmp_debug_printf_stdout(
char const *format, ...);
73extern int kmp_a_debug;
74extern int kmp_b_debug;
75extern int kmp_c_debug;
76extern int kmp_d_debug;
77extern int kmp_e_debug;
78extern int kmp_f_debug;
81#define KA_TRACE(d, x) \
82 if (kmp_a_debug >= d) { \
83 __kmp_debug_printf x; \
85#define KB_TRACE(d, x) \
86 if (kmp_b_debug >= d) { \
87 __kmp_debug_printf x; \
89#define KC_TRACE(d, x) \
90 if (kmp_c_debug >= d) { \
91 __kmp_debug_printf x; \
93#define KD_TRACE(d, x) \
94 if (kmp_d_debug >= d) { \
95 __kmp_debug_printf x; \
97#define KE_TRACE(d, x) \
98 if (kmp_e_debug >= d) { \
99 __kmp_debug_printf x; \
101#define KF_TRACE(d, x) \
102 if (kmp_f_debug >= d) { \
103 __kmp_debug_printf x; \
105#define K_DIAG(d, x) \
107 if (kmp_diag == d) { \
108 __kmp_debug_printf_stdout x; \
112#define KA_DUMP(d, x) \
113 if (kmp_a_debug >= d) { \
115 __kmp_disable(&ks); \
119#define KB_DUMP(d, x) \
120 if (kmp_b_debug >= d) { \
122 __kmp_disable(&ks); \
126#define KC_DUMP(d, x) \
127 if (kmp_c_debug >= d) { \
129 __kmp_disable(&ks); \
133#define KD_DUMP(d, x) \
134 if (kmp_d_debug >= d) { \
136 __kmp_disable(&ks); \
140#define KE_DUMP(d, x) \
141 if (kmp_e_debug >= d) { \
143 __kmp_disable(&ks); \
147#define KF_DUMP(d, x) \
148 if (kmp_f_debug >= d) { \
150 __kmp_disable(&ks); \
157#define KA_TRACE(d, x)
158#define KB_TRACE(d, x)
159#define KC_TRACE(d, x)
160#define KD_TRACE(d, x)
161#define KE_TRACE(d, x)
162#define KF_TRACE(d, x)
163#define K_DIAG(d, x) \
void __kmp_dump_debug_buffer(void)
void __kmp_debug_printf(char const *format,...)