1 //===--- Configuration.h - OpenMP device configuration interface -- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // API to query the global (constant) device environment.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef OMPTARGET_CONFIGURATION_H
14 #define OMPTARGET_CONFIGURATION_H
15 
16 #include "Types.h"
17 
18 namespace _OMP {
19 namespace config {
20 
21 enum DebugLevel : int32_t { Assertion };
22 
23 /// Return the number of devices in the system, same number as returned on the
24 /// host by omp_get_num_devices.
25 uint32_t getNumDevices();
26 
27 /// Return the user choosen debug level.
28 int32_t getDebugLevel();
29 
30 bool isDebugMode(DebugLevel Level);
31 
32 } // namespace config
33 } // namespace _OMP
34 
35 #endif
36