From cdbb942c9ac616ecaccdec39a861eacda76e7763 Mon Sep 17 00:00:00 2001 From: "Madsen, Jonathan" Date: Sat, 22 Mar 2025 22:30:55 -0500 Subject: [PATCH] Remove rocprofiler-sdk forward decls from public header (#8) Co-authored-by: Jonathan R. Madsen [ROCm/rocprofiler-register commit: 9338b9abc330f7f17f6f6b20f0bef21fd1165803] --- .../rocprofiler-register.h | 21 ------------------- .../rocprofiler_register.cpp | 21 +++++++++++++++++++ .../tests/generic-tool/generic-tool.cpp | 4 ++-- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/projects/rocprofiler-register/source/include/rocprofiler-register/rocprofiler-register.h b/projects/rocprofiler-register/source/include/rocprofiler-register/rocprofiler-register.h index f6751a4f59..52872cfb00 100644 --- a/projects/rocprofiler-register/source/include/rocprofiler-register/rocprofiler-register.h +++ b/projects/rocprofiler-register/source/include/rocprofiler-register/rocprofiler-register.h @@ -29,27 +29,6 @@ extern "C" { #endif -typedef struct -{ - const char* name; ///< clients should set this value for debugging - const uint32_t handle; ///< internal handle -} rocprofiler_client_id_t; - -typedef void (*rocprofiler_client_finalize_t)(rocprofiler_client_id_t); - -typedef int (*rocprofiler_tool_initialize_t)(rocprofiler_client_finalize_t finalize_func, - void* tool_data); - -typedef void (*rocprofiler_tool_finalize_t)(void* tool_data); - -typedef struct -{ - size_t size; ///< in case of future extensions - rocprofiler_tool_initialize_t initialize; ///< context creation - rocprofiler_tool_finalize_t finalize; ///< cleanup - void* tool_data; ///< data to provide to init and fini callbacks -} rocprofiler_tool_configure_result_t; - typedef uint32_t (*rocprofiler_register_import_func_t)(void); typedef struct diff --git a/projects/rocprofiler-register/source/lib/rocprofiler-register/rocprofiler_register.cpp b/projects/rocprofiler-register/source/lib/rocprofiler-register/rocprofiler_register.cpp index b65985eb78..df9631e08a 100644 --- a/projects/rocprofiler-register/source/lib/rocprofiler-register/rocprofiler_register.cpp +++ b/projects/rocprofiler-register/source/lib/rocprofiler-register/rocprofiler_register.cpp @@ -56,6 +56,27 @@ extern "C" { #pragma weak rocprofiler_register_import_roctx #pragma weak rocprofiler_register_import_roctx_static +typedef struct rocprofiler_client_id_t +{ + const char* name; ///< clients should set this value for debugging + const uint32_t handle; ///< internal handle +} rocprofiler_client_id_t; + +typedef void (*rocprofiler_client_finalize_t)(rocprofiler_client_id_t); + +typedef int (*rocprofiler_tool_initialize_t)(rocprofiler_client_finalize_t finalize_func, + void* tool_data); + +typedef void (*rocprofiler_tool_finalize_t)(void* tool_data); + +typedef struct rocprofiler_tool_configure_result_t +{ + size_t size; ///< in case of future extensions + rocprofiler_tool_initialize_t initialize; ///< context creation + rocprofiler_tool_finalize_t finalize; ///< cleanup + void* tool_data; ///< data to provide to init and fini callbacks +} rocprofiler_tool_configure_result_t; + extern rocprofiler_tool_configure_result_t* rocprofiler_configure(uint32_t, const char*, uint32_t, rocprofiler_client_id_t*); diff --git a/projects/rocprofiler-register/tests/generic-tool/generic-tool.cpp b/projects/rocprofiler-register/tests/generic-tool/generic-tool.cpp index 3ee4c7800d..d9e2bd5c60 100644 --- a/projects/rocprofiler-register/tests/generic-tool/generic-tool.cpp +++ b/projects/rocprofiler-register/tests/generic-tool/generic-tool.cpp @@ -5,7 +5,7 @@ #include extern "C" { -typedef struct +typedef struct rocprofiler_client_id_t { const char* name; ///< clients should set this value for debugging const uint32_t handle; ///< internal handle @@ -18,7 +18,7 @@ typedef int (*rocprofiler_tool_initialize_t)(rocprofiler_client_finalize_t final typedef void (*rocprofiler_tool_finalize_t)(void* tool_data); -typedef struct +typedef struct rocprofiler_tool_configure_result_t { size_t size; ///< in case of future extensions rocprofiler_tool_initialize_t initialize; ///< context creation