[Openmp-commits] [openmp] [OpenMP] Add ompTest library to OpenMP (PR #147381)

Jan Patrick Lehr via Openmp-commits openmp-commits at lists.llvm.org
Thu Jul 31 02:51:01 PDT 2025


================
@@ -0,0 +1,128 @@
+//===- InternalEventCommon.h - Common internal event basics -----*- C++ -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+///
+/// \file
+/// Provides event types, and class/operator declaration macros.
+///
+//===----------------------------------------------------------------------===//
+
+#ifndef OPENMP_TOOLS_OMPTEST_INCLUDE_INTERNALEVENTCOMMON_H
+#define OPENMP_TOOLS_OMPTEST_INCLUDE_INTERNALEVENTCOMMON_H
+
+#include "omp-tools.h"
+
+#include <cassert>
+#include <string>
+
+namespace omptest {
+
+namespace internal {
+/// Enum values are used for comparison of observed and asserted events
+/// List is based on OpenMP 5.2 specification, table 19.2 (page 447)
+enum class EventTy {
+  None,                     // not part of OpenMP spec, used for implementation
+  AssertionSyncPoint,       // not part of OpenMP spec, used for implementation
+  AssertionSuspend,         // not part of OpenMP spec, used for implementation
+  BufferRecord,             // not part of OpenMP spec, used for implementation
+  BufferRecordDeallocation, // not part of OpenMP spec, used for implementation
+  ThreadBegin,
+  ThreadEnd,
+  ParallelBegin,
+  ParallelEnd,
+  Work,
+  Dispatch,
+  TaskCreate,     // TODO: Implement
+  Dependences,    // TODO: Implement
+  TaskDependence, // TODO: Implement
+  TaskSchedule,   // TODO: Implement
+  ImplicitTask,   // TODO: Implement
+  Masked,         // TODO: Implement
+  SyncRegion,
+  MutexAcquire, // TODO: Implement
+  Mutex,        // TODO: Implement
+  NestLock,     // TODO: Implement
+  Flush,        // TODO: Implement
+  Cancel,       // TODO: Implement
+  DeviceInitialize,
+  DeviceFinalize,
+  DeviceLoad,
+  DeviceUnload,
+  BufferRequest,
+  BufferComplete,
+  TargetDataOp,
+  TargetDataOpEmi,
+  Target,
+  TargetEmi,
+  TargetSubmit,
+  TargetSubmitEmi,
+  ControlTool
+};
+
+struct InternalEvent {
+  EventTy Type;
+  EventTy getType() const { return Type; }
----------------
jplehr wrote:

I'm ok with that

https://github.com/llvm/llvm-project/pull/147381


More information about the Openmp-commits mailing list