[Openmp-commits] [openmp] 2b5a99b - [OpenMP] Rename the `_OMP` namespace in the device runtime to `ompx`
Johannes Doerfert via Openmp-commits
openmp-commits at lists.llvm.org
Mon Dec 19 14:44:10 PST 2022
Author: Johannes Doerfert
Date: 2022-12-19T14:43:59-08:00
New Revision: 2b5a99b3d9bf3eb46cdf46bdde2678004dd6aa60
URL: https://github.com/llvm/llvm-project/commit/2b5a99b3d9bf3eb46cdf46bdde2678004dd6aa60
DIFF: https://github.com/llvm/llvm-project/commit/2b5a99b3d9bf3eb46cdf46bdde2678004dd6aa60.diff
LOG: [OpenMP] Rename the `_OMP` namespace in the device runtime to `ompx`
Differential Revision: https://reviews.llvm.org/D140334
Added:
Modified:
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
Removed:
################################################################################
diff --git a/openmp/libomptarget/DeviceRTL/include/Configuration.h b/openmp/libomptarget/DeviceRTL/include/Configuration.h
index 72514b82896f9..09bce1092f096 100644
--- a/openmp/libomptarget/DeviceRTL/include/Configuration.h
+++ b/openmp/libomptarget/DeviceRTL/include/Configuration.h
@@ -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
diff --git a/openmp/libomptarget/DeviceRTL/include/Mapping.h b/openmp/libomptarget/DeviceRTL/include/Mapping.h
index c9e07bab3c9a7..96314e4702f6d 100644
--- a/openmp/libomptarget/DeviceRTL/include/Mapping.h
+++ b/openmp/libomptarget/DeviceRTL/include/Mapping.h
@@ -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
diff --git a/openmp/libomptarget/DeviceRTL/include/State.h b/openmp/libomptarget/DeviceRTL/include/State.h
index b50ad4ea9cf8b..aac5a2275fcac 100644
--- a/openmp/libomptarget/DeviceRTL/include/State.h
+++ b/openmp/libomptarget/DeviceRTL/include/State.h
@@ -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
diff --git a/openmp/libomptarget/DeviceRTL/include/Synchronization.h b/openmp/libomptarget/DeviceRTL/include/Synchronization.h
index 0740a657f758e..4b8068f9e4267 100644
--- a/openmp/libomptarget/DeviceRTL/include/Synchronization.h
+++ b/openmp/libomptarget/DeviceRTL/include/Synchronization.h
@@ -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
diff --git a/openmp/libomptarget/DeviceRTL/include/Utils.h b/openmp/libomptarget/DeviceRTL/include/Utils.h
index 84ffea65805d6..94da763717e22 100644
--- a/openmp/libomptarget/DeviceRTL/include/Utils.h
+++ b/openmp/libomptarget/DeviceRTL/include/Utils.h
@@ -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
diff --git a/openmp/libomptarget/DeviceRTL/src/Configuration.cpp b/openmp/libomptarget/DeviceRTL/src/Configuration.cpp
index a41574cfc21d6..17613b027fd54 100644
--- a/openmp/libomptarget/DeviceRTL/src/Configuration.cpp
+++ b/openmp/libomptarget/DeviceRTL/src/Configuration.cpp
@@ -16,7 +16,7 @@
#include "State.h"
#include "Types.h"
-using namespace _OMP;
+using namespace ompx;
#pragma omp begin declare target device_type(nohost)
diff --git a/openmp/libomptarget/DeviceRTL/src/Debug.cpp b/openmp/libomptarget/DeviceRTL/src/Debug.cpp
index c3ed85ac1cb60..a1b289e830227 100644
--- a/openmp/libomptarget/DeviceRTL/src/Debug.cpp
+++ b/openmp/libomptarget/DeviceRTL/src/Debug.cpp
@@ -16,7 +16,7 @@
#include "Mapping.h"
#include "Types.h"
-using namespace _OMP;
+using namespace ompx;
#pragma omp begin declare target device_type(nohost)
diff --git a/openmp/libomptarget/DeviceRTL/src/Kernel.cpp b/openmp/libomptarget/DeviceRTL/src/Kernel.cpp
index 05bccdc532788..03c6aa4967d34 100644
--- a/openmp/libomptarget/DeviceRTL/src/Kernel.cpp
+++ b/openmp/libomptarget/DeviceRTL/src/Kernel.cpp
@@ -17,7 +17,7 @@
#include "Synchronization.h"
#include "Types.h"
-using namespace _OMP;
+using namespace ompx;
#pragma omp begin declare target device_type(nohost)
diff --git a/openmp/libomptarget/DeviceRTL/src/Mapping.cpp b/openmp/libomptarget/DeviceRTL/src/Mapping.cpp
index 512577c06f9eb..4a44c0b2cca5e 100644
--- a/openmp/libomptarget/DeviceRTL/src/Mapping.cpp
+++ b/openmp/libomptarget/DeviceRTL/src/Mapping.cpp
@@ -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.
diff --git a/openmp/libomptarget/DeviceRTL/src/Misc.cpp b/openmp/libomptarget/DeviceRTL/src/Misc.cpp
index 7166925db4362..f9b89e7db7b0d 100644
--- a/openmp/libomptarget/DeviceRTL/src/Misc.cpp
+++ b/openmp/libomptarget/DeviceRTL/src/Misc.cpp
@@ -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(); }
}
///}
diff --git a/openmp/libomptarget/DeviceRTL/src/Parallelism.cpp b/openmp/libomptarget/DeviceRTL/src/Parallelism.cpp
index 5ebf3687ac43f..1fec2e37b2ca5 100644
--- a/openmp/libomptarget/DeviceRTL/src/Parallelism.cpp
+++ b/openmp/libomptarget/DeviceRTL/src/Parallelism.cpp
@@ -40,7 +40,7 @@
#include "Types.h"
#include "Utils.h"
-using namespace _OMP;
+using namespace ompx;
#pragma omp begin declare target device_type(nohost)
diff --git a/openmp/libomptarget/DeviceRTL/src/Reduction.cpp b/openmp/libomptarget/DeviceRTL/src/Reduction.cpp
index 523a4e451d186..db401852360f5 100644
--- a/openmp/libomptarget/DeviceRTL/src/Reduction.cpp
+++ b/openmp/libomptarget/DeviceRTL/src/Reduction.cpp
@@ -18,7 +18,7 @@
#include "Types.h"
#include "Utils.h"
-using namespace _OMP;
+using namespace ompx;
namespace {
diff --git a/openmp/libomptarget/DeviceRTL/src/State.cpp b/openmp/libomptarget/DeviceRTL/src/State.cpp
index fafe22b6b8022..aaf81b92887b2 100644
--- a/openmp/libomptarget/DeviceRTL/src/State.cpp
+++ b/openmp/libomptarget/DeviceRTL/src/State.cpp
@@ -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 {
diff --git a/openmp/libomptarget/DeviceRTL/src/Synchronization.cpp b/openmp/libomptarget/DeviceRTL/src/Synchronization.cpp
index 4b16e2e02800f..2cfd0cceaa1ca 100644
--- a/openmp/libomptarget/DeviceRTL/src/Synchronization.cpp
+++ b/openmp/libomptarget/DeviceRTL/src/Synchronization.cpp
@@ -21,7 +21,7 @@
#pragma omp begin declare target device_type(nohost)
-using namespace _OMP;
+using namespace ompx;
namespace impl {
diff --git a/openmp/libomptarget/DeviceRTL/src/Tasking.cpp b/openmp/libomptarget/DeviceRTL/src/Tasking.cpp
index 06804e0d388cf..ad26b0248a7a1 100644
--- a/openmp/libomptarget/DeviceRTL/src/Tasking.cpp
+++ b/openmp/libomptarget/DeviceRTL/src/Tasking.cpp
@@ -18,7 +18,7 @@
#include "Types.h"
#include "Utils.h"
-using namespace _OMP;
+using namespace ompx;
#pragma omp begin declare target device_type(nohost)
diff --git a/openmp/libomptarget/DeviceRTL/src/Utils.cpp b/openmp/libomptarget/DeviceRTL/src/Utils.cpp
index e4920ab90450c..4565ebf36b8e6 100644
--- a/openmp/libomptarget/DeviceRTL/src/Utils.cpp
+++ b/openmp/libomptarget/DeviceRTL/src/Utils.cpp
@@ -17,7 +17,7 @@
#pragma omp begin declare target device_type(nohost)
-using namespace _OMP;
+using namespace ompx;
extern "C" __attribute__((weak)) int IsSPMDMode;
diff --git a/openmp/libomptarget/DeviceRTL/src/Workshare.cpp b/openmp/libomptarget/DeviceRTL/src/Workshare.cpp
index ddcb41ca7cf71..e37e59577af4e 100644
--- a/openmp/libomptarget/DeviceRTL/src/Workshare.cpp
+++ b/openmp/libomptarget/DeviceRTL/src/Workshare.cpp
@@ -20,7 +20,7 @@
#include "Types.h"
#include "Utils.h"
-using namespace _OMP;
+using namespace ompx;
// TODO:
struct DynamicScheduleTracker {
More information about the Openmp-commits
mailing list