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