diff --git a/cmake/helpers.cmake b/cmake/helpers.cmake index d1e1ae25e3..dcd0d65cef 100644 --- a/cmake/helpers.cmake +++ b/cmake/helpers.cmake @@ -64,6 +64,7 @@ function(add_ur_target_compile_options name) -Wall -Wpedantic -Wempty-body + -Wunused-parameter $<$:-fdiagnostics-color=always> $<$:-fcolor-diagnostics> ) diff --git a/examples/hello_world/hello_world.cpp b/examples/hello_world/hello_world.cpp index 11e5374390..a36b863a3a 100644 --- a/examples/hello_world/hello_world.cpp +++ b/examples/hello_world/hello_world.cpp @@ -15,7 +15,7 @@ #include "ur_api.h" ////////////////////////////////////////////////////////////////////////// -int main(int argc, char *argv[]) { +int main([[maybe_unused]] int argc, [[maybe_unused]] char *argv[]) { ur_result_t status; // Initialize the platform diff --git a/scripts/templates/params.hpp.mako b/scripts/templates/params.hpp.mako index de971c481f..3c13ac11ab 100644 --- a/scripts/templates/params.hpp.mako +++ b/scripts/templates/params.hpp.mako @@ -144,7 +144,7 @@ template inline void serializeTagged(std::ostream &os, const void * %if re.match(r"enum", obj['type']): inline std::ostream &operator<<(std::ostream &os, enum ${th.make_enum_name(n, tags, obj)} value); %elif re.match(r"struct", obj['type']): - inline std::ostream &operator<<(std::ostream &os, const ${obj['type']} ${th.make_type_name(n, tags, obj)} params); + inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const ${obj['type']} ${th.make_type_name(n, tags, obj)} params); %endif %endfor # obj in spec['objects'] %endfor @@ -353,7 +353,7 @@ for item in obj['members']: %for tbl in th.get_pfncbtables(specs, meta, n, tags): %for obj in tbl['functions']: -inline std::ostream &operator<<(std::ostream &os, const struct ${th.make_pfncb_param_type(n, tags, obj)} *params) { +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ${th.make_pfncb_param_type(n, tags, obj)} *params) { <% params_dict = dict() for item in obj['params']: diff --git a/source/adapters/null/ur_null.cpp b/source/adapters/null/ur_null.cpp index 18c8d89ef5..7128a452b2 100644 --- a/source/adapters/null/ur_null.cpp +++ b/source/adapters/null/ur_null.cpp @@ -38,21 +38,21 @@ context_t::context_t() { return UR_RESULT_SUCCESS; }; ////////////////////////////////////////////////////////////////////////// - urDdiTable.Platform.pfnGet = [](ur_adapter_handle_t *phAdapters, - uint32_t NumAdapters, uint32_t NumEntries, - ur_platform_handle_t *phPlatforms, - uint32_t *pNumPlatforms) { - if (phPlatforms != nullptr && NumEntries != 1) { - return UR_RESULT_ERROR_INVALID_SIZE; - } - if (pNumPlatforms != nullptr) { - *pNumPlatforms = 1; - } - if (nullptr != phPlatforms) { - *reinterpret_cast(phPlatforms) = d_context.get(); - } - return UR_RESULT_SUCCESS; - }; + urDdiTable.Platform.pfnGet = + []([[maybe_unused]] ur_adapter_handle_t *phAdapters, + [[maybe_unused]] uint32_t NumAdapters, uint32_t NumEntries, + ur_platform_handle_t *phPlatforms, uint32_t *pNumPlatforms) { + if (phPlatforms != nullptr && NumEntries != 1) { + return UR_RESULT_ERROR_INVALID_SIZE; + } + if (pNumPlatforms != nullptr) { + *pNumPlatforms = 1; + } + if (nullptr != phPlatforms) { + *reinterpret_cast(phPlatforms) = d_context.get(); + } + return UR_RESULT_SUCCESS; + }; ////////////////////////////////////////////////////////////////////////// urDdiTable.Platform.pfnGetApiVersion = [](ur_platform_handle_t, @@ -122,8 +122,9 @@ context_t::context_t() { ////////////////////////////////////////////////////////////////////////// urDdiTable.Device.pfnGetInfo = - [](ur_device_handle_t hDevice, ur_device_info_t infoType, - size_t propSize, void *pDeviceInfo, size_t *pPropSizeRet) { + []([[maybe_unused]] ur_device_handle_t hDevice, + ur_device_info_t infoType, size_t propSize, void *pDeviceInfo, + size_t *pPropSizeRet) { switch (infoType) { case UR_DEVICE_INFO_TYPE: if (pDeviceInfo && propSize != sizeof(ur_device_type_t)) { diff --git a/source/common/unified_malloc_framework/src/memory_pool_default.c b/source/common/unified_malloc_framework/src/memory_pool_default.c index be7c4c9c57..b997b090cd 100644 --- a/source/common/unified_malloc_framework/src/memory_pool_default.c +++ b/source/common/unified_malloc_framework/src/memory_pool_default.c @@ -69,9 +69,15 @@ void umfPoolDestroy(umf_memory_pool_handle_t hPool) { free(hPool); } -enum umf_result_t umfFree(void *ptr) { return UMF_RESULT_ERROR_NOT_SUPPORTED; } +enum umf_result_t umfFree(void *ptr) { + (void)ptr; + return UMF_RESULT_ERROR_NOT_SUPPORTED; +} -umf_memory_pool_handle_t umfPoolByPtr(const void *ptr) { return NULL; } +umf_memory_pool_handle_t umfPoolByPtr(const void *ptr) { + (void)ptr; + return NULL; +} enum umf_result_t umfPoolGetMemoryProviders(umf_memory_pool_handle_t hPool, size_t numProviders, diff --git a/source/common/unified_malloc_framework/src/memory_tracker_windows.cpp b/source/common/unified_malloc_framework/src/memory_tracker_windows.cpp index 74cfec7e42..09c483b7eb 100644 --- a/source/common/unified_malloc_framework/src/memory_tracker_windows.cpp +++ b/source/common/unified_malloc_framework/src/memory_tracker_windows.cpp @@ -15,7 +15,8 @@ #if defined(UMF_SHARED_LIBRARY) critnib *TRACKER = NULL; -BOOL APIENTRY DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { +BOOL APIENTRY DllMain([[maybe_unused]] HINSTANCE hinstDLL, DWORD fdwReason, + LPVOID lpvReserved) { if (fdwReason == DLL_PROCESS_DETACH) { critnib_delete(TRACKER); } else if (fdwReason == DLL_PROCESS_ATTACH) { diff --git a/source/common/ur_params.hpp b/source/common/ur_params.hpp index 04a4636444..569a83b407 100644 --- a/source/common/ur_params.hpp +++ b/source/common/ur_params.hpp @@ -224,14 +224,18 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_function_t value); inline std::ostream &operator<<(std::ostream &os, enum ur_structure_type_t value); inline std::ostream &operator<<(std::ostream &os, enum ur_result_t value); -inline std::ostream &operator<<(std::ostream &os, - const struct ur_base_properties_t params); -inline std::ostream &operator<<(std::ostream &os, - const struct ur_base_desc_t params); -inline std::ostream &operator<<(std::ostream &os, - const struct ur_rect_offset_t params); -inline std::ostream &operator<<(std::ostream &os, - const struct ur_rect_region_t params); +inline std::ostream & +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_base_properties_t params); +inline std::ostream & +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_base_desc_t params); +inline std::ostream & +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_rect_offset_t params); +inline std::ostream & +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_rect_region_t params); inline std::ostream &operator<<(std::ostream &os, enum ur_device_init_flag_t value); inline std::ostream &operator<<(std::ostream &os, @@ -242,13 +246,14 @@ inline std::ostream &operator<<(std::ostream &os, inline std::ostream &operator<<(std::ostream &os, enum ur_platform_info_t value); inline std::ostream &operator<<(std::ostream &os, enum ur_api_version_t value); -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_platform_native_properties_t params); +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_platform_native_properties_t params); inline std::ostream &operator<<(std::ostream &os, enum ur_platform_backend_t value); -inline std::ostream &operator<<(std::ostream &os, - const struct ur_device_binary_t params); +inline std::ostream & +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_device_binary_t params); inline std::ostream &operator<<(std::ostream &os, enum ur_device_type_t value); inline std::ostream &operator<<(std::ostream &os, enum ur_device_info_t value); inline std::ostream &operator<<(std::ostream &os, @@ -257,10 +262,10 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_device_partition_t value); inline std::ostream & operator<<(std::ostream &os, - const struct ur_device_partition_property_t params); -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_device_partition_properties_t params); + [[maybe_unused]] const struct ur_device_partition_property_t params); +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_device_partition_properties_t params); inline std::ostream &operator<<(std::ostream &os, enum ur_device_fp_capability_flag_t value); inline std::ostream &operator<<(std::ostream &os, @@ -270,7 +275,8 @@ inline std::ostream &operator<<(std::ostream &os, inline std::ostream &operator<<(std::ostream &os, enum ur_device_exec_capability_flag_t value); inline std::ostream & -operator<<(std::ostream &os, const struct ur_device_native_properties_t params); +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_device_native_properties_t params); inline std::ostream &operator<<(std::ostream &os, enum ur_memory_order_capability_flag_t value); inline std::ostream &operator<<(std::ostream &os, @@ -278,12 +284,13 @@ inline std::ostream &operator<<(std::ostream &os, inline std::ostream & operator<<(std::ostream &os, enum ur_device_usm_access_capability_flag_t value); inline std::ostream &operator<<(std::ostream &os, enum ur_context_flag_t value); -inline std::ostream &operator<<(std::ostream &os, - const struct ur_context_properties_t params); +inline std::ostream & +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_context_properties_t params); inline std::ostream &operator<<(std::ostream &os, enum ur_context_info_t value); inline std::ostream & operator<<(std::ostream &os, - const struct ur_context_native_properties_t params); + [[maybe_unused]] const struct ur_context_native_properties_t params); inline std::ostream &operator<<(std::ostream &os, enum ur_mem_flag_t value); inline std::ostream &operator<<(std::ostream &os, enum ur_mem_type_t value); inline std::ostream &operator<<(std::ostream &os, enum ur_mem_info_t value); @@ -292,34 +299,40 @@ inline std::ostream &operator<<(std::ostream &os, inline std::ostream &operator<<(std::ostream &os, enum ur_image_channel_type_t value); inline std::ostream &operator<<(std::ostream &os, enum ur_image_info_t value); -inline std::ostream &operator<<(std::ostream &os, - const struct ur_image_format_t params); -inline std::ostream &operator<<(std::ostream &os, - const struct ur_image_desc_t params); -inline std::ostream &operator<<(std::ostream &os, - const struct ur_buffer_properties_t params); inline std::ostream & operator<<(std::ostream &os, - const struct ur_buffer_channel_properties_t params); + [[maybe_unused]] const struct ur_image_format_t params); inline std::ostream & operator<<(std::ostream &os, - const struct ur_buffer_alloc_location_properties_t params); -inline std::ostream &operator<<(std::ostream &os, - const struct ur_buffer_region_t params); + [[maybe_unused]] const struct ur_image_desc_t params); +inline std::ostream & +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_buffer_properties_t params); +inline std::ostream & +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_buffer_channel_properties_t params); +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_buffer_alloc_location_properties_t params); +inline std::ostream & +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_buffer_region_t params); inline std::ostream &operator<<(std::ostream &os, enum ur_buffer_create_type_t value); -inline std::ostream &operator<<(std::ostream &os, - const struct ur_mem_native_properties_t params); +inline std::ostream & +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_mem_native_properties_t params); inline std::ostream &operator<<(std::ostream &os, enum ur_sampler_filter_mode_t value); inline std::ostream &operator<<(std::ostream &os, enum ur_sampler_addressing_mode_t value); inline std::ostream &operator<<(std::ostream &os, enum ur_sampler_info_t value); -inline std::ostream &operator<<(std::ostream &os, - const struct ur_sampler_desc_t params); inline std::ostream & operator<<(std::ostream &os, - const struct ur_sampler_native_properties_t params); + [[maybe_unused]] const struct ur_sampler_desc_t params); +inline std::ostream & +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_sampler_native_properties_t params); inline std::ostream &operator<<(std::ostream &os, enum ur_usm_host_mem_flag_t value); inline std::ostream &operator<<(std::ostream &os, @@ -331,16 +344,21 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_usm_alloc_info_t value); inline std::ostream &operator<<(std::ostream &os, enum ur_usm_advice_flag_t value); -inline std::ostream &operator<<(std::ostream &os, - const struct ur_usm_desc_t params); -inline std::ostream &operator<<(std::ostream &os, - const struct ur_usm_host_desc_t params); -inline std::ostream &operator<<(std::ostream &os, - const struct ur_usm_device_desc_t params); -inline std::ostream &operator<<(std::ostream &os, - const struct ur_usm_pool_desc_t params); -inline std::ostream &operator<<(std::ostream &os, - const struct ur_usm_pool_limits_desc_t params); +inline std::ostream & +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_usm_desc_t params); +inline std::ostream & +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_usm_host_desc_t params); +inline std::ostream & +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_usm_device_desc_t params); +inline std::ostream & +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_usm_pool_desc_t params); +inline std::ostream & +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_usm_pool_limits_desc_t params); inline std::ostream &operator<<(std::ostream &os, enum ur_usm_pool_info_t value); inline std::ostream &operator<<(std::ostream &os, @@ -352,13 +370,16 @@ inline std::ostream &operator<<(std::ostream &os, inline std::ostream &operator<<(std::ostream &os, enum ur_physical_mem_flag_t value); inline std::ostream & -operator<<(std::ostream &os, const struct ur_physical_mem_properties_t params); +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_physical_mem_properties_t params); inline std::ostream &operator<<(std::ostream &os, enum ur_program_metadata_type_t value); -inline std::ostream &operator<<(std::ostream &os, - const struct ur_program_metadata_t params); -inline std::ostream &operator<<(std::ostream &os, - const struct ur_program_properties_t params); +inline std::ostream & +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_program_metadata_t params); +inline std::ostream & +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_program_properties_t params); inline std::ostream &operator<<(std::ostream &os, enum ur_program_info_t value); inline std::ostream &operator<<(std::ostream &os, enum ur_program_build_status_t value); @@ -366,18 +387,18 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_program_binary_type_t value); inline std::ostream &operator<<(std::ostream &os, enum ur_program_build_info_t value); +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_specialization_constant_info_t params); inline std::ostream & operator<<(std::ostream &os, - const struct ur_specialization_constant_info_t params); -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_program_native_properties_t params); -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_kernel_arg_value_properties_t params); -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_kernel_arg_local_properties_t params); + [[maybe_unused]] const struct ur_program_native_properties_t params); +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_kernel_arg_value_properties_t params); +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_kernel_arg_local_properties_t params); inline std::ostream &operator<<(std::ostream &os, enum ur_kernel_info_t value); inline std::ostream &operator<<(std::ostream &os, enum ur_kernel_group_info_t value); @@ -387,37 +408,43 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_kernel_cache_config_t value); inline std::ostream &operator<<(std::ostream &os, enum ur_kernel_exec_info_t value); +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_kernel_arg_pointer_properties_t params); +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_kernel_exec_info_properties_t params); +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_kernel_arg_sampler_properties_t params); +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_kernel_arg_mem_obj_properties_t params); inline std::ostream & operator<<(std::ostream &os, - const struct ur_kernel_arg_pointer_properties_t params); + [[maybe_unused]] const struct ur_kernel_native_properties_t params); +inline std::ostream &operator<<(std::ostream &os, enum ur_queue_info_t value); +inline std::ostream &operator<<(std::ostream &os, enum ur_queue_flag_t value); inline std::ostream & operator<<(std::ostream &os, - const struct ur_kernel_exec_info_properties_t params); + [[maybe_unused]] const struct ur_queue_properties_t params); inline std::ostream & operator<<(std::ostream &os, - const struct ur_kernel_arg_sampler_properties_t params); + [[maybe_unused]] const struct ur_queue_index_properties_t params); inline std::ostream & operator<<(std::ostream &os, - const struct ur_kernel_arg_mem_obj_properties_t params); -inline std::ostream & -operator<<(std::ostream &os, const struct ur_kernel_native_properties_t params); -inline std::ostream &operator<<(std::ostream &os, enum ur_queue_info_t value); -inline std::ostream &operator<<(std::ostream &os, enum ur_queue_flag_t value); -inline std::ostream &operator<<(std::ostream &os, - const struct ur_queue_properties_t params); -inline std::ostream & -operator<<(std::ostream &os, const struct ur_queue_index_properties_t params); -inline std::ostream &operator<<(std::ostream &os, - const struct ur_queue_native_desc_t params); + [[maybe_unused]] const struct ur_queue_native_desc_t params); inline std::ostream & -operator<<(std::ostream &os, const struct ur_queue_native_properties_t params); +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_queue_native_properties_t params); inline std::ostream &operator<<(std::ostream &os, enum ur_command_t value); inline std::ostream &operator<<(std::ostream &os, enum ur_event_status_t value); inline std::ostream &operator<<(std::ostream &os, enum ur_event_info_t value); inline std::ostream &operator<<(std::ostream &os, enum ur_profiling_info_t value); inline std::ostream & -operator<<(std::ostream &os, const struct ur_event_native_properties_t params); +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_event_native_properties_t params); inline std::ostream &operator<<(std::ostream &os, enum ur_execution_info_t value); inline std::ostream &operator<<(std::ostream &os, enum ur_map_flag_t value); @@ -425,23 +452,27 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_usm_migration_flag_t value); inline std::ostream &operator<<(std::ostream &os, enum ur_exp_image_copy_flag_t value); -inline std::ostream &operator<<(std::ostream &os, - const struct ur_exp_file_descriptor_t params); -inline std::ostream &operator<<(std::ostream &os, - const struct ur_exp_win32_handle_t params); inline std::ostream & operator<<(std::ostream &os, - const struct ur_exp_sampler_mip_properties_t params); -inline std::ostream &operator<<(std::ostream &os, - const struct ur_exp_interop_mem_desc_t params); + [[maybe_unused]] const struct ur_exp_file_descriptor_t params); inline std::ostream & operator<<(std::ostream &os, - const struct ur_exp_interop_semaphore_desc_t params); + [[maybe_unused]] const struct ur_exp_win32_handle_t params); +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_exp_sampler_mip_properties_t params); inline std::ostream & operator<<(std::ostream &os, - const struct ur_exp_layered_image_properties_t params); + [[maybe_unused]] const struct ur_exp_interop_mem_desc_t params); +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_exp_interop_semaphore_desc_t params); +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_exp_layered_image_properties_t params); inline std::ostream & -operator<<(std::ostream &os, const struct ur_exp_command_buffer_desc_t params); +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_exp_command_buffer_desc_t params); inline std::ostream &operator<<(std::ostream &os, enum ur_exp_peer_info_t value); @@ -10004,8 +10035,9 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } } // namespace ur_params -inline std::ostream &operator<<(std::ostream &os, - const struct ur_adapter_get_params_t *params) { +inline std::ostream & +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_adapter_get_params_t *params) { os << ".NumEntries = "; @@ -10032,7 +10064,8 @@ inline std::ostream &operator<<(std::ostream &os, } inline std::ostream & -operator<<(std::ostream &os, const struct ur_adapter_release_params_t *params) { +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_adapter_release_params_t *params) { os << ".hAdapter = "; @@ -10042,7 +10075,8 @@ operator<<(std::ostream &os, const struct ur_adapter_release_params_t *params) { } inline std::ostream & -operator<<(std::ostream &os, const struct ur_adapter_retain_params_t *params) { +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_adapter_retain_params_t *params) { os << ".hAdapter = "; @@ -10051,9 +10085,9 @@ operator<<(std::ostream &os, const struct ur_adapter_retain_params_t *params) { return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_adapter_get_last_error_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_adapter_get_last_error_params_t *params) { os << ".hAdapter = "; @@ -10074,7 +10108,7 @@ operator<<(std::ostream &os, inline std::ostream & operator<<(std::ostream &os, - const struct ur_adapter_get_info_params_t *params) { + [[maybe_unused]] const struct ur_adapter_get_info_params_t *params) { os << ".hAdapter = "; @@ -10104,9 +10138,8 @@ operator<<(std::ostream &os, } inline std::ostream &operator<<( - std::ostream &os, - const struct ur_bindless_images_unsampled_image_handle_destroy_exp_params_t - *params) { + std::ostream &os, [[maybe_unused]] const struct + ur_bindless_images_unsampled_image_handle_destroy_exp_params_t *params) { os << ".hContext = "; @@ -10126,9 +10159,8 @@ inline std::ostream &operator<<( } inline std::ostream &operator<<( - std::ostream &os, - const struct ur_bindless_images_sampled_image_handle_destroy_exp_params_t - *params) { + std::ostream &os, [[maybe_unused]] const struct + ur_bindless_images_sampled_image_handle_destroy_exp_params_t *params) { os << ".hContext = "; @@ -10149,7 +10181,8 @@ inline std::ostream &operator<<( inline std::ostream &operator<<( std::ostream &os, - const struct ur_bindless_images_image_allocate_exp_params_t *params) { + [[maybe_unused]] const struct ur_bindless_images_image_allocate_exp_params_t + *params) { os << ".hContext = "; @@ -10178,9 +10211,10 @@ inline std::ostream &operator<<( return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_bindless_images_image_free_exp_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_bindless_images_image_free_exp_params_t + *params) { os << ".hContext = "; @@ -10200,9 +10234,8 @@ operator<<(std::ostream &os, } inline std::ostream & -operator<<(std::ostream &os, - const struct ur_bindless_images_unsampled_image_create_exp_params_t - *params) { +operator<<(std::ostream &os, [[maybe_unused]] const struct + ur_bindless_images_unsampled_image_create_exp_params_t *params) { os << ".hContext = "; @@ -10241,9 +10274,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream &operator<<( - std::ostream &os, - const struct ur_bindless_images_sampled_image_create_exp_params_t *params) { +inline std::ostream & +operator<<(std::ostream &os, [[maybe_unused]] const struct + ur_bindless_images_sampled_image_create_exp_params_t *params) { os << ".hContext = "; @@ -10287,9 +10320,10 @@ inline std::ostream &operator<<( return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_bindless_images_image_copy_exp_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_bindless_images_image_copy_exp_params_t + *params) { os << ".hQueue = "; @@ -10369,7 +10403,8 @@ operator<<(std::ostream &os, inline std::ostream &operator<<( std::ostream &os, - const struct ur_bindless_images_image_get_info_exp_params_t *params) { + [[maybe_unused]] const struct ur_bindless_images_image_get_info_exp_params_t + *params) { os << ".hImageMem = "; @@ -10393,9 +10428,9 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - const struct ur_bindless_images_mipmap_get_level_exp_params_t *params) { +inline std::ostream & +operator<<(std::ostream &os, [[maybe_unused]] const struct + ur_bindless_images_mipmap_get_level_exp_params_t *params) { os << ".hContext = "; @@ -10424,9 +10459,10 @@ inline std::ostream &operator<<( return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_bindless_images_mipmap_free_exp_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_bindless_images_mipmap_free_exp_params_t + *params) { os << ".hContext = "; @@ -10445,9 +10481,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream &operator<<( - std::ostream &os, - const struct ur_bindless_images_import_opaque_fd_exp_params_t *params) { +inline std::ostream & +operator<<(std::ostream &os, [[maybe_unused]] const struct + ur_bindless_images_import_opaque_fd_exp_params_t *params) { os << ".hContext = "; @@ -10476,9 +10512,9 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - const struct ur_bindless_images_map_external_array_exp_params_t *params) { +inline std::ostream & +operator<<(std::ostream &os, [[maybe_unused]] const struct + ur_bindless_images_map_external_array_exp_params_t *params) { os << ".hContext = "; @@ -10512,9 +10548,9 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - const struct ur_bindless_images_release_interop_exp_params_t *params) { +inline std::ostream & +operator<<(std::ostream &os, [[maybe_unused]] const struct + ur_bindless_images_release_interop_exp_params_t *params) { os << ".hContext = "; @@ -10534,7 +10570,7 @@ inline std::ostream &operator<<( } inline std::ostream & -operator<<(std::ostream &os, const struct +operator<<(std::ostream &os, [[maybe_unused]] const struct ur_bindless_images_import_external_semaphore_opaque_fd_exp_params_t *params) { @@ -10560,10 +10596,9 @@ operator<<(std::ostream &os, const struct return os; } -inline std::ostream &operator<<( - std::ostream &os, - const struct ur_bindless_images_destroy_external_semaphore_exp_params_t - *params) { +inline std::ostream & +operator<<(std::ostream &os, [[maybe_unused]] const struct + ur_bindless_images_destroy_external_semaphore_exp_params_t *params) { os << ".hContext = "; @@ -10583,9 +10618,8 @@ inline std::ostream &operator<<( } inline std::ostream & -operator<<(std::ostream &os, - const struct ur_bindless_images_wait_external_semaphore_exp_params_t - *params) { +operator<<(std::ostream &os, [[maybe_unused]] const struct + ur_bindless_images_wait_external_semaphore_exp_params_t *params) { os << ".hQueue = "; @@ -10622,10 +10656,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream &operator<<( - std::ostream &os, - const struct ur_bindless_images_signal_external_semaphore_exp_params_t - *params) { +inline std::ostream & +operator<<(std::ostream &os, [[maybe_unused]] const struct + ur_bindless_images_signal_external_semaphore_exp_params_t *params) { os << ".hQueue = "; @@ -10664,7 +10697,8 @@ inline std::ostream &operator<<( inline std::ostream & operator<<(std::ostream &os, - const struct ur_command_buffer_create_exp_params_t *params) { + [[maybe_unused]] const struct ur_command_buffer_create_exp_params_t + *params) { os << ".hContext = "; @@ -10690,7 +10724,8 @@ operator<<(std::ostream &os, inline std::ostream & operator<<(std::ostream &os, - const struct ur_command_buffer_retain_exp_params_t *params) { + [[maybe_unused]] const struct ur_command_buffer_retain_exp_params_t + *params) { os << ".hCommandBuffer = "; @@ -10701,7 +10736,8 @@ operator<<(std::ostream &os, inline std::ostream & operator<<(std::ostream &os, - const struct ur_command_buffer_release_exp_params_t *params) { + [[maybe_unused]] const struct ur_command_buffer_release_exp_params_t + *params) { os << ".hCommandBuffer = "; @@ -10712,7 +10748,8 @@ operator<<(std::ostream &os, inline std::ostream & operator<<(std::ostream &os, - const struct ur_command_buffer_finalize_exp_params_t *params) { + [[maybe_unused]] const struct ur_command_buffer_finalize_exp_params_t + *params) { os << ".hCommandBuffer = "; @@ -10721,9 +10758,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream &operator<<( - std::ostream &os, - const struct ur_command_buffer_append_kernel_launch_exp_params_t *params) { +inline std::ostream & +operator<<(std::ostream &os, [[maybe_unused]] const struct + ur_command_buffer_append_kernel_launch_exp_params_t *params) { os << ".hCommandBuffer = "; @@ -10772,9 +10809,9 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - const struct ur_command_buffer_append_usm_memcpy_exp_params_t *params) { +inline std::ostream & +operator<<(std::ostream &os, [[maybe_unused]] const struct + ur_command_buffer_append_usm_memcpy_exp_params_t *params) { os << ".hCommandBuffer = "; @@ -10815,7 +10852,8 @@ inline std::ostream &operator<<( inline std::ostream &operator<<( std::ostream &os, - const struct ur_command_buffer_append_usm_fill_exp_params_t *params) { + [[maybe_unused]] const struct ur_command_buffer_append_usm_fill_exp_params_t + *params) { os << ".hCommandBuffer = "; @@ -10860,9 +10898,8 @@ inline std::ostream &operator<<( } inline std::ostream & -operator<<(std::ostream &os, - const struct ur_command_buffer_append_mem_buffer_copy_exp_params_t - *params) { +operator<<(std::ostream &os, [[maybe_unused]] const struct + ur_command_buffer_append_mem_buffer_copy_exp_params_t *params) { os << ".hCommandBuffer = "; @@ -10912,9 +10949,8 @@ operator<<(std::ostream &os, } inline std::ostream & -operator<<(std::ostream &os, - const struct ur_command_buffer_append_mem_buffer_write_exp_params_t - *params) { +operator<<(std::ostream &os, [[maybe_unused]] const struct + ur_command_buffer_append_mem_buffer_write_exp_params_t *params) { os << ".hCommandBuffer = "; @@ -10959,9 +10995,8 @@ operator<<(std::ostream &os, } inline std::ostream & -operator<<(std::ostream &os, - const struct ur_command_buffer_append_mem_buffer_read_exp_params_t - *params) { +operator<<(std::ostream &os, [[maybe_unused]] const struct + ur_command_buffer_append_mem_buffer_read_exp_params_t *params) { os << ".hCommandBuffer = "; @@ -11005,10 +11040,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream &operator<<( - std::ostream &os, - const struct ur_command_buffer_append_mem_buffer_copy_rect_exp_params_t - *params) { +inline std::ostream & +operator<<(std::ostream &os, [[maybe_unused]] const struct + ur_command_buffer_append_mem_buffer_copy_rect_exp_params_t *params) { os << ".hCommandBuffer = "; @@ -11078,9 +11112,8 @@ inline std::ostream &operator<<( } inline std::ostream &operator<<( - std::ostream &os, - const struct ur_command_buffer_append_mem_buffer_write_rect_exp_params_t - *params) { + std::ostream &os, [[maybe_unused]] const struct + ur_command_buffer_append_mem_buffer_write_rect_exp_params_t *params) { os << ".hCommandBuffer = "; @@ -11149,10 +11182,9 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - const struct ur_command_buffer_append_mem_buffer_read_rect_exp_params_t - *params) { +inline std::ostream & +operator<<(std::ostream &os, [[maybe_unused]] const struct + ur_command_buffer_append_mem_buffer_read_rect_exp_params_t *params) { os << ".hCommandBuffer = "; @@ -11222,9 +11254,8 @@ inline std::ostream &operator<<( } inline std::ostream & -operator<<(std::ostream &os, - const struct ur_command_buffer_append_mem_buffer_fill_exp_params_t - *params) { +operator<<(std::ostream &os, [[maybe_unused]] const struct + ur_command_buffer_append_mem_buffer_fill_exp_params_t *params) { os << ".hCommandBuffer = "; @@ -11275,7 +11306,8 @@ operator<<(std::ostream &os, inline std::ostream & operator<<(std::ostream &os, - const struct ur_command_buffer_enqueue_exp_params_t *params) { + [[maybe_unused]] const struct ur_command_buffer_enqueue_exp_params_t + *params) { os << ".hCommandBuffer = "; @@ -11313,7 +11345,8 @@ operator<<(std::ostream &os, } inline std::ostream & -operator<<(std::ostream &os, const struct ur_context_create_params_t *params) { +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_context_create_params_t *params) { os << ".DeviceCount = "; @@ -11345,7 +11378,8 @@ operator<<(std::ostream &os, const struct ur_context_create_params_t *params) { } inline std::ostream & -operator<<(std::ostream &os, const struct ur_context_retain_params_t *params) { +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_context_retain_params_t *params) { os << ".hContext = "; @@ -11355,7 +11389,8 @@ operator<<(std::ostream &os, const struct ur_context_retain_params_t *params) { } inline std::ostream & -operator<<(std::ostream &os, const struct ur_context_release_params_t *params) { +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_context_release_params_t *params) { os << ".hContext = "; @@ -11366,7 +11401,7 @@ operator<<(std::ostream &os, const struct ur_context_release_params_t *params) { inline std::ostream & operator<<(std::ostream &os, - const struct ur_context_get_info_params_t *params) { + [[maybe_unused]] const struct ur_context_get_info_params_t *params) { os << ".hContext = "; @@ -11397,7 +11432,8 @@ operator<<(std::ostream &os, inline std::ostream & operator<<(std::ostream &os, - const struct ur_context_get_native_handle_params_t *params) { + [[maybe_unused]] const struct ur_context_get_native_handle_params_t + *params) { os << ".hContext = "; @@ -11411,9 +11447,10 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_context_create_with_native_handle_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_context_create_with_native_handle_params_t + *params) { os << ".hNativeContext = "; @@ -11449,9 +11486,10 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_context_set_extended_deleter_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_context_set_extended_deleter_params_t + *params) { os << ".hContext = "; @@ -11470,9 +11508,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_enqueue_kernel_launch_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_enqueue_kernel_launch_params_t *params) { os << ".hQueue = "; @@ -11529,9 +11567,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_enqueue_events_wait_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_enqueue_events_wait_params_t *params) { os << ".hQueue = "; @@ -11563,9 +11601,10 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_enqueue_events_wait_with_barrier_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_enqueue_events_wait_with_barrier_params_t + *params) { os << ".hQueue = "; @@ -11597,9 +11636,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_enqueue_mem_buffer_read_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_enqueue_mem_buffer_read_params_t *params) { os << ".hQueue = "; @@ -11658,7 +11697,8 @@ operator<<(std::ostream &os, inline std::ostream & operator<<(std::ostream &os, - const struct ur_enqueue_mem_buffer_write_params_t *params) { + [[maybe_unused]] const struct ur_enqueue_mem_buffer_write_params_t + *params) { os << ".hQueue = "; @@ -11715,9 +11755,10 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_enqueue_mem_buffer_read_rect_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_enqueue_mem_buffer_read_rect_params_t + *params) { os << ".hQueue = "; @@ -11799,9 +11840,10 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_enqueue_mem_buffer_write_rect_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_enqueue_mem_buffer_write_rect_params_t + *params) { os << ".hQueue = "; @@ -11883,9 +11925,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_enqueue_mem_buffer_copy_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_enqueue_mem_buffer_copy_params_t *params) { os << ".hQueue = "; @@ -11942,9 +11984,10 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_enqueue_mem_buffer_copy_rect_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_enqueue_mem_buffer_copy_rect_params_t + *params) { os << ".hQueue = "; @@ -12021,9 +12064,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_enqueue_mem_buffer_fill_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_enqueue_mem_buffer_fill_params_t *params) { os << ".hQueue = "; @@ -12080,9 +12123,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_enqueue_mem_image_read_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_enqueue_mem_image_read_params_t *params) { os << ".hQueue = "; @@ -12149,10 +12192,10 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_enqueue_mem_image_write_params_t *params) { - +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_enqueue_mem_image_write_params_t *params) { + os << ".hQueue = "; ur_params::serializePtr(os, *(params->phQueue)); @@ -12218,9 +12261,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_enqueue_mem_image_copy_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_enqueue_mem_image_copy_params_t *params) { os << ".hQueue = "; @@ -12277,9 +12320,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_enqueue_mem_buffer_map_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_enqueue_mem_buffer_map_params_t *params) { os << ".hQueue = "; @@ -12341,9 +12384,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_enqueue_mem_unmap_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_enqueue_mem_unmap_params_t *params) { os << ".hQueue = "; @@ -12387,7 +12430,7 @@ operator<<(std::ostream &os, inline std::ostream & operator<<(std::ostream &os, - const struct ur_enqueue_usm_fill_params_t *params) { + [[maybe_unused]] const struct ur_enqueue_usm_fill_params_t *params) { os << ".hQueue = "; @@ -12439,9 +12482,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_enqueue_usm_memcpy_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_enqueue_usm_memcpy_params_t *params) { os << ".hQueue = "; @@ -12493,9 +12536,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_enqueue_usm_prefetch_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_enqueue_usm_prefetch_params_t *params) { os << ".hQueue = "; @@ -12542,9 +12585,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_enqueue_usm_advise_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_enqueue_usm_advise_params_t *params) { os << ".hQueue = "; @@ -12573,9 +12616,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_enqueue_usm_fill_2d_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_enqueue_usm_fill_2d_params_t *params) { os << ".hQueue = "; @@ -12637,9 +12680,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_enqueue_usm_memcpy_2d_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_enqueue_usm_memcpy_2d_params_t *params) { os << ".hQueue = "; @@ -12706,9 +12749,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream &operator<<( - std::ostream &os, - const struct ur_enqueue_device_global_variable_write_params_t *params) { +inline std::ostream & +operator<<(std::ostream &os, [[maybe_unused]] const struct + ur_enqueue_device_global_variable_write_params_t *params) { os << ".hQueue = "; @@ -12770,9 +12813,9 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - const struct ur_enqueue_device_global_variable_read_params_t *params) { +inline std::ostream & +operator<<(std::ostream &os, [[maybe_unused]] const struct + ur_enqueue_device_global_variable_read_params_t *params) { os << ".hQueue = "; @@ -12834,9 +12877,9 @@ inline std::ostream &operator<<( return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_enqueue_read_host_pipe_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_enqueue_read_host_pipe_params_t *params) { os << ".hQueue = "; @@ -12893,9 +12936,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_enqueue_write_host_pipe_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_enqueue_write_host_pipe_params_t *params) { os << ".hQueue = "; @@ -12953,7 +12996,8 @@ operator<<(std::ostream &os, } inline std::ostream & -operator<<(std::ostream &os, const struct ur_event_get_info_params_t *params) { +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_event_get_info_params_t *params) { os << ".hEvent = "; @@ -12984,7 +13028,8 @@ operator<<(std::ostream &os, const struct ur_event_get_info_params_t *params) { inline std::ostream & operator<<(std::ostream &os, - const struct ur_event_get_profiling_info_params_t *params) { + [[maybe_unused]] const struct ur_event_get_profiling_info_params_t + *params) { os << ".hEvent = "; @@ -13013,8 +13058,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream &operator<<(std::ostream &os, - const struct ur_event_wait_params_t *params) { +inline std::ostream & +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_event_wait_params_t *params) { os << ".numEvents = "; @@ -13035,8 +13081,9 @@ inline std::ostream &operator<<(std::ostream &os, return os; } -inline std::ostream &operator<<(std::ostream &os, - const struct ur_event_retain_params_t *params) { +inline std::ostream & +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_event_retain_params_t *params) { os << ".hEvent = "; @@ -13046,7 +13093,8 @@ inline std::ostream &operator<<(std::ostream &os, } inline std::ostream & -operator<<(std::ostream &os, const struct ur_event_release_params_t *params) { +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_event_release_params_t *params) { os << ".hEvent = "; @@ -13055,9 +13103,9 @@ operator<<(std::ostream &os, const struct ur_event_release_params_t *params) { return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_event_get_native_handle_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_event_get_native_handle_params_t *params) { os << ".hEvent = "; @@ -13071,9 +13119,10 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_event_create_with_native_handle_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_event_create_with_native_handle_params_t + *params) { os << ".hNativeEvent = "; @@ -13097,9 +13146,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_event_set_callback_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_event_set_callback_params_t *params) { os << ".hEvent = "; @@ -13124,7 +13173,8 @@ operator<<(std::ostream &os, } inline std::ostream & -operator<<(std::ostream &os, const struct ur_kernel_create_params_t *params) { +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_kernel_create_params_t *params) { os << ".hProgram = "; @@ -13144,7 +13194,8 @@ operator<<(std::ostream &os, const struct ur_kernel_create_params_t *params) { } inline std::ostream & -operator<<(std::ostream &os, const struct ur_kernel_get_info_params_t *params) { +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_kernel_get_info_params_t *params) { os << ".hKernel = "; @@ -13173,9 +13224,9 @@ operator<<(std::ostream &os, const struct ur_kernel_get_info_params_t *params) { return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_kernel_get_group_info_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_kernel_get_group_info_params_t *params) { os << ".hKernel = "; @@ -13211,7 +13262,8 @@ operator<<(std::ostream &os, inline std::ostream & operator<<(std::ostream &os, - const struct ur_kernel_get_sub_group_info_params_t *params) { + [[maybe_unused]] const struct ur_kernel_get_sub_group_info_params_t + *params) { os << ".hKernel = "; @@ -13246,7 +13298,8 @@ operator<<(std::ostream &os, } inline std::ostream & -operator<<(std::ostream &os, const struct ur_kernel_retain_params_t *params) { +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_kernel_retain_params_t *params) { os << ".hKernel = "; @@ -13256,7 +13309,8 @@ operator<<(std::ostream &os, const struct ur_kernel_retain_params_t *params) { } inline std::ostream & -operator<<(std::ostream &os, const struct ur_kernel_release_params_t *params) { +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_kernel_release_params_t *params) { os << ".hKernel = "; @@ -13267,7 +13321,8 @@ operator<<(std::ostream &os, const struct ur_kernel_release_params_t *params) { inline std::ostream & operator<<(std::ostream &os, - const struct ur_kernel_get_native_handle_params_t *params) { + [[maybe_unused]] const struct ur_kernel_get_native_handle_params_t + *params) { os << ".hKernel = "; @@ -13281,9 +13336,10 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_kernel_create_with_native_handle_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_kernel_create_with_native_handle_params_t + *params) { os << ".hNativeKernel = "; @@ -13312,9 +13368,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_kernel_set_arg_value_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_kernel_set_arg_value_params_t *params) { os << ".hKernel = "; @@ -13343,9 +13399,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_kernel_set_arg_local_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_kernel_set_arg_local_params_t *params) { os << ".hKernel = "; @@ -13369,9 +13425,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_kernel_set_arg_pointer_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_kernel_set_arg_pointer_params_t *params) { os << ".hKernel = "; @@ -13395,9 +13451,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_kernel_set_exec_info_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_kernel_set_exec_info_params_t *params) { os << ".hKernel = "; @@ -13426,9 +13482,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_kernel_set_arg_sampler_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_kernel_set_arg_sampler_params_t *params) { os << ".hKernel = "; @@ -13452,9 +13508,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_kernel_set_arg_mem_obj_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_kernel_set_arg_mem_obj_params_t *params) { os << ".hKernel = "; @@ -13478,9 +13534,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream &operator<<( - std::ostream &os, - const struct ur_kernel_set_specialization_constants_params_t *params) { +inline std::ostream & +operator<<(std::ostream &os, [[maybe_unused]] const struct + ur_kernel_set_specialization_constants_params_t *params) { os << ".hKernel = "; @@ -13499,8 +13555,9 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<(std::ostream &os, - const struct ur_loader_init_params_t *params) { +inline std::ostream & +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_loader_init_params_t *params) { os << ".device_flags = "; @@ -13517,14 +13574,14 @@ inline std::ostream &operator<<(std::ostream &os, inline std::ostream & operator<<(std::ostream &os, - const struct ur_loader_tear_down_params_t *params) { + [[maybe_unused]] const struct ur_loader_tear_down_params_t *params) { return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_loader_config_create_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_loader_config_create_params_t *params) { os << ".phLoaderConfig = "; @@ -13533,9 +13590,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_loader_config_retain_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_loader_config_retain_params_t *params) { os << ".hLoaderConfig = "; @@ -13544,9 +13601,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_loader_config_release_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_loader_config_release_params_t *params) { os << ".hLoaderConfig = "; @@ -13555,9 +13612,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_loader_config_get_info_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_loader_config_get_info_params_t *params) { os << ".hLoaderConfig = "; @@ -13588,7 +13645,8 @@ operator<<(std::ostream &os, inline std::ostream & operator<<(std::ostream &os, - const struct ur_loader_config_enable_layer_params_t *params) { + [[maybe_unused]] const struct ur_loader_config_enable_layer_params_t + *params) { os << ".hLoaderConfig = "; @@ -13604,7 +13662,7 @@ operator<<(std::ostream &os, inline std::ostream & operator<<(std::ostream &os, - const struct ur_mem_image_create_params_t *params) { + [[maybe_unused]] const struct ur_mem_image_create_params_t *params) { os << ".hContext = "; @@ -13638,9 +13696,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_mem_buffer_create_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_mem_buffer_create_params_t *params) { os << ".hContext = "; @@ -13669,8 +13727,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream &operator<<(std::ostream &os, - const struct ur_mem_retain_params_t *params) { +inline std::ostream & +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_mem_retain_params_t *params) { os << ".hMem = "; @@ -13679,8 +13738,9 @@ inline std::ostream &operator<<(std::ostream &os, return os; } -inline std::ostream &operator<<(std::ostream &os, - const struct ur_mem_release_params_t *params) { +inline std::ostream & +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_mem_release_params_t *params) { os << ".hMem = "; @@ -13689,9 +13749,9 @@ inline std::ostream &operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_mem_buffer_partition_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_mem_buffer_partition_params_t *params) { os << ".hBuffer = "; @@ -13720,9 +13780,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_mem_get_native_handle_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_mem_get_native_handle_params_t *params) { os << ".hMem = "; @@ -13736,9 +13796,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream &operator<<( - std::ostream &os, - const struct ur_mem_buffer_create_with_native_handle_params_t *params) { +inline std::ostream & +operator<<(std::ostream &os, [[maybe_unused]] const struct + ur_mem_buffer_create_with_native_handle_params_t *params) { os << ".hNativeMem = "; @@ -13762,9 +13822,9 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - const struct ur_mem_image_create_with_native_handle_params_t *params) { +inline std::ostream & +operator<<(std::ostream &os, [[maybe_unused]] const struct + ur_mem_image_create_with_native_handle_params_t *params) { os << ".hNativeMem = "; @@ -13798,8 +13858,9 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<(std::ostream &os, - const struct ur_mem_get_info_params_t *params) { +inline std::ostream & +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_mem_get_info_params_t *params) { os << ".hMemory = "; @@ -13828,9 +13889,9 @@ inline std::ostream &operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_mem_image_get_info_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_mem_image_get_info_params_t *params) { os << ".hMemory = "; @@ -13859,9 +13920,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_physical_mem_create_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_physical_mem_create_params_t *params) { os << ".hContext = "; @@ -13890,9 +13951,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_physical_mem_retain_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_physical_mem_retain_params_t *params) { os << ".hPhysicalMem = "; @@ -13901,9 +13962,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_physical_mem_release_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_physical_mem_release_params_t *params) { os << ".hPhysicalMem = "; @@ -13912,8 +13973,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream &operator<<(std::ostream &os, - const struct ur_platform_get_params_t *params) { +inline std::ostream & +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_platform_get_params_t *params) { os << ".phAdapters = {"; for (size_t i = 0; @@ -13956,9 +14018,9 @@ inline std::ostream &operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_platform_get_info_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_platform_get_info_params_t *params) { os << ".hPlatform = "; @@ -13989,7 +14051,8 @@ operator<<(std::ostream &os, inline std::ostream & operator<<(std::ostream &os, - const struct ur_platform_get_native_handle_params_t *params) { + [[maybe_unused]] const struct ur_platform_get_native_handle_params_t + *params) { os << ".hPlatform = "; @@ -14005,7 +14068,8 @@ operator<<(std::ostream &os, inline std::ostream &operator<<( std::ostream &os, - const struct ur_platform_create_with_native_handle_params_t *params) { + [[maybe_unused]] const struct ur_platform_create_with_native_handle_params_t + *params) { os << ".hNativePlatform = "; @@ -14026,7 +14090,8 @@ inline std::ostream &operator<<( inline std::ostream & operator<<(std::ostream &os, - const struct ur_platform_get_api_version_params_t *params) { + [[maybe_unused]] const struct ur_platform_get_api_version_params_t + *params) { os << ".hPlatform = "; @@ -14042,7 +14107,8 @@ operator<<(std::ostream &os, inline std::ostream & operator<<(std::ostream &os, - const struct ur_platform_get_backend_option_params_t *params) { + [[maybe_unused]] const struct ur_platform_get_backend_option_params_t + *params) { os << ".hPlatform = "; @@ -14061,9 +14127,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_program_create_with_il_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_program_create_with_il_params_t *params) { os << ".hContext = "; @@ -14094,7 +14160,8 @@ operator<<(std::ostream &os, inline std::ostream & operator<<(std::ostream &os, - const struct ur_program_create_with_binary_params_t *params) { + [[maybe_unused]] const struct ur_program_create_with_binary_params_t + *params) { os << ".hContext = "; @@ -14129,7 +14196,8 @@ operator<<(std::ostream &os, } inline std::ostream & -operator<<(std::ostream &os, const struct ur_program_build_params_t *params) { +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_program_build_params_t *params) { os << ".hContext = "; @@ -14149,7 +14217,8 @@ operator<<(std::ostream &os, const struct ur_program_build_params_t *params) { } inline std::ostream & -operator<<(std::ostream &os, const struct ur_program_compile_params_t *params) { +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_program_compile_params_t *params) { os << ".hContext = "; @@ -14168,8 +14237,9 @@ operator<<(std::ostream &os, const struct ur_program_compile_params_t *params) { return os; } -inline std::ostream &operator<<(std::ostream &os, - const struct ur_program_link_params_t *params) { +inline std::ostream & +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_program_link_params_t *params) { os << ".hContext = "; @@ -14206,7 +14276,8 @@ inline std::ostream &operator<<(std::ostream &os, } inline std::ostream & -operator<<(std::ostream &os, const struct ur_program_retain_params_t *params) { +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_program_retain_params_t *params) { os << ".hProgram = "; @@ -14216,7 +14287,8 @@ operator<<(std::ostream &os, const struct ur_program_retain_params_t *params) { } inline std::ostream & -operator<<(std::ostream &os, const struct ur_program_release_params_t *params) { +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_program_release_params_t *params) { os << ".hProgram = "; @@ -14225,9 +14297,10 @@ operator<<(std::ostream &os, const struct ur_program_release_params_t *params) { return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_program_get_function_pointer_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_program_get_function_pointer_params_t + *params) { os << ".hDevice = "; @@ -14253,7 +14326,7 @@ operator<<(std::ostream &os, inline std::ostream & operator<<(std::ostream &os, - const struct ur_program_get_info_params_t *params) { + [[maybe_unused]] const struct ur_program_get_info_params_t *params) { os << ".hProgram = "; @@ -14282,9 +14355,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_program_get_build_info_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_program_get_build_info_params_t *params) { os << ".hProgram = "; @@ -14318,9 +14391,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream &operator<<( - std::ostream &os, - const struct ur_program_set_specialization_constants_params_t *params) { +inline std::ostream & +operator<<(std::ostream &os, [[maybe_unused]] const struct + ur_program_set_specialization_constants_params_t *params) { os << ".hProgram = "; @@ -14348,7 +14421,8 @@ inline std::ostream &operator<<( inline std::ostream & operator<<(std::ostream &os, - const struct ur_program_get_native_handle_params_t *params) { + [[maybe_unused]] const struct ur_program_get_native_handle_params_t + *params) { os << ".hProgram = "; @@ -14362,9 +14436,10 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_program_create_with_native_handle_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_program_create_with_native_handle_params_t + *params) { os << ".hNativeProgram = "; @@ -14389,7 +14464,8 @@ operator<<(std::ostream &os, } inline std::ostream & -operator<<(std::ostream &os, const struct ur_queue_get_info_params_t *params) { +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_queue_get_info_params_t *params) { os << ".hQueue = "; @@ -14418,8 +14494,9 @@ operator<<(std::ostream &os, const struct ur_queue_get_info_params_t *params) { return os; } -inline std::ostream &operator<<(std::ostream &os, - const struct ur_queue_create_params_t *params) { +inline std::ostream & +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_queue_create_params_t *params) { os << ".hContext = "; @@ -14443,8 +14520,9 @@ inline std::ostream &operator<<(std::ostream &os, return os; } -inline std::ostream &operator<<(std::ostream &os, - const struct ur_queue_retain_params_t *params) { +inline std::ostream & +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_queue_retain_params_t *params) { os << ".hQueue = "; @@ -14454,7 +14532,8 @@ inline std::ostream &operator<<(std::ostream &os, } inline std::ostream & -operator<<(std::ostream &os, const struct ur_queue_release_params_t *params) { +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_queue_release_params_t *params) { os << ".hQueue = "; @@ -14463,9 +14542,9 @@ operator<<(std::ostream &os, const struct ur_queue_release_params_t *params) { return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_queue_get_native_handle_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_queue_get_native_handle_params_t *params) { os << ".hQueue = "; @@ -14484,9 +14563,10 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_queue_create_with_native_handle_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_queue_create_with_native_handle_params_t + *params) { os << ".hNativeQueue = "; @@ -14515,8 +14595,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream &operator<<(std::ostream &os, - const struct ur_queue_finish_params_t *params) { +inline std::ostream & +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_queue_finish_params_t *params) { os << ".hQueue = "; @@ -14525,8 +14606,9 @@ inline std::ostream &operator<<(std::ostream &os, return os; } -inline std::ostream &operator<<(std::ostream &os, - const struct ur_queue_flush_params_t *params) { +inline std::ostream & +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_queue_flush_params_t *params) { os << ".hQueue = "; @@ -14536,7 +14618,8 @@ inline std::ostream &operator<<(std::ostream &os, } inline std::ostream & -operator<<(std::ostream &os, const struct ur_sampler_create_params_t *params) { +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_sampler_create_params_t *params) { os << ".hContext = "; @@ -14556,7 +14639,8 @@ operator<<(std::ostream &os, const struct ur_sampler_create_params_t *params) { } inline std::ostream & -operator<<(std::ostream &os, const struct ur_sampler_retain_params_t *params) { +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_sampler_retain_params_t *params) { os << ".hSampler = "; @@ -14566,7 +14650,8 @@ operator<<(std::ostream &os, const struct ur_sampler_retain_params_t *params) { } inline std::ostream & -operator<<(std::ostream &os, const struct ur_sampler_release_params_t *params) { +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_sampler_release_params_t *params) { os << ".hSampler = "; @@ -14577,7 +14662,7 @@ operator<<(std::ostream &os, const struct ur_sampler_release_params_t *params) { inline std::ostream & operator<<(std::ostream &os, - const struct ur_sampler_get_info_params_t *params) { + [[maybe_unused]] const struct ur_sampler_get_info_params_t *params) { os << ".hSampler = "; @@ -14608,7 +14693,8 @@ operator<<(std::ostream &os, inline std::ostream & operator<<(std::ostream &os, - const struct ur_sampler_get_native_handle_params_t *params) { + [[maybe_unused]] const struct ur_sampler_get_native_handle_params_t + *params) { os << ".hSampler = "; @@ -14622,9 +14708,10 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_sampler_create_with_native_handle_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_sampler_create_with_native_handle_params_t + *params) { os << ".hNativeSampler = "; @@ -14649,7 +14736,8 @@ operator<<(std::ostream &os, } inline std::ostream & -operator<<(std::ostream &os, const struct ur_usm_host_alloc_params_t *params) { +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_usm_host_alloc_params_t *params) { os << ".hContext = "; @@ -14680,7 +14768,7 @@ operator<<(std::ostream &os, const struct ur_usm_host_alloc_params_t *params) { inline std::ostream & operator<<(std::ostream &os, - const struct ur_usm_device_alloc_params_t *params) { + [[maybe_unused]] const struct ur_usm_device_alloc_params_t *params) { os << ".hContext = "; @@ -14716,7 +14804,7 @@ operator<<(std::ostream &os, inline std::ostream & operator<<(std::ostream &os, - const struct ur_usm_shared_alloc_params_t *params) { + [[maybe_unused]] const struct ur_usm_shared_alloc_params_t *params) { os << ".hContext = "; @@ -14750,8 +14838,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream &operator<<(std::ostream &os, - const struct ur_usm_free_params_t *params) { +inline std::ostream & +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_usm_free_params_t *params) { os << ".hContext = "; @@ -14765,9 +14854,9 @@ inline std::ostream &operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_usm_get_mem_alloc_info_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_usm_get_mem_alloc_info_params_t *params) { os << ".hContext = "; @@ -14802,7 +14891,8 @@ operator<<(std::ostream &os, } inline std::ostream & -operator<<(std::ostream &os, const struct ur_usm_pool_create_params_t *params) { +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_usm_pool_create_params_t *params) { os << ".hContext = "; @@ -14822,7 +14912,8 @@ operator<<(std::ostream &os, const struct ur_usm_pool_create_params_t *params) { } inline std::ostream & -operator<<(std::ostream &os, const struct ur_usm_pool_retain_params_t *params) { +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_usm_pool_retain_params_t *params) { os << ".pPool = "; @@ -14833,7 +14924,7 @@ operator<<(std::ostream &os, const struct ur_usm_pool_retain_params_t *params) { inline std::ostream & operator<<(std::ostream &os, - const struct ur_usm_pool_release_params_t *params) { + [[maybe_unused]] const struct ur_usm_pool_release_params_t *params) { os << ".pPool = "; @@ -14842,9 +14933,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_usm_pool_get_info_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_usm_pool_get_info_params_t *params) { os << ".hPool = "; @@ -14873,9 +14964,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_usm_pitched_alloc_exp_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_usm_pitched_alloc_exp_params_t *params) { os << ".hContext = "; @@ -14925,7 +15016,8 @@ operator<<(std::ostream &os, } inline std::ostream & -operator<<(std::ostream &os, const struct ur_usm_import_exp_params_t *params) { +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_usm_import_exp_params_t *params) { os << ".hContext = "; @@ -14945,7 +15037,8 @@ operator<<(std::ostream &os, const struct ur_usm_import_exp_params_t *params) { } inline std::ostream & -operator<<(std::ostream &os, const struct ur_usm_release_exp_params_t *params) { +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_usm_release_exp_params_t *params) { os << ".hContext = "; @@ -14959,9 +15052,10 @@ operator<<(std::ostream &os, const struct ur_usm_release_exp_params_t *params) { return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_usm_p2p_enable_peer_access_exp_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_usm_p2p_enable_peer_access_exp_params_t + *params) { os << ".commandDevice = "; @@ -14975,9 +15069,10 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_usm_p2p_disable_peer_access_exp_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_usm_p2p_disable_peer_access_exp_params_t + *params) { os << ".commandDevice = "; @@ -14991,9 +15086,10 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_usm_p2p_peer_access_get_info_exp_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_usm_p2p_peer_access_get_info_exp_params_t + *params) { os << ".commandDevice = "; @@ -15027,9 +15123,10 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_virtual_mem_granularity_get_info_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_virtual_mem_granularity_get_info_params_t + *params) { os << ".hContext = "; @@ -15063,9 +15160,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_virtual_mem_reserve_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_virtual_mem_reserve_params_t *params) { os << ".hContext = "; @@ -15091,7 +15188,7 @@ operator<<(std::ostream &os, inline std::ostream & operator<<(std::ostream &os, - const struct ur_virtual_mem_free_params_t *params) { + [[maybe_unused]] const struct ur_virtual_mem_free_params_t *params) { os << ".hContext = "; @@ -15111,7 +15208,8 @@ operator<<(std::ostream &os, } inline std::ostream & -operator<<(std::ostream &os, const struct ur_virtual_mem_map_params_t *params) { +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_virtual_mem_map_params_t *params) { os << ".hContext = "; @@ -15146,9 +15244,9 @@ operator<<(std::ostream &os, const struct ur_virtual_mem_map_params_t *params) { return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_virtual_mem_unmap_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_virtual_mem_unmap_params_t *params) { os << ".hContext = "; @@ -15167,9 +15265,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_virtual_mem_set_access_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_virtual_mem_set_access_params_t *params) { os << ".hContext = "; @@ -15194,9 +15292,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_virtual_mem_get_info_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_virtual_mem_get_info_params_t *params) { os << ".hContext = "; @@ -15235,8 +15333,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream &operator<<(std::ostream &os, - const struct ur_device_get_params_t *params) { +inline std::ostream & +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_device_get_params_t *params) { os << ".hPlatform = "; @@ -15273,7 +15372,8 @@ inline std::ostream &operator<<(std::ostream &os, } inline std::ostream & -operator<<(std::ostream &os, const struct ur_device_get_info_params_t *params) { +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_device_get_info_params_t *params) { os << ".hDevice = "; @@ -15303,7 +15403,8 @@ operator<<(std::ostream &os, const struct ur_device_get_info_params_t *params) { } inline std::ostream & -operator<<(std::ostream &os, const struct ur_device_retain_params_t *params) { +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_device_retain_params_t *params) { os << ".hDevice = "; @@ -15313,7 +15414,8 @@ operator<<(std::ostream &os, const struct ur_device_retain_params_t *params) { } inline std::ostream & -operator<<(std::ostream &os, const struct ur_device_release_params_t *params) { +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_device_release_params_t *params) { os << ".hDevice = "; @@ -15324,7 +15426,7 @@ operator<<(std::ostream &os, const struct ur_device_release_params_t *params) { inline std::ostream & operator<<(std::ostream &os, - const struct ur_device_partition_params_t *params) { + [[maybe_unused]] const struct ur_device_partition_params_t *params) { os << ".hDevice = "; @@ -15360,9 +15462,9 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_device_select_binary_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_device_select_binary_params_t *params) { os << ".hDevice = "; @@ -15388,7 +15490,8 @@ operator<<(std::ostream &os, inline std::ostream & operator<<(std::ostream &os, - const struct ur_device_get_native_handle_params_t *params) { + [[maybe_unused]] const struct ur_device_get_native_handle_params_t + *params) { os << ".hDevice = "; @@ -15402,9 +15505,10 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_device_create_with_native_handle_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_device_create_with_native_handle_params_t + *params) { os << ".hNativeDevice = "; @@ -15428,9 +15532,10 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_device_get_global_timestamps_params_t *params) { +inline std::ostream &operator<<( + std::ostream &os, + [[maybe_unused]] const struct ur_device_get_global_timestamps_params_t + *params) { os << ".hDevice = "; diff --git a/source/common/ur_singleton.hpp b/source/common/ur_singleton.hpp index d757bb197c..6440e3ac7f 100644 --- a/source/common/ur_singleton.hpp +++ b/source/common/ur_singleton.hpp @@ -31,7 +31,8 @@ template class singleton_factory_t { ////////////////////////////////////////////////////////////////////////// /// extract the key from parameter list and if necessary, convert type - template key_t getKey(key_tn key, Ts &&...params) { + template + key_t getKey(key_tn key, [[maybe_unused]] Ts &&...params) { return reinterpret_cast(key); } diff --git a/source/loader/ur_lib.cpp b/source/loader/ur_lib.cpp index e1c0ed5e2f..08dc7e491a 100644 --- a/source/loader/ur_lib.cpp +++ b/source/loader/ur_lib.cpp @@ -70,7 +70,7 @@ void context_t::tearDownLayers() const { ////////////////////////////////////////////////////////////////////////// __urdlllocal ur_result_t -context_t::Init(ur_device_init_flags_t device_flags, +context_t::Init([[maybe_unused]] ur_device_init_flags_t device_flags, ur_loader_config_handle_t hLoaderConfig) { ur_result_t result; const char *logger_name = "loader"; diff --git a/test/conformance/event/urEventSetCallback.cpp b/test/conformance/event/urEventSetCallback.cpp index e238b4534d..ffecacc086 100644 --- a/test/conformance/event/urEventSetCallback.cpp +++ b/test/conformance/event/urEventSetCallback.cpp @@ -14,8 +14,9 @@ using urEventSetCallbackTest = uur::event::urEventReferenceTest; TEST_P(urEventSetCallbackTest, Success) { struct Callback { - static void callback(ur_event_handle_t hEvent, - ur_execution_info_t execStatus, void *pUserData) { + static void callback([[maybe_unused]] ur_event_handle_t hEvent, + [[maybe_unused]] ur_execution_info_t execStatus, + void *pUserData) { auto status = reinterpret_cast(pUserData); *status = true; @@ -78,7 +79,7 @@ TEST_P(urEventSetCallbackTest, AllStates) { }; struct Callback { - static void callback(ur_event_handle_t hEvent, + static void callback([[maybe_unused]] ur_event_handle_t hEvent, ur_execution_info_t execStatus, void *pUserData) { auto status = reinterpret_cast(pUserData); @@ -142,8 +143,9 @@ TEST_P(urEventSetCallbackTest, EventAlreadyCompleted) { ASSERT_SUCCESS(urEventWait(1, &event)); struct Callback { - static void callback(ur_event_handle_t hEvent, - ur_execution_info_t execStatus, void *pUserData) { + static void callback([[maybe_unused]] ur_event_handle_t hEvent, + [[maybe_unused]] ur_execution_info_t execStatus, + void *pUserData) { auto status = reinterpret_cast(pUserData); *status = true; @@ -165,8 +167,9 @@ UUR_INSTANTIATE_DEVICE_TEST_SUITE_P(urEventSetCallbackTest); /* Negative tests */ using urEventSetCallbackNegativeTest = uur::event::urEventTest; -void emptyCallback(ur_event_handle_t hEvent, ur_execution_info_t execStatus, - void *pUserData) {} +void emptyCallback([[maybe_unused]] ur_event_handle_t hEvent, + [[maybe_unused]] ur_execution_info_t execStatus, + [[maybe_unused]] void *pUserData) {} TEST_P(urEventSetCallbackNegativeTest, InvalidNullHandleEvent) { ASSERT_EQ_RESULT( diff --git a/test/conformance/source/environment.cpp b/test/conformance/source/environment.cpp index 92b84f4b4d..296bc73bb1 100644 --- a/test/conformance/source/environment.cpp +++ b/test/conformance/source/environment.cpp @@ -356,8 +356,8 @@ void KernelsEnvironment::LoadSource( binary_out = binary_ptr; } -std::vector -KernelsEnvironment::GetEntryPointNames(std::string program_name) { +std::vector KernelsEnvironment::GetEntryPointNames( + [[maybe_unused]] std::string program_name) { std::vector entry_points; #ifdef KERNELS_ENVIRONMENT entry_points = uur::device_binaries::program_kernel_map[program_name]; diff --git a/test/loader/platforms/platforms.cpp b/test/loader/platforms/platforms.cpp index bf85ae9cf4..504cc8404f 100644 --- a/test/loader/platforms/platforms.cpp +++ b/test/loader/platforms/platforms.cpp @@ -18,7 +18,7 @@ using namespace logger; ////////////////////////////////////////////////////////////////////////// -int main(int argc, char *argv[]) { +int main([[maybe_unused]] int argc, [[maybe_unused]] char *argv[]) { logger::init("TEST"); ur_result_t status; diff --git a/test/unified_malloc_framework/common/pool.hpp b/test/unified_malloc_framework/common/pool.hpp index 7a7b650e11..f4ecc7c594 100644 --- a/test/unified_malloc_framework/common/pool.hpp +++ b/test/unified_malloc_framework/common/pool.hpp @@ -76,7 +76,7 @@ struct pool_base { umf_result_t initialize(umf_memory_provider_handle_t *, size_t) noexcept { return UMF_RESULT_SUCCESS; }; - void *malloc(size_t size) noexcept { return nullptr; } + void *malloc([[maybe_unused]] size_t size) noexcept { return nullptr; } void *calloc(size_t, size_t) noexcept { return nullptr; } void *realloc(void *, size_t) noexcept { return nullptr; } void *aligned_malloc(size_t, size_t) noexcept { return nullptr; } @@ -120,7 +120,7 @@ struct malloc_pool : public pool_base { struct proxy_pool : public pool_base { umf_result_t initialize(umf_memory_provider_handle_t *providers, - size_t numProviders) noexcept { + [[maybe_unused]] size_t numProviders) noexcept { this->provider = providers[0]; return UMF_RESULT_SUCCESS; } @@ -136,7 +136,8 @@ struct proxy_pool : public pool_base { } return ptr; } - void *realloc(void *ptr, size_t size) noexcept { + void *realloc([[maybe_unused]] void *ptr, + [[maybe_unused]] size_t size) noexcept { // TODO: not supported umf::getPoolLastStatusRef() = UMF_RESULT_ERROR_NOT_SUPPORTED; @@ -150,7 +151,7 @@ struct proxy_pool : public pool_base { } return ptr; } - size_t malloc_usable_size(void *ptr) noexcept { + size_t malloc_usable_size([[maybe_unused]] void *ptr) noexcept { // TODO: not supported return 0; } diff --git a/test/unified_malloc_framework/common/provider.hpp b/test/unified_malloc_framework/common/provider.hpp index 518b2b0528..1c0388e179 100644 --- a/test/unified_malloc_framework/common/provider.hpp +++ b/test/unified_malloc_framework/common/provider.hpp @@ -30,21 +30,27 @@ struct provider_base { enum umf_result_t alloc(size_t, size_t, void **) noexcept { return UMF_RESULT_ERROR_UNKNOWN; } - enum umf_result_t free(void *ptr, size_t size) noexcept { + enum umf_result_t free([[maybe_unused]] void *ptr, + [[maybe_unused]] size_t size) noexcept { return UMF_RESULT_ERROR_UNKNOWN; } void get_last_native_error(const char **, int32_t *) noexcept {} - enum umf_result_t get_recommended_page_size(size_t size, - size_t *pageSize) noexcept { + enum umf_result_t + get_recommended_page_size([[maybe_unused]] size_t size, + [[maybe_unused]] size_t *pageSize) noexcept { return UMF_RESULT_ERROR_UNKNOWN; } - enum umf_result_t get_min_page_size(void *ptr, size_t *pageSize) noexcept { + enum umf_result_t + get_min_page_size([[maybe_unused]] void *ptr, + [[maybe_unused]] size_t *pageSize) noexcept { return UMF_RESULT_ERROR_UNKNOWN; } - enum umf_result_t purge_lazy(void *ptr, size_t size) noexcept { + enum umf_result_t purge_lazy([[maybe_unused]] void *ptr, + [[maybe_unused]] size_t size) noexcept { return UMF_RESULT_ERROR_UNKNOWN; } - enum umf_result_t purge_force(void *ptr, size_t size) noexcept { + enum umf_result_t purge_force([[maybe_unused]] void *ptr, + [[maybe_unused]] size_t size) noexcept { return UMF_RESULT_ERROR_UNKNOWN; } const char *get_name() noexcept { return "base"; } diff --git a/test/unified_malloc_framework/memoryPoolAPI.cpp b/test/unified_malloc_framework/memoryPoolAPI.cpp index d40254fbf0..7c750583d3 100644 --- a/test/unified_malloc_framework/memoryPoolAPI.cpp +++ b/test/unified_malloc_framework/memoryPoolAPI.cpp @@ -187,9 +187,10 @@ TEST_P(poolInitializeTest, errorPropagation) { umf_memory_provider_handle_t providers[] = {nullProvider.get()}; struct pool : public umf_test::pool_base { - umf_result_t initialize(umf_memory_provider_handle_t *providers, - size_t numProviders, - umf_result_t errorToReturn) noexcept { + umf_result_t + initialize([[maybe_unused]] umf_memory_provider_handle_t *providers, + [[maybe_unused]] size_t numProviders, + umf_result_t errorToReturn) noexcept { return errorToReturn; } }; @@ -233,6 +234,7 @@ TEST_F(test, getLastFailedMemoryProvider) { } enum umf_result_t free(void *ptr, size_t size) noexcept { + (void)size; ::free(ptr); return UMF_RESULT_SUCCESS; } diff --git a/test/unified_malloc_framework/umf_pools/disjoint_pool.cpp b/test/unified_malloc_framework/umf_pools/disjoint_pool.cpp index 9e4d4f7ee6..fd2bfb6106 100644 --- a/test/unified_malloc_framework/umf_pools/disjoint_pool.cpp +++ b/test/unified_malloc_framework/umf_pools/disjoint_pool.cpp @@ -42,7 +42,8 @@ TEST_F(test, freeErrorPropagation) { *ptr = malloc(size); return UMF_RESULT_SUCCESS; } - enum umf_result_t free(void *ptr, size_t size) noexcept { + enum umf_result_t free(void *ptr, + [[maybe_unused]] size_t size) noexcept { ::free(ptr); return freeReturn; }