llvm/openmp/runtime/src/kmp_settings.cpp

/*
 * kmp_settings.cpp -- Initialize environment variables
 */

//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "kmp.h"
#include "kmp_affinity.h"
#include "kmp_atomic.h"
#if KMP_USE_HIER_SCHED
#include "kmp_dispatch_hier.h"
#endif
#include "kmp_environment.h"
#include "kmp_i18n.h"
#include "kmp_io.h"
#include "kmp_itt.h"
#include "kmp_lock.h"
#include "kmp_settings.h"
#include "kmp_str.h"
#include "kmp_wrapper_getpid.h"
#include <ctype.h> // toupper()
#if OMPD_SUPPORT
#include "ompd-specific.h"
#endif

static int __kmp_env_toPrint(char const *name, int flag);

bool __kmp_env_format =; // 0 - old format; 1 - new format

// -----------------------------------------------------------------------------
// Helper string functions. Subject to move to kmp_str.

#ifdef USE_LOAD_BALANCE
static double __kmp_convert_to_double(char const *s) {}
#endif

#ifdef KMP_DEBUG
static unsigned int __kmp_readstr_with_sentinel(char *dest, char const *src,
                                                size_t len, char sentinel) {
  unsigned int i;
  for (i = 0; i < len; i++) {
    if ((*src == '\0') || (*src == sentinel)) {
      break;
    }
    *(dest++) = *(src++);
  }
  *dest = '\0';
  return i;
}
#endif

static int __kmp_match_with_sentinel(char const *a, char const *b, size_t len,
                                     char sentinel) {}

// Expected usage:
//     token is the token to check for.
//     buf is the string being parsed.
//     *end returns the char after the end of the token.
//        it is not modified unless a match occurs.
//
// Example 1:
//
//     if (__kmp_match_str("token", buf, *end) {
//         <do something>
//         buf = end;
//     }
//
//  Example 2:
//
//     if (__kmp_match_str("token", buf, *end) {
//         char *save = **end;
//         **end = sentinel;
//         <use any of the __kmp*_with_sentinel() functions>
//         **end = save;
//         buf = end;
//     }

static int __kmp_match_str(char const *token, char const *buf,
                           const char **end) {}

#if KMP_OS_DARWIN
static size_t __kmp_round4k(size_t size) {
  size_t _4k = 4 * 1024;
  if (size & (_4k - 1)) {
    size &= ~(_4k - 1);
    if (size <= KMP_SIZE_T_MAX - _4k) {
      size += _4k; // Round up if there is no overflow.
    }
  }
  return size;
} // __kmp_round4k
#endif

static int __kmp_strcasecmp_with_sentinel(char const *a, char const *b,
                                          char sentinel) {}

// =============================================================================
// Table structures and helper functions.

kmp_setting_t;
kmp_stg_ss_data_t;
kmp_stg_wp_data_t;
kmp_stg_fr_data_t;

kmp_stg_parse_func_t;
kmp_stg_print_func_t;

struct __kmp_setting {}; // struct __kmp_setting

struct __kmp_stg_ss_data {}; // struct __kmp_stg_ss_data

struct __kmp_stg_wp_data {}; // struct __kmp_stg_wp_data

struct __kmp_stg_fr_data {}; // struct __kmp_stg_fr_data

static int __kmp_stg_check_rivals( // 0 -- Ok, 1 -- errors found.
    char const *name, // Name of variable.
    char const *value, // Value of the variable.
    kmp_setting_t **rivals // List of rival settings (must include current one).
);

// Helper struct that trims heading/trailing white spaces
struct kmp_trimmed_str_t {};

// -----------------------------------------------------------------------------
// Helper parse functions.

static void __kmp_stg_parse_bool(char const *name, char const *value,
                                 int *out) {} // __kmp_stg_parse_bool

// placed here in order to use __kmp_round4k static function
void __kmp_check_stksize(size_t *val) {}

static void __kmp_stg_parse_size(char const *name, char const *value,
                                 size_t size_min, size_t size_max,
                                 int *is_specified, size_t *out,
                                 size_t factor) {} // __kmp_stg_parse_size

static void __kmp_stg_parse_str(char const *name, char const *value,
                                char **out) {} // __kmp_stg_parse_str

static void __kmp_stg_parse_int(
    char const
        *name, // I: Name of environment variable (used in warning messages).
    char const *value, // I: Value of environment variable to parse.
    int min, // I: Minimum allowed value.
    int max, // I: Maximum allowed value.
    int *out // O: Output (parsed) value.
) {} // __kmp_stg_parse_int

#if KMP_DEBUG_ADAPTIVE_LOCKS
static void __kmp_stg_parse_file(char const *name, char const *value,
                                 const char *suffix, char **out) {
  char buffer[256];
  char *t;
  int hasSuffix;
  __kmp_str_free(out);
  t = (char *)strrchr(value, '.');
  hasSuffix = t && __kmp_str_eqf(t, suffix);
  t = __kmp_str_format("%s%s", value, hasSuffix ? "" : suffix);
  __kmp_expand_file_name(buffer, sizeof(buffer), t);
  __kmp_str_free(&t);
  *out = __kmp_str_format("%s", buffer);
} // __kmp_stg_parse_file
#endif

#ifdef KMP_DEBUG
static char *par_range_to_print = NULL;

static void __kmp_stg_parse_par_range(char const *name, char const *value,
                                      int *out_range, char *out_routine,
                                      char *out_file, int *out_lb,
                                      int *out_ub) {
  const char *par_range_value;
  size_t len = KMP_STRLEN(value) + 1;
  par_range_to_print = (char *)KMP_INTERNAL_MALLOC(len + 1);
  KMP_STRNCPY_S(par_range_to_print, len + 1, value, len + 1);
  __kmp_par_range = +1;
  __kmp_par_range_lb = 0;
  __kmp_par_range_ub = INT_MAX;
  for (;;) {
    unsigned int len;
    if (!value || *value == '\0') {
      break;
    }
    if (!__kmp_strcasecmp_with_sentinel("routine", value, '=')) {
      par_range_value = strchr(value, '=') + 1;
      if (!par_range_value)
        goto par_range_error;
      value = par_range_value;
      len = __kmp_readstr_with_sentinel(out_routine, value,
                                        KMP_PAR_RANGE_ROUTINE_LEN - 1, ',');
      if (len == 0) {
        goto par_range_error;
      }
      value = strchr(value, ',');
      if (value != NULL) {
        value++;
      }
      continue;
    }
    if (!__kmp_strcasecmp_with_sentinel("filename", value, '=')) {
      par_range_value = strchr(value, '=') + 1;
      if (!par_range_value)
        goto par_range_error;
      value = par_range_value;
      len = __kmp_readstr_with_sentinel(out_file, value,
                                        KMP_PAR_RANGE_FILENAME_LEN - 1, ',');
      if (len == 0) {
        goto par_range_error;
      }
      value = strchr(value, ',');
      if (value != NULL) {
        value++;
      }
      continue;
    }
    if ((!__kmp_strcasecmp_with_sentinel("range", value, '=')) ||
        (!__kmp_strcasecmp_with_sentinel("incl_range", value, '='))) {
      par_range_value = strchr(value, '=') + 1;
      if (!par_range_value)
        goto par_range_error;
      value = par_range_value;
      if (KMP_SSCANF(value, "%d:%d", out_lb, out_ub) != 2) {
        goto par_range_error;
      }
      *out_range = +1;
      value = strchr(value, ',');
      if (value != NULL) {
        value++;
      }
      continue;
    }
    if (!__kmp_strcasecmp_with_sentinel("excl_range", value, '=')) {
      par_range_value = strchr(value, '=') + 1;
      if (!par_range_value)
        goto par_range_error;
      value = par_range_value;
      if (KMP_SSCANF(value, "%d:%d", out_lb, out_ub) != 2) {
        goto par_range_error;
      }
      *out_range = -1;
      value = strchr(value, ',');
      if (value != NULL) {
        value++;
      }
      continue;
    }
  par_range_error:
    KMP_WARNING(ParRangeSyntax, name);
    __kmp_par_range = 0;
    break;
  }
} // __kmp_stg_parse_par_range
#endif

int __kmp_initial_threads_capacity(int req_nproc) {}

int __kmp_default_tp_capacity(int req_nproc, int max_nth,
                              int all_threads_specified) {}

// -----------------------------------------------------------------------------
// Helper print functions.

static void __kmp_stg_print_bool(kmp_str_buf_t *buffer, char const *name,
                                 int value) {} // __kmp_stg_print_bool

static void __kmp_stg_print_int(kmp_str_buf_t *buffer, char const *name,
                                int value) {} // __kmp_stg_print_int

static void __kmp_stg_print_uint64(kmp_str_buf_t *buffer, char const *name,
                                   kmp_uint64 value) {} // __kmp_stg_print_uint64

static void __kmp_stg_print_str(kmp_str_buf_t *buffer, char const *name,
                                char const *value) {} // __kmp_stg_print_str

static void __kmp_stg_print_size(kmp_str_buf_t *buffer, char const *name,
                                 size_t value) {} // __kmp_stg_print_size

// =============================================================================
// Parse and print functions.

// -----------------------------------------------------------------------------
// KMP_DEVICE_THREAD_LIMIT, KMP_ALL_THREADS

static void __kmp_stg_parse_device_thread_limit(char const *name,
                                                char const *value, void *data) {} // __kmp_stg_parse_device_thread_limit

static void __kmp_stg_print_device_thread_limit(kmp_str_buf_t *buffer,
                                                char const *name, void *data) {} // __kmp_stg_print_device_thread_limit

// -----------------------------------------------------------------------------
// OMP_THREAD_LIMIT
static void __kmp_stg_parse_thread_limit(char const *name, char const *value,
                                         void *data) {} // __kmp_stg_parse_thread_limit

static void __kmp_stg_print_thread_limit(kmp_str_buf_t *buffer,
                                         char const *name, void *data) {} // __kmp_stg_print_thread_limit

// -----------------------------------------------------------------------------
// OMP_NUM_TEAMS
static void __kmp_stg_parse_nteams(char const *name, char const *value,
                                   void *data) {} // __kmp_stg_parse_nteams

static void __kmp_stg_print_nteams(kmp_str_buf_t *buffer, char const *name,
                                   void *data) {} // __kmp_stg_print_nteams

// -----------------------------------------------------------------------------
// OMP_TEAMS_THREAD_LIMIT
static void __kmp_stg_parse_teams_th_limit(char const *name, char const *value,
                                           void *data) {} // __kmp_stg_parse_teams_th_limit

static void __kmp_stg_print_teams_th_limit(kmp_str_buf_t *buffer,
                                           char const *name, void *data) {} // __kmp_stg_print_teams_th_limit

// -----------------------------------------------------------------------------
// KMP_TEAMS_THREAD_LIMIT
static void __kmp_stg_parse_teams_thread_limit(char const *name,
                                               char const *value, void *data) {} // __kmp_stg_teams_thread_limit

static void __kmp_stg_print_teams_thread_limit(kmp_str_buf_t *buffer,
                                               char const *name, void *data) {} // __kmp_stg_print_teams_thread_limit

// -----------------------------------------------------------------------------
// KMP_USE_YIELD
static void __kmp_stg_parse_use_yield(char const *name, char const *value,
                                      void *data) {} // __kmp_stg_parse_use_yield

static void __kmp_stg_print_use_yield(kmp_str_buf_t *buffer, char const *name,
                                      void *data) {} // __kmp_stg_print_use_yield

// -----------------------------------------------------------------------------
// KMP_BLOCKTIME

static void __kmp_stg_parse_blocktime(char const *name, char const *value,
                                      void *data) {} // __kmp_stg_parse_blocktime

static void __kmp_stg_print_blocktime(kmp_str_buf_t *buffer, char const *name,
                                      void *data) {} // __kmp_stg_print_blocktime

// -----------------------------------------------------------------------------
// KMP_DUPLICATE_LIB_OK

static void __kmp_stg_parse_duplicate_lib_ok(char const *name,
                                             char const *value, void *data) {} // __kmp_stg_parse_duplicate_lib_ok

static void __kmp_stg_print_duplicate_lib_ok(kmp_str_buf_t *buffer,
                                             char const *name, void *data) {} // __kmp_stg_print_duplicate_lib_ok

// -----------------------------------------------------------------------------
// KMP_INHERIT_FP_CONTROL

#if KMP_ARCH_X86 || KMP_ARCH_X86_64

static void __kmp_stg_parse_inherit_fp_control(char const *name,
                                               char const *value, void *data) {} // __kmp_stg_parse_inherit_fp_control

static void __kmp_stg_print_inherit_fp_control(kmp_str_buf_t *buffer,
                                               char const *name, void *data) {} // __kmp_stg_print_inherit_fp_control

#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 */

// Used for OMP_WAIT_POLICY
static char const *blocktime_str =;

// -----------------------------------------------------------------------------
// KMP_LIBRARY, OMP_WAIT_POLICY

static void __kmp_stg_parse_wait_policy(char const *name, char const *value,
                                        void *data) {} // __kmp_stg_parse_wait_policy

static void __kmp_stg_print_wait_policy(kmp_str_buf_t *buffer, char const *name,
                                        void *data) {} // __kmp_stg_print_wait_policy

#if KMP_USE_MONITOR
// -----------------------------------------------------------------------------
// KMP_MONITOR_STACKSIZE

static void __kmp_stg_parse_monitor_stacksize(char const *name,
                                              char const *value, void *data) {
  __kmp_stg_parse_size(name, value, __kmp_sys_min_stksize, KMP_MAX_STKSIZE,
                       NULL, &__kmp_monitor_stksize, 1);
} // __kmp_stg_parse_monitor_stacksize

static void __kmp_stg_print_monitor_stacksize(kmp_str_buf_t *buffer,
                                              char const *name, void *data) {
  if (__kmp_env_format) {
    if (__kmp_monitor_stksize > 0)
      KMP_STR_BUF_PRINT_NAME_EX(name);
    else
      KMP_STR_BUF_PRINT_NAME;
  } else {
    __kmp_str_buf_print(buffer, "   %s", name);
  }
  if (__kmp_monitor_stksize > 0) {
    __kmp_str_buf_print_size(buffer, __kmp_monitor_stksize);
  } else {
    __kmp_str_buf_print(buffer, ": %s\n", KMP_I18N_STR(NotDefined));
  }
  if (__kmp_env_format && __kmp_monitor_stksize) {
    __kmp_str_buf_print(buffer, "'\n");
  }
} // __kmp_stg_print_monitor_stacksize
#endif // KMP_USE_MONITOR

// -----------------------------------------------------------------------------
// KMP_SETTINGS

static void __kmp_stg_parse_settings(char const *name, char const *value,
                                     void *data) {} // __kmp_stg_parse_settings

static void __kmp_stg_print_settings(kmp_str_buf_t *buffer, char const *name,
                                     void *data) {} // __kmp_stg_print_settings

// -----------------------------------------------------------------------------
// KMP_STACKPAD

static void __kmp_stg_parse_stackpad(char const *name, char const *value,
                                     void *data) {} // __kmp_stg_parse_stackpad

static void __kmp_stg_print_stackpad(kmp_str_buf_t *buffer, char const *name,
                                     void *data) {} // __kmp_stg_print_stackpad

// -----------------------------------------------------------------------------
// KMP_STACKOFFSET

static void __kmp_stg_parse_stackoffset(char const *name, char const *value,
                                        void *data) {} // __kmp_stg_parse_stackoffset

static void __kmp_stg_print_stackoffset(kmp_str_buf_t *buffer, char const *name,
                                        void *data) {} // __kmp_stg_print_stackoffset

// -----------------------------------------------------------------------------
// KMP_STACKSIZE, OMP_STACKSIZE, GOMP_STACKSIZE

static void __kmp_stg_parse_stacksize(char const *name, char const *value,
                                      void *data) {} // __kmp_stg_parse_stacksize

// This function is called for printing both KMP_STACKSIZE (factor is 1) and
// OMP_STACKSIZE (factor is 1024). Currently it is not possible to print
// OMP_STACKSIZE value in bytes. We can consider adding this possibility by a
// customer request in future.
static void __kmp_stg_print_stacksize(kmp_str_buf_t *buffer, char const *name,
                                      void *data) {} // __kmp_stg_print_stacksize

// -----------------------------------------------------------------------------
// KMP_VERSION

static void __kmp_stg_parse_version(char const *name, char const *value,
                                    void *data) {} // __kmp_stg_parse_version

static void __kmp_stg_print_version(kmp_str_buf_t *buffer, char const *name,
                                    void *data) {} // __kmp_stg_print_version

// -----------------------------------------------------------------------------
// KMP_WARNINGS

static void __kmp_stg_parse_warnings(char const *name, char const *value,
                                     void *data) {} // __kmp_stg_parse_warnings

static void __kmp_stg_print_warnings(kmp_str_buf_t *buffer, char const *name,
                                     void *data) {} // __kmp_stg_print_warnings

// -----------------------------------------------------------------------------
// KMP_NESTING_MODE

static void __kmp_stg_parse_nesting_mode(char const *name, char const *value,
                                         void *data) {} // __kmp_stg_parse_nesting_mode

static void __kmp_stg_print_nesting_mode(kmp_str_buf_t *buffer,
                                         char const *name, void *data) {} // __kmp_stg_print_nesting_mode

// -----------------------------------------------------------------------------
// OMP_NESTED, OMP_NUM_THREADS

static void __kmp_stg_parse_nested(char const *name, char const *value,
                                   void *data) {} // __kmp_stg_parse_nested

static void __kmp_stg_print_nested(kmp_str_buf_t *buffer, char const *name,
                                   void *data) {} // __kmp_stg_print_nested

static void __kmp_parse_nested_num_threads(const char *var, const char *env,
                                           kmp_nested_nthreads_t *nth_array) {}

static void __kmp_stg_parse_num_threads(char const *name, char const *value,
                                        void *data) {} // __kmp_stg_parse_num_threads

#if OMPX_TASKGRAPH
static void __kmp_stg_parse_max_tdgs(char const *name, char const *value,
                                     void *data) {
  __kmp_stg_parse_int(name, value, 0, INT_MAX, &__kmp_max_tdgs);
} // __kmp_stg_parse_max_tdgs

static void __kmp_std_print_max_tdgs(kmp_str_buf_t *buffer, char const *name,
                                     void *data) {
  __kmp_stg_print_int(buffer, name, __kmp_max_tdgs);
} // __kmp_std_print_max_tdgs

static void __kmp_stg_parse_tdg_dot(char const *name, char const *value,
                                   void *data) {
  __kmp_stg_parse_bool(name, value, &__kmp_tdg_dot);
} // __kmp_stg_parse_tdg_dot

static void __kmp_stg_print_tdg_dot(kmp_str_buf_t *buffer, char const *name,
                                   void *data) {
  __kmp_stg_print_bool(buffer, name, __kmp_tdg_dot);
} // __kmp_stg_print_tdg_dot
#endif

static void __kmp_stg_parse_num_hidden_helper_threads(char const *name,
                                                      char const *value,
                                                      void *data) {} // __kmp_stg_parse_num_hidden_helper_threads

static void __kmp_stg_print_num_hidden_helper_threads(kmp_str_buf_t *buffer,
                                                      char const *name,
                                                      void *data) {} // __kmp_stg_print_num_hidden_helper_threads

static void __kmp_stg_parse_use_hidden_helper(char const *name,
                                              char const *value, void *data) {} // __kmp_stg_parse_use_hidden_helper

static void __kmp_stg_print_use_hidden_helper(kmp_str_buf_t *buffer,
                                              char const *name, void *data) {} // __kmp_stg_print_use_hidden_helper

static void __kmp_stg_print_num_threads(kmp_str_buf_t *buffer, char const *name,
                                        void *data) {} // __kmp_stg_print_num_threads

// -----------------------------------------------------------------------------
// OpenMP 3.0: KMP_TASKING, OMP_MAX_ACTIVE_LEVELS,

static void __kmp_stg_parse_tasking(char const *name, char const *value,
                                    void *data) {} // __kmp_stg_parse_tasking

static void __kmp_stg_print_tasking(kmp_str_buf_t *buffer, char const *name,
                                    void *data) {} // __kmp_stg_print_tasking

static void __kmp_stg_parse_task_stealing(char const *name, char const *value,
                                          void *data) {} // __kmp_stg_parse_task_stealing

static void __kmp_stg_print_task_stealing(kmp_str_buf_t *buffer,
                                          char const *name, void *data) {} // __kmp_stg_print_task_stealing

static void __kmp_stg_parse_max_active_levels(char const *name,
                                              char const *value, void *data) {} // __kmp_stg_parse_max_active_levels

static void __kmp_stg_print_max_active_levels(kmp_str_buf_t *buffer,
                                              char const *name, void *data) {} // __kmp_stg_print_max_active_levels

// -----------------------------------------------------------------------------
// OpenMP 4.0: OMP_DEFAULT_DEVICE
static void __kmp_stg_parse_default_device(char const *name, char const *value,
                                           void *data) {} // __kmp_stg_parse_default_device

static void __kmp_stg_print_default_device(kmp_str_buf_t *buffer,
                                           char const *name, void *data) {} // __kmp_stg_print_default_device

// -----------------------------------------------------------------------------
// OpenMP 5.0: OMP_TARGET_OFFLOAD
static void __kmp_stg_parse_target_offload(char const *name, char const *value,
                                           void *data) {} // __kmp_stg_parse_target_offload

static void __kmp_stg_print_target_offload(kmp_str_buf_t *buffer,
                                           char const *name, void *data) {} // __kmp_stg_print_target_offload

// -----------------------------------------------------------------------------
// OpenMP 4.5: OMP_MAX_TASK_PRIORITY
static void __kmp_stg_parse_max_task_priority(char const *name,
                                              char const *value, void *data) {} // __kmp_stg_parse_max_task_priority

static void __kmp_stg_print_max_task_priority(kmp_str_buf_t *buffer,
                                              char const *name, void *data) {} // __kmp_stg_print_max_task_priority

// KMP_TASKLOOP_MIN_TASKS
// taskloop threshold to switch from recursive to linear tasks creation
static void __kmp_stg_parse_taskloop_min_tasks(char const *name,
                                               char const *value, void *data) {} // __kmp_stg_parse_taskloop_min_tasks

static void __kmp_stg_print_taskloop_min_tasks(kmp_str_buf_t *buffer,
                                               char const *name, void *data) {} // __kmp_stg_print_taskloop_min_tasks

// -----------------------------------------------------------------------------
// KMP_DISP_NUM_BUFFERS
static void __kmp_stg_parse_disp_buffers(char const *name, char const *value,
                                         void *data) {} // __kmp_stg_parse_disp_buffers

static void __kmp_stg_print_disp_buffers(kmp_str_buf_t *buffer,
                                         char const *name, void *data) {} // __kmp_stg_print_disp_buffers

#if KMP_NESTED_HOT_TEAMS
// -----------------------------------------------------------------------------
// KMP_HOT_TEAMS_MAX_LEVEL, KMP_HOT_TEAMS_MODE

static void __kmp_stg_parse_hot_teams_level(char const *name, char const *value,
                                            void *data) {} // __kmp_stg_parse_hot_teams_level

static void __kmp_stg_print_hot_teams_level(kmp_str_buf_t *buffer,
                                            char const *name, void *data) {} // __kmp_stg_print_hot_teams_level

static void __kmp_stg_parse_hot_teams_mode(char const *name, char const *value,
                                           void *data) {} // __kmp_stg_parse_hot_teams_mode

static void __kmp_stg_print_hot_teams_mode(kmp_str_buf_t *buffer,
                                           char const *name, void *data) {} // __kmp_stg_print_hot_teams_mode

#endif // KMP_NESTED_HOT_TEAMS

// -----------------------------------------------------------------------------
// KMP_HANDLE_SIGNALS

#if KMP_HANDLE_SIGNALS

static void __kmp_stg_parse_handle_signals(char const *name, char const *value,
                                           void *data) {} // __kmp_stg_parse_handle_signals

static void __kmp_stg_print_handle_signals(kmp_str_buf_t *buffer,
                                           char const *name, void *data) {} // __kmp_stg_print_handle_signals

#endif // KMP_HANDLE_SIGNALS

// -----------------------------------------------------------------------------
// KMP_X_DEBUG, KMP_DEBUG, KMP_DEBUG_BUF_*, KMP_DIAG

#ifdef KMP_DEBUG

#define KMP_STG_X_DEBUG

KMP_STG_X_DEBUG(a)
KMP_STG_X_DEBUG(b)
KMP_STG_X_DEBUG(c)
KMP_STG_X_DEBUG(d)
KMP_STG_X_DEBUG(e)
KMP_STG_X_DEBUG(f)

#undef KMP_STG_X_DEBUG

static void __kmp_stg_parse_debug(char const *name, char const *value,
                                  void *data) {
  int debug = 0;
  __kmp_stg_parse_int(name, value, 0, INT_MAX, &debug);
  if (kmp_a_debug < debug) {
    kmp_a_debug = debug;
  }
  if (kmp_b_debug < debug) {
    kmp_b_debug = debug;
  }
  if (kmp_c_debug < debug) {
    kmp_c_debug = debug;
  }
  if (kmp_d_debug < debug) {
    kmp_d_debug = debug;
  }
  if (kmp_e_debug < debug) {
    kmp_e_debug = debug;
  }
  if (kmp_f_debug < debug) {
    kmp_f_debug = debug;
  }
} // __kmp_stg_parse_debug

static void __kmp_stg_parse_debug_buf(char const *name, char const *value,
                                      void *data) {
  __kmp_stg_parse_bool(name, value, &__kmp_debug_buf);
  // !!! TODO: Move buffer initialization of this file! It may works
  // incorrectly if KMP_DEBUG_BUF is parsed before KMP_DEBUG_BUF_LINES or
  // KMP_DEBUG_BUF_CHARS.
  if (__kmp_debug_buf) {
    int i;
    int elements = __kmp_debug_buf_lines * __kmp_debug_buf_chars;

    /* allocate and initialize all entries in debug buffer to empty */
    __kmp_debug_buffer = (char *)__kmp_page_allocate(elements * sizeof(char));
    for (i = 0; i < elements; i += __kmp_debug_buf_chars)
      __kmp_debug_buffer[i] = '\0';

    __kmp_debug_count = 0;
  }
  K_DIAG(1, ("__kmp_debug_buf = %d\n", __kmp_debug_buf));
} // __kmp_stg_parse_debug_buf

static void __kmp_stg_print_debug_buf(kmp_str_buf_t *buffer, char const *name,
                                      void *data) {
  __kmp_stg_print_bool(buffer, name, __kmp_debug_buf);
} // __kmp_stg_print_debug_buf

static void __kmp_stg_parse_debug_buf_atomic(char const *name,
                                             char const *value, void *data) {
  __kmp_stg_parse_bool(name, value, &__kmp_debug_buf_atomic);
} // __kmp_stg_parse_debug_buf_atomic

static void __kmp_stg_print_debug_buf_atomic(kmp_str_buf_t *buffer,
                                             char const *name, void *data) {
  __kmp_stg_print_bool(buffer, name, __kmp_debug_buf_atomic);
} // __kmp_stg_print_debug_buf_atomic

static void __kmp_stg_parse_debug_buf_chars(char const *name, char const *value,
                                            void *data) {
  __kmp_stg_parse_int(name, value, KMP_DEBUG_BUF_CHARS_MIN, INT_MAX,
                      &__kmp_debug_buf_chars);
} // __kmp_stg_debug_parse_buf_chars

static void __kmp_stg_print_debug_buf_chars(kmp_str_buf_t *buffer,
                                            char const *name, void *data) {
  __kmp_stg_print_int(buffer, name, __kmp_debug_buf_chars);
} // __kmp_stg_print_debug_buf_chars

static void __kmp_stg_parse_debug_buf_lines(char const *name, char const *value,
                                            void *data) {
  __kmp_stg_parse_int(name, value, KMP_DEBUG_BUF_LINES_MIN, INT_MAX,
                      &__kmp_debug_buf_lines);
} // __kmp_stg_parse_debug_buf_lines

static void __kmp_stg_print_debug_buf_lines(kmp_str_buf_t *buffer,
                                            char const *name, void *data) {
  __kmp_stg_print_int(buffer, name, __kmp_debug_buf_lines);
} // __kmp_stg_print_debug_buf_lines

static void __kmp_stg_parse_diag(char const *name, char const *value,
                                 void *data) {
  __kmp_stg_parse_int(name, value, 0, INT_MAX, &kmp_diag);
} // __kmp_stg_parse_diag

static void __kmp_stg_print_diag(kmp_str_buf_t *buffer, char const *name,
                                 void *data) {
  __kmp_stg_print_int(buffer, name, kmp_diag);
} // __kmp_stg_print_diag

#endif // KMP_DEBUG

// -----------------------------------------------------------------------------
// KMP_ALIGN_ALLOC

static void __kmp_stg_parse_align_alloc(char const *name, char const *value,
                                        void *data) {} // __kmp_stg_parse_align_alloc

static void __kmp_stg_print_align_alloc(kmp_str_buf_t *buffer, char const *name,
                                        void *data) {} // __kmp_stg_print_align_alloc

// -----------------------------------------------------------------------------
// KMP_PLAIN_BARRIER, KMP_FORKJOIN_BARRIER, KMP_REDUCTION_BARRIER

// TODO: Remove __kmp_barrier_branch_bit_env_name varibale, remove loops from
// parse and print functions, pass required info through data argument.

static void __kmp_stg_parse_barrier_branch_bit(char const *name,
                                               char const *value, void *data) {} // __kmp_stg_parse_barrier_branch_bit

static void __kmp_stg_print_barrier_branch_bit(kmp_str_buf_t *buffer,
                                               char const *name, void *data) {} // __kmp_stg_print_barrier_branch_bit

// ----------------------------------------------------------------------------
// KMP_PLAIN_BARRIER_PATTERN, KMP_FORKJOIN_BARRIER_PATTERN,
// KMP_REDUCTION_BARRIER_PATTERN

// TODO: Remove __kmp_barrier_pattern_name variable, remove loops from parse and
// print functions, pass required data to functions through data argument.

static void __kmp_stg_parse_barrier_pattern(char const *name, char const *value,
                                            void *data) {} // __kmp_stg_parse_barrier_pattern

static void __kmp_stg_print_barrier_pattern(kmp_str_buf_t *buffer,
                                            char const *name, void *data) {} // __kmp_stg_print_barrier_pattern

// -----------------------------------------------------------------------------
// KMP_ABORT_DELAY

static void __kmp_stg_parse_abort_delay(char const *name, char const *value,
                                        void *data) {} // __kmp_stg_parse_abort_delay

static void __kmp_stg_print_abort_delay(kmp_str_buf_t *buffer, char const *name,
                                        void *data) {} // __kmp_stg_print_abort_delay

// -----------------------------------------------------------------------------
// KMP_CPUINFO_FILE

static void __kmp_stg_parse_cpuinfo_file(char const *name, char const *value,
                                         void *data) {} //__kmp_stg_parse_cpuinfo_file

static void __kmp_stg_print_cpuinfo_file(kmp_str_buf_t *buffer,
                                         char const *name, void *data) {} //__kmp_stg_print_cpuinfo_file

// -----------------------------------------------------------------------------
// KMP_FORCE_REDUCTION, KMP_DETERMINISTIC_REDUCTION

static void __kmp_stg_parse_force_reduction(char const *name, char const *value,
                                            void *data) {} // __kmp_stg_parse_force_reduction

static void __kmp_stg_print_force_reduction(kmp_str_buf_t *buffer,
                                            char const *name, void *data) {} // __kmp_stg_print_force_reduction

// -----------------------------------------------------------------------------
// KMP_STORAGE_MAP

static void __kmp_stg_parse_storage_map(char const *name, char const *value,
                                        void *data) {} // __kmp_stg_parse_storage_map

static void __kmp_stg_print_storage_map(kmp_str_buf_t *buffer, char const *name,
                                        void *data) {} // __kmp_stg_print_storage_map

// -----------------------------------------------------------------------------
// KMP_ALL_THREADPRIVATE

static void __kmp_stg_parse_all_threadprivate(char const *name,
                                              char const *value, void *data) {} // __kmp_stg_parse_all_threadprivate

static void __kmp_stg_print_all_threadprivate(kmp_str_buf_t *buffer,
                                              char const *name, void *data) {}

// -----------------------------------------------------------------------------
// KMP_FOREIGN_THREADS_THREADPRIVATE

static void __kmp_stg_parse_foreign_threads_threadprivate(char const *name,
                                                          char const *value,
                                                          void *data) {} // __kmp_stg_parse_foreign_threads_threadprivate

static void __kmp_stg_print_foreign_threads_threadprivate(kmp_str_buf_t *buffer,
                                                          char const *name,
                                                          void *data) {} // __kmp_stg_print_foreign_threads_threadprivate

// -----------------------------------------------------------------------------
// KMP_AFFINITY, GOMP_CPU_AFFINITY, KMP_TOPOLOGY_METHOD

static inline const char *
__kmp_hw_get_core_type_keyword(kmp_hw_core_type_t type) {}

#if KMP_AFFINITY_SUPPORTED
// Parse the proc id list.  Return TRUE if successful, FALSE otherwise.
static int __kmp_parse_affinity_proc_id_list(const char *var, const char *env,
                                             const char **nextEnv,
                                             char **proclist) {}

// If KMP_AFFINITY is specified without a type, then
// __kmp_affinity_notype should point to its setting.
static kmp_setting_t *__kmp_affinity_notype =;

static void __kmp_parse_affinity_env(char const *name, char const *value,
                                     kmp_affinity_t *out_affinity) {} // __kmp_parse_affinity_env

static void __kmp_stg_parse_affinity(char const *name, char const *value,
                                     void *data) {} // __kmp_stg_parse_affinity
static void __kmp_stg_parse_hh_affinity(char const *name, char const *value,
                                        void *data) {}

static void __kmp_print_affinity_env(kmp_str_buf_t *buffer, char const *name,
                                     const kmp_affinity_t &affinity) {} //__kmp_stg_print_affinity

static void __kmp_stg_print_affinity(kmp_str_buf_t *buffer, char const *name,
                                     void *data) {}
static void __kmp_stg_print_hh_affinity(kmp_str_buf_t *buffer, char const *name,
                                        void *data) {}

#ifdef KMP_GOMP_COMPAT

static void __kmp_stg_parse_gomp_cpu_affinity(char const *name,
                                              char const *value, void *data) {} // __kmp_stg_parse_gomp_cpu_affinity

#endif /* KMP_GOMP_COMPAT */

/*-----------------------------------------------------------------------------
The OMP_PLACES proc id list parser. Here is the grammar:

place_list := place
place_list := place , place_list
place := num
place := place : num
place := place : num : signed
place := { subplacelist }
place := ! place                  // (lowest priority)
subplace_list := subplace
subplace_list := subplace , subplace_list
subplace := num
subplace := num : num
subplace := num : num : signed
signed := num
signed := + signed
signed := - signed
-----------------------------------------------------------------------------*/

// Return TRUE if successful parse, FALSE otherwise
static int __kmp_parse_subplace_list(const char *var, const char **scan) {}

// Return TRUE if successful parse, FALSE otherwise
static int __kmp_parse_place(const char *var, const char **scan) {}

// Return TRUE if successful parse, FALSE otherwise
static int __kmp_parse_place_list(const char *var, const char *env,
                                  char **place_list) {}

static inline void __kmp_places_set(enum affinity_type type, kmp_hw_t kind) {}

static void __kmp_places_syntax_error_fallback(char const *name,
                                               kmp_hw_t kind) {}

static void __kmp_stg_parse_places(char const *name, char const *value,
                                   void *data) {}

static void __kmp_stg_print_places(kmp_str_buf_t *buffer, char const *name,
                                   void *data) {}

static void __kmp_stg_parse_topology_method(char const *name, char const *value,
                                            void *data) {} // __kmp_stg_parse_topology_method

static void __kmp_stg_print_topology_method(kmp_str_buf_t *buffer,
                                            char const *name, void *data) {} // __kmp_stg_print_topology_method

// KMP_TEAMS_PROC_BIND
struct kmp_proc_bind_info_t {};
static kmp_proc_bind_info_t proc_bind_table[] =;
static void __kmp_stg_parse_teams_proc_bind(char const *name, char const *value,
                                            void *data) {}
static void __kmp_stg_print_teams_proc_bind(kmp_str_buf_t *buffer,
                                            char const *name, void *data) {}
#endif /* KMP_AFFINITY_SUPPORTED */

// OMP_PROC_BIND / bind-var is functional on all 4.0 builds, including OS X*
// OMP_PLACES / place-partition-var is not.
static void __kmp_stg_parse_proc_bind(char const *name, char const *value,
                                      void *data) {}

static void __kmp_stg_print_proc_bind(kmp_str_buf_t *buffer, char const *name,
                                      void *data) {}

static void __kmp_stg_parse_display_affinity(char const *name,
                                             char const *value, void *data) {}
static void __kmp_stg_print_display_affinity(kmp_str_buf_t *buffer,
                                             char const *name, void *data) {}
static void __kmp_stg_parse_affinity_format(char const *name, char const *value,
                                            void *data) {}
static void __kmp_stg_print_affinity_format(kmp_str_buf_t *buffer,
                                            char const *name, void *data) {}

/*-----------------------------------------------------------------------------
OMP_ALLOCATOR sets default allocator. Here is the grammar:

<allocator>        |= <predef-allocator> | <predef-mem-space> |
                      <predef-mem-space>:<traits>
<traits>           |= <trait>=<value> | <trait>=<value>,<traits>
<predef-allocator> |= omp_default_mem_alloc | omp_large_cap_mem_alloc |
                      omp_const_mem_alloc | omp_high_bw_mem_alloc |
                      omp_low_lat_mem_alloc | omp_cgroup_mem_alloc |
                      omp_pteam_mem_alloc | omp_thread_mem_alloc
<predef-mem-space> |= omp_default_mem_space | omp_large_cap_mem_space |
                      omp_const_mem_space | omp_high_bw_mem_space |
                      omp_low_lat_mem_space
<trait>            |= sync_hint | alignment | access | pool_size | fallback |
                      fb_data | pinned | partition
<value>            |= one of the allowed values of trait |
                      non-negative integer | <predef-allocator>
-----------------------------------------------------------------------------*/

static void __kmp_stg_parse_allocator(char const *name, char const *value,
                                      void *data) {}

static void __kmp_stg_print_allocator(kmp_str_buf_t *buffer, char const *name,
                                      void *data) {}

// -----------------------------------------------------------------------------
// OMP_DYNAMIC

static void __kmp_stg_parse_omp_dynamic(char const *name, char const *value,
                                        void *data) {} // __kmp_stg_parse_omp_dynamic

static void __kmp_stg_print_omp_dynamic(kmp_str_buf_t *buffer, char const *name,
                                        void *data) {} // __kmp_stg_print_omp_dynamic

static void __kmp_stg_parse_kmp_dynamic_mode(char const *name,
                                             char const *value, void *data) {} //__kmp_stg_parse_kmp_dynamic_mode

static void __kmp_stg_print_kmp_dynamic_mode(kmp_str_buf_t *buffer,
                                             char const *name, void *data) {} // __kmp_stg_print_kmp_dynamic_mode

#ifdef USE_LOAD_BALANCE

// -----------------------------------------------------------------------------
// KMP_LOAD_BALANCE_INTERVAL

static void __kmp_stg_parse_ld_balance_interval(char const *name,
                                                char const *value, void *data) {} // __kmp_stg_parse_load_balance_interval

static void __kmp_stg_print_ld_balance_interval(kmp_str_buf_t *buffer,
                                                char const *name, void *data) {} // __kmp_stg_print_load_balance_interval

#endif /* USE_LOAD_BALANCE */

// -----------------------------------------------------------------------------
// KMP_INIT_AT_FORK

static void __kmp_stg_parse_init_at_fork(char const *name, char const *value,
                                         void *data) {} // __kmp_stg_parse_init_at_fork

static void __kmp_stg_print_init_at_fork(kmp_str_buf_t *buffer,
                                         char const *name, void *data) {} // __kmp_stg_print_init_at_fork

// -----------------------------------------------------------------------------
// KMP_SCHEDULE

static void __kmp_stg_parse_schedule(char const *name, char const *value,
                                     void *data) {} // __kmp_stg_parse__schedule

static void __kmp_stg_print_schedule(kmp_str_buf_t *buffer, char const *name,
                                     void *data) {} // __kmp_stg_print_schedule

// -----------------------------------------------------------------------------
// OMP_SCHEDULE

static inline void __kmp_omp_schedule_restore() {}

// if parse_hier = true:
//    Parse [HW,][modifier:]kind[,chunk]
// else:
//    Parse [modifier:]kind[,chunk]
static const char *__kmp_parse_single_omp_schedule(const char *name,
                                                   const char *value,
                                                   bool parse_hier = false) {}

static void __kmp_stg_parse_omp_schedule(char const *name, char const *value,
                                         void *data) {} // __kmp_stg_parse_omp_schedule

static void __kmp_stg_print_omp_schedule(kmp_str_buf_t *buffer,
                                         char const *name, void *data) {} // __kmp_stg_print_omp_schedule

#if KMP_USE_HIER_SCHED
// -----------------------------------------------------------------------------
// KMP_DISP_HAND_THREAD
static void __kmp_stg_parse_kmp_hand_thread(char const *name, char const *value,
                                            void *data) {
  __kmp_stg_parse_bool(name, value, &(__kmp_dispatch_hand_threading));
} // __kmp_stg_parse_kmp_hand_thread

static void __kmp_stg_print_kmp_hand_thread(kmp_str_buf_t *buffer,
                                            char const *name, void *data) {
  __kmp_stg_print_bool(buffer, name, __kmp_dispatch_hand_threading);
} // __kmp_stg_print_kmp_hand_thread
#endif

// -----------------------------------------------------------------------------
// KMP_FORCE_MONOTONIC_DYNAMIC_SCHEDULE
static void __kmp_stg_parse_kmp_force_monotonic(char const *name,
                                                char const *value, void *data) {} // __kmp_stg_parse_kmp_force_monotonic

static void __kmp_stg_print_kmp_force_monotonic(kmp_str_buf_t *buffer,
                                                char const *name, void *data) {} // __kmp_stg_print_kmp_force_monotonic

// -----------------------------------------------------------------------------
// KMP_ATOMIC_MODE

static void __kmp_stg_parse_atomic_mode(char const *name, char const *value,
                                        void *data) {} // __kmp_stg_parse_atomic_mode

static void __kmp_stg_print_atomic_mode(kmp_str_buf_t *buffer, char const *name,
                                        void *data) {} // __kmp_stg_print_atomic_mode

// -----------------------------------------------------------------------------
// KMP_CONSISTENCY_CHECK

static void __kmp_stg_parse_consistency_check(char const *name,
                                              char const *value, void *data) {} // __kmp_stg_parse_consistency_check

static void __kmp_stg_print_consistency_check(kmp_str_buf_t *buffer,
                                              char const *name, void *data) {} // __kmp_stg_print_consistency_check

#if USE_ITT_BUILD
// -----------------------------------------------------------------------------
// KMP_ITT_PREPARE_DELAY

#if USE_ITT_NOTIFY

static void __kmp_stg_parse_itt_prepare_delay(char const *name,
                                              char const *value, void *data) {} // __kmp_str_parse_itt_prepare_delay

static void __kmp_stg_print_itt_prepare_delay(kmp_str_buf_t *buffer,
                                              char const *name, void *data) {} // __kmp_str_print_itt_prepare_delay

#endif // USE_ITT_NOTIFY
#endif /* USE_ITT_BUILD */

// -----------------------------------------------------------------------------
// KMP_MALLOC_POOL_INCR

static void __kmp_stg_parse_malloc_pool_incr(char const *name,
                                             char const *value, void *data) {} // __kmp_stg_parse_malloc_pool_incr

static void __kmp_stg_print_malloc_pool_incr(kmp_str_buf_t *buffer,
                                             char const *name, void *data) {} // _kmp_stg_print_malloc_pool_incr

#ifdef KMP_DEBUG

// -----------------------------------------------------------------------------
// KMP_PAR_RANGE

static void __kmp_stg_parse_par_range_env(char const *name, char const *value,
                                          void *data) {
  __kmp_stg_parse_par_range(name, value, &__kmp_par_range,
                            __kmp_par_range_routine, __kmp_par_range_filename,
                            &__kmp_par_range_lb, &__kmp_par_range_ub);
} // __kmp_stg_parse_par_range_env

static void __kmp_stg_print_par_range_env(kmp_str_buf_t *buffer,
                                          char const *name, void *data) {
  if (__kmp_par_range != 0) {
    __kmp_stg_print_str(buffer, name, par_range_to_print);
  }
} // __kmp_stg_print_par_range_env

#endif

// -----------------------------------------------------------------------------
// KMP_GTID_MODE

static void __kmp_stg_parse_gtid_mode(char const *name, char const *value,
                                      void *data) {} // __kmp_str_parse_gtid_mode

static void __kmp_stg_print_gtid_mode(kmp_str_buf_t *buffer, char const *name,
                                      void *data) {} // __kmp_stg_print_gtid_mode

// -----------------------------------------------------------------------------
// KMP_NUM_LOCKS_IN_BLOCK

static void __kmp_stg_parse_lock_block(char const *name, char const *value,
                                       void *data) {} // __kmp_str_parse_lock_block

static void __kmp_stg_print_lock_block(kmp_str_buf_t *buffer, char const *name,
                                       void *data) {} // __kmp_stg_print_lock_block

// -----------------------------------------------------------------------------
// KMP_LOCK_KIND

#if KMP_USE_DYNAMIC_LOCK
#define KMP_STORE_LOCK_SEQ(a)
#else
#define KMP_STORE_LOCK_SEQ
#endif

static void __kmp_stg_parse_lock_kind(char const *name, char const *value,
                                      void *data) {}

static void __kmp_stg_print_lock_kind(kmp_str_buf_t *buffer, char const *name,
                                      void *data) {}

// -----------------------------------------------------------------------------
// KMP_SPIN_BACKOFF_PARAMS

// KMP_SPIN_BACKOFF_PARAMS=max_backoff[,min_tick] (max backoff size, min tick
// for machine pause)
static void __kmp_stg_parse_spin_backoff_params(const char *name,
                                                const char *value, void *data) {}

static void __kmp_stg_print_spin_backoff_params(kmp_str_buf_t *buffer,
                                                char const *name, void *data) {}

#if KMP_USE_ADAPTIVE_LOCKS

// -----------------------------------------------------------------------------
// KMP_ADAPTIVE_LOCK_PROPS, KMP_SPECULATIVE_STATSFILE

// Parse out values for the tunable parameters from a string of the form
// KMP_ADAPTIVE_LOCK_PROPS=max_soft_retries[,max_badness]
static void __kmp_stg_parse_adaptive_lock_props(const char *name,
                                                const char *value, void *data) {}

static void __kmp_stg_print_adaptive_lock_props(kmp_str_buf_t *buffer,
                                                char const *name, void *data) {} // __kmp_stg_print_adaptive_lock_props

#if KMP_DEBUG_ADAPTIVE_LOCKS

static void __kmp_stg_parse_speculative_statsfile(char const *name,
                                                  char const *value,
                                                  void *data) {
  __kmp_stg_parse_file(name, value, "",
                       CCAST(char **, &__kmp_speculative_statsfile));
} // __kmp_stg_parse_speculative_statsfile

static void __kmp_stg_print_speculative_statsfile(kmp_str_buf_t *buffer,
                                                  char const *name,
                                                  void *data) {
  if (__kmp_str_match("-", 0, __kmp_speculative_statsfile)) {
    __kmp_stg_print_str(buffer, name, "stdout");
  } else {
    __kmp_stg_print_str(buffer, name, __kmp_speculative_statsfile);
  }

} // __kmp_stg_print_speculative_statsfile

#endif // KMP_DEBUG_ADAPTIVE_LOCKS

#endif // KMP_USE_ADAPTIVE_LOCKS

// -----------------------------------------------------------------------------
// KMP_HW_SUBSET (was KMP_PLACE_THREADS)
// 2s16c,2t => 2S16C,2T => 2S16C \0 2T

// Return KMP_HW_SUBSET preferred hardware type in case a token is ambiguously
// short. The original KMP_HW_SUBSET environment variable had single letters:
// s, c, t for sockets, cores, threads repsectively.
static kmp_hw_t __kmp_hw_subset_break_tie(const kmp_hw_t *possible,
                                          size_t num_possible) {}

// Return hardware type from string or HW_UNKNOWN if string cannot be parsed
// This algorithm is very forgiving to the user in that, the instant it can
// reduce the search space to one, it assumes that is the topology level the
// user wanted, even if it is misspelled later in the token.
static kmp_hw_t __kmp_stg_parse_hw_subset_name(char const *token) {}

// The longest observable sequence of items can only be HW_LAST length
// The input string is usually short enough, let's use 512 limit for now
#define MAX_T_LEVEL
#define MAX_STR_LEN
static void __kmp_stg_parse_hw_subset(char const *name, char const *value,
                                      void *data) {}

static void __kmp_stg_print_hw_subset(kmp_str_buf_t *buffer, char const *name,
                                      void *data) {}

#if USE_ITT_BUILD
// -----------------------------------------------------------------------------
// KMP_FORKJOIN_FRAMES

static void __kmp_stg_parse_forkjoin_frames(char const *name, char const *value,
                                            void *data) {} // __kmp_stg_parse_forkjoin_frames

static void __kmp_stg_print_forkjoin_frames(kmp_str_buf_t *buffer,
                                            char const *name, void *data) {} // __kmp_stg_print_forkjoin_frames

// -----------------------------------------------------------------------------
// KMP_FORKJOIN_FRAMES_MODE

static void __kmp_stg_parse_forkjoin_frames_mode(char const *name,
                                                 char const *value,
                                                 void *data) {} // __kmp_stg_parse_forkjoin_frames

static void __kmp_stg_print_forkjoin_frames_mode(kmp_str_buf_t *buffer,
                                                 char const *name, void *data) {} // __kmp_stg_print_forkjoin_frames
#endif /* USE_ITT_BUILD */

// -----------------------------------------------------------------------------
// KMP_ENABLE_TASK_THROTTLING

static void __kmp_stg_parse_task_throttling(char const *name, char const *value,
                                            void *data) {} // __kmp_stg_parse_task_throttling

static void __kmp_stg_print_task_throttling(kmp_str_buf_t *buffer,
                                            char const *name, void *data) {} // __kmp_stg_print_task_throttling

#if KMP_HAVE_MWAIT || KMP_HAVE_UMWAIT
// -----------------------------------------------------------------------------
// KMP_USER_LEVEL_MWAIT

static void __kmp_stg_parse_user_level_mwait(char const *name,
                                             char const *value, void *data) {} // __kmp_stg_parse_user_level_mwait

static void __kmp_stg_print_user_level_mwait(kmp_str_buf_t *buffer,
                                             char const *name, void *data) {} // __kmp_stg_print_user_level_mwait

// -----------------------------------------------------------------------------
// KMP_MWAIT_HINTS

static void __kmp_stg_parse_mwait_hints(char const *name, char const *value,
                                        void *data) {} // __kmp_stg_parse_mwait_hints

static void __kmp_stg_print_mwait_hints(kmp_str_buf_t *buffer, char const *name,
                                        void *data) {} // __kmp_stg_print_mwait_hints

#endif // KMP_HAVE_MWAIT || KMP_HAVE_UMWAIT

#if KMP_HAVE_UMWAIT
// -----------------------------------------------------------------------------
// KMP_TPAUSE
// 0 = don't use TPAUSE, 1 = use C0.1 state, 2 = use C0.2 state

static void __kmp_stg_parse_tpause(char const *name, char const *value,
                                   void *data) {} // __kmp_stg_parse_tpause

static void __kmp_stg_print_tpause(kmp_str_buf_t *buffer, char const *name,
                                   void *data) {} // __kmp_stg_print_tpause
#endif // KMP_HAVE_UMWAIT

// -----------------------------------------------------------------------------
// OMP_DISPLAY_ENV

static void __kmp_stg_parse_omp_display_env(char const *name, char const *value,
                                            void *data) {} // __kmp_stg_parse_omp_display_env

static void __kmp_stg_print_omp_display_env(kmp_str_buf_t *buffer,
                                            char const *name, void *data) {} // __kmp_stg_print_omp_display_env

static void __kmp_stg_parse_omp_cancellation(char const *name,
                                             char const *value, void *data) {} // __kmp_stg_parse_omp_cancellation

static void __kmp_stg_print_omp_cancellation(kmp_str_buf_t *buffer,
                                             char const *name, void *data) {} // __kmp_stg_print_omp_cancellation

#if OMPT_SUPPORT
int __kmp_tool =;

static void __kmp_stg_parse_omp_tool(char const *name, char const *value,
                                     void *data) {} // __kmp_stg_parse_omp_tool

static void __kmp_stg_print_omp_tool(kmp_str_buf_t *buffer, char const *name,
                                     void *data) {} // __kmp_stg_print_omp_tool

char *__kmp_tool_libraries =;

static void __kmp_stg_parse_omp_tool_libraries(char const *name,
                                               char const *value, void *data) {} // __kmp_stg_parse_omp_tool_libraries

static void __kmp_stg_print_omp_tool_libraries(kmp_str_buf_t *buffer,
                                               char const *name, void *data) {} // __kmp_stg_print_omp_tool_libraries

char *__kmp_tool_verbose_init =;

static void __kmp_stg_parse_omp_tool_verbose_init(char const *name,
                                                  char const *value,
                                                  void *data) {} // __kmp_stg_parse_omp_tool_libraries

static void __kmp_stg_print_omp_tool_verbose_init(kmp_str_buf_t *buffer,
                                                  char const *name,
                                                  void *data) {} // __kmp_stg_print_omp_tool_verbose_init

#endif

// Table.

static kmp_setting_t __kmp_stg_table[] =; // settings

static int const __kmp_stg_count =;

static inline kmp_setting_t *__kmp_stg_find(char const *name) {} // __kmp_stg_find

static int __kmp_stg_cmp(void const *_a, void const *_b) {} // __kmp_stg_cmp

static void __kmp_stg_init(void) {} // __kmp_stg_init

static void __kmp_stg_parse(char const *name, char const *value) {} // __kmp_stg_parse

static int __kmp_stg_check_rivals( // 0 -- Ok, 1 -- errors found.
    char const *name, // Name of variable.
    char const *value, // Value of the variable.
    kmp_setting_t **rivals // List of rival settings (must include current one).
) {} // __kmp_stg_check_rivals

static int __kmp_env_toPrint(char const *name, int flag) {}

#if defined(KMP_DEBUG) && KMP_AFFINITY_SUPPORTED
static void __kmp_print_affinity_settings(const kmp_affinity_t *affinity) {
  K_DIAG(1, ("%s:\n", affinity->env_var));
  K_DIAG(1, ("    type     : %d\n", affinity->type));
  K_DIAG(1, ("    compact  : %d\n", affinity->compact));
  K_DIAG(1, ("    offset   : %d\n", affinity->offset));
  K_DIAG(1, ("    verbose  : %u\n", affinity->flags.verbose));
  K_DIAG(1, ("    warnings : %u\n", affinity->flags.warnings));
  K_DIAG(1, ("    respect  : %u\n", affinity->flags.respect));
  K_DIAG(1, ("    reset    : %u\n", affinity->flags.reset));
  K_DIAG(1, ("    dups     : %u\n", affinity->flags.dups));
  K_DIAG(1, ("    gran     : %d\n", (int)affinity->gran));
  KMP_DEBUG_ASSERT(affinity->type != affinity_default);
}
#endif

static void __kmp_aux_env_initialize(kmp_env_blk_t *block) {}

void __kmp_env_initialize(char const *string) {} // __kmp_env_initialize

void __kmp_env_print() {} // __kmp_env_print

void __kmp_env_print_2() {} // __kmp_env_print_2

void __kmp_display_env_impl(int display_env, int display_env_verbose) {}

#if OMPD_SUPPORT
// Dump environment variables for OMPD
void __kmp_env_dump() {}
#endif // OMPD_SUPPORT

// end of file