diff --git a/include/ur_print.hpp b/include/ur_print.hpp index f779e95f2b..392e5bbe69 100644 --- a/include/ur_print.hpp +++ b/include/ur_print.hpp @@ -206,113 +206,113 @@ inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_exp_peer_in } // 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, enum ur_function_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum ur_structure_type_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum 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, enum ur_device_init_flag_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum 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, enum ur_adapter_info_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum ur_adapter_backend_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum ur_platform_info_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum 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, enum 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, enum ur_device_type_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum ur_device_info_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum ur_device_affinity_domain_flag_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum 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, enum ur_device_fp_capability_flag_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum ur_device_mem_cache_type_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum ur_device_local_mem_type_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum 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, enum ur_memory_order_capability_flag_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum ur_memory_scope_capability_flag_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum ur_device_usm_access_capability_flag_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum 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, enum 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, enum ur_mem_flag_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum ur_mem_type_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum ur_mem_info_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum ur_image_channel_order_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum ur_image_channel_type_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum 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, enum 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, enum ur_sampler_filter_mode_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum ur_sampler_addressing_mode_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum 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, enum ur_usm_host_mem_flag_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum ur_usm_device_mem_flag_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum ur_usm_pool_flag_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum ur_usm_type_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum ur_usm_alloc_info_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum 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, enum ur_usm_pool_info_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum ur_virtual_mem_granularity_info_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum ur_virtual_mem_access_flag_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum ur_virtual_mem_info_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum 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, enum 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, enum ur_program_info_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum ur_program_build_status_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum ur_program_binary_type_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum 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, enum ur_kernel_info_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum ur_kernel_group_info_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum ur_kernel_sub_group_info_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum ur_kernel_cache_config_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum 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, enum ur_queue_info_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum 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, enum ur_command_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum ur_event_status_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum ur_event_info_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum 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, enum ur_execution_info_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum ur_map_flag_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum ur_usm_migration_flag_t value); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum 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); @@ -321,13 +321,13 @@ UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] 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); +UR_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum 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) { +inline std::ostream &operator<<(std::ostream &os, enum ur_function_t value) { switch (value) { case UR_FUNCTION_CONTEXT_CREATE: os << "UR_FUNCTION_CONTEXT_CREATE"; @@ -891,7 +891,7 @@ inline std::ostream &operator<<(std::ostream &os, ur_function_t value) { /// @brief Print operator for the ur_structure_type_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_structure_type_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_structure_type_t value) { switch (value) { case UR_STRUCTURE_TYPE_CONTEXT_PROPERTIES: os << "UR_STRUCTURE_TYPE_CONTEXT_PROPERTIES"; @@ -1256,7 +1256,7 @@ inline ur_result_t printStruct(std::ostream &os, const void *ptr) { /// @brief Print operator for the ur_result_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_result_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_result_t value) { switch (value) { case UR_RESULT_SUCCESS: os << "UR_RESULT_SUCCESS"; @@ -1575,7 +1575,7 @@ inline std::ostream &operator<<(std::ostream &os, const struct ur_rect_region_t /// @brief Print operator for the ur_device_init_flag_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_device_init_flag_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_device_init_flag_t value) { switch (value) { case UR_DEVICE_INIT_FLAG_GPU: os << "UR_DEVICE_INIT_FLAG_GPU"; @@ -1672,7 +1672,7 @@ inline ur_result_t printFlag(std::ostream &os, uint32_t f /// @brief Print operator for the ur_loader_config_info_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_loader_config_info_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_loader_config_info_t value) { switch (value) { case UR_LOADER_CONFIG_INFO_AVAILABLE_LAYERS: os << "UR_LOADER_CONFIG_INFO_AVAILABLE_LAYERS"; @@ -1756,7 +1756,7 @@ inline std::ostream &operator<<(std::ostream &os, const struct ur_code_location_ /// @brief Print operator for the ur_adapter_info_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_adapter_info_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_adapter_info_t value) { switch (value) { case UR_ADAPTER_INFO_BACKEND: os << "UR_ADAPTER_INFO_BACKEND"; @@ -1816,7 +1816,7 @@ inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_adapter_inf /// @brief Print operator for the ur_adapter_backend_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_adapter_backend_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_adapter_backend_t value) { switch (value) { case UR_ADAPTER_BACKEND_UNKNOWN: os << "UR_ADAPTER_BACKEND_UNKNOWN"; @@ -1846,7 +1846,7 @@ inline std::ostream &operator<<(std::ostream &os, ur_adapter_backend_t value) { /// @brief Print operator for the ur_platform_info_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_platform_info_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_platform_info_t value) { switch (value) { case UR_PLATFORM_INFO_NAME: os << "UR_PLATFORM_INFO_NAME"; @@ -1931,7 +1931,7 @@ inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_platform_in /// @brief Print operator for the ur_api_version_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_api_version_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_api_version_t value) { os << UR_MAJOR_VERSION(value) << "." << UR_MINOR_VERSION(value); return os; } @@ -1964,7 +1964,7 @@ inline std::ostream &operator<<(std::ostream &os, const struct ur_platform_nativ /// @brief Print operator for the ur_platform_backend_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_platform_backend_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_platform_backend_t value) { switch (value) { case UR_PLATFORM_BACKEND_UNKNOWN: os << "UR_PLATFORM_BACKEND_UNKNOWN"; @@ -2020,7 +2020,7 @@ inline std::ostream &operator<<(std::ostream &os, const struct ur_device_binary_ /// @brief Print operator for the ur_device_type_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_device_type_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_device_type_t value) { switch (value) { case UR_DEVICE_TYPE_DEFAULT: os << "UR_DEVICE_TYPE_DEFAULT"; @@ -2053,7 +2053,7 @@ inline std::ostream &operator<<(std::ostream &os, ur_device_type_t value) { /// @brief Print operator for the ur_device_info_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_device_info_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_device_info_t value) { switch (value) { case UR_DEVICE_INFO_TYPE: os << "UR_DEVICE_INFO_TYPE"; @@ -4015,7 +4015,7 @@ inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_device_info /// @brief Print operator for the ur_device_affinity_domain_flag_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_device_affinity_domain_flag_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_device_affinity_domain_flag_t value) { switch (value) { case UR_DEVICE_AFFINITY_DOMAIN_FLAG_NUMA: os << "UR_DEVICE_AFFINITY_DOMAIN_FLAG_NUMA"; @@ -4125,7 +4125,7 @@ inline ur_result_t printFlag(std::ostream &os, /// @brief Print operator for the ur_device_partition_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_device_partition_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_device_partition_t value) { switch (value) { case UR_DEVICE_PARTITION_EQUALLY: os << "UR_DEVICE_PARTITION_EQUALLY"; @@ -4239,7 +4239,7 @@ inline std::ostream &operator<<(std::ostream &os, const struct ur_device_partiti /// @brief Print operator for the ur_device_fp_capability_flag_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_device_fp_capability_flag_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_device_fp_capability_flag_t value) { switch (value) { case UR_DEVICE_FP_CAPABILITY_FLAG_CORRECTLY_ROUNDED_DIVIDE_SQRT: os << "UR_DEVICE_FP_CAPABILITY_FLAG_CORRECTLY_ROUNDED_DIVIDE_SQRT"; @@ -4375,7 +4375,7 @@ inline ur_result_t printFlag(std::ostream &os, u /// @brief Print operator for the ur_device_mem_cache_type_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_device_mem_cache_type_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_device_mem_cache_type_t value) { switch (value) { case UR_DEVICE_MEM_CACHE_TYPE_NONE: os << "UR_DEVICE_MEM_CACHE_TYPE_NONE"; @@ -4396,7 +4396,7 @@ inline std::ostream &operator<<(std::ostream &os, ur_device_mem_cache_type_t val /// @brief Print operator for the ur_device_local_mem_type_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_device_local_mem_type_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_device_local_mem_type_t value) { switch (value) { case UR_DEVICE_LOCAL_MEM_TYPE_NONE: os << "UR_DEVICE_LOCAL_MEM_TYPE_NONE"; @@ -4417,7 +4417,7 @@ inline std::ostream &operator<<(std::ostream &os, ur_device_local_mem_type_t val /// @brief Print operator for the ur_device_exec_capability_flag_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_device_exec_capability_flag_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_device_exec_capability_flag_t value) { switch (value) { case UR_DEVICE_EXEC_CAPABILITY_FLAG_KERNEL: os << "UR_DEVICE_EXEC_CAPABILITY_FLAG_KERNEL"; @@ -4500,7 +4500,7 @@ inline std::ostream &operator<<(std::ostream &os, const struct ur_device_native_ /// @brief Print operator for the ur_memory_order_capability_flag_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_memory_order_capability_flag_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_memory_order_capability_flag_t value) { switch (value) { case UR_MEMORY_ORDER_CAPABILITY_FLAG_RELAXED: os << "UR_MEMORY_ORDER_CAPABILITY_FLAG_RELAXED"; @@ -4597,7 +4597,7 @@ inline ur_result_t printFlag(std::ostream &os /// @brief Print operator for the ur_memory_scope_capability_flag_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_memory_scope_capability_flag_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_memory_scope_capability_flag_t value) { switch (value) { case UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_ITEM: os << "UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_ITEM"; @@ -4694,7 +4694,7 @@ inline ur_result_t printFlag(std::ostream &os /// @brief Print operator for the ur_device_usm_access_capability_flag_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_device_usm_access_capability_flag_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_device_usm_access_capability_flag_t value) { switch (value) { case UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_ACCESS: os << "UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_ACCESS"; @@ -4778,7 +4778,7 @@ inline ur_result_t printFlag(std::ostrea /// @brief Print operator for the ur_context_flag_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_context_flag_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_context_flag_t value) { switch (value) { case UR_CONTEXT_FLAG_TBD: os << "UR_CONTEXT_FLAG_TBD"; @@ -4849,7 +4849,7 @@ inline std::ostream &operator<<(std::ostream &os, const struct ur_context_proper /// @brief Print operator for the ur_context_info_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_context_info_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_context_info_t value) { switch (value) { case UR_CONTEXT_INFO_NUM_DEVICES: os << "UR_CONTEXT_INFO_NUM_DEVICES"; @@ -5046,7 +5046,7 @@ inline std::ostream &operator<<(std::ostream &os, const struct ur_context_native /// @brief Print operator for the ur_mem_flag_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_mem_flag_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_mem_flag_t value) { switch (value) { case UR_MEM_FLAG_READ_WRITE: os << "UR_MEM_FLAG_READ_WRITE"; @@ -5156,7 +5156,7 @@ inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { /// @brief Print operator for the ur_mem_type_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_mem_type_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_mem_type_t value) { switch (value) { case UR_MEM_TYPE_BUFFER: os << "UR_MEM_TYPE_BUFFER"; @@ -5189,7 +5189,7 @@ inline std::ostream &operator<<(std::ostream &os, ur_mem_type_t value) { /// @brief Print operator for the ur_mem_info_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_mem_info_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_mem_info_t value) { switch (value) { case UR_MEM_INFO_SIZE: os << "UR_MEM_INFO_SIZE"; @@ -5250,7 +5250,7 @@ inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_mem_info_t /// @brief Print operator for the ur_image_channel_order_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_image_channel_order_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_image_channel_order_t value) { switch (value) { case UR_IMAGE_CHANNEL_ORDER_A: os << "UR_IMAGE_CHANNEL_ORDER_A"; @@ -5307,7 +5307,7 @@ inline std::ostream &operator<<(std::ostream &os, ur_image_channel_order_t value /// @brief Print operator for the ur_image_channel_type_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_image_channel_type_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_image_channel_type_t value) { switch (value) { case UR_IMAGE_CHANNEL_TYPE_SNORM_INT8: os << "UR_IMAGE_CHANNEL_TYPE_SNORM_INT8"; @@ -5364,7 +5364,7 @@ inline std::ostream &operator<<(std::ostream &os, ur_image_channel_type_t value) /// @brief Print operator for the ur_image_info_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_image_info_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_image_info_t value) { switch (value) { case UR_IMAGE_INFO_FORMAT: os << "UR_IMAGE_INFO_FORMAT"; @@ -5689,7 +5689,7 @@ inline std::ostream &operator<<(std::ostream &os, const struct ur_buffer_region_ /// @brief Print operator for the ur_buffer_create_type_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_buffer_create_type_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_buffer_create_type_t value) { switch (value) { case UR_BUFFER_CREATE_TYPE_REGION: os << "UR_BUFFER_CREATE_TYPE_REGION"; @@ -5729,7 +5729,7 @@ inline std::ostream &operator<<(std::ostream &os, const struct ur_mem_native_pro /// @brief Print operator for the ur_sampler_filter_mode_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_sampler_filter_mode_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_sampler_filter_mode_t value) { switch (value) { case UR_SAMPLER_FILTER_MODE_NEAREST: os << "UR_SAMPLER_FILTER_MODE_NEAREST"; @@ -5747,7 +5747,7 @@ inline std::ostream &operator<<(std::ostream &os, ur_sampler_filter_mode_t value /// @brief Print operator for the ur_sampler_addressing_mode_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_sampler_addressing_mode_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_sampler_addressing_mode_t value) { switch (value) { case UR_SAMPLER_ADDRESSING_MODE_NONE: os << "UR_SAMPLER_ADDRESSING_MODE_NONE"; @@ -5774,7 +5774,7 @@ inline std::ostream &operator<<(std::ostream &os, ur_sampler_addressing_mode_t v /// @brief Print operator for the ur_sampler_info_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_sampler_info_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_sampler_info_t value) { switch (value) { case UR_SAMPLER_INFO_REFERENCE_COUNT: os << "UR_SAMPLER_INFO_REFERENCE_COUNT"; @@ -5940,7 +5940,7 @@ inline std::ostream &operator<<(std::ostream &os, const struct ur_sampler_native /// @brief Print operator for the ur_usm_host_mem_flag_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_usm_host_mem_flag_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_usm_host_mem_flag_t value) { switch (value) { case UR_USM_HOST_MEM_FLAG_INITIAL_PLACEMENT: os << "UR_USM_HOST_MEM_FLAG_INITIAL_PLACEMENT"; @@ -5985,7 +5985,7 @@ inline ur_result_t printFlag(std::ostream &os, uint32_t /// @brief Print operator for the ur_usm_device_mem_flag_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_usm_device_mem_flag_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_usm_device_mem_flag_t value) { switch (value) { case UR_USM_DEVICE_MEM_FLAG_WRITE_COMBINED: os << "UR_USM_DEVICE_MEM_FLAG_WRITE_COMBINED"; @@ -6056,7 +6056,7 @@ inline ur_result_t printFlag(std::ostream &os, uint32_ /// @brief Print operator for the ur_usm_pool_flag_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_usm_pool_flag_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_usm_pool_flag_t value) { switch (value) { case UR_USM_POOL_FLAG_ZERO_INITIALIZE_BLOCK: os << "UR_USM_POOL_FLAG_ZERO_INITIALIZE_BLOCK"; @@ -6101,7 +6101,7 @@ inline ur_result_t printFlag(std::ostream &os, uint32_t flag /// @brief Print operator for the ur_usm_type_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_usm_type_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_usm_type_t value) { switch (value) { case UR_USM_TYPE_UNKNOWN: os << "UR_USM_TYPE_UNKNOWN"; @@ -6125,7 +6125,7 @@ inline std::ostream &operator<<(std::ostream &os, ur_usm_type_t value) { /// @brief Print operator for the ur_usm_alloc_info_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_usm_alloc_info_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_usm_alloc_info_t value) { switch (value) { case UR_USM_ALLOC_INFO_TYPE: os << "UR_USM_ALLOC_INFO_TYPE"; @@ -6232,7 +6232,7 @@ inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_usm_alloc_i /// @brief Print operator for the ur_usm_advice_flag_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_usm_advice_flag_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_usm_advice_flag_t value) { switch (value) { case UR_USM_ADVICE_FLAG_DEFAULT: os << "UR_USM_ADVICE_FLAG_DEFAULT"; @@ -6598,7 +6598,7 @@ inline std::ostream &operator<<(std::ostream &os, const struct ur_usm_pool_limit /// @brief Print operator for the ur_usm_pool_info_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_usm_pool_info_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_usm_pool_info_t value) { switch (value) { case UR_USM_POOL_INFO_REFERENCE_COUNT: os << "UR_USM_POOL_INFO_REFERENCE_COUNT"; @@ -6659,7 +6659,7 @@ inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_usm_pool_in /// @brief Print operator for the ur_virtual_mem_granularity_info_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_virtual_mem_granularity_info_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_virtual_mem_granularity_info_t value) { switch (value) { case UR_VIRTUAL_MEM_GRANULARITY_INFO_MINIMUM: os << "UR_VIRTUAL_MEM_GRANULARITY_INFO_MINIMUM"; @@ -6719,7 +6719,7 @@ inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_virtual_mem /// @brief Print operator for the ur_virtual_mem_access_flag_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_virtual_mem_access_flag_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_virtual_mem_access_flag_t value) { switch (value) { case UR_VIRTUAL_MEM_ACCESS_FLAG_NONE: os << "UR_VIRTUAL_MEM_ACCESS_FLAG_NONE"; @@ -6790,7 +6790,7 @@ inline ur_result_t printFlag(std::ostream &os, uin /// @brief Print operator for the ur_virtual_mem_info_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_virtual_mem_info_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_virtual_mem_info_t value) { switch (value) { case UR_VIRTUAL_MEM_INFO_ACCESS_MODE: os << "UR_VIRTUAL_MEM_INFO_ACCESS_MODE"; @@ -6836,7 +6836,7 @@ inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_virtual_mem /// @brief Print operator for the ur_physical_mem_flag_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_physical_mem_flag_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_physical_mem_flag_t value) { switch (value) { case UR_PHYSICAL_MEM_FLAG_TBD: os << "UR_PHYSICAL_MEM_FLAG_TBD"; @@ -6907,7 +6907,7 @@ inline std::ostream &operator<<(std::ostream &os, const struct ur_physical_mem_p /// @brief Print operator for the ur_program_metadata_type_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_program_metadata_type_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_program_metadata_type_t value) { switch (value) { case UR_PROGRAM_METADATA_TYPE_UINT32: os << "UR_PROGRAM_METADATA_TYPE_UINT32"; @@ -7045,7 +7045,7 @@ inline std::ostream &operator<<(std::ostream &os, const struct ur_program_proper /// @brief Print operator for the ur_program_info_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_program_info_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_program_info_t value) { switch (value) { case UR_PROGRAM_INFO_REFERENCE_COUNT: os << "UR_PROGRAM_INFO_REFERENCE_COUNT"; @@ -7195,7 +7195,7 @@ inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_program_inf /// @brief Print operator for the ur_program_build_status_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_program_build_status_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_program_build_status_t value) { switch (value) { case UR_PROGRAM_BUILD_STATUS_NONE: os << "UR_PROGRAM_BUILD_STATUS_NONE"; @@ -7219,7 +7219,7 @@ inline std::ostream &operator<<(std::ostream &os, ur_program_build_status_t valu /// @brief Print operator for the ur_program_binary_type_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_program_binary_type_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_program_binary_type_t value) { switch (value) { case UR_PROGRAM_BINARY_TYPE_NONE: os << "UR_PROGRAM_BINARY_TYPE_NONE"; @@ -7243,7 +7243,7 @@ inline std::ostream &operator<<(std::ostream &os, ur_program_binary_type_t value /// @brief Print operator for the ur_program_build_info_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_program_build_info_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_program_build_info_t value) { switch (value) { case UR_PROGRAM_BUILD_INFO_STATUS: os << "UR_PROGRAM_BUILD_INFO_STATUS"; @@ -7409,7 +7409,7 @@ inline std::ostream &operator<<(std::ostream &os, const struct ur_kernel_arg_loc /// @brief Print operator for the ur_kernel_info_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_kernel_info_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_kernel_info_t value) { switch (value) { case UR_KERNEL_INFO_FUNCTION_NAME: os << "UR_KERNEL_INFO_FUNCTION_NAME"; @@ -7532,7 +7532,7 @@ inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_kernel_info /// @brief Print operator for the ur_kernel_group_info_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_kernel_group_info_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_kernel_group_info_t value) { switch (value) { case UR_KERNEL_GROUP_INFO_GLOBAL_WORK_SIZE: os << "UR_KERNEL_GROUP_INFO_GLOBAL_WORK_SIZE"; @@ -7656,7 +7656,7 @@ inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_kernel_grou /// @brief Print operator for the ur_kernel_sub_group_info_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_kernel_sub_group_info_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_kernel_sub_group_info_t value) { switch (value) { case UR_KERNEL_SUB_GROUP_INFO_MAX_SUB_GROUP_SIZE: os << "UR_KERNEL_SUB_GROUP_INFO_MAX_SUB_GROUP_SIZE"; @@ -7746,7 +7746,7 @@ inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_kernel_sub_ /// @brief Print operator for the ur_kernel_cache_config_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_kernel_cache_config_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_kernel_cache_config_t value) { switch (value) { case UR_KERNEL_CACHE_CONFIG_DEFAULT: os << "UR_KERNEL_CACHE_CONFIG_DEFAULT"; @@ -7767,7 +7767,7 @@ inline std::ostream &operator<<(std::ostream &os, ur_kernel_cache_config_t value /// @brief Print operator for the ur_kernel_exec_info_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_kernel_exec_info_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_kernel_exec_info_t value) { switch (value) { case UR_KERNEL_EXEC_INFO_USM_INDIRECT_ACCESS: os << "UR_KERNEL_EXEC_INFO_USM_INDIRECT_ACCESS"; @@ -7955,7 +7955,7 @@ inline std::ostream &operator<<(std::ostream &os, const struct ur_kernel_native_ /// @brief Print operator for the ur_queue_info_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_queue_info_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_queue_info_t value) { switch (value) { case UR_QUEUE_INFO_CONTEXT: os << "UR_QUEUE_INFO_CONTEXT"; @@ -8094,7 +8094,7 @@ inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_queue_info_ /// @brief Print operator for the ur_queue_flag_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_queue_flag_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_queue_flag_t value) { switch (value) { case UR_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_ENABLE: os << "UR_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_ENABLE"; @@ -8371,7 +8371,7 @@ inline std::ostream &operator<<(std::ostream &os, const struct ur_queue_native_p /// @brief Print operator for the ur_command_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_command_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_command_t value) { switch (value) { case UR_COMMAND_KERNEL_LAUNCH: os << "UR_COMMAND_KERNEL_LAUNCH"; @@ -8467,7 +8467,7 @@ inline std::ostream &operator<<(std::ostream &os, ur_command_t value) { /// @brief Print operator for the ur_event_status_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_event_status_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_event_status_t value) { switch (value) { case UR_EVENT_STATUS_COMPLETE: os << "UR_EVENT_STATUS_COMPLETE"; @@ -8491,7 +8491,7 @@ inline std::ostream &operator<<(std::ostream &os, ur_event_status_t value) { /// @brief Print operator for the ur_event_info_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_event_info_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_event_info_t value) { switch (value) { case UR_EVENT_INFO_COMMAND_QUEUE: os << "UR_EVENT_INFO_COMMAND_QUEUE"; @@ -8598,7 +8598,7 @@ inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_event_info_ /// @brief Print operator for the ur_profiling_info_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_profiling_info_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_profiling_info_t value) { switch (value) { case UR_PROFILING_INFO_COMMAND_QUEUED: os << "UR_PROFILING_INFO_COMMAND_QUEUED"; @@ -8728,7 +8728,7 @@ inline std::ostream &operator<<(std::ostream &os, const struct ur_event_native_p /// @brief Print operator for the ur_execution_info_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_execution_info_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_execution_info_t value) { switch (value) { case UR_EXECUTION_INFO_COMPLETE: os << "UR_EXECUTION_INFO_COMPLETE"; @@ -8752,7 +8752,7 @@ inline std::ostream &operator<<(std::ostream &os, ur_execution_info_t value) { /// @brief Print operator for the ur_map_flag_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_map_flag_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_map_flag_t value) { switch (value) { case UR_MAP_FLAG_READ: os << "UR_MAP_FLAG_READ"; @@ -8823,7 +8823,7 @@ inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { /// @brief Print operator for the ur_usm_migration_flag_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_usm_migration_flag_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_usm_migration_flag_t value) { switch (value) { case UR_USM_MIGRATION_FLAG_DEFAULT: os << "UR_USM_MIGRATION_FLAG_DEFAULT"; @@ -8868,7 +8868,7 @@ inline ur_result_t printFlag(std::ostream &os, uint32_t /// @brief Print operator for the ur_exp_image_copy_flag_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_exp_image_copy_flag_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_exp_image_copy_flag_t value) { switch (value) { case UR_EXP_IMAGE_COPY_FLAG_HOST_TO_DEVICE: os << "UR_EXP_IMAGE_COPY_FLAG_HOST_TO_DEVICE"; @@ -9146,7 +9146,7 @@ inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_command_bu /// @brief Print operator for the ur_exp_peer_info_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, ur_exp_peer_info_t value) { +inline std::ostream &operator<<(std::ostream &os, enum ur_exp_peer_info_t value) { switch (value) { case UR_EXP_PEER_INFO_UR_PEER_ACCESS_SUPPORTED: os << "UR_EXP_PEER_INFO_UR_PEER_ACCESS_SUPPORTED"; diff --git a/scripts/Doxyfile b/scripts/Doxyfile index 199fd6afdc..db418d6530 100644 --- a/scripts/Doxyfile +++ b/scripts/Doxyfile @@ -848,8 +848,7 @@ RECURSIVE = YES # Note that relative paths are relative to the directory from which doxygen is # run. -EXCLUDE = README.md \ - ../include/ur_print.hpp +EXCLUDE = README.md # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded @@ -876,7 +875,7 @@ EXCLUDE_PATTERNS = # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories use the pattern */test/* -EXCLUDE_SYMBOLS = +EXCLUDE_SYMBOLS = *::print::details # The EXAMPLE_PATH tag can be used to specify one or more files or directories # that contain example code fragments that are included (see the \include diff --git a/scripts/templates/api_listing.mako b/scripts/templates/api_listing.mako index 0cfe15a9da..38672cb5da 100644 --- a/scripts/templates/api_listing.mako +++ b/scripts/templates/api_listing.mako @@ -273,8 +273,8 @@ ${th.make_type_name(n, tags, obj)} api_types_funcs = tph.get_api_types_funcs(specs, meta, namespace, tags) extras_funcs = tph.get_extras_funcs(tags) %>\ -## Generate Print links table -Print +## Generate Print C API links table +Print C API ============================================================ * Functions %for func in api_types_funcs: @@ -296,7 +296,7 @@ ${func_name} :project: UnifiedRuntime -## Generate Print API documentation +## Generate Print C API documentation Print Functions ------------------------------------------------------------------------------ %for func in api_types_funcs: @@ -307,3 +307,46 @@ ${generate_api_doc(func.c_name)} ## 'Extras' functions ${generate_api_doc(func.c_name)} %endfor + +## Generate Print C++ API functions links table +Print C++ API +============================================================ +* Functions +## As operators doesn't need any special descriptions, docs for them are limited to just +## listing their declarations. This is made to avoid making the docs page unresponsive +## by introducing a large amount of not-so-helpful links and detailed descriptions. +%for func in api_types_funcs: +%if func.cpp_name != 'operator<<': + * :ref:`${f'{func.cpp_name}({func.cpp_args})'.replace("_", "-")}` +%endif +%endfor + +## 'Extras' functions +%for func in extras_funcs: + * :ref:`${func.cpp_name}` +%endfor + +## Generate Print C++ API documentation +Print Functions +------------------------------------------------------------------------------ +%for func in api_types_funcs: +%if func.cpp_name != 'operator<<': +${generate_api_doc(f'{func.cpp_name}({func.cpp_args})')} +%endif +%endfor + +%for func in extras_funcs: +## 'Extras' functions +${generate_api_doc(func.cpp_name)} +%endfor + +## Print the list of operators declarations +Print Operators +------------------------------------------------------------------------------ +%for func in api_types_funcs: +%if func.cpp_name == 'operator<<': +.. doxygenfunction:: ${f'{func.cpp_name}({func.cpp_args})'} + :project: UnifiedRuntime + :outline: +%endif +%endfor diff --git a/scripts/templates/print.hpp.mako b/scripts/templates/print.hpp.mako index b4976eaf6b..47a31181d6 100644 --- a/scripts/templates/print.hpp.mako +++ b/scripts/templates/print.hpp.mako @@ -158,7 +158,7 @@ template inline ${x}_result_t printTagged(std::ostream &os, const v %for spec in specs: %for obj in spec['objects']: %if re.match(r"enum", obj['type']): - ${X}_APIEXPORT inline std::ostream &operator<<(std::ostream &os, ${th.make_enum_name(n, tags, obj)} value); + ${X}_APIEXPORT inline std::ostream &operator<<(std::ostream &os, enum ${th.make_enum_name(n, tags, obj)} value); %elif re.match(r"struct", obj['type']): ${X}_APIEXPORT inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const ${obj['type']} ${th.make_type_name(n, tags, obj)} params); %endif @@ -175,12 +175,12 @@ template inline ${x}_result_t printTagged(std::ostream &os, const v /// @returns /// std::ostream & %if "api_version" in obj['name']: - inline std::ostream &operator<<(std::ostream &os, ${th.make_enum_name(n, tags, obj)} value) { + inline std::ostream &operator<<(std::ostream &os, enum ${th.make_enum_name(n, tags, obj)} value) { os << UR_MAJOR_VERSION(value) << "." << UR_MINOR_VERSION(value); return os; } %else: - inline std::ostream &operator<<(std::ostream &os, ${th.make_enum_name(n, tags, obj)} value) { + inline std::ostream &operator<<(std::ostream &os, enum ${th.make_enum_name(n, tags, obj)} value) { switch (value) { %for n, item in enumerate(obj['etors']): <% diff --git a/scripts/templates/print_helper.py b/scripts/templates/print_helper.py index 16ef57e64b..3173078540 100644 --- a/scripts/templates/print_helper.py +++ b/scripts/templates/print_helper.py @@ -112,7 +112,19 @@ def c_args(self) -> str: @property def cpp_name(self) -> str: - return "" + return "operator<<" + + @property + def cpp_args(self) -> str: + attribute = ( + "[[maybe_unused]]" if re.match("const struct", self.print_arg.type) else "" + ) + return str( + [ + Arg("std::ostream &", "os"), + Arg(" ".join([attribute, self.print_arg.type]), self.print_arg.name), + ] + ).strip("[]") @property def print_arg(self) -> Arg: @@ -165,7 +177,7 @@ def _make_c_func_name(self) -> str: def _make_c_args(self) -> str: c_args = [self.print_arg] c_args.extend(self._c_common_args) - return str(c_args).strip("[]") + return str(c_args)[1:-1] class ExtrasFunc(Func):