From 098cdee1340c0f4e941b9136d390f82b98f0a909 Mon Sep 17 00:00:00 2001 From: Omar Ahmed Date: Wed, 25 Oct 2023 12:39:52 +0100 Subject: [PATCH] Add some merge fixes --- include/ur_print.hpp | 2562 +++++++----------- scripts/templates/print.hpp.mako | 25 +- source/adapters/cuda/ur_interface_loader.cpp | 24 +- source/adapters/null/ur_null.cpp | 23 +- test/loader/loader_lifetime/urLoaderInit.cpp | 4 +- test/loader/platforms/platforms.cpp | 2 +- tools/urinfo/CMakeLists.txt | 1 + tools/urinfo/urinfo.cpp | 4 +- tools/urinfo/utils.hpp | 4 +- 9 files changed, 999 insertions(+), 1650 deletions(-) diff --git a/include/ur_print.hpp b/include/ur_print.hpp index 64ca154bc8..6a47b955bc 100644 --- a/include/ur_print.hpp +++ b/include/ur_print.hpp @@ -60,8 +60,6 @@ template <> struct is_handle : std::true_type {}; template <> struct is_handle : std::true_type {}; -template inline constexpr bool is_handle_v = is_handle::value; -template inline void serializePtr(std::ostream &os, const T *ptr); template inline constexpr bool is_handle_v = is_handle::value; template @@ -204,274 +202,132 @@ template <> inline ur_result_t printFlag(std::ostream &os, uint32_t flag); template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_exp_peer_info_t value, size_t size); - -} // namespace ur_params - -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, - [[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, - enum ur_loader_config_info_t value); -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_code_location_t params); -inline std::ostream &operator<<(std::ostream &os, enum ur_adapter_info_t value); -inline std::ostream &operator<<(std::ostream &os, - enum ur_adapter_backend_t value); -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, - [[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, - [[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, - enum ur_device_affinity_domain_flag_t value); -inline std::ostream &operator<<(std::ostream &os, - enum ur_device_partition_t value); -inline std::ostream & -operator<<(std::ostream &os, - [[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, - enum ur_device_mem_cache_type_t value); -inline std::ostream &operator<<(std::ostream &os, - enum ur_device_local_mem_type_t value); -inline std::ostream &operator<<(std::ostream &os, - enum ur_device_exec_capability_flag_t value); -inline std::ostream & -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, - enum ur_memory_scope_capability_flag_t value); -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, - [[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, - [[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); -inline std::ostream &operator<<(std::ostream &os, - enum ur_image_channel_order_t value); -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, - [[maybe_unused]] const struct ur_image_format_t params); -inline std::ostream & -operator<<(std::ostream &os, - [[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, - [[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, - [[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, - enum ur_usm_device_mem_flag_t value); -inline std::ostream &operator<<(std::ostream &os, - enum ur_usm_pool_flag_t value); -inline std::ostream &operator<<(std::ostream &os, enum ur_usm_type_t value); -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, - [[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, - enum ur_virtual_mem_granularity_info_t value); -inline std::ostream &operator<<(std::ostream &os, - enum ur_virtual_mem_access_flag_t value); -inline std::ostream &operator<<(std::ostream &os, - enum ur_virtual_mem_info_t value); -inline std::ostream &operator<<(std::ostream &os, - enum ur_physical_mem_flag_t value); -inline std::ostream & -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, - [[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); -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, - [[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); -inline std::ostream &operator<<(std::ostream &os, - enum ur_kernel_sub_group_info_t value); -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, - [[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, - [[maybe_unused]] const struct ur_queue_properties_t params); -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_queue_index_properties_t params); -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_queue_native_desc_t params); -inline std::ostream & -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, - [[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); -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, - [[maybe_unused]] const struct ur_exp_file_descriptor_t params); -inline std::ostream & -operator<<(std::ostream &os, - [[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, - [[maybe_unused]] const struct ur_exp_sampler_addr_modes_t params); -inline std::ostream & -operator<<(std::ostream &os, - [[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, - [[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); - -inline std::ostream &operator<<(std::ostream &os, enum ur_function_t value) { +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_exp_peer_info_t value, size_t size); + +} // namespace details + +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_function_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_structure_type_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_result_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_base_properties_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_base_desc_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_rect_offset_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_rect_region_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_device_init_flag_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_loader_config_info_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_code_location_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_adapter_info_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_adapter_backend_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_platform_info_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_api_version_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_platform_native_properties_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_platform_backend_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_device_binary_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_device_type_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_device_info_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_device_affinity_domain_flag_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_device_partition_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_device_partition_property_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_device_partition_properties_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_device_fp_capability_flag_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_device_mem_cache_type_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_device_local_mem_type_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_device_exec_capability_flag_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_device_native_properties_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_memory_order_capability_flag_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_memory_scope_capability_flag_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_device_usm_access_capability_flag_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_context_flag_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_context_properties_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_context_info_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_context_native_properties_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_mem_flag_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_mem_type_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_mem_info_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_image_channel_order_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_image_channel_type_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_image_info_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_image_format_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_image_desc_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_buffer_properties_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_buffer_channel_properties_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_buffer_alloc_location_properties_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_buffer_region_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_buffer_create_type_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_mem_native_properties_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_sampler_filter_mode_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_sampler_addressing_mode_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_sampler_info_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_sampler_desc_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_sampler_native_properties_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_usm_host_mem_flag_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_usm_device_mem_flag_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_usm_pool_flag_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_usm_type_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_usm_alloc_info_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_usm_advice_flag_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_desc_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_host_desc_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_device_desc_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_pool_desc_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_pool_limits_desc_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_usm_pool_info_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_virtual_mem_granularity_info_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_virtual_mem_access_flag_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_virtual_mem_info_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_physical_mem_flag_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_physical_mem_properties_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_program_metadata_type_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_metadata_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_properties_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_program_info_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_program_build_status_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_program_binary_type_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_program_build_info_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_specialization_constant_info_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_native_properties_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_arg_value_properties_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_arg_local_properties_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_kernel_info_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_kernel_group_info_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_kernel_sub_group_info_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_kernel_cache_config_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_kernel_exec_info_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_arg_pointer_properties_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_exec_info_properties_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_arg_sampler_properties_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_arg_mem_obj_properties_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_native_properties_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_queue_info_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_queue_flag_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_queue_properties_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_queue_index_properties_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_queue_native_desc_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_queue_native_properties_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_command_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_event_status_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_event_info_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_profiling_info_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_event_native_properties_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_execution_info_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_map_flag_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_usm_migration_flag_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_exp_image_copy_flag_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_file_descriptor_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_win32_handle_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_sampler_mip_properties_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_sampler_addr_modes_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_interop_mem_desc_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_interop_semaphore_desc_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_layered_image_properties_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_command_buffer_desc_t params); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ur_exp_peer_info_t value); + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_function_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, ur_function_t value) { switch (value) { case UR_FUNCTION_CONTEXT_CREATE: os << "UR_FUNCTION_CONTEXT_CREATE"; @@ -968,67 +824,51 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_function_t value) { case UR_FUNCTION_ADAPTER_GET_INFO: os << "UR_FUNCTION_ADAPTER_GET_INFO"; break; - case UR_FUNCTION_LOADER_INIT: os << "UR_FUNCTION_LOADER_INIT"; break; - case UR_FUNCTION_LOADER_TEAR_DOWN: os << "UR_FUNCTION_LOADER_TEAR_DOWN"; break; - case UR_FUNCTION_COMMAND_BUFFER_APPEND_USM_MEMCPY_EXP: os << "UR_FUNCTION_COMMAND_BUFFER_APPEND_USM_MEMCPY_EXP"; break; - case UR_FUNCTION_COMMAND_BUFFER_APPEND_USM_FILL_EXP: os << "UR_FUNCTION_COMMAND_BUFFER_APPEND_USM_FILL_EXP"; break; - case UR_FUNCTION_COMMAND_BUFFER_APPEND_MEM_BUFFER_COPY_EXP: os << "UR_FUNCTION_COMMAND_BUFFER_APPEND_MEM_BUFFER_COPY_EXP"; break; - case UR_FUNCTION_COMMAND_BUFFER_APPEND_MEM_BUFFER_WRITE_EXP: os << "UR_FUNCTION_COMMAND_BUFFER_APPEND_MEM_BUFFER_WRITE_EXP"; break; - case UR_FUNCTION_COMMAND_BUFFER_APPEND_MEM_BUFFER_READ_EXP: os << "UR_FUNCTION_COMMAND_BUFFER_APPEND_MEM_BUFFER_READ_EXP"; break; - case UR_FUNCTION_COMMAND_BUFFER_APPEND_MEM_BUFFER_COPY_RECT_EXP: os << "UR_FUNCTION_COMMAND_BUFFER_APPEND_MEM_BUFFER_COPY_RECT_EXP"; break; - case UR_FUNCTION_COMMAND_BUFFER_APPEND_MEM_BUFFER_WRITE_RECT_EXP: os << "UR_FUNCTION_COMMAND_BUFFER_APPEND_MEM_BUFFER_WRITE_RECT_EXP"; break; - case UR_FUNCTION_COMMAND_BUFFER_APPEND_MEM_BUFFER_READ_RECT_EXP: os << "UR_FUNCTION_COMMAND_BUFFER_APPEND_MEM_BUFFER_READ_RECT_EXP"; break; - case UR_FUNCTION_COMMAND_BUFFER_APPEND_MEM_BUFFER_FILL_EXP: os << "UR_FUNCTION_COMMAND_BUFFER_APPEND_MEM_BUFFER_FILL_EXP"; break; - case UR_FUNCTION_ENQUEUE_COOPERATIVE_KERNEL_LAUNCH_EXP: os << "UR_FUNCTION_ENQUEUE_COOPERATIVE_KERNEL_LAUNCH_EXP"; break; - case UR_FUNCTION_KERNEL_SUGGEST_MAX_COOPERATIVE_GROUP_COUNT_EXP: os << "UR_FUNCTION_KERNEL_SUGGEST_MAX_COOPERATIVE_GROUP_COUNT_EXP"; break; - case UR_FUNCTION_COMMAND_BUFFER_APPEND_USM_PREFETCH_EXP: os << "UR_FUNCTION_COMMAND_BUFFER_APPEND_USM_PREFETCH_EXP"; break; - case UR_FUNCTION_COMMAND_BUFFER_APPEND_USM_ADVISE_EXP: os << "UR_FUNCTION_COMMAND_BUFFER_APPEND_USM_ADVISE_EXP"; break; - case UR_FUNCTION_LOADER_CONFIG_SET_CODE_LOCATION_CALLBACK: os << "UR_FUNCTION_LOADER_CONFIG_SET_CODE_LOCATION_CALLBACK"; break; @@ -1164,11 +1004,9 @@ inline std::ostream &operator<<(std::ostream &os, ur_structure_type_t value) { case UR_STRUCTURE_TYPE_EXP_WIN32_HANDLE: os << "UR_STRUCTURE_TYPE_EXP_WIN32_HANDLE"; break; - case UR_STRUCTURE_TYPE_EXP_LAYERED_IMAGE_PROPERTIES: os << "UR_STRUCTURE_TYPE_EXP_LAYERED_IMAGE_PROPERTIES"; break; - case UR_STRUCTURE_TYPE_EXP_SAMPLER_ADDR_MODES: os << "UR_STRUCTURE_TYPE_EXP_SAMPLER_ADDR_MODES"; break; @@ -1186,8 +1024,7 @@ inline ur_result_t printStruct(std::ostream &os, const void *ptr) { return printPtr(os, ptr); } - const enum ur_structure_type_t *value = - (const enum ur_structure_type_t *)ptr; + const enum ur_structure_type_t *value = (const enum ur_structure_type_t *)ptr; switch (*value) { case UR_STRUCTURE_TYPE_CONTEXT_PROPERTIES: { @@ -1399,18 +1236,6 @@ inline ur_result_t printStruct(std::ostream &os, const void *ptr) { const ur_exp_sampler_addr_modes_t *pstruct = (const ur_exp_sampler_addr_modes_t *)ptr; printPtr(os, pstruct); } break; - - case UR_STRUCTURE_TYPE_EXP_LAYERED_IMAGE_PROPERTIES: { - const ur_exp_layered_image_properties_t *pstruct = - (const ur_exp_layered_image_properties_t *)ptr; - ur_params::serializePtr(os, pstruct); - } break; - - case UR_STRUCTURE_TYPE_EXP_SAMPLER_ADDR_MODES: { - const ur_exp_sampler_addr_modes_t *pstruct = - (const ur_exp_sampler_addr_modes_t *)ptr; - ur_params::serializePtr(os, pstruct); - } break; default: os << "unknown enumerator"; return UR_RESULT_ERROR_INVALID_ENUMERATION; @@ -1885,36 +1710,7 @@ inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_loader_conf } return UR_RESULT_SUCCESS; } -} // namespace ur_params -inline std::ostream &operator<<(std::ostream &os, - const struct ur_code_location_t params) { - os << "(struct ur_code_location_t){"; - - os << ".functionName = "; - - ur_params::serializePtr(os, (params.functionName)); - - os << ", "; - os << ".sourceFile = "; - - ur_params::serializePtr(os, (params.sourceFile)); - - os << ", "; - os << ".lineNumber = "; - - os << (params.lineNumber); - - os << ", "; - os << ".columnNumber = "; - - os << (params.columnNumber); - - os << "}"; - return os; -} -inline std::ostream &operator<<(std::ostream &os, - enum ur_adapter_info_t value) { - switch (value) { +} // namespace details /////////////////////////////////////////////////////////////////////////////// /// @brief Print operator for the ur_code_location_t type @@ -2595,11 +2391,9 @@ inline std::ostream &operator<<(std::ostream &os, ur_device_info_t value) { case UR_DEVICE_INFO_VIRTUAL_MEMORY_SUPPORT: os << "UR_DEVICE_INFO_VIRTUAL_MEMORY_SUPPORT"; break; - case UR_DEVICE_INFO_ESIMD_SUPPORT: os << "UR_DEVICE_INFO_ESIMD_SUPPORT"; break; - case UR_DEVICE_INFO_BINDLESS_IMAGES_SUPPORT_EXP: os << "UR_DEVICE_INFO_BINDLESS_IMAGES_SUPPORT_EXP"; break; @@ -3996,20 +3790,6 @@ inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_device_info os << ")"; } break; - - case UR_DEVICE_INFO_ESIMD_SUPPORT: { - const ur_bool_t *tptr = (const ur_bool_t *)ptr; - if (sizeof(ur_bool_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_bool_t) << ")"; - return; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - os << ")"; - } break; case UR_DEVICE_INFO_ESIMD_SUPPORT: { const ur_bool_t *tptr = (const ur_bool_t *)ptr; if (sizeof(ur_bool_t) > size) { @@ -8941,19 +8721,15 @@ inline std::ostream &operator<<(std::ostream &os, const struct ur_event_native_p /// std::ostream & inline std::ostream &operator<<(std::ostream &os, ur_execution_info_t value) { switch (value) { - case UR_EXECUTION_INFO_COMPLETE: os << "UR_EXECUTION_INFO_COMPLETE"; break; - case UR_EXECUTION_INFO_RUNNING: os << "UR_EXECUTION_INFO_RUNNING"; break; - case UR_EXECUTION_INFO_SUBMITTED: os << "UR_EXECUTION_INFO_SUBMITTED"; break; - case UR_EXECUTION_INFO_QUEUED: os << "UR_EXECUTION_INFO_QUEUED"; break; @@ -9241,8 +9017,11 @@ inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_sampler_mi os << "}"; return os; } -inline std::ostream & -operator<<(std::ostream &os, const struct ur_exp_sampler_addr_modes_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_exp_sampler_addr_modes_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_sampler_addr_modes_t params) { os << "(struct ur_exp_sampler_addr_modes_t){"; os << ".stype = "; @@ -9252,7 +9031,8 @@ operator<<(std::ostream &os, const struct ur_exp_sampler_addr_modes_t params) { os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << ", "; os << ".addrModes = {"; @@ -9268,8 +9048,11 @@ operator<<(std::ostream &os, const struct ur_exp_sampler_addr_modes_t params) { os << "}"; return os; } -inline std::ostream &operator<<(std::ostream &os, - const struct ur_exp_interop_mem_desc_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_exp_interop_mem_desc_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_interop_mem_desc_t params) { os << "(struct ur_exp_interop_mem_desc_t){"; os << ".stype = "; @@ -9330,30 +9113,11 @@ inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_layered_im os << "}"; return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_exp_layered_image_properties_t params) { - os << "(struct ur_exp_layered_image_properties_t){"; - - os << ".stype = "; - - os << (params.stype); - - os << ", "; - os << ".pNext = "; - - ur_params::serializeStruct(os, (params.pNext)); - - os << ", "; - os << ".numLayers = "; - - os << (params.numLayers); - - os << "}"; - return os; -} -inline std::ostream & -operator<<(std::ostream &os, const struct ur_exp_command_buffer_desc_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_exp_command_buffer_desc_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_command_buffer_desc_t params) { os << "(struct ur_exp_command_buffer_desc_t){"; os << ".stype = "; @@ -9429,13 +9193,58 @@ inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_exp_peer_in } } // namespace details -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_adapter_get_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_loader_config_create_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_loader_config_create_params_t *params) { + + os << ".phLoaderConfig = "; - os << ".NumEntries = "; + details::printPtr(os, + *(params->pphLoaderConfig)); - os << *(params->pNumEntries); + return os; +} + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_loader_config_retain_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_loader_config_retain_params_t *params) { + + os << ".hLoaderConfig = "; + + details::printPtr(os, + *(params->phLoaderConfig)); + + return os; +} + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_loader_config_release_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_loader_config_release_params_t *params) { + + os << ".hLoaderConfig = "; + + details::printPtr(os, + *(params->phLoaderConfig)); + + return os; +} + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_loader_config_get_info_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_loader_config_get_info_params_t *params) { + + os << ".hLoaderConfig = "; + + details::printPtr(os, + *(params->phLoaderConfig)); os << ", "; os << ".propName = "; @@ -9460,9 +9269,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_adapter_release_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_loader_config_enable_layer_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_loader_config_enable_layer_params_t *params) { os << ".hLoaderConfig = "; @@ -9478,9 +9289,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_adapter_retain_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_loader_config_set_code_location_callback_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_loader_config_set_code_location_callback_params_t *params) { os << ".hLoaderConfig = "; @@ -9502,9 +9315,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_adapter_get_last_error_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_platform_get_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_platform_get_params_t *params) { os << ".phAdapters = {"; for (size_t i = 0; *(params->pphAdapters) != NULL && i < *params->pNumAdapters; ++i) { @@ -9548,9 +9363,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_adapter_get_info_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_platform_get_info_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_platform_get_info_params_t *params) { os << ".hPlatform = "; @@ -9580,13 +9397,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream &operator<<( - std::ostream &os, [[maybe_unused]] const struct - ur_bindless_images_unsampled_image_handle_destroy_exp_params_t *params) { - - os << ".hContext = "; - - ur_params::serializePtr(os, *(params->phContext)); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_platform_get_native_handle_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_platform_get_native_handle_params_t *params) { os << ".hPlatform = "; @@ -9602,9 +9417,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, [[maybe_unused]] const struct - ur_bindless_images_sampled_image_handle_destroy_exp_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_platform_create_with_native_handle_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_platform_create_with_native_handle_params_t *params) { os << ".hNativePlatform = "; @@ -9626,19 +9443,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_bindless_images_image_allocate_exp_params_t - *params) { - - os << ".hContext = "; - - ur_params::serializePtr(os, *(params->phContext)); - - os << ", "; - os << ".hDevice = "; - - ur_params::serializePtr(os, *(params->phDevice)); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_platform_get_api_version_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_platform_get_api_version_params_t *params) { os << ".hPlatform = "; @@ -9654,10 +9463,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_bindless_images_image_free_exp_params_t - *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_platform_get_backend_option_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_platform_get_backend_option_params_t *params) { os << ".hPlatform = "; @@ -9679,9 +9489,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_bindless_images_unsampled_image_create_exp_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_context_create_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_context_create_params_t *params) { os << ".DeviceCount = "; @@ -9742,9 +9554,11 @@ inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct return os; } -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_bindless_images_sampled_image_create_exp_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_context_get_info_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_context_get_info_params_t *params) { os << ".hContext = "; @@ -9794,10 +9608,11 @@ inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_bindless_images_image_copy_exp_params_t - *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_context_create_with_native_handle_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_context_create_with_native_handle_params_t *params) { os << ".hNativeContext = "; @@ -9896,10 +9711,11 @@ inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_bindless_images_image_get_info_exp_params_t - *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_event_get_profiling_info_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_event_get_profiling_info_params_t *params) { os << ".hEvent = "; @@ -9929,9 +9745,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_bindless_images_mipmap_get_level_exp_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_event_wait_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_event_wait_params_t *params) { os << ".numEvents = "; @@ -10000,10 +9818,16 @@ inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_bindless_images_mipmap_free_exp_params_t - *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_event_create_with_native_handle_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_event_create_with_native_handle_params_t *params) { + + os << ".hNativeEvent = "; + + details::printPtr(os, + *(params->phNativeEvent)); os << ", "; os << ".hContext = "; @@ -10026,13 +9850,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_bindless_images_import_opaque_fd_exp_params_t *params) { - - os << ".hContext = "; - - ur_params::serializePtr(os, *(params->phContext)); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_event_set_callback_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_event_set_callback_params_t *params) { os << ".hEvent = "; @@ -10059,9 +9881,11 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct return os; } -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_bindless_images_map_external_array_exp_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_program_create_with_il_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_create_with_il_params_t *params) { os << ".hContext = "; @@ -10094,9 +9918,11 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct return os; } -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_bindless_images_release_interop_exp_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_program_create_with_binary_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_create_with_binary_params_t *params) { os << ".hContext = "; @@ -10110,19 +9936,7 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct *(params->phDevice)); os << ", "; - os << ".hInteropMem = "; - - ur_params::serializePtr(os, *(params->phInteropMem)); - - return os; -} - -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_bindless_images_import_external_semaphore_opaque_fd_exp_params_t - *params) { - - os << ".hContext = "; + os << ".size = "; os << *(params->psize); @@ -10147,9 +9961,11 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct return os; } -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_bindless_images_destroy_external_semaphore_exp_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_program_build_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_build_params_t *params) { os << ".hContext = "; @@ -10171,18 +9987,11 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct return os; } -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_bindless_images_wait_external_semaphore_exp_params_t *params) { - - os << ".hQueue = "; - - ur_params::serializePtr(os, *(params->phQueue)); - - os << ", "; - os << ".hSemaphore = "; - - ur_params::serializePtr(os, *(params->phSemaphore)); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_program_compile_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_compile_params_t *params) { os << ".hContext = "; @@ -10204,13 +10013,11 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct return os; } -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_bindless_images_signal_external_semaphore_exp_params_t *params) { - - os << ".hQueue = "; - - ur_params::serializePtr(os, *(params->phQueue)); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_program_link_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_link_params_t *params) { os << ".hContext = "; @@ -10235,29 +10042,7 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << "}"; os << ", "; - os << ".phEvent = "; - - ur_params::serializePtr(os, *(params->pphEvent)); - - return os; -} - -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_command_buffer_create_exp_params_t - *params) { - - os << ".hContext = "; - - ur_params::serializePtr(os, *(params->phContext)); - - os << ", "; - os << ".hDevice = "; - - ur_params::serializePtr(os, *(params->phDevice)); - - os << ", "; - os << ".pCommandBufferDesc = "; + os << ".pOptions = "; details::printPtr(os, *(params->ppOptions)); @@ -10271,10 +10056,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_command_buffer_retain_exp_params_t - *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_program_retain_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_retain_params_t *params) { os << ".hProgram = "; @@ -10284,10 +10070,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_command_buffer_release_exp_params_t - *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_program_release_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_release_params_t *params) { os << ".hProgram = "; @@ -10297,20 +10084,16 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_command_buffer_finalize_exp_params_t - *params) { - - os << ".hCommandBuffer = "; - - ur_params::serializePtr(os, *(params->phCommandBuffer)); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_program_get_function_pointer_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_get_function_pointer_params_t *params) { os << ".hDevice = "; -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_command_buffer_append_kernel_launch_exp_params_t *params) { + details::printPtr(os, + *(params->phDevice)); os << ", "; os << ".hProgram = "; @@ -10367,9 +10150,11 @@ inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct return os; } -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_command_buffer_append_usm_memcpy_exp_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_program_get_build_info_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_get_build_info_params_t *params) { os << ".hProgram = "; @@ -10435,56 +10220,11 @@ inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_command_buffer_append_usm_fill_exp_params_t - *params) { - - os << ".hCommandBuffer = "; - - ur_params::serializePtr(os, *(params->phCommandBuffer)); - - os << ", "; - os << ".pMemory = "; - - ur_params::serializePtr(os, *(params->ppMemory)); - - os << ", "; - os << ".pPattern = "; - - ur_params::serializePtr(os, *(params->ppPattern)); - - os << ", "; - os << ".patternSize = "; - - os << *(params->ppatternSize); - - os << ", "; - os << ".size = "; - - os << *(params->psize); - - os << ", "; - os << ".numSyncPointsInWaitList = "; - - os << *(params->pnumSyncPointsInWaitList); - - os << ", "; - os << ".pSyncPointWaitList = "; - - ur_params::serializePtr(os, *(params->ppSyncPointWaitList)); - - os << ", "; - os << ".pSyncPoint = "; - - ur_params::serializePtr(os, *(params->ppSyncPoint)); - - return os; -} - -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_command_buffer_append_mem_buffer_copy_exp_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_program_get_native_handle_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_get_native_handle_params_t *params) { os << ".hProgram = "; @@ -10592,9 +10332,11 @@ inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct return os; } -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_command_buffer_append_mem_buffer_write_exp_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_kernel_get_group_info_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_get_group_info_params_t *params) { os << ".hKernel = "; @@ -10670,9 +10412,11 @@ inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct return os; } -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_command_buffer_append_mem_buffer_read_exp_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_kernel_retain_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_retain_params_t *params) { os << ".hKernel = "; @@ -10790,9 +10534,11 @@ inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct return os; } -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_command_buffer_append_mem_buffer_copy_rect_exp_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_kernel_set_arg_local_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_set_arg_local_params_t *params) { os << ".hKernel = "; @@ -10914,9 +10660,11 @@ inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct return os; } -inline std::ostream &operator<<( - std::ostream &os, [[maybe_unused]] const struct - ur_command_buffer_append_mem_buffer_write_rect_exp_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_kernel_set_arg_mem_obj_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_set_arg_mem_obj_params_t *params) { os << ".hKernel = "; @@ -11096,9 +10844,11 @@ inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct return os; } -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_command_buffer_append_mem_buffer_read_rect_exp_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_sampler_create_with_native_handle_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_sampler_create_with_native_handle_params_t *params) { os << ".hNativeSampler = "; @@ -11368,143 +11118,11 @@ inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct return os; } -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_command_buffer_append_mem_buffer_fill_exp_params_t *params) { - - os << ".hCommandBuffer = "; - - ur_params::serializePtr(os, *(params->phCommandBuffer)); - - os << ", "; - os << ".hBuffer = "; - - ur_params::serializePtr(os, *(params->phBuffer)); - - os << ", "; - os << ".pPattern = "; - - ur_params::serializePtr(os, *(params->ppPattern)); - - os << ", "; - os << ".patternSize = "; - - os << *(params->ppatternSize); - - os << ", "; - os << ".offset = "; - - os << *(params->poffset); - - os << ", "; - os << ".size = "; - - os << *(params->psize); - - os << ", "; - os << ".numSyncPointsInWaitList = "; - - os << *(params->pnumSyncPointsInWaitList); - - os << ", "; - os << ".pSyncPointWaitList = "; - - ur_params::serializePtr(os, *(params->ppSyncPointWaitList)); - - os << ", "; - os << ".pSyncPoint = "; - - ur_params::serializePtr(os, *(params->ppSyncPoint)); - - return os; -} - -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_command_buffer_append_usm_prefetch_exp_params_t *params) { - - os << ".hCommandBuffer = "; - - ur_params::serializePtr(os, *(params->phCommandBuffer)); - - os << ", "; - os << ".pMemory = "; - - ur_params::serializePtr(os, *(params->ppMemory)); - - os << ", "; - os << ".size = "; - - os << *(params->psize); - - os << ", "; - os << ".flags = "; - - ur_params::serializeFlag(os, *(params->pflags)); - - os << ", "; - os << ".numSyncPointsInWaitList = "; - - os << *(params->pnumSyncPointsInWaitList); - - os << ", "; - os << ".pSyncPointWaitList = "; - - ur_params::serializePtr(os, *(params->ppSyncPointWaitList)); - - os << ", "; - os << ".pSyncPoint = "; - - ur_params::serializePtr(os, *(params->ppSyncPoint)); - - return os; -} - -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_command_buffer_append_usm_advise_exp_params_t *params) { - - os << ".hCommandBuffer = "; - - ur_params::serializePtr(os, *(params->phCommandBuffer)); - - os << ", "; - os << ".pMemory = "; - - ur_params::serializePtr(os, *(params->ppMemory)); - - os << ", "; - os << ".size = "; - - os << *(params->psize); - - os << ", "; - os << ".advice = "; - - ur_params::serializeFlag(os, *(params->padvice)); - - os << ", "; - os << ".numSyncPointsInWaitList = "; - - os << *(params->pnumSyncPointsInWaitList); - - os << ", "; - os << ".pSyncPointWaitList = "; - - ur_params::serializePtr(os, *(params->ppSyncPointWaitList)); - - os << ", "; - os << ".pSyncPoint = "; - - ur_params::serializePtr(os, *(params->ppSyncPoint)); - - return os; -} - -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_command_buffer_enqueue_exp_params_t - *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_mem_get_info_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_mem_get_info_params_t *params) { os << ".hMemory = "; @@ -11568,9 +11186,11 @@ inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_context_create_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_physical_mem_create_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_physical_mem_create_params_t *params) { os << ".hContext = "; @@ -11603,9 +11223,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_context_retain_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_physical_mem_retain_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_physical_mem_retain_params_t *params) { os << ".hPhysicalMem = "; @@ -11615,9 +11237,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_context_release_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_physical_mem_release_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_physical_mem_release_params_t *params) { os << ".hPhysicalMem = "; @@ -11627,13 +11251,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_context_get_info_params_t *params) { - - os << ".hContext = "; - - ur_params::serializePtr(os, *(params->phContext)); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_adapter_get_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_adapter_get_params_t *params) { os << ".NumEntries = "; @@ -11660,10 +11282,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_context_get_native_handle_params_t - *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_adapter_release_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_adapter_release_params_t *params) { os << ".hAdapter = "; @@ -11673,10 +11296,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_context_create_with_native_handle_params_t - *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_adapter_retain_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_adapter_retain_params_t *params) { os << ".hAdapter = "; @@ -11712,10 +11336,11 @@ inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_context_set_extended_deleter_params_t - *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_adapter_get_info_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_adapter_get_info_params_t *params) { os << ".hAdapter = "; @@ -11725,7 +11350,7 @@ inline std::ostream &operator<<( os << ", "; os << ".propName = "; - os << reinterpret_cast(*(params->ppfnDeleter)); + os << *(params->ppropName); os << ", "; os << ".propSize = "; @@ -11745,9 +11370,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_enqueue_kernel_launch_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_enqueue_kernel_launch_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_kernel_launch_params_t *params) { os << ".hQueue = "; @@ -11809,9 +11436,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_enqueue_events_wait_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_enqueue_events_wait_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_events_wait_params_t *params) { os << ".hQueue = "; @@ -11844,10 +11473,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_enqueue_events_wait_with_barrier_params_t - *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_enqueue_events_wait_with_barrier_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_events_wait_with_barrier_params_t *params) { os << ".hQueue = "; @@ -11880,9 +11510,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_enqueue_mem_buffer_read_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_enqueue_mem_buffer_read_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_mem_buffer_read_params_t *params) { os << ".hQueue = "; @@ -11942,10 +11574,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_enqueue_mem_buffer_write_params_t - *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_enqueue_mem_buffer_write_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_mem_buffer_write_params_t *params) { os << ".hQueue = "; @@ -12005,10 +11638,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_enqueue_mem_buffer_read_rect_params_t - *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_enqueue_mem_buffer_read_rect_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_mem_buffer_read_rect_params_t *params) { os << ".hQueue = "; @@ -12093,10 +11727,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_enqueue_mem_buffer_write_rect_params_t - *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_enqueue_mem_buffer_write_rect_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_mem_buffer_write_rect_params_t *params) { os << ".hQueue = "; @@ -12181,9 +11816,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_enqueue_mem_buffer_copy_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_enqueue_mem_buffer_copy_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_mem_buffer_copy_params_t *params) { os << ".hQueue = "; @@ -12243,10 +11880,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_enqueue_mem_buffer_copy_rect_params_t - *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_enqueue_mem_buffer_copy_rect_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_mem_buffer_copy_rect_params_t *params) { os << ".hQueue = "; @@ -12326,9 +11964,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_enqueue_mem_buffer_fill_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_enqueue_mem_buffer_fill_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_mem_buffer_fill_params_t *params) { os << ".hQueue = "; @@ -12388,9 +12028,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_enqueue_mem_image_read_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_enqueue_mem_image_read_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_mem_image_read_params_t *params) { os << ".hQueue = "; @@ -12460,9 +12102,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_enqueue_mem_image_write_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_enqueue_mem_image_write_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_mem_image_write_params_t *params) { os << ".hQueue = "; @@ -12532,9 +12176,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_enqueue_mem_image_copy_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_enqueue_mem_image_copy_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_mem_image_copy_params_t *params) { os << ".hQueue = "; @@ -12594,9 +12240,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_enqueue_mem_buffer_map_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_enqueue_mem_buffer_map_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_mem_buffer_map_params_t *params) { os << ".hQueue = "; @@ -12662,9 +12310,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_enqueue_mem_unmap_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_enqueue_mem_unmap_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_mem_unmap_params_t *params) { os << ".hQueue = "; @@ -12709,9 +12359,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_enqueue_usm_fill_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_enqueue_usm_fill_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_usm_fill_params_t *params) { os << ".hQueue = "; @@ -12766,9 +12418,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_enqueue_usm_memcpy_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_enqueue_usm_memcpy_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_usm_memcpy_params_t *params) { os << ".hQueue = "; @@ -12823,9 +12477,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_enqueue_usm_prefetch_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_enqueue_usm_prefetch_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_usm_prefetch_params_t *params) { os << ".hQueue = "; @@ -12875,9 +12531,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_enqueue_usm_advise_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_enqueue_usm_advise_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_usm_advise_params_t *params) { os << ".hQueue = "; @@ -12910,9 +12568,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_enqueue_usm_fill_2d_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_enqueue_usm_fill_2d_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_usm_fill_2d_params_t *params) { os << ".hQueue = "; @@ -12977,9 +12637,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_enqueue_usm_memcpy_2d_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_enqueue_usm_memcpy_2d_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_usm_memcpy_2d_params_t *params) { os << ".hQueue = "; @@ -13049,9 +12711,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_enqueue_device_global_variable_write_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_enqueue_device_global_variable_write_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_device_global_variable_write_params_t *params) { os << ".hQueue = "; @@ -13117,9 +12781,11 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct return os; } -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_enqueue_device_global_variable_read_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_enqueue_device_global_variable_read_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_device_global_variable_read_params_t *params) { os << ".hQueue = "; @@ -13185,9 +12851,11 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_enqueue_read_host_pipe_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_enqueue_read_host_pipe_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_read_host_pipe_params_t *params) { os << ".hQueue = "; @@ -13248,9 +12916,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_enqueue_write_host_pipe_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_enqueue_write_host_pipe_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_write_host_pipe_params_t *params) { os << ".hQueue = "; @@ -13311,68 +12981,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_enqueue_cooperative_kernel_launch_exp_params_t *params) { - - os << ".hQueue = "; - - ur_params::serializePtr(os, *(params->phQueue)); - - os << ", "; - os << ".hKernel = "; - - ur_params::serializePtr(os, *(params->phKernel)); - - os << ", "; - os << ".workDim = "; - - os << *(params->pworkDim); - - os << ", "; - os << ".pGlobalWorkOffset = "; - - ur_params::serializePtr(os, *(params->ppGlobalWorkOffset)); - - os << ", "; - os << ".pGlobalWorkSize = "; - - ur_params::serializePtr(os, *(params->ppGlobalWorkSize)); - - os << ", "; - os << ".pLocalWorkSize = "; - - ur_params::serializePtr(os, *(params->ppLocalWorkSize)); - - os << ", "; - os << ".numEventsInWaitList = "; - - os << *(params->pnumEventsInWaitList); - - os << ", "; - os << ".phEventWaitList = {"; - for (size_t i = 0; *(params->pphEventWaitList) != NULL && - i < *params->pnumEventsInWaitList; - ++i) { - if (i != 0) { - os << ", "; - } - - ur_params::serializePtr(os, (*(params->pphEventWaitList))[i]); - } - os << "}"; - - os << ", "; - os << ".phEvent = "; - - ur_params::serializePtr(os, *(params->pphEvent)); - - return os; -} - -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_event_get_info_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_enqueue_cooperative_kernel_launch_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_cooperative_kernel_launch_exp_params_t *params) { os << ".hQueue = "; @@ -13391,19 +13004,7 @@ operator<<(std::ostream &os, os << *(params->pworkDim); os << ", "; - os << ".pPropSizeRet = "; - - ur_params::serializePtr(os, *(params->ppPropSizeRet)); - - return os; -} - -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_event_get_profiling_info_params_t - *params) { - - os << ".hEvent = "; + os << ".pGlobalWorkOffset = "; details::printPtr(os, *(params->ppGlobalWorkOffset)); @@ -13421,18 +13022,7 @@ operator<<(std::ostream &os, *(params->ppLocalWorkSize)); os << ", "; - os << ".pPropSizeRet = "; - - ur_params::serializePtr(os, *(params->ppPropSizeRet)); - - return os; -} - -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_event_wait_params_t *params) { - - os << ".numEvents = "; + os << ".numEventsInWaitList = "; os << *(params->pnumEventsInWaitList); @@ -13448,25 +13038,8 @@ operator<<(std::ostream &os, } os << "}"; - return os; -} - -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_event_retain_params_t *params) { - - os << ".hEvent = "; - - ur_params::serializePtr(os, *(params->phEvent)); - - return os; -} - -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_event_release_params_t *params) { - - os << ".hEvent = "; + os << ", "; + os << ".phEvent = "; details::printPtr(os, *(params->pphEvent)); @@ -13474,9 +13047,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_event_get_native_handle_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_queue_get_info_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_queue_get_info_params_t *params) { os << ".hQueue = "; @@ -13484,19 +13059,7 @@ inline std::ostream &operator<<( *(params->phQueue)); os << ", "; - os << ".phNativeEvent = "; - - ur_params::serializePtr(os, *(params->pphNativeEvent)); - - return os; -} - -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_event_create_with_native_handle_params_t - *params) { - - os << ".hNativeEvent = "; + os << ".propName = "; os << *(params->ppropName); @@ -13518,9 +13081,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_event_set_callback_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_queue_create_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_queue_create_params_t *params) { os << ".hContext = "; @@ -13536,7 +13101,8 @@ inline std::ostream &operator<<( os << ", "; os << ".pProperties = "; - os << reinterpret_cast(*(params->ppfnNotify)); + details::printPtr(os, + *(params->ppProperties)); os << ", "; os << ".phQueue = "; @@ -13547,18 +13113,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_kernel_create_params_t *params) { - - os << ".hProgram = "; - - ur_params::serializePtr(os, *(params->phProgram)); - - os << ", "; - os << ".pKernelName = "; - - ur_params::serializePtr(os, *(params->ppKernelName)); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_queue_retain_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_queue_retain_params_t *params) { os << ".hQueue = "; @@ -13568,28 +13127,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_kernel_get_info_params_t *params) { - - os << ".hKernel = "; - - ur_params::serializePtr(os, *(params->phKernel)); - - os << ", "; - os << ".propName = "; - - os << *(params->ppropName); - - os << ", "; - os << ".propSize = "; - - os << *(params->ppropSize); - - os << ", "; - os << ".pPropValue = "; - ur_params::serializeTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_queue_release_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_queue_release_params_t *params) { os << ".hQueue = "; @@ -13599,18 +13141,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_kernel_get_group_info_params_t *params) { - - os << ".hKernel = "; - - ur_params::serializePtr(os, *(params->phKernel)); - - os << ", "; - os << ".hDevice = "; - - ur_params::serializePtr(os, *(params->phDevice)); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_queue_get_native_handle_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_queue_get_native_handle_params_t *params) { os << ".hQueue = "; @@ -13632,10 +13167,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_kernel_get_sub_group_info_params_t - *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_queue_create_with_native_handle_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_queue_create_with_native_handle_params_t *params) { os << ".hNativeQueue = "; @@ -13669,9 +13205,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_kernel_retain_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_queue_finish_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_queue_finish_params_t *params) { os << ".hQueue = "; @@ -13681,9 +13219,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_kernel_release_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_queue_flush_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_queue_flush_params_t *params) { os << ".hQueue = "; @@ -13693,10 +13233,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_kernel_get_native_handle_params_t - *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_bindless_images_unsampled_image_handle_destroy_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_bindless_images_unsampled_image_handle_destroy_exp_params_t *params) { os << ".hContext = "; @@ -13706,10 +13247,8 @@ operator<<(std::ostream &os, os << ", "; os << ".hDevice = "; -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_kernel_create_with_native_handle_params_t - *params) { + details::printPtr(os, + *(params->phDevice)); os << ", "; os << ".hImage = "; @@ -13746,9 +13285,11 @@ inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_kernel_set_arg_value_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_bindless_images_image_allocate_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_bindless_images_image_allocate_exp_params_t *params) { os << ".hContext = "; @@ -13782,9 +13323,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_kernel_set_arg_local_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_bindless_images_image_free_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_bindless_images_image_free_exp_params_t *params) { os << ".hContext = "; @@ -13826,9 +13369,8 @@ inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".hImageMem = "; -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_kernel_set_arg_pointer_params_t *params) { + details::printPtr(os, + *(params->phImageMem)); os << ", "; os << ".pImageFormat = "; @@ -13857,9 +13399,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_kernel_set_exec_info_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_bindless_images_sampled_image_create_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_bindless_images_sampled_image_create_exp_params_t *params) { os << ".hContext = "; @@ -13885,18 +13429,7 @@ inline std::ostream &operator<<( *(params->ppImageFormat)); os << ", "; - os << ".pPropValue = "; - ur_params::serializeTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); - - return os; -} - -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_kernel_set_arg_sampler_params_t *params) { - - os << ".hKernel = "; + os << ".pImageDesc = "; details::printPtr(os, *(params->ppImageDesc)); @@ -13922,9 +13455,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_kernel_set_arg_mem_obj_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_bindless_images_image_copy_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_bindless_images_image_copy_exp_params_t *params) { os << ".hQueue = "; @@ -13946,9 +13481,8 @@ inline std::ostream &operator<<( os << ", "; os << ".pImageFormat = "; -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_kernel_set_specialization_constants_params_t *params) { + details::printPtr(os, + *(params->ppImageFormat)); os << ", "; os << ".pImageDesc = "; @@ -13965,54 +13499,12 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".srcOffset = "; - ur_params::serializePtr(os, *(params->ppSpecConstants)); - - return os; -} - -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_kernel_suggest_max_cooperative_group_count_exp_params_t *params) { - - os << ".hKernel = "; - - ur_params::serializePtr(os, *(params->phKernel)); - - os << ", "; - os << ".pGroupCountRet = "; - - ur_params::serializePtr(os, *(params->ppGroupCountRet)); - - return os; -} - -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_loader_init_params_t *params) { - - os << ".device_flags = "; - - ur_params::serializeFlag(os, - *(params->pdevice_flags)); - - os << ", "; - os << ".hLoaderConfig = "; - - ur_params::serializePtr(os, *(params->phLoaderConfig)); + os << *(params->psrcOffset); os << ", "; os << ".dstOffset = "; -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_loader_tear_down_params_t *params) { - - return os; -} - -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_loader_config_create_params_t *params) { + os << *(params->pdstOffset); os << ", "; os << ".copyExtent = "; @@ -14022,9 +13514,7 @@ inline std::ostream &operator<<( os << ", "; os << ".hostExtent = "; -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_loader_config_retain_params_t *params) { + os << *(params->phostExtent); os << ", "; os << ".numEventsInWaitList = "; @@ -14038,9 +13528,10 @@ inline std::ostream &operator<<( os << ", "; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_loader_config_release_params_t *params) { + details::printPtr(os, + (*(params->pphEventWaitList))[i]); + } + os << "}"; os << ", "; os << ".phEvent = "; @@ -14051,9 +13542,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_loader_config_get_info_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_bindless_images_image_get_info_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_bindless_images_image_get_info_exp_params_t *params) { os << ".hImageMem = "; @@ -14080,10 +13573,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_loader_config_enable_layer_params_t - *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_bindless_images_mipmap_get_level_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_bindless_images_mipmap_get_level_exp_params_t *params) { os << ".hContext = "; @@ -14099,30 +13593,8 @@ operator<<(std::ostream &os, os << ", "; os << ".hImageMem = "; -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_loader_config_set_code_location_callback_params_t *params) { - - os << ".hLoaderConfig = "; - - ur_params::serializePtr(os, *(params->phLoaderConfig)); - - os << ", "; - os << ".pfnCodeloc = "; - - os << reinterpret_cast(*(params->ppfnCodeloc)); - - os << ", "; - os << ".pUserData = "; - - ur_params::serializePtr(os, *(params->ppUserData)); - - return os; -} - -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_mem_image_create_params_t *params) { + details::printPtr(os, + *(params->phImageMem)); os << ", "; os << ".mipmapLevel = "; @@ -14164,9 +13636,11 @@ inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_mem_buffer_create_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_bindless_images_import_opaque_fd_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_bindless_images_import_opaque_fd_exp_params_t *params) { os << ".hContext = "; @@ -14191,18 +13665,7 @@ inline std::ostream &operator<<( *(params->ppInteropMemDesc)); os << ", "; - os << ".phBuffer = "; - - ur_params::serializePtr(os, *(params->pphBuffer)); - - return os; -} - -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_mem_retain_params_t *params) { - - os << ".hMem = "; + os << ".phInteropMem = "; details::printPtr(os, *(params->pphInteropMem)); @@ -14210,19 +13673,16 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_mem_release_params_t *params) { - - os << ".hMem = "; - - ur_params::serializePtr(os, *(params->phMem)); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_bindless_images_map_external_array_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_bindless_images_map_external_array_exp_params_t *params) { os << ".hContext = "; -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_mem_buffer_partition_params_t *params) { + details::printPtr(os, + *(params->phContext)); os << ", "; os << ".hDevice = "; @@ -14257,9 +13717,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_mem_get_native_handle_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_bindless_images_release_interop_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_bindless_images_release_interop_exp_params_t *params) { os << ".hContext = "; @@ -14281,9 +13743,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_mem_buffer_create_with_native_handle_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_bindless_images_import_external_semaphore_opaque_fd_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_bindless_images_import_external_semaphore_opaque_fd_exp_params_t *params) { os << ".hContext = "; @@ -14311,9 +13775,11 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct return os; } -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_mem_image_create_with_native_handle_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_bindless_images_destroy_external_semaphore_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_bindless_images_destroy_external_semaphore_exp_params_t *params) { os << ".hContext = "; @@ -14378,9 +13844,11 @@ inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_mem_get_info_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_bindless_images_signal_external_semaphore_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_bindless_images_signal_external_semaphore_exp_params_t *params) { os << ".hQueue = "; @@ -14419,9 +13887,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_mem_image_get_info_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_usm_host_alloc_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_host_alloc_params_t *params) { os << ".hContext = "; @@ -14454,9 +13924,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_physical_mem_create_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_usm_device_alloc_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_device_alloc_params_t *params) { os << ".hContext = "; @@ -14484,9 +13956,7 @@ inline std::ostream &operator<<( os << ", "; os << ".size = "; -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_physical_mem_retain_params_t *params) { + os << *(params->psize); os << ", "; os << ".ppMem = "; @@ -14497,9 +13967,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_physical_mem_release_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_usm_shared_alloc_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_shared_alloc_params_t *params) { os << ".hContext = "; @@ -14509,9 +13981,8 @@ inline std::ostream &operator<<( os << ", "; os << ".hDevice = "; -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_platform_get_params_t *params) { + details::printPtr(os, + *(params->phDevice)); os << ", "; os << ".pUSMDesc = "; @@ -14559,9 +14030,11 @@ inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_platform_get_info_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_usm_get_mem_alloc_info_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_get_mem_alloc_info_params_t *params) { os << ".hContext = "; @@ -14597,10 +14070,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_platform_get_native_handle_params_t - *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_usm_pool_create_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_pool_create_params_t *params) { os << ".hContext = "; @@ -14622,10 +14096,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_platform_create_with_native_handle_params_t - *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_usm_pool_retain_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_pool_retain_params_t *params) { os << ".pPool = "; @@ -14649,10 +14124,11 @@ inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_platform_get_api_version_params_t - *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_usm_pool_get_info_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_pool_get_info_params_t *params) { os << ".hPool = "; @@ -14662,10 +14138,7 @@ operator<<(std::ostream &os, os << ", "; os << ".propName = "; -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_platform_get_backend_option_params_t - *params) { + os << *(params->ppropName); os << ", "; os << ".propSize = "; @@ -14685,9 +14158,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_program_create_with_il_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_usm_pitched_alloc_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_pitched_alloc_exp_params_t *params) { os << ".hContext = "; @@ -14707,19 +14182,7 @@ inline std::ostream &operator<<( *(params->ppUSMDesc)); os << ", "; - os << ".phProgram = "; - - ur_params::serializePtr(os, *(params->pphProgram)); - - return os; -} - -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_program_create_with_binary_params_t - *params) { - - os << ".hContext = "; + os << ".pool = "; details::printPtr(os, *(params->ppool)); @@ -14754,9 +14217,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_program_build_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_usm_import_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_import_exp_params_t *params) { os << ".hContext = "; @@ -14777,9 +14242,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_program_compile_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_usm_release_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_release_exp_params_t *params) { os << ".hContext = "; @@ -14795,9 +14262,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_program_link_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_command_buffer_create_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_command_buffer_create_exp_params_t *params) { os << ".hContext = "; @@ -14839,9 +14308,11 @@ inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_program_retain_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_command_buffer_release_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_command_buffer_release_exp_params_t *params) { os << ".hCommandBuffer = "; @@ -14851,9 +14322,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_program_release_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_command_buffer_finalize_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_command_buffer_finalize_exp_params_t *params) { os << ".hCommandBuffer = "; @@ -14863,10 +14336,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_program_get_function_pointer_params_t - *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_command_buffer_append_kernel_launch_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_command_buffer_append_kernel_launch_exp_params_t *params) { os << ".hCommandBuffer = "; @@ -14887,9 +14361,8 @@ inline std::ostream &operator<<( os << ", "; os << ".pGlobalWorkOffset = "; -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_program_get_info_params_t *params) { + details::printPtr(os, + *(params->ppGlobalWorkOffset)); os << ", "; os << ".pGlobalWorkSize = "; @@ -14923,9 +14396,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_program_get_build_info_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_command_buffer_append_usm_memcpy_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_command_buffer_append_usm_memcpy_exp_params_t *params) { os << ".hCommandBuffer = "; @@ -14950,18 +14425,7 @@ inline std::ostream &operator<<( os << *(params->psize); os << ", "; - os << ".pPropSizeRet = "; - - ur_params::serializePtr(os, *(params->ppPropSizeRet)); - - return os; -} - -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_program_set_specialization_constants_params_t *params) { - - os << ".hProgram = "; + os << ".numSyncPointsInWaitList = "; os << *(params->pnumSyncPointsInWaitList); @@ -14980,10 +14444,11 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_program_get_native_handle_params_t - *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_command_buffer_append_usm_fill_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_command_buffer_append_usm_fill_exp_params_t *params) { os << ".hCommandBuffer = "; @@ -14999,10 +14464,8 @@ operator<<(std::ostream &os, os << ", "; os << ".pPattern = "; -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_program_create_with_native_handle_params_t - *params) { + details::printPtr(os, + *(params->ppPattern)); os << ", "; os << ".patternSize = "; @@ -15034,9 +14497,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_queue_get_info_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_command_buffer_append_mem_buffer_copy_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_command_buffer_append_mem_buffer_copy_exp_params_t *params) { os << ".hCommandBuffer = "; @@ -15063,9 +14528,7 @@ operator<<(std::ostream &os, os << ", "; os << ".dstOffset = "; -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_queue_create_params_t *params) { + os << *(params->pdstOffset); os << ", "; os << ".size = "; @@ -15092,9 +14555,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_queue_retain_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_command_buffer_append_mem_buffer_write_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_command_buffer_append_mem_buffer_write_exp_params_t *params) { os << ".hCommandBuffer = "; @@ -15104,9 +14569,8 @@ operator<<(std::ostream &os, os << ", "; os << ".hBuffer = "; -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_queue_release_params_t *params) { + details::printPtr(os, + *(params->phBuffer)); os << ", "; os << ".offset = "; @@ -15116,9 +14580,7 @@ operator<<(std::ostream &os, os << ", "; os << ".size = "; -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_queue_get_native_handle_params_t *params) { + os << *(params->psize); os << ", "; os << ".pSrc = "; @@ -15146,10 +14608,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_queue_create_with_native_handle_params_t - *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_command_buffer_append_mem_buffer_read_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_command_buffer_append_mem_buffer_read_exp_params_t *params) { os << ".hCommandBuffer = "; @@ -15175,9 +14638,8 @@ inline std::ostream &operator<<( os << ", "; os << ".pDst = "; -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_queue_finish_params_t *params) { + details::printPtr(os, + *(params->ppDst)); os << ", "; os << ".numSyncPointsInWaitList = "; @@ -15187,9 +14649,8 @@ operator<<(std::ostream &os, os << ", "; os << ".pSyncPointWaitList = "; -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_queue_flush_params_t *params) { + details::printPtr(os, + *(params->ppSyncPointWaitList)); os << ", "; os << ".pSyncPoint = "; @@ -15200,9 +14661,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_sampler_create_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_command_buffer_append_mem_buffer_copy_rect_exp_params_t type +/// @returns +/// std::ostream & +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 = "; @@ -15224,9 +14687,7 @@ operator<<(std::ostream &os, os << ", "; os << ".srcOrigin = "; -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_sampler_retain_params_t *params) { + os << *(params->psrcOrigin); os << ", "; os << ".dstOrigin = "; @@ -15236,9 +14697,7 @@ operator<<(std::ostream &os, os << ", "; os << ".region = "; -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_sampler_release_params_t *params) { + os << *(params->pregion); os << ", "; os << ".srcRowPitch = "; @@ -15248,9 +14707,7 @@ operator<<(std::ostream &os, os << ", "; os << ".srcSlicePitch = "; -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_sampler_get_info_params_t *params) { + os << *(params->psrcSlicePitch); os << ", "; os << ".dstRowPitch = "; @@ -15282,10 +14739,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_sampler_get_native_handle_params_t - *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_command_buffer_append_mem_buffer_write_rect_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_command_buffer_append_mem_buffer_write_rect_exp_params_t *params) { os << ".hCommandBuffer = "; @@ -15301,10 +14759,7 @@ operator<<(std::ostream &os, os << ", "; os << ".bufferOffset = "; -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_sampler_create_with_native_handle_params_t - *params) { + os << *(params->pbufferOffset); os << ", "; os << ".hostOffset = "; @@ -15329,9 +14784,7 @@ inline std::ostream &operator<<( os << ", "; os << ".hostRowPitch = "; -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_usm_host_alloc_params_t *params) { + os << *(params->phostRowPitch); os << ", "; os << ".hostSlicePitch = "; @@ -15364,9 +14817,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_usm_device_alloc_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_command_buffer_append_mem_buffer_read_rect_exp_params_t type +/// @returns +/// std::ostream & +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 = "; @@ -15395,18 +14850,7 @@ operator<<(std::ostream &os, os << *(params->pregion); os << ", "; - os << ".ppMem = "; - - ur_params::serializePtr(os, *(params->pppMem)); - - return os; -} - -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_usm_shared_alloc_params_t *params) { - - os << ".hContext = "; + os << ".bufferRowPitch = "; os << *(params->pbufferRowPitch); @@ -15434,9 +14878,7 @@ operator<<(std::ostream &os, os << ", "; os << ".numSyncPointsInWaitList = "; -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_usm_free_params_t *params) { + os << *(params->pnumSyncPointsInWaitList); os << ", "; os << ".pSyncPointWaitList = "; @@ -15453,9 +14895,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_usm_get_mem_alloc_info_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_command_buffer_append_mem_buffer_fill_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_command_buffer_append_mem_buffer_fill_exp_params_t *params) { os << ".hCommandBuffer = "; @@ -15480,18 +14924,7 @@ inline std::ostream &operator<<( os << *(params->ppatternSize); os << ", "; - os << ".pPropSizeRet = "; - - ur_params::serializePtr(os, *(params->ppPropSizeRet)); - - return os; -} - -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_usm_pool_create_params_t *params) { - - os << ".hContext = "; + os << ".offset = "; os << *(params->poffset); @@ -15508,9 +14941,8 @@ operator<<(std::ostream &os, os << ", "; os << ".pSyncPointWaitList = "; -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_usm_pool_retain_params_t *params) { + details::printPtr(os, + *(params->ppSyncPointWaitList)); os << ", "; os << ".pSyncPoint = "; @@ -15521,9 +14953,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_usm_pool_release_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_command_buffer_append_usm_prefetch_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_command_buffer_append_usm_prefetch_exp_params_t *params) { os << ".hCommandBuffer = "; @@ -15533,9 +14967,8 @@ operator<<(std::ostream &os, os << ", "; os << ".pMemory = "; -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_usm_pool_get_info_params_t *params) { + details::printPtr(os, + *(params->ppMemory)); os << ", "; os << ".size = "; @@ -15568,16 +15001,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_usm_pitched_alloc_exp_params_t *params) { - - os << ".hContext = "; - - ur_params::serializePtr(os, *(params->phContext)); - - os << ", "; - os << ".hDevice = "; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_command_buffer_append_usm_advise_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_command_buffer_append_usm_advise_exp_params_t *params) { os << ".hCommandBuffer = "; @@ -15621,9 +15049,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_usm_import_exp_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_command_buffer_enqueue_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_command_buffer_enqueue_exp_params_t *params) { os << ".hCommandBuffer = "; @@ -15639,9 +15069,7 @@ operator<<(std::ostream &os, os << ", "; os << ".numEventsInWaitList = "; -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_usm_release_exp_params_t *params) { + os << *(params->pnumEventsInWaitList); os << ", "; os << ".phEventWaitList = {"; @@ -15664,10 +15092,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_usm_p2p_enable_peer_access_exp_params_t - *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_usm_p2p_enable_peer_access_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_p2p_enable_peer_access_exp_params_t *params) { os << ".commandDevice = "; @@ -15683,10 +15112,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_usm_p2p_disable_peer_access_exp_params_t - *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_usm_p2p_disable_peer_access_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_p2p_disable_peer_access_exp_params_t *params) { os << ".commandDevice = "; @@ -15702,10 +15132,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_usm_p2p_peer_access_get_info_exp_params_t - *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_usm_p2p_peer_access_get_info_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_p2p_peer_access_get_info_exp_params_t *params) { os << ".commandDevice = "; @@ -15770,10 +15201,11 @@ inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_virtual_mem_granularity_get_info_params_t - *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_virtual_mem_granularity_get_info_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_virtual_mem_granularity_get_info_params_t *params) { os << ".hContext = "; @@ -15809,9 +15241,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_virtual_mem_reserve_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_virtual_mem_reserve_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_virtual_mem_reserve_params_t *params) { os << ".hContext = "; @@ -15838,9 +15272,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_virtual_mem_free_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_virtual_mem_free_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_virtual_mem_free_params_t *params) { os << ".hContext = "; @@ -15861,9 +15297,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_virtual_mem_map_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_virtual_mem_map_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_virtual_mem_map_params_t *params) { os << ".hContext = "; @@ -15901,9 +15339,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_virtual_mem_unmap_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_virtual_mem_unmap_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_virtual_mem_unmap_params_t *params) { os << ".hContext = "; @@ -15924,9 +15364,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_virtual_mem_set_access_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_virtual_mem_set_access_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_virtual_mem_set_access_params_t *params) { os << ".hContext = "; @@ -15953,9 +15395,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_virtual_mem_get_info_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_virtual_mem_get_info_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_virtual_mem_get_info_params_t *params) { os << ".hContext = "; @@ -15996,9 +15440,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_device_get_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_device_get_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_device_get_params_t *params) { os << ".hPlatform = "; @@ -16036,9 +15482,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_device_get_info_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_device_get_info_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_device_get_info_params_t *params) { os << ".hDevice = "; @@ -16068,9 +15516,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_device_retain_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_device_retain_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_device_retain_params_t *params) { os << ".hDevice = "; @@ -16080,9 +15530,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_device_release_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_device_release_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_device_release_params_t *params) { os << ".hDevice = "; @@ -16092,9 +15544,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_device_partition_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_device_partition_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_device_partition_params_t *params) { os << ".hDevice = "; @@ -16133,9 +15587,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_device_select_binary_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_device_select_binary_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_device_select_binary_params_t *params) { os << ".hDevice = "; @@ -16162,10 +15618,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_device_get_native_handle_params_t - *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_device_get_native_handle_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_device_get_native_handle_params_t *params) { os << ".hDevice = "; @@ -16181,10 +15638,11 @@ operator<<(std::ostream &os, return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_device_create_with_native_handle_params_t - *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_device_create_with_native_handle_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_device_create_with_native_handle_params_t *params) { os << ".hNativeDevice = "; @@ -16212,10 +15670,11 @@ inline std::ostream &operator<<( return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_device_get_global_timestamps_params_t - *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_device_get_global_timestamps_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_device_get_global_timestamps_params_t *params) { os << ".hDevice = "; @@ -16237,14 +15696,16 @@ inline std::ostream &operator<<( return os; } -namespace ur_params { - -template inline void serializePtr(std::ostream &os, const T *ptr) { +namespace details { +/////////////////////////////////////////////////////////////////////////////// +// @brief Print pointer value +template +inline ur_result_t printPtr(std::ostream &os, const T *ptr) { if (ptr == nullptr) { os << "nullptr"; } else if constexpr (std::is_pointer_v) { os << (const void *)(ptr) << " ("; - serializePtr(os, *ptr); + printPtr(os, *ptr); os << ")"; } else if constexpr (std::is_void_v || is_handle_v) { os << (const void *)ptr; @@ -16263,100 +15724,24 @@ template inline void serializePtr(std::ostream &os, const T *ptr) { } // namespace details } // namespace print -inline int serializeFunctionParams(std::ostream &os, uint32_t function, - const void *params) { - switch ((enum ur_function_t)function) { - case UR_FUNCTION_ADAPTER_GET: { - os << (const struct ur_adapter_get_params_t *)params; - } break; - case UR_FUNCTION_ADAPTER_RELEASE: { - os << (const struct ur_adapter_release_params_t *)params; - } break; - case UR_FUNCTION_ADAPTER_RETAIN: { - os << (const struct ur_adapter_retain_params_t *)params; - } break; - case UR_FUNCTION_ADAPTER_GET_LAST_ERROR: { - os << (const struct ur_adapter_get_last_error_params_t *)params; - } break; - case UR_FUNCTION_ADAPTER_GET_INFO: { - os << (const struct ur_adapter_get_info_params_t *)params; - } break; - case UR_FUNCTION_BINDLESS_IMAGES_UNSAMPLED_IMAGE_HANDLE_DESTROY_EXP: { - os << (const struct - ur_bindless_images_unsampled_image_handle_destroy_exp_params_t *) - params; - } break; - case UR_FUNCTION_BINDLESS_IMAGES_SAMPLED_IMAGE_HANDLE_DESTROY_EXP: { - os << (const struct - ur_bindless_images_sampled_image_handle_destroy_exp_params_t *) - params; - } break; - case UR_FUNCTION_BINDLESS_IMAGES_IMAGE_ALLOCATE_EXP: { - os << (const struct ur_bindless_images_image_allocate_exp_params_t *) - params; - } break; - case UR_FUNCTION_BINDLESS_IMAGES_IMAGE_FREE_EXP: { - os << (const struct ur_bindless_images_image_free_exp_params_t *)params; - } break; - case UR_FUNCTION_BINDLESS_IMAGES_UNSAMPLED_IMAGE_CREATE_EXP: { - os << (const struct - ur_bindless_images_unsampled_image_create_exp_params_t *)params; - } break; - case UR_FUNCTION_BINDLESS_IMAGES_SAMPLED_IMAGE_CREATE_EXP: { - os << (const struct ur_bindless_images_sampled_image_create_exp_params_t - *)params; - } break; - case UR_FUNCTION_BINDLESS_IMAGES_IMAGE_COPY_EXP: { - os << (const struct ur_bindless_images_image_copy_exp_params_t *)params; - } break; - case UR_FUNCTION_BINDLESS_IMAGES_IMAGE_GET_INFO_EXP: { - os << (const struct ur_bindless_images_image_get_info_exp_params_t *) - params; - } break; - case UR_FUNCTION_BINDLESS_IMAGES_MIPMAP_GET_LEVEL_EXP: { - os << (const struct ur_bindless_images_mipmap_get_level_exp_params_t *) - params; - } break; - case UR_FUNCTION_BINDLESS_IMAGES_MIPMAP_FREE_EXP: { - os << (const struct ur_bindless_images_mipmap_free_exp_params_t *) - params; - } break; - case UR_FUNCTION_BINDLESS_IMAGES_IMPORT_OPAQUE_FD_EXP: { - os << (const struct ur_bindless_images_import_opaque_fd_exp_params_t *) - params; - } break; - case UR_FUNCTION_BINDLESS_IMAGES_MAP_EXTERNAL_ARRAY_EXP: { - os << (const struct ur_bindless_images_map_external_array_exp_params_t - *)params; - } break; - case UR_FUNCTION_BINDLESS_IMAGES_RELEASE_INTEROP_EXP: { - os << (const struct ur_bindless_images_release_interop_exp_params_t *) - params; - } break; - case UR_FUNCTION_BINDLESS_IMAGES_IMPORT_EXTERNAL_SEMAPHORE_OPAQUE_FD_EXP: { - os << (const struct - ur_bindless_images_import_external_semaphore_opaque_fd_exp_params_t - *)params; - } break; - case UR_FUNCTION_BINDLESS_IMAGES_DESTROY_EXTERNAL_SEMAPHORE_EXP: { - os << (const struct - ur_bindless_images_destroy_external_semaphore_exp_params_t *) - params; - } break; - case UR_FUNCTION_BINDLESS_IMAGES_WAIT_EXTERNAL_SEMAPHORE_EXP: { - os << (const struct - ur_bindless_images_wait_external_semaphore_exp_params_t *)params; - } break; - case UR_FUNCTION_BINDLESS_IMAGES_SIGNAL_EXTERNAL_SEMAPHORE_EXP: { - os << (const struct - ur_bindless_images_signal_external_semaphore_exp_params_t *) - params; - } break; - case UR_FUNCTION_COMMAND_BUFFER_CREATE_EXP: { - os << (const struct ur_command_buffer_create_exp_params_t *)params; - } break; - case UR_FUNCTION_COMMAND_BUFFER_RETAIN_EXP: { - os << (const struct ur_command_buffer_retain_exp_params_t *)params; +namespace extras { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print function parameters +/// @returns +/// - ::UR_RESULT_SUCCESS +/// - ::UR_RESULT_ERROR_INVALID_ENUMERATION +/// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER +/// - `NULL == params` +UR_APIEXPORT inline ur_result_t UR_APICALL printFunctionParams(std::ostream &os, ur_function_t function, const void *params) { + using namespace print; + + if (!params) { + return UR_RESULT_ERROR_INVALID_NULL_POINTER; + } + + switch (function) { + case UR_FUNCTION_LOADER_CONFIG_CREATE: { + os << (const struct ur_loader_config_create_params_t *)params; } break; case UR_FUNCTION_LOADER_CONFIG_RETAIN: { os << (const struct ur_loader_config_retain_params_t *)params; @@ -16367,52 +15752,26 @@ inline int serializeFunctionParams(std::ostream &os, uint32_t function, case UR_FUNCTION_LOADER_CONFIG_GET_INFO: { os << (const struct ur_loader_config_get_info_params_t *)params; } break; - case UR_FUNCTION_COMMAND_BUFFER_APPEND_USM_MEMCPY_EXP: { - os << (const struct ur_command_buffer_append_usm_memcpy_exp_params_t *) - params; - } break; - case UR_FUNCTION_COMMAND_BUFFER_APPEND_USM_FILL_EXP: { - os << (const struct ur_command_buffer_append_usm_fill_exp_params_t *) - params; - } break; - case UR_FUNCTION_COMMAND_BUFFER_APPEND_MEM_BUFFER_COPY_EXP: { - os << (const struct - ur_command_buffer_append_mem_buffer_copy_exp_params_t *)params; - } break; - case UR_FUNCTION_COMMAND_BUFFER_APPEND_MEM_BUFFER_WRITE_EXP: { - os << (const struct - ur_command_buffer_append_mem_buffer_write_exp_params_t *)params; + case UR_FUNCTION_LOADER_CONFIG_ENABLE_LAYER: { + os << (const struct ur_loader_config_enable_layer_params_t *)params; } break; - case UR_FUNCTION_COMMAND_BUFFER_APPEND_MEM_BUFFER_READ_EXP: { - os << (const struct - ur_command_buffer_append_mem_buffer_read_exp_params_t *)params; - } break; - case UR_FUNCTION_COMMAND_BUFFER_APPEND_MEM_BUFFER_COPY_RECT_EXP: { - os << (const struct - ur_command_buffer_append_mem_buffer_copy_rect_exp_params_t *) - params; + case UR_FUNCTION_LOADER_CONFIG_SET_CODE_LOCATION_CALLBACK: { + os << (const struct ur_loader_config_set_code_location_callback_params_t *)params; } break; - case UR_FUNCTION_COMMAND_BUFFER_APPEND_MEM_BUFFER_WRITE_RECT_EXP: { - os << (const struct - ur_command_buffer_append_mem_buffer_write_rect_exp_params_t *) - params; + case UR_FUNCTION_PLATFORM_GET: { + os << (const struct ur_platform_get_params_t *)params; } break; - case UR_FUNCTION_COMMAND_BUFFER_APPEND_MEM_BUFFER_READ_RECT_EXP: { - os << (const struct - ur_command_buffer_append_mem_buffer_read_rect_exp_params_t *) - params; + case UR_FUNCTION_PLATFORM_GET_INFO: { + os << (const struct ur_platform_get_info_params_t *)params; } break; - case UR_FUNCTION_COMMAND_BUFFER_APPEND_MEM_BUFFER_FILL_EXP: { - os << (const struct - ur_command_buffer_append_mem_buffer_fill_exp_params_t *)params; + case UR_FUNCTION_PLATFORM_GET_NATIVE_HANDLE: { + os << (const struct ur_platform_get_native_handle_params_t *)params; } break; - case UR_FUNCTION_COMMAND_BUFFER_APPEND_USM_PREFETCH_EXP: { - os << (const struct ur_command_buffer_append_usm_prefetch_exp_params_t - *)params; + case UR_FUNCTION_PLATFORM_CREATE_WITH_NATIVE_HANDLE: { + os << (const struct ur_platform_create_with_native_handle_params_t *)params; } break; - case UR_FUNCTION_COMMAND_BUFFER_APPEND_USM_ADVISE_EXP: { - os << (const struct ur_command_buffer_append_usm_advise_exp_params_t *) - params; + case UR_FUNCTION_PLATFORM_GET_API_VERSION: { + os << (const struct ur_platform_get_api_version_params_t *)params; } break; case UR_FUNCTION_PLATFORM_GET_BACKEND_OPTION: { os << (const struct ur_platform_get_backend_option_params_t *)params; @@ -16438,10 +15797,6 @@ inline int serializeFunctionParams(std::ostream &os, uint32_t function, case UR_FUNCTION_CONTEXT_SET_EXTENDED_DELETER: { os << (const struct ur_context_set_extended_deleter_params_t *)params; } break; - case UR_FUNCTION_ENQUEUE_COOPERATIVE_KERNEL_LAUNCH_EXP: { - os << (const struct ur_enqueue_cooperative_kernel_launch_exp_params_t *) - params; - } break; case UR_FUNCTION_EVENT_GET_INFO: { os << (const struct ur_event_get_info_params_t *)params; } break; @@ -16551,18 +15906,7 @@ inline int serializeFunctionParams(std::ostream &os, uint32_t function, os << (const struct ur_kernel_set_specialization_constants_params_t *)params; } break; case UR_FUNCTION_KERNEL_SUGGEST_MAX_COOPERATIVE_GROUP_COUNT_EXP: { - os << (const struct - ur_kernel_suggest_max_cooperative_group_count_exp_params_t *) - params; - } break; - case UR_FUNCTION_LOADER_INIT: { - os << (const struct ur_loader_init_params_t *)params; - } break; - case UR_FUNCTION_LOADER_TEAR_DOWN: { - os << (const struct ur_loader_tear_down_params_t *)params; - } break; - case UR_FUNCTION_LOADER_CONFIG_CREATE: { - os << (const struct ur_loader_config_create_params_t *)params; + os << (const struct ur_kernel_suggest_max_cooperative_group_count_exp_params_t *)params; } break; case UR_FUNCTION_SAMPLER_CREATE: { os << (const struct ur_sampler_create_params_t *)params; @@ -16582,10 +15926,6 @@ inline int serializeFunctionParams(std::ostream &os, uint32_t function, case UR_FUNCTION_SAMPLER_CREATE_WITH_NATIVE_HANDLE: { os << (const struct ur_sampler_create_with_native_handle_params_t *)params; } break; - case UR_FUNCTION_LOADER_CONFIG_SET_CODE_LOCATION_CALLBACK: { - os << (const struct ur_loader_config_set_code_location_callback_params_t - *)params; - } break; case UR_FUNCTION_MEM_IMAGE_CREATE: { os << (const struct ur_mem_image_create_params_t *)params; } break; diff --git a/scripts/templates/print.hpp.mako b/scripts/templates/print.hpp.mako index 1f865a98c6..b4976eaf6b 100644 --- a/scripts/templates/print.hpp.mako +++ b/scripts/templates/print.hpp.mako @@ -37,7 +37,7 @@ from templates import helper as th %elif loop and th.type_traits.is_pointer_to_pointer(itype): details::printPtr(os, ${caller.body()}); %elif th.type_traits.is_handle(itype): - ${x}_params::serializePtr(os, ${caller.body()}); + details::printPtr(os, ${caller.body()}); %elif iname and iname.startswith("pfn"): os << reinterpret_cast(${caller.body()}); %else: @@ -85,7 +85,7 @@ def findMemberType(_item): os << "}"; %elif findMemberType(item) is not None and findMemberType(item)['type'] == "union": os << ".${iname} = "; - ${x}_params::serializeUnion(os, ${deref}(params${access}${item['name']}), params${access}${th.param_traits.tagged_member(item)}); + details::printUnion(os, ${deref}(params${access}${item['name']}), params${access}${th.param_traits.tagged_member(item)}); %elif th.type_traits.is_array(item['type']): os << ".${iname} = {"; for(auto i = 0; i < ${th.type_traits.get_array_length(item['type'])}; i++){ @@ -122,9 +122,9 @@ template <> struct is_handle<${th.make_type_name(n, tags, obj)}> : std::true_typ %endfor template inline constexpr bool is_handle_v = is_handle::value; -template inline void serializePtr(std::ostream &os, const T *ptr); -template inline void serializeFlag(std::ostream &os, uint32_t flag); -template inline void serializeTagged(std::ostream &os, const void *ptr, T value, size_t size); +template inline ${x}_result_t printPtr(std::ostream &os, const T *ptr); +template inline ${x}_result_t printFlag(std::ostream &os, uint32_t flag); +template inline ${x}_result_t printTagged(std::ostream &os, const void *ptr, T value, size_t size); %for spec in specs: %for obj in spec['objects']: @@ -160,7 +160,7 @@ template inline void serializeTagged(std::ostream &os, const void * %if re.match(r"enum", obj['type']): ${X}_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ${th.make_enum_name(n, tags, obj)} value); %elif re.match(r"struct", obj['type']): - inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const ${obj['type']} ${th.make_type_name(n, tags, obj)} params); + ${X}_APIEXPORT 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 @@ -390,6 +390,10 @@ for item in obj['members']: %for tbl in th.get_pfncbtables(specs, meta, n, tags): %for obj in tbl['functions']: +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ${th.make_pfncb_param_type(n, tags, obj)} type +/// @returns +/// std::ostream & inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ${th.make_pfncb_param_type(n, tags, obj)} *params) { <% params_dict = dict() @@ -407,14 +411,15 @@ inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct %endfor %endfor -namespace ${x}_params { - -template inline void serializePtr(std::ostream &os, const T *ptr) { +namespace details { +/////////////////////////////////////////////////////////////////////////////// +// @brief Print pointer value +template inline ${x}_result_t printPtr(std::ostream &os, const T *ptr) { if (ptr == nullptr) { os << "nullptr"; } else if constexpr (std::is_pointer_v) { os << (const void *)(ptr) << " ("; - serializePtr(os, *ptr); + printPtr(os, *ptr); os << ")"; } else if constexpr (std::is_void_v || is_handle_v) { os << (const void *)ptr; diff --git a/source/adapters/cuda/ur_interface_loader.cpp b/source/adapters/cuda/ur_interface_loader.cpp index b87934182c..7bd5b4d397 100644 --- a/source/adapters/cuda/ur_interface_loader.cpp +++ b/source/adapters/cuda/ur_interface_loader.cpp @@ -202,8 +202,6 @@ UR_DLLEXPORT ur_result_t UR_APICALL urGetGlobalProcAddrTable( if (UR_RESULT_SUCCESS != result) { return result; } - pDdiTable->pfnInit = urInit; - pDdiTable->pfnTearDown = urTearDown; pDdiTable->pfnAdapterGet = urAdapterGet; pDdiTable->pfnAdapterRelease = urAdapterRelease; pDdiTable->pfnAdapterRetain = urAdapterRetain; @@ -280,17 +278,17 @@ UR_DLLEXPORT ur_result_t UR_APICALL urGetCommandBufferExpProcAddrTable( pDdiTable->pfnReleaseExp = urCommandBufferReleaseExp; pDdiTable->pfnFinalizeExp = urCommandBufferFinalizeExp; pDdiTable->pfnAppendKernelLaunchExp = urCommandBufferAppendKernelLaunchExp; - pDdiTable->pfnAppendMemcpyUSMExp = urCommandBufferAppendMemcpyUSMExp; - pDdiTable->pfnAppendMembufferCopyExp = urCommandBufferAppendMembufferCopyExp; - pDdiTable->pfnAppendMembufferCopyRectExp = - urCommandBufferAppendMembufferCopyRectExp; - pDdiTable->pfnAppendMembufferReadExp = urCommandBufferAppendMembufferReadExp; - pDdiTable->pfnAppendMembufferReadRectExp = - urCommandBufferAppendMembufferReadRectExp; - pDdiTable->pfnAppendMembufferWriteExp = - urCommandBufferAppendMembufferWriteExp; - pDdiTable->pfnAppendMembufferWriteRectExp = - urCommandBufferAppendMembufferWriteRectExp; + pDdiTable->pfnAppendUSMMemcpyExp = urCommandBufferAppendUSMMemcpyExp; + pDdiTable->pfnAppendMemBufferCopyExp = urCommandBufferAppendMemBufferCopyExp; + pDdiTable->pfnAppendMemBufferCopyRectExp = + urCommandBufferAppendMemBufferCopyRectExp; + pDdiTable->pfnAppendMemBufferReadExp = urCommandBufferAppendMemBufferReadExp; + pDdiTable->pfnAppendMemBufferReadRectExp = + urCommandBufferAppendMemBufferReadRectExp; + pDdiTable->pfnAppendMemBufferWriteExp = + urCommandBufferAppendMemBufferWriteExp; + pDdiTable->pfnAppendMemBufferWriteRectExp = + urCommandBufferAppendMemBufferWriteRectExp; pDdiTable->pfnEnqueueExp = urCommandBufferEnqueueExp; return retVal; diff --git a/source/adapters/null/ur_null.cpp b/source/adapters/null/ur_null.cpp index 1a5d0aa373..3df120392d 100644 --- a/source/adapters/null/ur_null.cpp +++ b/source/adapters/null/ur_null.cpp @@ -165,8 +165,10 @@ context_t::context_t() { ////////////////////////////////////////////////////////////////////////// urDdiTable.USM.pfnHostAlloc = - [](ur_context_handle_t hContext, const ur_usm_desc_t *pUSMDesc, - ur_usm_pool_handle_t pool, size_t size, void **ppMem) { + []([[maybe_unused]] ur_context_handle_t hContext, + [[maybe_unused]] const ur_usm_desc_t *pUSMDesc, + [[maybe_unused]] ur_usm_pool_handle_t pool, size_t size, + void **ppMem) { if (size == 0) { *ppMem = nullptr; return UR_RESULT_ERROR_UNSUPPORTED_SIZE; @@ -180,9 +182,11 @@ context_t::context_t() { ////////////////////////////////////////////////////////////////////////// urDdiTable.USM.pfnDeviceAlloc = - [](ur_context_handle_t hContext, ur_device_handle_t hDevice, - const ur_usm_desc_t *pUSMDesc, ur_usm_pool_handle_t pool, - size_t size, void **ppMem) { + []([[maybe_unused]] ur_context_handle_t hContext, + [[maybe_unused]] ur_device_handle_t hDevice, + [[maybe_unused]] const ur_usm_desc_t *pUSMDesc, + [[maybe_unused]] ur_usm_pool_handle_t pool, size_t size, + void **ppMem) { if (size == 0) { *ppMem = nullptr; return UR_RESULT_ERROR_UNSUPPORTED_SIZE; @@ -195,16 +199,17 @@ context_t::context_t() { }; ////////////////////////////////////////////////////////////////////////// - urDdiTable.USM.pfnFree = [](ur_context_handle_t hContext, void *pMem) { + urDdiTable.USM.pfnFree = []([[maybe_unused]] ur_context_handle_t hContext, + void *pMem) { free(pMem); return UR_RESULT_SUCCESS; }; ////////////////////////////////////////////////////////////////////////// urDdiTable.USM.pfnGetMemAllocInfo = - [](ur_context_handle_t hContext, const void *pMem, - ur_usm_alloc_info_t propName, size_t propSize, void *pPropValue, - size_t *pPropSizeRet) { + []([[maybe_unused]] ur_context_handle_t hContext, const void *pMem, + ur_usm_alloc_info_t propName, [[maybe_unused]] size_t propSize, + void *pPropValue, size_t *pPropSizeRet) { switch (propName) { case UR_USM_ALLOC_INFO_TYPE: *reinterpret_cast(pPropValue) = diff --git a/test/loader/loader_lifetime/urLoaderInit.cpp b/test/loader/loader_lifetime/urLoaderInit.cpp index 48060240b8..693cf273f2 100644 --- a/test/loader/loader_lifetime/urLoaderInit.cpp +++ b/test/loader/loader_lifetime/urLoaderInit.cpp @@ -3,7 +3,7 @@ // See LICENSE.TXT // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception #include "fixtures.hpp" -#include +#include using urLoaderInitTestWithParam = ::testing::TestWithParam; @@ -17,7 +17,7 @@ INSTANTIATE_TEST_SUITE_P( UR_DEVICE_INIT_FLAG_FPGA | UR_DEVICE_INIT_FLAG_VPU), [](const ::testing::TestParamInfo &info) { std::stringstream ss; - ur_params::serializeFlag(ss, info.param); + ur::print::details::printFlag(ss, info.param); return GTestSanitizeString(ss.str()); }); diff --git a/test/loader/platforms/platforms.cpp b/test/loader/platforms/platforms.cpp index 5fb3bba81c..c78aff373c 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[]) { auto out = create_logger("TEST"); ur_result_t status; diff --git a/tools/urinfo/CMakeLists.txt b/tools/urinfo/CMakeLists.txt index 53e4d828a2..6e60fde329 100644 --- a/tools/urinfo/CMakeLists.txt +++ b/tools/urinfo/CMakeLists.txt @@ -12,6 +12,7 @@ target_compile_definitions(urinfo PRIVATE UR_VERSION="${PROJECT_VERSION}" ) target_include_directories(urinfo PRIVATE + ${PROJECT_SOURCE_DIR}/include ${PROJECT_SOURCE_DIR}/source/common ) target_link_libraries(urinfo PRIVATE diff --git a/tools/urinfo/urinfo.cpp b/tools/urinfo/urinfo.cpp index 7e33c15a93..983428b550 100644 --- a/tools/urinfo/urinfo.cpp +++ b/tools/urinfo/urinfo.cpp @@ -171,9 +171,7 @@ devices which are currently visible in the local execution environment. } } - ~app() { - urLoaderConfigRelease(loaderConfig); - } + ~app() { urLoaderConfigRelease(loaderConfig); } }; } // namespace urinfo diff --git a/tools/urinfo/utils.hpp b/tools/urinfo/utils.hpp index bbbd327cb9..316e6159fc 100644 --- a/tools/urinfo/utils.hpp +++ b/tools/urinfo/utils.hpp @@ -6,7 +6,7 @@ #pragma once #include "ur_api.h" -#include "ur_params.hpp" +#include "ur_print.hpp" #include #include #include @@ -16,6 +16,8 @@ #include #include +using namespace ur::print; + #define UR_CHECK(ACTION) \ if (auto error = ACTION) { \ std::cerr << "error: " #ACTION " failed: " << error << "\n"; \