brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.0 KiB · 7ec7428 Raw
49 lines · c
1#if USE_DEBUGGER2/*3 * kmp_debugger.h -- debugger support.4 */5 6//===----------------------------------------------------------------------===//7//8// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.9// See https://llvm.org/LICENSE.txt for license information.10// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception11//12//===----------------------------------------------------------------------===//13 14#ifndef KMP_DEBUGGER_H15#define KMP_DEBUGGER_H16 17#ifdef __cplusplus18extern "C" {19#endif // __cplusplus20 21/* This external variable can be set by any debugger to flag to the runtime22   that we are currently executing inside a debugger.  This will allow the23   debugger to override the number of threads spawned in a parallel region by24   using __kmp_omp_num_threads() (below).25   * When __kmp_debugging is TRUE, each team and each task gets a unique integer26   identifier that can be used by debugger to conveniently identify teams and27   tasks.28   * The debugger has access to __kmp_omp_debug_struct_info which contains29   information about the OpenMP library's important internal structures.  This30   access will allow the debugger to read detailed information from the typical31   OpenMP constructs (teams, threads, tasking, etc. ) during a debugging32   session and offer detailed and useful information which the user can probe33   about the OpenMP portion of their code. */34extern int __kmp_debugging; /* Boolean whether currently debugging OpenMP RTL */35// Return number of threads specified by the debugger for given parallel region.36/* The ident field, which represents a source file location, is used to check if37   the debugger has changed the number of threads for the parallel region at38   source file location ident.  This way, specific parallel regions' number of39   threads can be changed at the debugger's request. */40int __kmp_omp_num_threads(ident_t const *ident);41 42#ifdef __cplusplus43} // extern "C"44#endif // __cplusplus45 46#endif // KMP_DEBUGGER_H47 48#endif // USE_DEBUGGER49