LLVM OpenMP* Runtime Library
kmp_settings.h
1 /*
2  * kmp_settings.h -- Initialize environment variables
3  */
4 
5 //===----------------------------------------------------------------------===//
6 //
7 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
8 // See https://llvm.org/LICENSE.txt for license information.
9 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef KMP_SETTINGS_H
14 #define KMP_SETTINGS_H
15 
16 void __kmp_reset_global_vars(void);
17 void __kmp_env_initialize(char const *);
18 void __kmp_env_print();
19 void __kmp_env_print_2();
20 void __kmp_display_env_impl(int display_env, int display_env_verbose);
21 
22 int __kmp_initial_threads_capacity(int req_nproc);
23 void __kmp_init_dflt_team_nth();
24 int __kmp_convert_to_milliseconds(char const *);
25 int __kmp_default_tp_capacity(int, int, int);
26 
27 #if KMP_MIC
28 #define KMP_STR_BUF_PRINT_NAME \
29  __kmp_str_buf_print(buffer, " %s %s", KMP_I18N_STR(Device), name)
30 #define KMP_STR_BUF_PRINT_NAME_EX(x) \
31  __kmp_str_buf_print(buffer, " %s %s='", KMP_I18N_STR(Device), x)
32 #define KMP_STR_BUF_PRINT_BOOL_EX(n, v, t, f) \
33  __kmp_str_buf_print(buffer, " %s %s='%s'\n", KMP_I18N_STR(Device), n, \
34  (v) ? t : f)
35 #define KMP_STR_BUF_PRINT_BOOL \
36  KMP_STR_BUF_PRINT_BOOL_EX(name, value, "TRUE", "FALSE")
37 #define KMP_STR_BUF_PRINT_INT \
38  __kmp_str_buf_print(buffer, " %s %s='%d'\n", KMP_I18N_STR(Device), name, \
39  value)
40 #define KMP_STR_BUF_PRINT_UINT64 \
41  __kmp_str_buf_print(buffer, " %s %s='%" KMP_UINT64_SPEC "'\n", \
42  KMP_I18N_STR(Device), name, value);
43 #define KMP_STR_BUF_PRINT_STR \
44  __kmp_str_buf_print(buffer, " %s %s='%s'\n", KMP_I18N_STR(Device), name, \
45  value)
46 #else
47 #define KMP_STR_BUF_PRINT_NAME \
48  __kmp_str_buf_print(buffer, " %s %s", KMP_I18N_STR(Host), name)
49 #define KMP_STR_BUF_PRINT_NAME_EX(x) \
50  __kmp_str_buf_print(buffer, " %s %s='", KMP_I18N_STR(Host), x)
51 #define KMP_STR_BUF_PRINT_BOOL_EX(n, v, t, f) \
52  __kmp_str_buf_print(buffer, " %s %s='%s'\n", KMP_I18N_STR(Host), n, \
53  (v) ? t : f)
54 #define KMP_STR_BUF_PRINT_BOOL \
55  KMP_STR_BUF_PRINT_BOOL_EX(name, value, "TRUE", "FALSE")
56 #define KMP_STR_BUF_PRINT_INT \
57  __kmp_str_buf_print(buffer, " %s %s='%d'\n", KMP_I18N_STR(Host), name, value)
58 #define KMP_STR_BUF_PRINT_UINT64 \
59  __kmp_str_buf_print(buffer, " %s %s='%" KMP_UINT64_SPEC "'\n", \
60  KMP_I18N_STR(Host), name, value);
61 #define KMP_STR_BUF_PRINT_STR \
62  __kmp_str_buf_print(buffer, " %s %s='%s'\n", KMP_I18N_STR(Host), name, value)
63 #endif
64 
65 #endif // KMP_SETTINGS_H
66 
67 // end of file //