[OpenMP] Rename the `_OMP` namespace in the device runtime to `ompx`
authorJohannes Doerfert <johannes@jdoerfert.de>
Mon, 19 Dec 2022 18:54:15 +0000 (10:54 -0800)
committerJohannes Doerfert <johannes@jdoerfert.de>
Mon, 19 Dec 2022 22:43:59 +0000 (14:43 -0800)
Differential Revision: https://reviews.llvm.org/D140334

17 files changed:
openmp/libomptarget/DeviceRTL/include/Configuration.h
openmp/libomptarget/DeviceRTL/include/Mapping.h
openmp/libomptarget/DeviceRTL/include/State.h
openmp/libomptarget/DeviceRTL/include/Synchronization.h
openmp/libomptarget/DeviceRTL/include/Utils.h
openmp/libomptarget/DeviceRTL/src/Configuration.cpp
openmp/libomptarget/DeviceRTL/src/Debug.cpp
openmp/libomptarget/DeviceRTL/src/Kernel.cpp
openmp/libomptarget/DeviceRTL/src/Mapping.cpp
openmp/libomptarget/DeviceRTL/src/Misc.cpp
openmp/libomptarget/DeviceRTL/src/Parallelism.cpp
openmp/libomptarget/DeviceRTL/src/Reduction.cpp
openmp/libomptarget/DeviceRTL/src/State.cpp
openmp/libomptarget/DeviceRTL/src/Synchronization.cpp
openmp/libomptarget/DeviceRTL/src/Tasking.cpp
openmp/libomptarget/DeviceRTL/src/Utils.cpp
openmp/libomptarget/DeviceRTL/src/Workshare.cpp

index 72514b8..09bce10 100644 (file)
@@ -15,7 +15,7 @@
 
 #include "Types.h"
 
-namespace _OMP {
+namespace ompx {
 namespace config {
 
 enum DebugKind : uint32_t {
@@ -49,6 +49,6 @@ bool mayUseThreadStates();
 bool mayUseNestedParallelism();
 
 } // namespace config
-} // namespace _OMP
+} // namespace ompx
 
 #endif
index c9e07ba..96314e4 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "Types.h"
 
-namespace _OMP {
+namespace ompx {
 
 namespace mapping {
 
@@ -97,6 +97,6 @@ uint32_t getNumberOfProcessorElements();
 
 } // namespace mapping
 
-} // namespace _OMP
+} // namespace ompx
 
 #endif
index b50ad4e..aac5a22 100644 (file)
@@ -19,7 +19,7 @@
 
 #pragma omp begin declare target device_type(nohost)
 
-namespace _OMP {
+namespace ompx {
 
 namespace memory {
 
@@ -364,7 +364,7 @@ inline state::Value<uint32_t, state::VK_RunSched> RunSched;
 
 } // namespace icv
 
-} // namespace _OMP
+} // namespace ompx
 
 #pragma omp end declare target
 
index 0740a65..4b8068f 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "Types.h"
 
-namespace _OMP {
+namespace ompx {
 
 namespace synchronize {
 
@@ -124,6 +124,6 @@ void system(atomic::OrderingTy Ordering);
 
 } // namespace fence
 
-} // namespace _OMP
+} // namespace ompx
 
 #endif
index 84ffea6..94da763 100644 (file)
@@ -16,7 +16,7 @@
 
 #pragma omp begin declare target device_type(nohost)
 
-namespace _OMP {
+namespace ompx {
 namespace utils {
 
 /// Return the value \p Var from thread Id \p SrcLane in the warp if the thread
@@ -89,7 +89,7 @@ __attribute__((loader_uninitialized)) static void *const UndefPtr;
 #define OMP_UNLIKELY(EXPR) __builtin_expect((bool)(EXPR), false)
 
 } // namespace utils
-} // namespace _OMP
+} // namespace ompx
 
 #pragma omp end declare target
 
index a41574c..17613b0 100644 (file)
@@ -16,7 +16,7 @@
 #include "State.h"
 #include "Types.h"
 
-using namespace _OMP;
+using namespace ompx;
 
 #pragma omp begin declare target device_type(nohost)
 
index c3ed85a..a1b289e 100644 (file)
@@ -16,7 +16,7 @@
 #include "Mapping.h"
 #include "Types.h"
 
-using namespace _OMP;
+using namespace ompx;
 
 #pragma omp begin declare target device_type(nohost)
 
index 05bccdc..03c6aa4 100644 (file)
@@ -17,7 +17,7 @@
 #include "Synchronization.h"
 #include "Types.h"
 
-using namespace _OMP;
+using namespace ompx;
 
 #pragma omp begin declare target device_type(nohost)
 
index 512577c..4a44c0b 100644 (file)
@@ -19,9 +19,9 @@
 
 #include "llvm/Frontend/OpenMP/OMPGridValues.h"
 
-using namespace _OMP;
+using namespace ompx;
 
-namespace _OMP {
+namespace ompx {
 namespace impl {
 
 // Forward declarations defined to be defined for AMDGCN and NVPTX.
@@ -154,7 +154,7 @@ uint32_t getNumberOfWarpsInBlock() {
 uint32_t getWarpSize() { return getGridValue().GV_Warp_Size; }
 
 } // namespace impl
-} // namespace _OMP
+} // namespace ompx
 
 /// We have to be deliberate about the distinction of `mapping::` and `impl::`
 /// below to avoid repeating assumptions or including irrelevant ones.
index 7166925..f9b89e7 100644 (file)
@@ -15,7 +15,7 @@
 
 #pragma omp begin declare target device_type(nohost)
 
-namespace _OMP {
+namespace ompx {
 namespace impl {
 
 double getWTick();
@@ -59,7 +59,7 @@ double getWTime() {
 #pragma omp end declare variant
 
 } // namespace impl
-} // namespace _OMP
+} // namespace ompx
 
 /// Interfaces
 ///
@@ -76,9 +76,9 @@ int32_t __kmpc_cancel(IdentTy *, int32_t, int32_t) {
   return 0;
 }
 
-double omp_get_wtick(void) { return _OMP::impl::getWTick(); }
+double omp_get_wtick(void) { return ompx::impl::getWTick(); }
 
-double omp_get_wtime(void) { return _OMP::impl::getWTime(); }
+double omp_get_wtime(void) { return ompx::impl::getWTime(); }
 }
 
 ///}
index 5ebf368..1fec2e3 100644 (file)
@@ -40,7 +40,7 @@
 #include "Types.h"
 #include "Utils.h"
 
-using namespace _OMP;
+using namespace ompx;
 
 #pragma omp begin declare target device_type(nohost)
 
index 523a4e4..db40185 100644 (file)
@@ -18,7 +18,7 @@
 #include "Types.h"
 #include "Utils.h"
 
-using namespace _OMP;
+using namespace ompx;
 
 namespace {
 
index fafe22b..aaf81b9 100644 (file)
@@ -17,7 +17,7 @@
 #include "Types.h"
 #include "Utils.h"
 
-using namespace _OMP;
+using namespace ompx;
 
 #pragma omp begin declare target device_type(nohost)
 
@@ -221,8 +221,8 @@ void state::TeamStateTy::assertEqual(TeamStateTy &Other) const {
   ASSERT(HasThreadState == Other.HasThreadState);
 }
 
-state::TeamStateTy SHARED(_OMP::state::TeamState);
-state::ThreadStateTy **SHARED(_OMP::state::ThreadStates);
+state::TeamStateTy SHARED(ompx::state::TeamState);
+state::ThreadStateTy **SHARED(ompx::state::ThreadStates);
 
 namespace {
 
index 4b16e2e..2cfd0cc 100644 (file)
@@ -21,7 +21,7 @@
 
 #pragma omp begin declare target device_type(nohost)
 
-using namespace _OMP;
+using namespace ompx;
 
 namespace impl {
 
index 06804e0..ad26b02 100644 (file)
@@ -18,7 +18,7 @@
 #include "Types.h"
 #include "Utils.h"
 
-using namespace _OMP;
+using namespace ompx;
 
 #pragma omp begin declare target device_type(nohost)
 
index e4920ab..4565ebf 100644 (file)
@@ -17,7 +17,7 @@
 
 #pragma omp begin declare target device_type(nohost)
 
-using namespace _OMP;
+using namespace ompx;
 
 extern "C" __attribute__((weak)) int IsSPMDMode;
 
index ddcb41c..e37e595 100644 (file)
@@ -20,7 +20,7 @@
 #include "Types.h"
 #include "Utils.h"
 
-using namespace _OMP;
+using namespace ompx;
 
 // TODO:
 struct DynamicScheduleTracker {