From 2a108b79a09944a734b1ab44dc4cd14cfbed6d52 Mon Sep 17 00:00:00 2001 From: Kevin Huck Date: Mon, 21 Oct 2024 06:58:53 -0700 Subject: [PATCH] Minor fixes to opencl from testing on apple --- src/apex/apex_opencl.cpp | 17 +++++++++++++++++ src/apex/apex_types.h | 2 +- src/apex/trace_event_listener.cpp | 6 +++++- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/apex/apex_opencl.cpp b/src/apex/apex_opencl.cpp index 278b4aee..381a8228 100644 --- a/src/apex/apex_opencl.cpp +++ b/src/apex/apex_opencl.cpp @@ -14,7 +14,24 @@ * limitations under the License. ******************************************************************************/ +#ifdef __APPLE__ +#include +#ifndef CL_API_PREFIX__VERSION_1_1_DEPRECATED +#define CL_API_PREFIX__VERSION_1_1_DEPRECATED +#endif +#ifndef CL_API_SUFFIX__VERSION_1_1_DEPRECATED +#define CL_API_SUFFIX__VERSION_1_1_DEPRECATED +#endif +#ifndef CL_API_PREFIX__VERSION_1_2_DEPRECATED +#define CL_API_PREFIX__VERSION_1_2_DEPRECATED +#endif +#ifndef CL_API_SUFFIX__VERSION_1_2_DEPRECATED +#define CL_API_SUFFIX__VERSION_1_2_DEPRECATED +#endif +#else #include +#endif + #include #ifndef _GNU_SOURCE #define _GNU_SOURCE diff --git a/src/apex/apex_types.h b/src/apex/apex_types.h index 9375d608..64d77bdf 100644 --- a/src/apex/apex_types.h +++ b/src/apex/apex_types.h @@ -189,7 +189,7 @@ typedef enum _profile_type { */ typedef enum _argument_type { APEX_LONG_INTEGER_TYPE = 0, - APEX_UNSIGNED_LONG_INTEGER_TYPE = 0, + APEX_UNSIGNED_LONG_INTEGER_TYPE, APEX_DOUBLE_TYPE, APEX_STRING_TYPE, APEX_POINTER_TYPE, diff --git a/src/apex/trace_event_listener.cpp b/src/apex/trace_event_listener.cpp index bbad4ab2..ddf361f4 100644 --- a/src/apex/trace_event_listener.cpp +++ b/src/apex/trace_event_listener.cpp @@ -261,8 +261,12 @@ inline void trace_event_listener::_common_stop(std::shared_ptr &p) { for (size_t a = 0 ; a < p->tt_ptr->arguments.size() ; a++) { auto& arg = p->tt_ptr->arguments[a]; switch (p->tt_ptr->argument_types[a]) { + case APEX_UNSIGNED_LONG_INTEGER_TYPE: { + ss << ",\"" << p->tt_ptr->argument_names[a] << "\":\"" << std::get(arg) << "\""; + break; + } case APEX_LONG_INTEGER_TYPE: { - ss << ",\"" << p->tt_ptr->argument_names[a] << "\":\"" << std::get(arg) << "\""; + ss << ",\"" << p->tt_ptr->argument_names[a] << "\":\"" << std::get(arg) << "\""; break; } case APEX_DOUBLE_TYPE: {