LLVM OpenMP* Runtime Library
 All Classes Functions Variables Typedefs Enumerations Enumerator Groups Pages
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 #if OMP_40_ENABLED
20 void __kmp_env_print_2();
21 #endif // OMP_40_ENABLED
22 
23 int __kmp_initial_threads_capacity(int req_nproc);
24 void __kmp_init_dflt_team_nth();
25 int __kmp_convert_to_milliseconds(char const *);
26 int __kmp_default_tp_capacity(int, int, int);
27 
28 #if KMP_MIC
29 #define KMP_STR_BUF_PRINT_NAME \
30  __kmp_str_buf_print(buffer, " %s %s", KMP_I18N_STR(Device), name)
31 #define KMP_STR_BUF_PRINT_NAME_EX(x) \
32  __kmp_str_buf_print(buffer, " %s %s='", KMP_I18N_STR(Device), x)
33 #define KMP_STR_BUF_PRINT_BOOL_EX(n, v, t, f) \
34  __kmp_str_buf_print(buffer, " %s %s='%s'\n", KMP_I18N_STR(Device), n, \
35  (v) ? t : f)
36 #define KMP_STR_BUF_PRINT_BOOL \
37  KMP_STR_BUF_PRINT_BOOL_EX(name, value, "TRUE", "FALSE")
38 #define KMP_STR_BUF_PRINT_INT \
39  __kmp_str_buf_print(buffer, " %s %s='%d'\n", KMP_I18N_STR(Device), name, \
40  value)
41 #define KMP_STR_BUF_PRINT_UINT64 \
42  __kmp_str_buf_print(buffer, " %s %s='%" KMP_UINT64_SPEC "'\n", \
43  KMP_I18N_STR(Device), name, value);
44 #define KMP_STR_BUF_PRINT_STR \
45  __kmp_str_buf_print(buffer, " %s %s='%s'\n", KMP_I18N_STR(Device), name, \
46  value)
47 #else
48 #define KMP_STR_BUF_PRINT_NAME \
49  __kmp_str_buf_print(buffer, " %s %s", KMP_I18N_STR(Host), name)
50 #define KMP_STR_BUF_PRINT_NAME_EX(x) \
51  __kmp_str_buf_print(buffer, " %s %s='", KMP_I18N_STR(Host), x)
52 #define KMP_STR_BUF_PRINT_BOOL_EX(n, v, t, f) \
53  __kmp_str_buf_print(buffer, " %s %s='%s'\n", KMP_I18N_STR(Host), n, \
54  (v) ? t : f)
55 #define KMP_STR_BUF_PRINT_BOOL \
56  KMP_STR_BUF_PRINT_BOOL_EX(name, value, "TRUE", "FALSE")
57 #define KMP_STR_BUF_PRINT_INT \
58  __kmp_str_buf_print(buffer, " %s %s='%d'\n", KMP_I18N_STR(Host), name, value)
59 #define KMP_STR_BUF_PRINT_UINT64 \
60  __kmp_str_buf_print(buffer, " %s %s='%" KMP_UINT64_SPEC "'\n", \
61  KMP_I18N_STR(Host), name, value);
62 #define KMP_STR_BUF_PRINT_STR \
63  __kmp_str_buf_print(buffer, " %s %s='%s'\n", KMP_I18N_STR(Host), name, value)
64 #endif
65 
66 #endif // KMP_SETTINGS_H
67 
68 // end of file //