llvm/openmp/libompd/src/omp-icv.cpp

/*
 * omp-icv.cpp -- OMPD Internal Control Variable handling
 */

//===----------------------------------------------------------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
// clang-format off
/* clang-format expect kmp.h before omp.h which results in build break
 * due to a few redeclarations.
 */
#include "omp-debug.h"
// NOLINTNEXTLINE "to avoid clang tidy warning for the same reason as above."
#include "omp.h"
#include "ompd-private.h"
#include "TargetValue.h"
#define OMPD_SKIP_HWLOC
#include "kmp.h"
#undef OMPD_SKIP_HWLOC
#include <cstring>

/* The ICVs ompd-final-var and ompd-implicit-var below are for backward
 * compatibility with 5.0.
 */

#define FOREACH_OMPD_ICV(macro)

void __ompd_init_icvs(const ompd_callbacks_t *table) {}

enum ompd_icv {};

static const char *ompd_icv_string_values[] =;

static const ompd_scope_t ompd_icv_scope_values[] =;

// clang-format on
ompd_rc_t ompd_enumerate_icvs(ompd_address_space_handle_t *handle,
                              ompd_icv_id_t current, ompd_icv_id_t *next_id,
                              const char **next_icv_name,
                              ompd_scope_t *next_scope, int *more) {}

static ompd_rc_t create_empty_string(const char **empty_string_ptr) {}

static ompd_rc_t ompd_get_dynamic(
    ompd_thread_handle_t *thread_handle, /* IN: OpenMP thread handle */
    ompd_word_t *dyn_val /* OUT: Dynamic adjustment of threads */
) {}

static ompd_rc_t
ompd_get_stacksize(ompd_address_space_handle_t
                       *addr_handle, /* IN: handle for the address space */
                   ompd_word_t *stacksize_val /* OUT: per thread stack size */
) {}

static ompd_rc_t ompd_get_cancellation(
    ompd_address_space_handle_t
        *addr_handle,             /* IN: handle for the address space */
    ompd_word_t *cancellation_val /* OUT: cancellation value */
) {}

static ompd_rc_t ompd_get_max_task_priority(
    ompd_address_space_handle_t
        *addr_handle,                  /* IN: handle for the address space */
    ompd_word_t *max_task_priority_val /* OUT: max task priority value */
) {}

static ompd_rc_t
ompd_get_debug(ompd_address_space_handle_t
                   *addr_handle,      /* IN: handle for the address space */
               ompd_word_t *debug_val /* OUT: debug value */
) {}

/* Helper routine for the ompd_get_nthreads routines */
static ompd_rc_t ompd_get_nthreads_aux(ompd_thread_handle_t *thread_handle,
                                       uint32_t *used,
                                       uint32_t *current_nesting_level,
                                       uint32_t *nproc) {}

static ompd_rc_t ompd_get_nthreads(
    ompd_thread_handle_t *thread_handle, /* IN: handle for the thread */
    ompd_word_t *nthreads_var_val        /* OUT: nthreads-var (of integer type)
                                            value */
) {}

static ompd_rc_t ompd_get_nthreads(
    ompd_thread_handle_t *thread_handle, /* IN: handle for the thread */
    const char **nthreads_list_string    /* OUT: string list of comma separated
                                            nthreads values */
) {}

static ompd_rc_t ompd_get_display_affinity(
    ompd_address_space_handle_t
        *addr_handle,                 /* IN: handle for the address space */
    ompd_word_t *display_affinity_val /* OUT: display affinity value */
) {}

static ompd_rc_t ompd_get_affinity_format(
    ompd_address_space_handle_t *addr_handle, /* IN: address space handle*/
    const char **affinity_format_string       /* OUT: affinity format string */
) {}

static ompd_rc_t ompd_get_tool_libraries(
    ompd_address_space_handle_t *addr_handle, /* IN: address space handle*/
    const char **tool_libraries_string        /* OUT: tool libraries string */
) {}

static ompd_rc_t ompd_get_default_device(
    ompd_thread_handle_t *thread_handle, /* IN: handle for the thread */
    ompd_word_t *default_device_val      /* OUT: default device value */
) {}

static ompd_rc_t
ompd_get_tool(ompd_address_space_handle_t
                  *addr_handle,     /* IN: handle for the address space */
              ompd_word_t *tool_val /* OUT: tool value */
) {}

static ompd_rc_t ompd_get_tool_verbose_init(
    ompd_address_space_handle_t *addr_handle, /* IN: address space handle*/
    const char **tool_verbose_init_string /* OUT: tool verbose init string */
) {}

static ompd_rc_t ompd_get_level(
    ompd_parallel_handle_t *parallel_handle, /* IN: OpenMP parallel handle */
    ompd_word_t *val                         /* OUT: nesting level */
) {}

static ompd_rc_t ompd_get_active_level(
    ompd_parallel_handle_t *parallel_handle, /* IN: OpenMP parallel handle */
    ompd_word_t *val                         /* OUT: active nesting level */
) {}

static ompd_rc_t
ompd_get_num_procs(ompd_address_space_handle_t
                       *addr_handle, /* IN: handle for the address space */
                   ompd_word_t *val  /* OUT: number of processes */
) {}

static ompd_rc_t ompd_get_thread_limit(
    ompd_task_handle_t *task_handle, /* IN: OpenMP task handle*/
    ompd_word_t *val                 /* OUT: max number of threads */
) {}

static ompd_rc_t ompd_get_thread_num(
    ompd_thread_handle_t *thread_handle, /* IN: OpenMP thread handle*/
    ompd_word_t *val /* OUT: number of the thread within the team */
) {}

static ompd_rc_t
ompd_in_final(ompd_task_handle_t *task_handle, /* IN: OpenMP task handle*/
              ompd_word_t *val                 /* OUT: max number of threads */
) {}

static ompd_rc_t ompd_get_max_active_levels(
    ompd_task_handle_t *task_handle, /* IN: OpenMP task handle*/
    ompd_word_t *val                 /* OUT: max number of threads */
) {}

static ompd_rc_t ompd_get_run_schedule(
    ompd_task_handle_t *task_handle, /* IN: OpenMP task handle*/
    const char **run_sched_string    /* OUT: Run Schedule String
                                        consisting of kind and modifier */
) {}

/* Helper routine for the ompd_get_proc_bind routines */
static ompd_rc_t ompd_get_proc_bind_aux(ompd_task_handle_t *task_handle,
                                        uint32_t *used,
                                        uint32_t *current_nesting_level,
                                        uint32_t *proc_bind) {}

static ompd_rc_t
ompd_get_proc_bind(ompd_task_handle_t *task_handle, /* IN: OpenMP task handle */
                   ompd_word_t *bind /* OUT: Kind of proc-binding */
) {}

static ompd_rc_t ompd_get_proc_bind(
    ompd_task_handle_t *task_handle,   /* IN: OpenMP task handle */
    const char **proc_bind_list_string /* OUT: string list of comma separated
                                          bind-var values */
) {}

static ompd_rc_t
ompd_is_implicit(ompd_task_handle_t *task_handle, /* IN: OpenMP task handle*/
                 ompd_word_t *val /* OUT: max number of threads */
) {}

ompd_rc_t ompd_get_num_threads(
    ompd_parallel_handle_t *parallel_handle, /* IN: OpenMP parallel handle */
    ompd_word_t *val                         /* OUT: number of threads */
) {}

ompd_rc_t ompd_get_icv_from_scope(void *handle, ompd_scope_t scope,
                                  ompd_icv_id_t icv_id,
                                  ompd_word_t *icv_value) {}

ompd_rc_t ompd_get_icv_string_from_scope(void *handle, ompd_scope_t scope,
                                         ompd_icv_id_t icv_id,
                                         const char **icv_string) {}

static ompd_rc_t __ompd_get_tool_data(TValue &dataValue, ompd_word_t *value,
                                      ompd_address_t *ptr) {}

ompd_rc_t ompd_get_task_data(ompd_task_handle_t *task_handle,
                             ompd_word_t *value, ompd_address_t *ptr) {}

ompd_rc_t ompd_get_parallel_data(ompd_parallel_handle_t *parallel_handle,
                                 ompd_word_t *value, ompd_address_t *ptr) {}

ompd_rc_t ompd_get_thread_data(ompd_thread_handle_t *thread_handle,
                               ompd_word_t *value, ompd_address_t *ptr) {}

ompd_rc_t ompd_get_tool_data(void *handle, ompd_scope_t scope,
                             ompd_word_t *value, ompd_address_t *ptr) {}