| 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 |
#if OMPD_SUPPORT |
| 22 |
void __kmp_env_dump(); |
| 23 |
#endif |
| 24 |
|
| 25 |
int __kmp_initial_threads_capacity(int req_nproc); |
| 26 |
void __kmp_init_dflt_team_nth(); |
| 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 // |