/* * kmp_utility.cpp -- Utility routines for the OpenMP support library. */ //===----------------------------------------------------------------------===// // // 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_i18n.h" #include "kmp_str.h" #include "kmp_wrapper_getpid.h" #include <float.h> static const char *unknown = …; #if KMP_ARCH_X86 || KMP_ARCH_X86_64 /* NOTE: If called before serial_initialize (i.e. from runtime_initialize), then the debugging package has not been initialized yet, and only "0" will print debugging output since the environment variables have not been read. */ #ifdef KMP_DEBUG static int trace_level = 5; #endif static kmp_uint64 __kmp_parse_frequency( // R: Frequency in Hz. char const *frequency // I: Float number and unit: MHz, GHz, or TGz. ) { … } // func __kmp_parse_cpu_frequency void __kmp_query_cpuid(kmp_cpuinfo_t *p) { … } #endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 */ void __kmp_expand_host_name(char *buffer, size_t size) { … } /* Expand the meta characters in the filename: * Currently defined characters are: * %H the hostname * %P the number of threads used. * %I the unique identifier for this run. */ void __kmp_expand_file_name(char *result, size_t rlen, char *pattern) { … } #if !OMPT_SUPPORT extern "C" { typedef struct ompt_start_tool_result_t ompt_start_tool_result_t; // Define symbols expected by VERSION script ompt_start_tool_result_t *ompt_start_tool(unsigned int omp_version, const char *runtime_version) { return nullptr; } void ompt_libomp_connect(ompt_start_tool_result_t *result) { result = nullptr; } } #endif