[Openmp-commits] [llvm] [openmp] [offload][ompt] Added lookup function for device callbacks (PR #110007)
Jan André Reuter via Openmp-commits
openmp-commits at lists.llvm.org
Thu Sep 26 04:45:26 PDT 2024
================
@@ -27,14 +27,77 @@
#undef DEBUG_PREFIX
#define DEBUG_PREFIX "OMPT"
+using namespace llvm::omp::target::ompt;
+
// Define OMPT callback functions (bound to actual callbacks later on)
#define defineOmptCallback(Name, Type, Code) \
Name##_t llvm::omp::target::ompt::Name##_fn = nullptr;
FOREACH_OMPT_NOEMI_EVENT(defineOmptCallback)
FOREACH_OMPT_EMI_EVENT(defineOmptCallback)
#undef defineOmptCallback
-using namespace llvm::omp::target::ompt;
+int ompt_get_device_num_procs(ompt_device_t *device) { return 0; }
+
+ompt_device_time_t ompt_get_device_time(ompt_device_t *device) { return 0; }
----------------
Thyre wrote:
Maybe use `ompt_time_none` instead? See 19.4.4.6 in the OpenMP 5.2 spec.
https://github.com/llvm/llvm-project/pull/110007
More information about the Openmp-commits
mailing list