]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/openmp/runtime/src/kmp_settings.h
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[FreeBSD/FreeBSD.git] / contrib / openmp / runtime / src / kmp_settings.h
1 /*
2  * kmp_settings.h -- Initialize environment variables
3  */
4
5 //===----------------------------------------------------------------------===//
6 //
7 //                     The LLVM Compiler Infrastructure
8 //
9 // This file is dual licensed under the MIT and the University of Illinois Open
10 // Source Licenses. See LICENSE.txt for details.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef KMP_SETTINGS_H
15 #define KMP_SETTINGS_H
16
17 void __kmp_reset_global_vars(void);
18 void __kmp_env_initialize(char const *);
19 void __kmp_env_print();
20 #if OMP_40_ENABLED
21 void __kmp_env_print_2();
22 #endif // OMP_40_ENABLED
23
24 int __kmp_initial_threads_capacity(int req_nproc);
25 void __kmp_init_dflt_team_nth();
26 int __kmp_convert_to_milliseconds(char const *);
27 int __kmp_default_tp_capacity(int, int, int);
28
29 #if KMP_MIC
30 #define KMP_STR_BUF_PRINT_NAME                                                 \
31   __kmp_str_buf_print(buffer, "  %s %s", KMP_I18N_STR(Device), name)
32 #define KMP_STR_BUF_PRINT_NAME_EX(x)                                           \
33   __kmp_str_buf_print(buffer, "  %s %s='", KMP_I18N_STR(Device), x)
34 #define KMP_STR_BUF_PRINT_BOOL_EX(n, v, t, f)                                  \
35   __kmp_str_buf_print(buffer, "  %s %s='%s'\n", KMP_I18N_STR(Device), n,       \
36                       (v) ? t : f)
37 #define KMP_STR_BUF_PRINT_BOOL                                                 \
38   KMP_STR_BUF_PRINT_BOOL_EX(name, value, "TRUE", "FALSE")
39 #define KMP_STR_BUF_PRINT_INT                                                  \
40   __kmp_str_buf_print(buffer, "  %s %s='%d'\n", KMP_I18N_STR(Device), name,    \
41                       value)
42 #define KMP_STR_BUF_PRINT_UINT64                                               \
43   __kmp_str_buf_print(buffer, "  %s %s='%" KMP_UINT64_SPEC "'\n",              \
44                       KMP_I18N_STR(Device), name, value);
45 #define KMP_STR_BUF_PRINT_STR                                                  \
46   __kmp_str_buf_print(buffer, "  %s %s='%s'\n", KMP_I18N_STR(Device), name,    \
47                       value)
48 #else
49 #define KMP_STR_BUF_PRINT_NAME                                                 \
50   __kmp_str_buf_print(buffer, "  %s %s", KMP_I18N_STR(Host), name)
51 #define KMP_STR_BUF_PRINT_NAME_EX(x)                                           \
52   __kmp_str_buf_print(buffer, "  %s %s='", KMP_I18N_STR(Host), x)
53 #define KMP_STR_BUF_PRINT_BOOL_EX(n, v, t, f)                                  \
54   __kmp_str_buf_print(buffer, "  %s %s='%s'\n", KMP_I18N_STR(Host), n,         \
55                       (v) ? t : f)
56 #define KMP_STR_BUF_PRINT_BOOL                                                 \
57   KMP_STR_BUF_PRINT_BOOL_EX(name, value, "TRUE", "FALSE")
58 #define KMP_STR_BUF_PRINT_INT                                                  \
59   __kmp_str_buf_print(buffer, "  %s %s='%d'\n", KMP_I18N_STR(Host), name, value)
60 #define KMP_STR_BUF_PRINT_UINT64                                               \
61   __kmp_str_buf_print(buffer, "  %s %s='%" KMP_UINT64_SPEC "'\n",              \
62                       KMP_I18N_STR(Host), name, value);
63 #define KMP_STR_BUF_PRINT_STR                                                  \
64   __kmp_str_buf_print(buffer, "  %s %s='%s'\n", KMP_I18N_STR(Host), name, value)
65 #endif
66
67 #endif // KMP_SETTINGS_H
68
69 // end of file //