From eff80636e5b5a79a53aeb677b5804739e7214841 Mon Sep 17 00:00:00 2001 From: Patryk Kaminski Date: Tue, 5 Sep 2023 12:32:59 +0200 Subject: [PATCH 1/3] Rename params stringifier --- scripts/generate_code.py | 8 +- .../{params.hpp.mako => print.hpp.mako} | 74 +- source/common/{ur_params.hpp => ur_print.hpp} | 2152 ++++++++--------- test/conformance/testing/include/uur/checks.h | 2 +- test/loader/loader_lifetime/urLoaderInit.cpp | 4 +- test/loader/platforms/platforms.cpp | 2 +- test/unit/utils/params.cpp | 10 +- tools/urtrace/collector.cpp | 8 +- 8 files changed, 1117 insertions(+), 1143 deletions(-) rename scripts/templates/{params.hpp.mako => print.hpp.mako} (84%) rename source/common/{ur_params.hpp => ur_print.hpp} (86%) diff --git a/scripts/generate_code.py b/scripts/generate_code.py index 3c4b3107a3..0d391b1747 100644 --- a/scripts/generate_code.py +++ b/scripts/generate_code.py @@ -278,11 +278,11 @@ def _mako_tracing_layer_cpp(path, namespace, tags, version, specs, meta): """ generates c/c++ files from the specification documents """ -def _mako_params_hpp(path, namespace, tags, version, specs, meta): - template = "params.hpp.mako" +def _mako_print_hpp(path, namespace, tags, version, specs, meta): + template = "print.hpp.mako" fin = os.path.join(templates_dir, template) - name = "%s_params"%(namespace) + name = "%s_print"%(namespace) filename = "%s.hpp"%(name) fout = os.path.join(path, filename) @@ -361,6 +361,6 @@ def generate_common(path, section, namespace, tags, version, specs, meta): os.makedirs(layer_dstpath, exist_ok=True) loc = 0 - loc += _mako_params_hpp(layer_dstpath, namespace, tags, version, specs, meta) + loc += _mako_print_hpp(layer_dstpath, namespace, tags, version, specs, meta) print("COMMON Generated %s lines of code.\n"%loc) diff --git a/scripts/templates/params.hpp.mako b/scripts/templates/print.hpp.mako similarity index 84% rename from scripts/templates/params.hpp.mako rename to scripts/templates/print.hpp.mako index 42fbf61d1f..ddf17dff29 100644 --- a/scripts/templates/params.hpp.mako +++ b/scripts/templates/print.hpp.mako @@ -18,8 +18,8 @@ from templates import helper as th * @file ${name}.hpp * */ -#ifndef ${X}_PARAMS_HPP -#define ${X}_PARAMS_HPP 1 +#ifndef ${X}_PRINT_HPP +#define ${X}_PRINT_HPP 1 #include "${x}_api.h" #include @@ -27,15 +27,15 @@ from templates import helper as th <%def name="member(iname, itype, loop)"> %if iname == "pNext": - ${x}_params::serializeStruct(os, ${caller.body()}); + ${x}_print::printStruct(os, ${caller.body()}); %elif th.type_traits.is_flags(itype): - ${x}_params::serializeFlag<${th.type_traits.get_flag_type(itype)}>(os, ${caller.body()}); + ${x}_print::printFlag<${th.type_traits.get_flag_type(itype)}>(os, ${caller.body()}); %elif not loop and th.type_traits.is_pointer(itype): - ${x}_params::serializePtr(os, ${caller.body()}); + ${x}_print::printPtr(os, ${caller.body()}); %elif loop and th.type_traits.is_pointer_to_pointer(itype): - ${x}_params::serializePtr(os, ${caller.body()}); + ${x}_print::printPtr(os, ${caller.body()}); %elif th.type_traits.is_handle(itype): - ${x}_params::serializePtr(os, ${caller.body()}); + ${x}_print::printPtr(os, ${caller.body()}); %elif iname and iname.startswith("pfn"): os << reinterpret_cast(${caller.body()}); %else: @@ -83,7 +83,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)}); + ${x}_print::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++){ @@ -97,7 +97,7 @@ def findMemberType(_item): os << "}"; %elif typename is not None: os << ".${iname} = "; - ${x}_params::serializeTagged(os, ${deref}(params${access}${pname}), ${deref}(params${access}${prefix}${typename}), ${deref}(params${access}${prefix}${typename_size})); + ${x}_print::printTagged(os, ${deref}(params${access}${pname}), ${deref}(params${access}${prefix}${typename}), ${deref}(params${access}${prefix}${typename_size})); %else: os << ".${iname} = "; <%call expr="member(iname, itype, False)"> @@ -106,7 +106,7 @@ def findMemberType(_item): %endif -namespace ${x}_params { +namespace ${x}_print { template struct is_handle : std::false_type {}; %for spec in specs: %for obj in spec['objects']: @@ -117,24 +117,24 @@ 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 void printPtr(std::ostream &os, const T *ptr); +template inline void printFlag(std::ostream &os, uint32_t flag); +template inline void printTagged(std::ostream &os, const void *ptr, T value, size_t size); %for spec in specs: %for obj in spec['objects']: ## ENUM ####################################################################### %if re.match(r"enum", obj['type']): %if obj.get('typed_etors', False) is True: - template <> inline void serializeTagged(std::ostream &os, const void *ptr, ${th.make_enum_name(n, tags, obj)} value, size_t size); + template <> inline void printTagged(std::ostream &os, const void *ptr, ${th.make_enum_name(n, tags, obj)} value, size_t size); %elif "structure_type" in obj['name']: - inline void serializeStruct(std::ostream &os, const void *ptr); + inline void printStruct(std::ostream &os, const void *ptr); %endif %endif %if re.match(r"union", obj['type']) and obj['name']: <% tag = [_obj for _s in specs for _obj in _s['objects'] if _obj['name'] == obj['tag']][0] %> - inline void serializeUnion( + inline void printUnion( std::ostream &os, const ${obj['type']} ${th.make_type_name(n, tags, obj)} params, const ${tag['type']} ${th.make_type_name(n, tags, tag)} tag @@ -143,11 +143,11 @@ template inline void serializeTagged(std::ostream &os, const void * %if th.type_traits.is_flags(obj['name']): - template<> inline void serializeFlag<${th.make_enum_name(n, tags, obj)}>(std::ostream &os, uint32_t flag); + template<> inline void printFlag<${th.make_enum_name(n, tags, obj)}>(std::ostream &os, uint32_t flag); %endif %endfor # obj in spec['objects'] %endfor -} // namespace ${x}_params +} // namespace ${x}_print %for spec in specs: %for obj in spec['objects']: @@ -188,11 +188,11 @@ template inline void serializeTagged(std::ostream &os, const void * } %endif %if obj.get('typed_etors', False) is True: - namespace ${x}_params { + namespace ${x}_print { template <> - inline void serializeTagged(std::ostream &os, const void *ptr, ${th.make_enum_name(n, tags, obj)} value, size_t size) { + inline void printTagged(std::ostream &os, const void *ptr, ${th.make_enum_name(n, tags, obj)} value, size_t size) { if (ptr == NULL) { - serializePtr(os, ptr); + printPtr(os, ptr); return; } @@ -211,7 +211,7 @@ template inline void serializeTagged(std::ostream &os, const void * const ${atype} *tptr = (const ${atype} *)ptr; %endif %if "char" in atype: ## print char* arrays as simple NULL-terminated strings - serializePtr(os, tptr); + printPtr(os, tptr); %else: os << "{"; size_t nelems = size / sizeof(${atype}); @@ -250,10 +250,10 @@ template inline void serializeTagged(std::ostream &os, const void * } } %elif "structure_type" in obj['name']: - namespace ${x}_params { - inline void serializeStruct(std::ostream &os, const void *ptr) { + namespace ${x}_print { + inline void printStruct(std::ostream &os, const void *ptr) { if (ptr == NULL) { - ${x}_params::serializePtr(os, ptr); + ${x}_print::printPtr(os, ptr); return; } @@ -266,7 +266,7 @@ template inline void serializeTagged(std::ostream &os, const void * %> case ${ename}: { const ${th.subt(n, tags, item['desc'])} *pstruct = (const ${th.subt(n, tags, item['desc'])} *)ptr; - ${x}_params::serializePtr(os, pstruct); + ${x}_print::printPtr(os, pstruct); } break; %endfor default: @@ -274,13 +274,13 @@ template inline void serializeTagged(std::ostream &os, const void * break; } } - } // namespace ${x}_params + } // namespace ${x}_print %endif %if th.type_traits.is_flags(obj['name']): -namespace ${x}_params { +namespace ${x}_print { template<> -inline void serializeFlag<${th.make_enum_name(n, tags, obj)}>(std::ostream &os, uint32_t flag) { +inline void printFlag<${th.make_enum_name(n, tags, obj)}>(std::ostream &os, uint32_t flag) { uint32_t val = flag; bool first = true; %for n, item in enumerate(obj['etors']): @@ -310,7 +310,7 @@ inline void serializeFlag<${th.make_enum_name(n, tags, obj)}>(std::ostream &os, os << "0"; } } -} // namespace ${x}_params +} // namespace ${x}_print %endif ## STRUCT/UNION ############################################################### %elif re.match(r"struct", obj['type']): @@ -332,7 +332,7 @@ inline std::ostream &operator<<(std::ostream &os, const ${obj['type']} ${th.make } %elif re.match(r"union", obj['type']) and obj['name']: <% tag = findUnionTag(obj) %> -inline void ${x}_params::serializeUnion( +inline void ${x}_print::printUnion( std::ostream &os, const ${obj['type']} ${th.make_type_name(n, tags, obj)} params, const ${tag['type']} ${th.make_type_name(n, tags, tag)} tag @@ -381,14 +381,14 @@ inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct %endfor %endfor -namespace ${x}_params { +namespace ${x}_print { -template inline void serializePtr(std::ostream &os, const T *ptr) { +template inline void 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; @@ -403,7 +403,7 @@ template inline void serializePtr(std::ostream &os, const T *ptr) { } } -inline int serializeFunctionParams(std::ostream &os, uint32_t function, const void *params) { +inline int printFunctionParams(std::ostream &os, uint32_t function, const void *params) { switch((enum ${x}_function_t)function) { %for tbl in th.get_pfncbtables(specs, meta, n, tags): %for obj in tbl['functions']: @@ -416,6 +416,6 @@ inline int serializeFunctionParams(std::ostream &os, uint32_t function, const vo } return 0; } -} // namespace ur_params +} // namespace ur_print -#endif /* ${X}_PARAMS_HPP */ +#endif /* ${X}_PRINT_HPP */ diff --git a/source/common/ur_params.hpp b/source/common/ur_print.hpp similarity index 86% rename from source/common/ur_params.hpp rename to source/common/ur_print.hpp index 9d7779ea2d..0f867dcfa3 100644 --- a/source/common/ur_params.hpp +++ b/source/common/ur_print.hpp @@ -6,17 +6,17 @@ * See LICENSE.TXT * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * - * @file ur_params.hpp + * @file ur_print.hpp * */ -#ifndef UR_PARAMS_HPP -#define UR_PARAMS_HPP 1 +#ifndef UR_PRINT_HPP +#define UR_PRINT_HPP 1 #include "ur_api.h" #include #include -namespace ur_params { +namespace ur_print { template struct is_handle : std::false_type {}; template <> struct is_handle : std::true_type {}; template <> struct is_handle : std::true_type {}; @@ -40,185 +40,177 @@ 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 void printPtr(std::ostream &os, const T *ptr); +template inline void printFlag(std::ostream &os, uint32_t flag); 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); +inline void printTagged(std::ostream &os, const void *ptr, T value, + size_t size); -inline void serializeStruct(std::ostream &os, const void *ptr); +inline void printStruct(std::ostream &os, const void *ptr); template <> -inline void serializeFlag(std::ostream &os, - uint32_t flag); +inline void printFlag(std::ostream &os, uint32_t flag); template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_loader_config_info_t value, size_t size); +inline void printTagged(std::ostream &os, const void *ptr, + ur_loader_config_info_t value, size_t size); template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_adapter_info_t value, size_t size); +inline void printTagged(std::ostream &os, const void *ptr, + ur_adapter_info_t value, size_t size); template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_platform_info_t value, size_t size); +inline void printTagged(std::ostream &os, const void *ptr, + ur_platform_info_t value, size_t size); template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_device_info_t value, size_t size); +inline void printTagged(std::ostream &os, const void *ptr, + ur_device_info_t value, size_t size); template <> -inline void serializeFlag(std::ostream &os, - uint32_t flag); +inline void printFlag(std::ostream &os, + uint32_t flag); -inline void serializeUnion(std::ostream &os, - const union ur_device_partition_value_t params, - const enum ur_device_partition_t tag); +inline void printUnion(std::ostream &os, + const union ur_device_partition_value_t params, + const enum ur_device_partition_t tag); template <> -inline void serializeFlag(std::ostream &os, - uint32_t flag); +inline void printFlag(std::ostream &os, + uint32_t flag); template <> -inline void serializeFlag(std::ostream &os, - uint32_t flag); +inline void printFlag(std::ostream &os, + uint32_t flag); template <> -inline void serializeFlag(std::ostream &os, - uint32_t flag); +inline void printFlag(std::ostream &os, + uint32_t flag); template <> -inline void serializeFlag(std::ostream &os, - uint32_t flag); +inline void printFlag(std::ostream &os, + uint32_t flag); template <> -inline void -serializeFlag(std::ostream &os, - uint32_t flag); +inline void printFlag(std::ostream &os, + uint32_t flag); template <> -inline void serializeFlag(std::ostream &os, uint32_t flag); +inline void printFlag(std::ostream &os, uint32_t flag); template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_context_info_t value, size_t size); +inline void printTagged(std::ostream &os, const void *ptr, + ur_context_info_t value, size_t size); template <> -inline void serializeFlag(std::ostream &os, uint32_t flag); +inline void printFlag(std::ostream &os, uint32_t flag); template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_mem_info_t value, size_t size); +inline void printTagged(std::ostream &os, const void *ptr, ur_mem_info_t value, + size_t size); template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_image_info_t value, size_t size); +inline void printTagged(std::ostream &os, const void *ptr, + ur_image_info_t value, size_t size); template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_sampler_info_t value, size_t size); +inline void printTagged(std::ostream &os, const void *ptr, + ur_sampler_info_t value, size_t size); template <> -inline void serializeFlag(std::ostream &os, - uint32_t flag); +inline void printFlag(std::ostream &os, uint32_t flag); template <> -inline void serializeFlag(std::ostream &os, - uint32_t flag); +inline void printFlag(std::ostream &os, + uint32_t flag); template <> -inline void serializeFlag(std::ostream &os, uint32_t flag); +inline void printFlag(std::ostream &os, uint32_t flag); template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_usm_alloc_info_t value, size_t size); +inline void printTagged(std::ostream &os, const void *ptr, + ur_usm_alloc_info_t value, size_t size); template <> -inline void serializeFlag(std::ostream &os, - uint32_t flag); +inline void printFlag(std::ostream &os, uint32_t flag); template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_usm_pool_info_t value, size_t size); +inline void printTagged(std::ostream &os, const void *ptr, + ur_usm_pool_info_t value, size_t size); template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_virtual_mem_granularity_info_t value, - size_t size); +inline void printTagged(std::ostream &os, const void *ptr, + ur_virtual_mem_granularity_info_t value, size_t size); template <> -inline void serializeFlag(std::ostream &os, - uint32_t flag); +inline void printFlag(std::ostream &os, + uint32_t flag); template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_virtual_mem_info_t value, size_t size); +inline void printTagged(std::ostream &os, const void *ptr, + ur_virtual_mem_info_t value, size_t size); template <> -inline void serializeFlag(std::ostream &os, - uint32_t flag); +inline void printFlag(std::ostream &os, uint32_t flag); -inline void serializeUnion(std::ostream &os, - const union ur_program_metadata_value_t params, - const enum ur_program_metadata_type_t tag); +inline void printUnion(std::ostream &os, + const union ur_program_metadata_value_t params, + const enum ur_program_metadata_type_t tag); template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_program_info_t value, size_t size); +inline void printTagged(std::ostream &os, const void *ptr, + ur_program_info_t value, size_t size); template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_program_build_info_t value, size_t size); +inline void printTagged(std::ostream &os, const void *ptr, + ur_program_build_info_t value, size_t size); template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_kernel_info_t value, size_t size); +inline void printTagged(std::ostream &os, const void *ptr, + ur_kernel_info_t value, size_t size); template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_kernel_group_info_t value, size_t size); +inline void printTagged(std::ostream &os, const void *ptr, + ur_kernel_group_info_t value, size_t size); template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_kernel_sub_group_info_t value, size_t size); +inline void printTagged(std::ostream &os, const void *ptr, + ur_kernel_sub_group_info_t value, size_t size); template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_kernel_exec_info_t value, size_t size); +inline void printTagged(std::ostream &os, const void *ptr, + ur_kernel_exec_info_t value, size_t size); template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_queue_info_t value, size_t size); +inline void printTagged(std::ostream &os, const void *ptr, + ur_queue_info_t value, size_t size); template <> -inline void serializeFlag(std::ostream &os, uint32_t flag); +inline void printFlag(std::ostream &os, uint32_t flag); template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_event_info_t value, size_t size); +inline void printTagged(std::ostream &os, const void *ptr, + ur_event_info_t value, size_t size); template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_profiling_info_t value, size_t size); +inline void printTagged(std::ostream &os, const void *ptr, + ur_profiling_info_t value, size_t size); template <> -inline void serializeFlag(std::ostream &os, uint32_t flag); +inline void printFlag(std::ostream &os, uint32_t flag); template <> -inline void serializeFlag(std::ostream &os, - uint32_t flag); +inline void printFlag(std::ostream &os, uint32_t flag); template <> -inline void serializeFlag(std::ostream &os, - uint32_t flag); +inline void 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); +inline void printTagged(std::ostream &os, const void *ptr, + ur_exp_peer_info_t value, size_t size); -} // namespace ur_params +} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_function_t value); inline std::ostream &operator<<(std::ostream &os, @@ -1392,10 +1384,10 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_params { -inline void serializeStruct(std::ostream &os, const void *ptr) { +namespace ur_print { +inline void printStruct(std::ostream &os, const void *ptr) { if (ptr == NULL) { - ur_params::serializePtr(os, ptr); + ur_print::printPtr(os, ptr); return; } @@ -1406,252 +1398,252 @@ inline void serializeStruct(std::ostream &os, const void *ptr) { case UR_STRUCTURE_TYPE_CONTEXT_PROPERTIES: { const ur_context_properties_t *pstruct = (const ur_context_properties_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_IMAGE_DESC: { const ur_image_desc_t *pstruct = (const ur_image_desc_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_BUFFER_PROPERTIES: { const ur_buffer_properties_t *pstruct = (const ur_buffer_properties_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_BUFFER_REGION: { const ur_buffer_region_t *pstruct = (const ur_buffer_region_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_BUFFER_CHANNEL_PROPERTIES: { const ur_buffer_channel_properties_t *pstruct = (const ur_buffer_channel_properties_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_BUFFER_ALLOC_LOCATION_PROPERTIES: { const ur_buffer_alloc_location_properties_t *pstruct = (const ur_buffer_alloc_location_properties_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_PROGRAM_PROPERTIES: { const ur_program_properties_t *pstruct = (const ur_program_properties_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_USM_DESC: { const ur_usm_desc_t *pstruct = (const ur_usm_desc_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_USM_HOST_DESC: { const ur_usm_host_desc_t *pstruct = (const ur_usm_host_desc_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_USM_DEVICE_DESC: { const ur_usm_device_desc_t *pstruct = (const ur_usm_device_desc_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_USM_POOL_DESC: { const ur_usm_pool_desc_t *pstruct = (const ur_usm_pool_desc_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_USM_POOL_LIMITS_DESC: { const ur_usm_pool_limits_desc_t *pstruct = (const ur_usm_pool_limits_desc_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_DEVICE_BINARY: { const ur_device_binary_t *pstruct = (const ur_device_binary_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_SAMPLER_DESC: { const ur_sampler_desc_t *pstruct = (const ur_sampler_desc_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_QUEUE_PROPERTIES: { const ur_queue_properties_t *pstruct = (const ur_queue_properties_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_QUEUE_INDEX_PROPERTIES: { const ur_queue_index_properties_t *pstruct = (const ur_queue_index_properties_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_CONTEXT_NATIVE_PROPERTIES: { const ur_context_native_properties_t *pstruct = (const ur_context_native_properties_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_KERNEL_NATIVE_PROPERTIES: { const ur_kernel_native_properties_t *pstruct = (const ur_kernel_native_properties_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_QUEUE_NATIVE_PROPERTIES: { const ur_queue_native_properties_t *pstruct = (const ur_queue_native_properties_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_MEM_NATIVE_PROPERTIES: { const ur_mem_native_properties_t *pstruct = (const ur_mem_native_properties_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_EVENT_NATIVE_PROPERTIES: { const ur_event_native_properties_t *pstruct = (const ur_event_native_properties_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_PLATFORM_NATIVE_PROPERTIES: { const ur_platform_native_properties_t *pstruct = (const ur_platform_native_properties_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_DEVICE_NATIVE_PROPERTIES: { const ur_device_native_properties_t *pstruct = (const ur_device_native_properties_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_PROGRAM_NATIVE_PROPERTIES: { const ur_program_native_properties_t *pstruct = (const ur_program_native_properties_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_SAMPLER_NATIVE_PROPERTIES: { const ur_sampler_native_properties_t *pstruct = (const ur_sampler_native_properties_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_QUEUE_NATIVE_DESC: { const ur_queue_native_desc_t *pstruct = (const ur_queue_native_desc_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_DEVICE_PARTITION_PROPERTIES: { const ur_device_partition_properties_t *pstruct = (const ur_device_partition_properties_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_KERNEL_ARG_MEM_OBJ_PROPERTIES: { const ur_kernel_arg_mem_obj_properties_t *pstruct = (const ur_kernel_arg_mem_obj_properties_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_PHYSICAL_MEM_PROPERTIES: { const ur_physical_mem_properties_t *pstruct = (const ur_physical_mem_properties_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_KERNEL_ARG_POINTER_PROPERTIES: { const ur_kernel_arg_pointer_properties_t *pstruct = (const ur_kernel_arg_pointer_properties_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_KERNEL_ARG_SAMPLER_PROPERTIES: { const ur_kernel_arg_sampler_properties_t *pstruct = (const ur_kernel_arg_sampler_properties_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_KERNEL_EXEC_INFO_PROPERTIES: { const ur_kernel_exec_info_properties_t *pstruct = (const ur_kernel_exec_info_properties_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_KERNEL_ARG_VALUE_PROPERTIES: { const ur_kernel_arg_value_properties_t *pstruct = (const ur_kernel_arg_value_properties_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_KERNEL_ARG_LOCAL_PROPERTIES: { const ur_kernel_arg_local_properties_t *pstruct = (const ur_kernel_arg_local_properties_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_DESC: { const ur_exp_command_buffer_desc_t *pstruct = (const ur_exp_command_buffer_desc_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_EXP_SAMPLER_MIP_PROPERTIES: { const ur_exp_sampler_mip_properties_t *pstruct = (const ur_exp_sampler_mip_properties_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_EXP_INTEROP_MEM_DESC: { const ur_exp_interop_mem_desc_t *pstruct = (const ur_exp_interop_mem_desc_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_EXP_INTEROP_SEMAPHORE_DESC: { const ur_exp_interop_semaphore_desc_t *pstruct = (const ur_exp_interop_semaphore_desc_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_EXP_FILE_DESCRIPTOR: { const ur_exp_file_descriptor_t *pstruct = (const ur_exp_file_descriptor_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_EXP_WIN32_HANDLE: { const ur_exp_win32_handle_t *pstruct = (const ur_exp_win32_handle_t *)ptr; - ur_params::serializePtr(os, pstruct); + ur_print::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); + ur_print::printPtr(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); + ur_print::printPtr(os, pstruct); } break; default: os << "unknown enumerator"; break; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_result_t value) { switch (value) { @@ -1963,7 +1955,7 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << "}"; return os; @@ -1979,7 +1971,7 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << "}"; return os; @@ -2055,11 +2047,10 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeFlag(std::ostream &os, - uint32_t flag) { +inline void printFlag(std::ostream &os, uint32_t flag) { uint32_t val = flag; bool first = true; @@ -2123,7 +2114,7 @@ inline void serializeFlag(std::ostream &os, os << "0"; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_loader_config_info_t value) { switch (value) { @@ -2141,12 +2132,12 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_loader_config_info_t value, size_t size) { +inline void printTagged(std::ostream &os, const void *ptr, + ur_loader_config_info_t value, size_t size) { if (ptr == NULL) { - serializePtr(os, ptr); + printPtr(os, ptr); return; } @@ -2155,7 +2146,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, case UR_LOADER_CONFIG_INFO_AVAILABLE_LAYERS: { const char *tptr = (const char *)ptr; - serializePtr(os, tptr); + printPtr(os, tptr); } break; case UR_LOADER_CONFIG_INFO_REFERENCE_COUNT: { @@ -2176,7 +2167,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, const struct ur_code_location_t params) { os << "(struct ur_code_location_t){"; @@ -2220,12 +2211,12 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_adapter_info_t value, size_t size) { +inline void printTagged(std::ostream &os, const void *ptr, + ur_adapter_info_t value, size_t size) { if (ptr == NULL) { - serializePtr(os, ptr); + printPtr(os, ptr); return; } @@ -2263,7 +2254,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_adapter_backend_t value) { switch (value) { @@ -2330,12 +2321,12 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_platform_info_t value, size_t size) { +inline void printTagged(std::ostream &os, const void *ptr, + ur_platform_info_t value, size_t size) { if (ptr == NULL) { - serializePtr(os, ptr); + printPtr(os, ptr); return; } @@ -2344,31 +2335,31 @@ inline void serializeTagged(std::ostream &os, const void *ptr, case UR_PLATFORM_INFO_NAME: { const char *tptr = (const char *)ptr; - serializePtr(os, tptr); + printPtr(os, tptr); } break; case UR_PLATFORM_INFO_VENDOR_NAME: { const char *tptr = (const char *)ptr; - serializePtr(os, tptr); + printPtr(os, tptr); } break; case UR_PLATFORM_INFO_VERSION: { const char *tptr = (const char *)ptr; - serializePtr(os, tptr); + printPtr(os, tptr); } break; case UR_PLATFORM_INFO_EXTENSIONS: { const char *tptr = (const char *)ptr; - serializePtr(os, tptr); + printPtr(os, tptr); } break; case UR_PLATFORM_INFO_PROFILE: { const char *tptr = (const char *)ptr; - serializePtr(os, tptr); + printPtr(os, tptr); } break; case UR_PLATFORM_INFO_BACKEND: { @@ -2389,7 +2380,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_api_version_t value) { os << UR_MAJOR_VERSION(value) << "." << UR_MINOR_VERSION(value); return os; @@ -2406,7 +2397,7 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << ", "; os << ".isNativeHandleOwned = "; @@ -2460,12 +2451,12 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << ", "; os << ".pDeviceTargetSpec = "; - ur_params::serializePtr(os, (params.pDeviceTargetSpec)); + ur_print::printPtr(os, (params.pDeviceTargetSpec)); os << "}"; return os; @@ -3042,12 +3033,12 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_device_info_t value) { } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_device_info_t value, size_t size) { +inline void printTagged(std::ostream &os, const void *ptr, + ur_device_info_t value, size_t size) { if (ptr == NULL) { - serializePtr(os, ptr); + printPtr(os, ptr); return; } @@ -3163,7 +3154,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_params::serializeFlag(os, *tptr); + ur_print::printFlag(os, *tptr); os << ")"; } break; @@ -3179,7 +3170,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_params::serializeFlag(os, *tptr); + ur_print::printFlag(os, *tptr); os << ")"; } break; @@ -3195,7 +3186,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_params::serializeFlag(os, *tptr); + ur_print::printFlag(os, *tptr); os << ")"; } break; @@ -3209,7 +3200,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_params::serializeFlag(os, *tptr); + ur_print::printFlag(os, *tptr); os << ")"; } break; @@ -3899,7 +3890,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_params::serializeFlag(os, *tptr); + ur_print::printFlag(os, *tptr); os << ")"; } break; @@ -3913,7 +3904,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_params::serializeFlag(os, *tptr); + ur_print::printFlag(os, *tptr); os << ")"; } break; @@ -3927,7 +3918,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_params::serializeFlag(os, *tptr); + ur_print::printFlag(os, *tptr); os << ")"; } break; @@ -3935,7 +3926,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, case UR_DEVICE_INFO_BUILT_IN_KERNELS: { const char *tptr = (const char *)ptr; - serializePtr(os, tptr); + printPtr(os, tptr); } break; case UR_DEVICE_INFO_PLATFORM: { @@ -3947,7 +3938,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_params::serializePtr(os, *tptr); + ur_print::printPtr(os, *tptr); os << ")"; } break; @@ -3969,49 +3960,49 @@ inline void serializeTagged(std::ostream &os, const void *ptr, case UR_DEVICE_INFO_IL_VERSION: { const char *tptr = (const char *)ptr; - serializePtr(os, tptr); + printPtr(os, tptr); } break; case UR_DEVICE_INFO_NAME: { const char *tptr = (const char *)ptr; - serializePtr(os, tptr); + printPtr(os, tptr); } break; case UR_DEVICE_INFO_VENDOR: { const char *tptr = (const char *)ptr; - serializePtr(os, tptr); + printPtr(os, tptr); } break; case UR_DEVICE_INFO_DRIVER_VERSION: { const char *tptr = (const char *)ptr; - serializePtr(os, tptr); + printPtr(os, tptr); } break; case UR_DEVICE_INFO_PROFILE: { const char *tptr = (const char *)ptr; - serializePtr(os, tptr); + printPtr(os, tptr); } break; case UR_DEVICE_INFO_VERSION: { const char *tptr = (const char *)ptr; - serializePtr(os, tptr); + printPtr(os, tptr); } break; case UR_DEVICE_INFO_BACKEND_RUNTIME_VERSION: { const char *tptr = (const char *)ptr; - serializePtr(os, tptr); + printPtr(os, tptr); } break; case UR_DEVICE_INFO_EXTENSIONS: { const char *tptr = (const char *)ptr; - serializePtr(os, tptr); + printPtr(os, tptr); } break; case UR_DEVICE_INFO_PRINTF_BUFFER_SIZE: { @@ -4051,7 +4042,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_params::serializePtr(os, *tptr); + ur_print::printPtr(os, *tptr); os << ")"; } break; @@ -4096,7 +4087,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_params::serializeFlag(os, *tptr); + ur_print::printFlag(os, *tptr); os << ")"; } break; @@ -4170,8 +4161,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_params::serializeFlag(os, - *tptr); + ur_print::printFlag(os, *tptr); os << ")"; } break; @@ -4186,8 +4176,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_params::serializeFlag(os, - *tptr); + ur_print::printFlag(os, *tptr); os << ")"; } break; @@ -4202,8 +4191,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_params::serializeFlag(os, - *tptr); + ur_print::printFlag(os, *tptr); os << ")"; } break; @@ -4218,8 +4206,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_params::serializeFlag(os, - *tptr); + ur_print::printFlag(os, *tptr); os << ")"; } break; @@ -4234,8 +4221,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_params::serializeFlag(os, - *tptr); + ur_print::printFlag(os, *tptr); os << ")"; } break; @@ -4243,13 +4229,13 @@ inline void serializeTagged(std::ostream &os, const void *ptr, case UR_DEVICE_INFO_UUID: { const char *tptr = (const char *)ptr; - serializePtr(os, tptr); + printPtr(os, tptr); } break; case UR_DEVICE_INFO_PCI_ADDRESS: { const char *tptr = (const char *)ptr; - serializePtr(os, tptr); + printPtr(os, tptr); } break; case UR_DEVICE_INFO_GPU_EU_COUNT: { @@ -4403,7 +4389,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_params::serializeFlag(os, *tptr); + ur_print::printFlag(os, *tptr); os << ")"; } break; @@ -4419,7 +4405,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_params::serializeFlag(os, *tptr); + ur_print::printFlag(os, *tptr); os << ")"; } break; @@ -4435,7 +4421,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_params::serializeFlag(os, *tptr); + ur_print::printFlag(os, *tptr); os << ")"; } break; @@ -4451,7 +4437,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_params::serializeFlag(os, *tptr); + ur_print::printFlag(os, *tptr); os << ")"; } break; @@ -4853,7 +4839,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_device_affinity_domain_flag_t value) { switch (value) { @@ -4887,11 +4873,11 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeFlag(std::ostream &os, - uint32_t flag) { +inline void printFlag(std::ostream &os, + uint32_t flag) { uint32_t val = flag; bool first = true; @@ -4970,7 +4956,7 @@ inline void serializeFlag(std::ostream &os, os << "0"; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_device_partition_t value) { switch (value) { @@ -4997,10 +4983,9 @@ inline std::ostream &operator<<(std::ostream &os, return os; } -inline void -ur_params::serializeUnion(std::ostream &os, - const union ur_device_partition_value_t params, - const enum ur_device_partition_t tag) { +inline void ur_print::printUnion(std::ostream &os, + const union ur_device_partition_value_t params, + const enum ur_device_partition_t tag) { os << "(union ur_device_partition_value_t){"; switch (tag) { @@ -5022,7 +5007,7 @@ ur_params::serializeUnion(std::ostream &os, os << ".affinity_domain = "; - ur_params::serializeFlag( + ur_print::printFlag( os, (params.affinity_domain)); break; @@ -5043,7 +5028,7 @@ operator<<(std::ostream &os, os << ", "; os << ".value = "; - ur_params::serializeUnion(os, (params.value), params.type); + ur_print::printUnion(os, (params.value), params.type); os << "}"; return os; @@ -5060,12 +5045,12 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << ", "; os << ".pProperties = "; - ur_params::serializePtr(os, (params.pProperties)); + ur_print::printPtr(os, (params.pProperties)); os << ", "; os << ".PropCount = "; @@ -5116,11 +5101,11 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeFlag(std::ostream &os, - uint32_t flag) { +inline void printFlag(std::ostream &os, + uint32_t flag) { uint32_t val = flag; bool first = true; @@ -5222,7 +5207,7 @@ inline void serializeFlag(std::ostream &os, os << "0"; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_device_mem_cache_type_t value) { switch (value) { @@ -5282,11 +5267,11 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeFlag(std::ostream &os, - uint32_t flag) { +inline void printFlag(std::ostream &os, + uint32_t flag) { uint32_t val = flag; bool first = true; @@ -5321,7 +5306,7 @@ inline void serializeFlag(std::ostream &os, os << "0"; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream & operator<<(std::ostream &os, const struct ur_device_native_properties_t params) { @@ -5334,7 +5319,7 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << ", "; os << ".isNativeHandleOwned = "; @@ -5373,11 +5358,11 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeFlag(std::ostream &os, - uint32_t flag) { +inline void printFlag(std::ostream &os, + uint32_t flag) { uint32_t val = flag; bool first = true; @@ -5445,7 +5430,7 @@ inline void serializeFlag(std::ostream &os, os << "0"; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_memory_scope_capability_flag_t value) { switch (value) { @@ -5475,11 +5460,11 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeFlag(std::ostream &os, - uint32_t flag) { +inline void printFlag(std::ostream &os, + uint32_t flag) { uint32_t val = flag; bool first = true; @@ -5547,7 +5532,7 @@ inline void serializeFlag(std::ostream &os, os << "0"; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream & operator<<(std::ostream &os, enum ur_device_usm_access_capability_flag_t value) { @@ -5574,12 +5559,11 @@ operator<<(std::ostream &os, } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void -serializeFlag(std::ostream &os, - uint32_t flag) { +inline void printFlag(std::ostream &os, + uint32_t flag) { uint32_t val = flag; bool first = true; @@ -5638,7 +5622,7 @@ serializeFlag(std::ostream &os, os << "0"; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_context_flag_t value) { switch (value) { @@ -5652,10 +5636,10 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeFlag(std::ostream &os, uint32_t flag) { +inline void printFlag(std::ostream &os, uint32_t flag) { uint32_t val = flag; bool first = true; @@ -5678,7 +5662,7 @@ inline void serializeFlag(std::ostream &os, uint32_t flag) { os << "0"; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, const struct ur_context_properties_t params) { os << "(struct ur_context_properties_t){"; @@ -5690,12 +5674,12 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << ", "; os << ".flags = "; - ur_params::serializeFlag(os, (params.flags)); + ur_print::printFlag(os, (params.flags)); os << "}"; return os; @@ -5745,12 +5729,12 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_context_info_t value, size_t size) { +inline void printTagged(std::ostream &os, const void *ptr, + ur_context_info_t value, size_t size) { if (ptr == NULL) { - serializePtr(os, ptr); + printPtr(os, ptr); return; } @@ -5780,7 +5764,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, os << ", "; } - ur_params::serializePtr(os, tptr[i]); + ur_print::printPtr(os, tptr[i]); } os << "}"; } break; @@ -5838,7 +5822,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_params::serializeFlag(os, *tptr); + ur_print::printFlag(os, *tptr); os << ")"; } break; @@ -5854,7 +5838,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_params::serializeFlag(os, *tptr); + ur_print::printFlag(os, *tptr); os << ")"; } break; @@ -5870,7 +5854,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_params::serializeFlag(os, *tptr); + ur_print::printFlag(os, *tptr); os << ")"; } break; @@ -5886,7 +5870,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_params::serializeFlag(os, *tptr); + ur_print::printFlag(os, *tptr); os << ")"; } break; @@ -5895,7 +5879,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream & operator<<(std::ostream &os, const struct ur_context_native_properties_t params) { @@ -5908,7 +5892,7 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << ", "; os << ".isNativeHandleOwned = "; @@ -5950,10 +5934,10 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_mem_flag_t value) { } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeFlag(std::ostream &os, uint32_t flag) { +inline void printFlag(std::ostream &os, uint32_t flag) { uint32_t val = flag; bool first = true; @@ -6029,7 +6013,7 @@ inline void serializeFlag(std::ostream &os, uint32_t flag) { os << "0"; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_mem_type_t value) { switch (value) { @@ -6082,12 +6066,12 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_mem_info_t value) { } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_mem_info_t value, size_t size) { +inline void printTagged(std::ostream &os, const void *ptr, ur_mem_info_t value, + size_t size) { if (ptr == NULL) { - serializePtr(os, ptr); + printPtr(os, ptr); return; } @@ -6116,7 +6100,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_params::serializePtr(os, *tptr); + ur_print::printPtr(os, *tptr); os << ")"; } break; @@ -6125,7 +6109,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_image_channel_order_t value) { switch (value) { @@ -6300,12 +6284,12 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_image_info_t value) { } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_image_info_t value, size_t size) { +inline void printTagged(std::ostream &os, const void *ptr, + ur_image_info_t value, size_t size) { if (ptr == NULL) { - serializePtr(os, ptr); + printPtr(os, ptr); return; } @@ -6413,7 +6397,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, const struct ur_image_format_t params) { os << "(struct ur_image_format_t){"; @@ -6441,7 +6425,7 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << ", "; os << ".type = "; @@ -6502,12 +6486,12 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << ", "; os << ".pHost = "; - ur_params::serializePtr(os, (params.pHost)); + ur_print::printPtr(os, (params.pHost)); os << "}"; return os; @@ -6524,7 +6508,7 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << ", "; os << ".channel = "; @@ -6546,7 +6530,7 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << ", "; os << ".location = "; @@ -6567,7 +6551,7 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << ", "; os << ".origin = "; @@ -6606,7 +6590,7 @@ operator<<(std::ostream &os, const struct ur_mem_native_properties_t params) { os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << ", "; os << ".isNativeHandleOwned = "; @@ -6691,12 +6675,12 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_sampler_info_t value, size_t size) { +inline void printTagged(std::ostream &os, const void *ptr, + ur_sampler_info_t value, size_t size) { if (ptr == NULL) { - serializePtr(os, ptr); + printPtr(os, ptr); return; } @@ -6725,7 +6709,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_params::serializePtr(os, *tptr); + ur_print::printPtr(os, *tptr); os << ")"; } break; @@ -6779,7 +6763,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, const struct ur_sampler_desc_t params) { os << "(struct ur_sampler_desc_t){"; @@ -6791,7 +6775,7 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << ", "; os << ".normalizedCoords = "; @@ -6823,7 +6807,7 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << ", "; os << ".isNativeHandleOwned = "; @@ -6846,11 +6830,10 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeFlag(std::ostream &os, - uint32_t flag) { +inline void printFlag(std::ostream &os, uint32_t flag) { uint32_t val = flag; bool first = true; @@ -6874,7 +6857,7 @@ inline void serializeFlag(std::ostream &os, os << "0"; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_usm_device_mem_flag_t value) { switch (value) { @@ -6896,11 +6879,11 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeFlag(std::ostream &os, - uint32_t flag) { +inline void printFlag(std::ostream &os, + uint32_t flag) { uint32_t val = flag; bool first = true; @@ -6946,7 +6929,7 @@ inline void serializeFlag(std::ostream &os, os << "0"; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_usm_pool_flag_t value) { switch (value) { @@ -6960,10 +6943,10 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeFlag(std::ostream &os, uint32_t flag) { +inline void printFlag(std::ostream &os, uint32_t flag) { uint32_t val = flag; bool first = true; @@ -6987,7 +6970,7 @@ inline void serializeFlag(std::ostream &os, uint32_t flag) { os << "0"; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_usm_type_t value) { switch (value) { @@ -7041,12 +7024,12 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_usm_alloc_info_t value, size_t size) { +inline void printTagged(std::ostream &os, const void *ptr, + ur_usm_alloc_info_t value, size_t size) { if (ptr == NULL) { - serializePtr(os, ptr); + printPtr(os, ptr); return; } @@ -7103,7 +7086,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_params::serializePtr(os, *tptr); + ur_print::printPtr(os, *tptr); os << ")"; } break; @@ -7117,7 +7100,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_params::serializePtr(os, *tptr); + ur_print::printPtr(os, *tptr); os << ")"; } break; @@ -7126,7 +7109,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_usm_advice_flag_t value) { switch (value) { @@ -7196,11 +7179,10 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeFlag(std::ostream &os, - uint32_t flag) { +inline void printFlag(std::ostream &os, uint32_t flag) { uint32_t val = flag; bool first = true; @@ -7378,7 +7360,7 @@ inline void serializeFlag(std::ostream &os, os << "0"; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, const struct ur_usm_desc_t params) { os << "(struct ur_usm_desc_t){"; @@ -7390,12 +7372,12 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << ", "; os << ".hints = "; - ur_params::serializeFlag(os, (params.hints)); + ur_print::printFlag(os, (params.hints)); os << ", "; os << ".align = "; @@ -7416,12 +7398,12 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << ", "; os << ".flags = "; - ur_params::serializeFlag(os, (params.flags)); + ur_print::printFlag(os, (params.flags)); os << "}"; return os; @@ -7437,12 +7419,12 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << ", "; os << ".flags = "; - ur_params::serializeFlag(os, (params.flags)); + ur_print::printFlag(os, (params.flags)); os << "}"; return os; @@ -7458,12 +7440,12 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << ", "; os << ".flags = "; - ur_params::serializeFlag(os, (params.flags)); + ur_print::printFlag(os, (params.flags)); os << "}"; return os; @@ -7479,7 +7461,7 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << ", "; os << ".maxPoolableSize = "; @@ -7511,12 +7493,12 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_usm_pool_info_t value, size_t size) { +inline void printTagged(std::ostream &os, const void *ptr, + ur_usm_pool_info_t value, size_t size) { if (ptr == NULL) { - serializePtr(os, ptr); + printPtr(os, ptr); return; } @@ -7545,7 +7527,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_params::serializePtr(os, *tptr); + ur_print::printPtr(os, *tptr); os << ")"; } break; @@ -7554,7 +7536,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_virtual_mem_granularity_info_t value) { switch (value) { @@ -7572,13 +7554,12 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_virtual_mem_granularity_info_t value, - size_t size) { +inline void printTagged(std::ostream &os, const void *ptr, + ur_virtual_mem_granularity_info_t value, size_t size) { if (ptr == NULL) { - serializePtr(os, ptr); + printPtr(os, ptr); return; } @@ -7616,7 +7597,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_virtual_mem_access_flag_t value) { switch (value) { @@ -7638,11 +7619,11 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeFlag(std::ostream &os, - uint32_t flag) { +inline void printFlag(std::ostream &os, + uint32_t flag) { uint32_t val = flag; bool first = true; @@ -7688,7 +7669,7 @@ inline void serializeFlag(std::ostream &os, os << "0"; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_virtual_mem_info_t value) { switch (value) { @@ -7702,12 +7683,12 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_virtual_mem_info_t value, size_t size) { +inline void printTagged(std::ostream &os, const void *ptr, + ur_virtual_mem_info_t value, size_t size) { if (ptr == NULL) { - serializePtr(os, ptr); + printPtr(os, ptr); return; } @@ -7724,7 +7705,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_params::serializeFlag(os, *tptr); + ur_print::printFlag(os, *tptr); os << ")"; } break; @@ -7733,7 +7714,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_physical_mem_flag_t value) { switch (value) { @@ -7747,11 +7728,10 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeFlag(std::ostream &os, - uint32_t flag) { +inline void printFlag(std::ostream &os, uint32_t flag) { uint32_t val = flag; bool first = true; @@ -7775,7 +7755,7 @@ inline void serializeFlag(std::ostream &os, os << "0"; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream & operator<<(std::ostream &os, const struct ur_physical_mem_properties_t params) { os << "(struct ur_physical_mem_properties_t){"; @@ -7787,12 +7767,12 @@ operator<<(std::ostream &os, const struct ur_physical_mem_properties_t params) { os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << ", "; os << ".flags = "; - ur_params::serializeFlag(os, (params.flags)); + ur_print::printFlag(os, (params.flags)); os << "}"; return os; @@ -7823,10 +7803,9 @@ inline std::ostream &operator<<(std::ostream &os, return os; } -inline void -ur_params::serializeUnion(std::ostream &os, - const union ur_program_metadata_value_t params, - const enum ur_program_metadata_type_t tag) { +inline void ur_print::printUnion(std::ostream &os, + const union ur_program_metadata_value_t params, + const enum ur_program_metadata_type_t tag) { os << "(union ur_program_metadata_value_t){"; switch (tag) { @@ -7848,14 +7827,14 @@ ur_params::serializeUnion(std::ostream &os, os << ".pString = "; - ur_params::serializePtr(os, (params.pString)); + ur_print::printPtr(os, (params.pString)); break; case UR_PROGRAM_METADATA_TYPE_BYTE_ARRAY: os << ".pData = "; - ur_params::serializePtr(os, (params.pData)); + ur_print::printPtr(os, (params.pData)); break; default: @@ -7870,7 +7849,7 @@ inline std::ostream &operator<<(std::ostream &os, os << ".pName = "; - ur_params::serializePtr(os, (params.pName)); + ur_print::printPtr(os, (params.pName)); os << ", "; os << ".type = "; @@ -7884,7 +7863,7 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".value = "; - ur_params::serializeUnion(os, (params.value), params.type); + ur_print::printUnion(os, (params.value), params.type); os << "}"; return os; @@ -7900,7 +7879,7 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << ", "; os << ".count = "; @@ -7966,12 +7945,12 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_program_info_t value, size_t size) { +inline void printTagged(std::ostream &os, const void *ptr, + ur_program_info_t value, size_t size) { if (ptr == NULL) { - serializePtr(os, ptr); + printPtr(os, ptr); return; } @@ -8000,7 +7979,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_params::serializePtr(os, *tptr); + ur_print::printPtr(os, *tptr); os << ")"; } break; @@ -8029,7 +8008,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, os << ", "; } - ur_params::serializePtr(os, tptr[i]); + ur_print::printPtr(os, tptr[i]); } os << "}"; } break; @@ -8037,7 +8016,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, case UR_PROGRAM_INFO_SOURCE: { const char *tptr = (const char *)ptr; - serializePtr(os, tptr); + printPtr(os, tptr); } break; case UR_PROGRAM_INFO_BINARY_SIZES: { @@ -8058,7 +8037,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, case UR_PROGRAM_INFO_BINARIES: { const unsigned char *tptr = (const unsigned char *)ptr; - serializePtr(os, tptr); + printPtr(os, tptr); } break; case UR_PROGRAM_INFO_NUM_KERNELS: { @@ -8078,14 +8057,14 @@ inline void serializeTagged(std::ostream &os, const void *ptr, case UR_PROGRAM_INFO_KERNEL_NAMES: { const char *tptr = (const char *)ptr; - serializePtr(os, tptr); + printPtr(os, tptr); } break; default: os << "unknown enumerator"; break; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_program_build_status_t value) { switch (value) { @@ -8161,12 +8140,12 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_program_build_info_t value, size_t size) { +inline void printTagged(std::ostream &os, const void *ptr, + ur_program_build_info_t value, size_t size) { if (ptr == NULL) { - serializePtr(os, ptr); + printPtr(os, ptr); return; } @@ -8190,13 +8169,13 @@ inline void serializeTagged(std::ostream &os, const void *ptr, case UR_PROGRAM_BUILD_INFO_OPTIONS: { const char *tptr = (const char *)ptr; - serializePtr(os, tptr); + printPtr(os, tptr); } break; case UR_PROGRAM_BUILD_INFO_LOG: { const char *tptr = (const char *)ptr; - serializePtr(os, tptr); + printPtr(os, tptr); } break; case UR_PROGRAM_BUILD_INFO_BINARY_TYPE: { @@ -8218,7 +8197,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream & operator<<(std::ostream &os, const struct ur_specialization_constant_info_t params) { @@ -8236,7 +8215,7 @@ operator<<(std::ostream &os, os << ", "; os << ".pValue = "; - ur_params::serializePtr(os, (params.pValue)); + ur_print::printPtr(os, (params.pValue)); os << "}"; return os; @@ -8253,7 +8232,7 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << ", "; os << ".isNativeHandleOwned = "; @@ -8275,7 +8254,7 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << "}"; return os; @@ -8292,7 +8271,7 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << "}"; return os; @@ -8333,12 +8312,12 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_kernel_info_t value) { } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_kernel_info_t value, size_t size) { +inline void printTagged(std::ostream &os, const void *ptr, + ur_kernel_info_t value, size_t size) { if (ptr == NULL) { - serializePtr(os, ptr); + printPtr(os, ptr); return; } @@ -8347,7 +8326,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, case UR_KERNEL_INFO_FUNCTION_NAME: { const char *tptr = (const char *)ptr; - serializePtr(os, tptr); + printPtr(os, tptr); } break; case UR_KERNEL_INFO_NUM_ARGS: { @@ -8387,7 +8366,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_params::serializePtr(os, *tptr); + ur_print::printPtr(os, *tptr); os << ")"; } break; @@ -8401,7 +8380,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_params::serializePtr(os, *tptr); + ur_print::printPtr(os, *tptr); os << ")"; } break; @@ -8409,7 +8388,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, case UR_KERNEL_INFO_ATTRIBUTES: { const char *tptr = (const char *)ptr; - serializePtr(os, tptr); + printPtr(os, tptr); } break; case UR_KERNEL_INFO_NUM_REGS: { @@ -8430,7 +8409,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_kernel_group_info_t value) { switch (value) { @@ -8464,12 +8443,12 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_kernel_group_info_t value, size_t size) { +inline void printTagged(std::ostream &os, const void *ptr, + ur_kernel_group_info_t value, size_t size) { if (ptr == NULL) { - serializePtr(os, ptr); + printPtr(os, ptr); return; } @@ -8565,7 +8544,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_kernel_sub_group_info_t value) { switch (value) { @@ -8591,12 +8570,12 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_kernel_sub_group_info_t value, size_t size) { +inline void printTagged(std::ostream &os, const void *ptr, + ur_kernel_sub_group_info_t value, size_t size) { if (ptr == NULL) { - serializePtr(os, ptr); + printPtr(os, ptr); return; } @@ -8662,7 +8641,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_kernel_cache_config_t value) { switch (value) { @@ -8705,12 +8684,12 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_kernel_exec_info_t value, size_t size) { +inline void printTagged(std::ostream &os, const void *ptr, + ur_kernel_exec_info_t value, size_t size) { if (ptr == NULL) { - serializePtr(os, ptr); + printPtr(os, ptr); return; } @@ -8764,7 +8743,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream & operator<<(std::ostream &os, const struct ur_kernel_arg_pointer_properties_t params) { @@ -8777,7 +8756,7 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << "}"; return os; @@ -8794,7 +8773,7 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << "}"; return os; @@ -8811,7 +8790,7 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << "}"; return os; @@ -8828,12 +8807,12 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << ", "; os << ".memoryAccess = "; - ur_params::serializeFlag(os, (params.memoryAccess)); + ur_print::printFlag(os, (params.memoryAccess)); os << "}"; return os; @@ -8850,7 +8829,7 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << ", "; os << ".isNativeHandleOwned = "; @@ -8896,12 +8875,12 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_queue_info_t value) { } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_queue_info_t value, size_t size) { +inline void printTagged(std::ostream &os, const void *ptr, + ur_queue_info_t value, size_t size) { if (ptr == NULL) { - serializePtr(os, ptr); + printPtr(os, ptr); return; } @@ -8916,7 +8895,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_params::serializePtr(os, *tptr); + ur_print::printPtr(os, *tptr); os << ")"; } break; @@ -8930,7 +8909,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_params::serializePtr(os, *tptr); + ur_print::printPtr(os, *tptr); os << ")"; } break; @@ -8944,7 +8923,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_params::serializePtr(os, *tptr); + ur_print::printPtr(os, *tptr); os << ")"; } break; @@ -8958,7 +8937,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_params::serializeFlag(os, *tptr); + ur_print::printFlag(os, *tptr); os << ")"; } break; @@ -9009,7 +8988,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_queue_flag_t value) { switch (value) { @@ -9062,10 +9041,10 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_queue_flag_t value) { } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeFlag(std::ostream &os, uint32_t flag) { +inline void printFlag(std::ostream &os, uint32_t flag) { uint32_t val = flag; bool first = true; @@ -9198,7 +9177,7 @@ inline void serializeFlag(std::ostream &os, uint32_t flag) { os << "0"; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, const struct ur_queue_properties_t params) { os << "(struct ur_queue_properties_t){"; @@ -9210,12 +9189,12 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << ", "; os << ".flags = "; - ur_params::serializeFlag(os, (params.flags)); + ur_print::printFlag(os, (params.flags)); os << "}"; return os; @@ -9231,7 +9210,7 @@ operator<<(std::ostream &os, const struct ur_queue_index_properties_t params) { os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << ", "; os << ".computeIndex = "; @@ -9252,12 +9231,12 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << ", "; os << ".pNativeData = "; - ur_params::serializePtr(os, (params.pNativeData)); + ur_print::printPtr(os, (params.pNativeData)); os << "}"; return os; @@ -9273,7 +9252,7 @@ operator<<(std::ostream &os, const struct ur_queue_native_properties_t params) { os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << ", "; os << ".isNativeHandleOwned = "; @@ -9456,12 +9435,12 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_event_info_t value) { } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_event_info_t value, size_t size) { +inline void printTagged(std::ostream &os, const void *ptr, + ur_event_info_t value, size_t size) { if (ptr == NULL) { - serializePtr(os, ptr); + printPtr(os, ptr); return; } @@ -9476,7 +9455,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_params::serializePtr(os, *tptr); + ur_print::printPtr(os, *tptr); os << ")"; } break; @@ -9490,7 +9469,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_params::serializePtr(os, *tptr); + ur_print::printPtr(os, *tptr); os << ")"; } break; @@ -9541,7 +9520,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_profiling_info_t value) { switch (value) { @@ -9571,12 +9550,12 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_profiling_info_t value, size_t size) { +inline void printTagged(std::ostream &os, const void *ptr, + ur_profiling_info_t value, size_t size) { if (ptr == NULL) { - serializePtr(os, ptr); + printPtr(os, ptr); return; } @@ -9656,7 +9635,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream & operator<<(std::ostream &os, const struct ur_event_native_properties_t params) { os << "(struct ur_event_native_properties_t){"; @@ -9668,7 +9647,7 @@ operator<<(std::ostream &os, const struct ur_event_native_properties_t params) { os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << ", "; os << ".isNativeHandleOwned = "; @@ -9723,10 +9702,10 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_map_flag_t value) { } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeFlag(std::ostream &os, uint32_t flag) { +inline void printFlag(std::ostream &os, uint32_t flag) { uint32_t val = flag; bool first = true; @@ -9770,7 +9749,7 @@ inline void serializeFlag(std::ostream &os, uint32_t flag) { os << "0"; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_usm_migration_flag_t value) { switch (value) { @@ -9784,11 +9763,11 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeFlag(std::ostream &os, - uint32_t flag) { +inline void printFlag(std::ostream &os, + uint32_t flag) { uint32_t val = flag; bool first = true; @@ -9812,7 +9791,7 @@ inline void serializeFlag(std::ostream &os, os << "0"; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_exp_image_copy_flag_t value) { switch (value) { @@ -9834,11 +9813,11 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeFlag(std::ostream &os, - uint32_t flag) { +inline void printFlag(std::ostream &os, + uint32_t flag) { uint32_t val = flag; bool first = true; @@ -9884,7 +9863,7 @@ inline void serializeFlag(std::ostream &os, os << "0"; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_file_descriptor_t params) { os << "(struct ur_exp_file_descriptor_t){"; @@ -9896,7 +9875,7 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << ", "; os << ".fd = "; @@ -9917,12 +9896,12 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << ", "; os << ".handle = "; - ur_params::serializePtr(os, (params.handle)); + ur_print::printPtr(os, (params.handle)); os << "}"; return os; @@ -9939,7 +9918,7 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << ", "; os << ".minMipmapLevelClamp = "; @@ -9975,7 +9954,7 @@ operator<<(std::ostream &os, const struct ur_exp_sampler_addr_modes_t params) { os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << ", "; os << ".addrModes = {"; @@ -10002,7 +9981,7 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << "}"; return os; @@ -10019,7 +9998,7 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << "}"; return os; @@ -10036,7 +10015,7 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << ", "; os << ".numLayers = "; @@ -10057,7 +10036,7 @@ operator<<(std::ostream &os, const struct ur_exp_command_buffer_desc_t params) { os << ", "; os << ".pNext = "; - ur_params::serializeStruct(os, (params.pNext)); + ur_print::printStruct(os, (params.pNext)); os << "}"; return os; @@ -10079,12 +10058,12 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_params { +namespace ur_print { template <> -inline void serializeTagged(std::ostream &os, const void *ptr, - ur_exp_peer_info_t value, size_t size) { +inline void printTagged(std::ostream &os, const void *ptr, + ur_exp_peer_info_t value, size_t size) { if (ptr == NULL) { - serializePtr(os, ptr); + printPtr(os, ptr); return; } @@ -10122,7 +10101,7 @@ inline void serializeTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_params +} // namespace ur_print inline std::ostream & operator<<(std::ostream &os, @@ -10140,14 +10119,14 @@ operator<<(std::ostream &os, os << ", "; } - ur_params::serializePtr(os, (*(params->pphAdapters))[i]); + ur_print::printPtr(os, (*(params->pphAdapters))[i]); } os << "}"; os << ", "; os << ".pNumAdapters = "; - ur_params::serializePtr(os, *(params->ppNumAdapters)); + ur_print::printPtr(os, *(params->ppNumAdapters)); return os; } @@ -10158,7 +10137,7 @@ operator<<(std::ostream &os, os << ".hAdapter = "; - ur_params::serializePtr(os, *(params->phAdapter)); + ur_print::printPtr(os, *(params->phAdapter)); return os; } @@ -10169,7 +10148,7 @@ operator<<(std::ostream &os, os << ".hAdapter = "; - ur_params::serializePtr(os, *(params->phAdapter)); + ur_print::printPtr(os, *(params->phAdapter)); return os; } @@ -10180,17 +10159,17 @@ inline std::ostream &operator<<( os << ".hAdapter = "; - ur_params::serializePtr(os, *(params->phAdapter)); + ur_print::printPtr(os, *(params->phAdapter)); os << ", "; os << ".ppMessage = "; - ur_params::serializePtr(os, *(params->pppMessage)); + ur_print::printPtr(os, *(params->pppMessage)); os << ", "; os << ".pError = "; - ur_params::serializePtr(os, *(params->ppError)); + ur_print::printPtr(os, *(params->ppError)); return os; } @@ -10201,7 +10180,7 @@ operator<<(std::ostream &os, os << ".hAdapter = "; - ur_params::serializePtr(os, *(params->phAdapter)); + ur_print::printPtr(os, *(params->phAdapter)); os << ", "; os << ".propName = "; @@ -10215,13 +10194,13 @@ operator<<(std::ostream &os, os << ", "; os << ".pPropValue = "; - ur_params::serializeTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_params::serializePtr(os, *(params->ppPropSizeRet)); + ur_print::printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -10232,17 +10211,17 @@ inline std::ostream &operator<<( os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_params::serializePtr(os, *(params->phDevice)); + ur_print::printPtr(os, *(params->phDevice)); os << ", "; os << ".hImage = "; - ur_params::serializePtr(os, *(params->phImage)); + ur_print::printPtr(os, *(params->phImage)); return os; } @@ -10253,17 +10232,17 @@ inline std::ostream &operator<<( os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_params::serializePtr(os, *(params->phDevice)); + ur_print::printPtr(os, *(params->phDevice)); os << ", "; os << ".hImage = "; - ur_params::serializePtr(os, *(params->phImage)); + ur_print::printPtr(os, *(params->phImage)); return os; } @@ -10275,27 +10254,27 @@ inline std::ostream &operator<<( os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_params::serializePtr(os, *(params->phDevice)); + ur_print::printPtr(os, *(params->phDevice)); os << ", "; os << ".pImageFormat = "; - ur_params::serializePtr(os, *(params->ppImageFormat)); + ur_print::printPtr(os, *(params->ppImageFormat)); os << ", "; os << ".pImageDesc = "; - ur_params::serializePtr(os, *(params->ppImageDesc)); + ur_print::printPtr(os, *(params->ppImageDesc)); os << ", "; os << ".phImageMem = "; - ur_params::serializePtr(os, *(params->pphImageMem)); + ur_print::printPtr(os, *(params->pphImageMem)); return os; } @@ -10307,17 +10286,17 @@ inline std::ostream &operator<<( os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_params::serializePtr(os, *(params->phDevice)); + ur_print::printPtr(os, *(params->phDevice)); os << ", "; os << ".hImageMem = "; - ur_params::serializePtr(os, *(params->phImageMem)); + ur_print::printPtr(os, *(params->phImageMem)); return os; } @@ -10328,37 +10307,37 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_params::serializePtr(os, *(params->phDevice)); + ur_print::printPtr(os, *(params->phDevice)); os << ", "; os << ".hImageMem = "; - ur_params::serializePtr(os, *(params->phImageMem)); + ur_print::printPtr(os, *(params->phImageMem)); os << ", "; os << ".pImageFormat = "; - ur_params::serializePtr(os, *(params->ppImageFormat)); + ur_print::printPtr(os, *(params->ppImageFormat)); os << ", "; os << ".pImageDesc = "; - ur_params::serializePtr(os, *(params->ppImageDesc)); + ur_print::printPtr(os, *(params->ppImageDesc)); os << ", "; os << ".phMem = "; - ur_params::serializePtr(os, *(params->pphMem)); + ur_print::printPtr(os, *(params->pphMem)); os << ", "; os << ".phImage = "; - ur_params::serializePtr(os, *(params->pphImage)); + ur_print::printPtr(os, *(params->pphImage)); return os; } @@ -10369,42 +10348,42 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_params::serializePtr(os, *(params->phDevice)); + ur_print::printPtr(os, *(params->phDevice)); os << ", "; os << ".hImageMem = "; - ur_params::serializePtr(os, *(params->phImageMem)); + ur_print::printPtr(os, *(params->phImageMem)); os << ", "; os << ".pImageFormat = "; - ur_params::serializePtr(os, *(params->ppImageFormat)); + ur_print::printPtr(os, *(params->ppImageFormat)); os << ", "; os << ".pImageDesc = "; - ur_params::serializePtr(os, *(params->ppImageDesc)); + ur_print::printPtr(os, *(params->ppImageDesc)); os << ", "; os << ".hSampler = "; - ur_params::serializePtr(os, *(params->phSampler)); + ur_print::printPtr(os, *(params->phSampler)); os << ", "; os << ".phMem = "; - ur_params::serializePtr(os, *(params->pphMem)); + ur_print::printPtr(os, *(params->pphMem)); os << ", "; os << ".phImage = "; - ur_params::serializePtr(os, *(params->pphImage)); + ur_print::printPtr(os, *(params->pphImage)); return os; } @@ -10416,33 +10395,33 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_params::serializePtr(os, *(params->phQueue)); + ur_print::printPtr(os, *(params->phQueue)); os << ", "; os << ".pDst = "; - ur_params::serializePtr(os, *(params->ppDst)); + ur_print::printPtr(os, *(params->ppDst)); os << ", "; os << ".pSrc = "; - ur_params::serializePtr(os, *(params->ppSrc)); + ur_print::printPtr(os, *(params->ppSrc)); os << ", "; os << ".pImageFormat = "; - ur_params::serializePtr(os, *(params->ppImageFormat)); + ur_print::printPtr(os, *(params->ppImageFormat)); os << ", "; os << ".pImageDesc = "; - ur_params::serializePtr(os, *(params->ppImageDesc)); + ur_print::printPtr(os, *(params->ppImageDesc)); os << ", "; os << ".imageCopyFlags = "; - ur_params::serializeFlag( - os, *(params->pimageCopyFlags)); + ur_print::printFlag(os, + *(params->pimageCopyFlags)); os << ", "; os << ".srcOffset = "; @@ -10478,14 +10457,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_params::serializePtr(os, (*(params->pphEventWaitList))[i]); + ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_params::serializePtr(os, *(params->pphEvent)); + ur_print::printPtr(os, *(params->pphEvent)); return os; } @@ -10497,7 +10476,7 @@ inline std::ostream &operator<<( os << ".hImageMem = "; - ur_params::serializePtr(os, *(params->phImageMem)); + ur_print::printPtr(os, *(params->phImageMem)); os << ", "; os << ".propName = "; @@ -10507,12 +10486,12 @@ inline std::ostream &operator<<( os << ", "; os << ".pPropValue = "; - ur_params::serializePtr(os, *(params->ppPropValue)); + ur_print::printPtr(os, *(params->ppPropValue)); os << ", "; os << ".pPropSizeRet = "; - ur_params::serializePtr(os, *(params->ppPropSizeRet)); + ur_print::printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -10523,17 +10502,17 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_params::serializePtr(os, *(params->phDevice)); + ur_print::printPtr(os, *(params->phDevice)); os << ", "; os << ".hImageMem = "; - ur_params::serializePtr(os, *(params->phImageMem)); + ur_print::printPtr(os, *(params->phImageMem)); os << ", "; os << ".mipmapLevel = "; @@ -10543,7 +10522,7 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".phImageMem = "; - ur_params::serializePtr(os, *(params->pphImageMem)); + ur_print::printPtr(os, *(params->pphImageMem)); return os; } @@ -10555,17 +10534,17 @@ inline std::ostream &operator<<( os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_params::serializePtr(os, *(params->phDevice)); + ur_print::printPtr(os, *(params->phDevice)); os << ", "; os << ".hMem = "; - ur_params::serializePtr(os, *(params->phMem)); + ur_print::printPtr(os, *(params->phMem)); return os; } @@ -10576,12 +10555,12 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_params::serializePtr(os, *(params->phDevice)); + ur_print::printPtr(os, *(params->phDevice)); os << ", "; os << ".size = "; @@ -10591,12 +10570,12 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".pInteropMemDesc = "; - ur_params::serializePtr(os, *(params->ppInteropMemDesc)); + ur_print::printPtr(os, *(params->ppInteropMemDesc)); os << ", "; os << ".phInteropMem = "; - ur_params::serializePtr(os, *(params->pphInteropMem)); + ur_print::printPtr(os, *(params->pphInteropMem)); return os; } @@ -10607,32 +10586,32 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_params::serializePtr(os, *(params->phDevice)); + ur_print::printPtr(os, *(params->phDevice)); os << ", "; os << ".pImageFormat = "; - ur_params::serializePtr(os, *(params->ppImageFormat)); + ur_print::printPtr(os, *(params->ppImageFormat)); os << ", "; os << ".pImageDesc = "; - ur_params::serializePtr(os, *(params->ppImageDesc)); + ur_print::printPtr(os, *(params->ppImageDesc)); os << ", "; os << ".hInteropMem = "; - ur_params::serializePtr(os, *(params->phInteropMem)); + ur_print::printPtr(os, *(params->phInteropMem)); os << ", "; os << ".phImageMem = "; - ur_params::serializePtr(os, *(params->pphImageMem)); + ur_print::printPtr(os, *(params->pphImageMem)); return os; } @@ -10643,17 +10622,17 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_params::serializePtr(os, *(params->phDevice)); + ur_print::printPtr(os, *(params->phDevice)); os << ", "; os << ".hInteropMem = "; - ur_params::serializePtr(os, *(params->phInteropMem)); + ur_print::printPtr(os, *(params->phInteropMem)); return os; } @@ -10665,22 +10644,22 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_params::serializePtr(os, *(params->phDevice)); + ur_print::printPtr(os, *(params->phDevice)); os << ", "; os << ".pInteropSemaphoreDesc = "; - ur_params::serializePtr(os, *(params->ppInteropSemaphoreDesc)); + ur_print::printPtr(os, *(params->ppInteropSemaphoreDesc)); os << ", "; os << ".phInteropSemaphore = "; - ur_params::serializePtr(os, *(params->pphInteropSemaphore)); + ur_print::printPtr(os, *(params->pphInteropSemaphore)); return os; } @@ -10691,17 +10670,17 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_params::serializePtr(os, *(params->phDevice)); + ur_print::printPtr(os, *(params->phDevice)); os << ", "; os << ".hInteropSemaphore = "; - ur_params::serializePtr(os, *(params->phInteropSemaphore)); + ur_print::printPtr(os, *(params->phInteropSemaphore)); return os; } @@ -10712,12 +10691,12 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hQueue = "; - ur_params::serializePtr(os, *(params->phQueue)); + ur_print::printPtr(os, *(params->phQueue)); os << ", "; os << ".hSemaphore = "; - ur_params::serializePtr(os, *(params->phSemaphore)); + ur_print::printPtr(os, *(params->phSemaphore)); os << ", "; os << ".numEventsInWaitList = "; @@ -10733,14 +10712,14 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; } - ur_params::serializePtr(os, (*(params->pphEventWaitList))[i]); + ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_params::serializePtr(os, *(params->pphEvent)); + ur_print::printPtr(os, *(params->pphEvent)); return os; } @@ -10751,12 +10730,12 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hQueue = "; - ur_params::serializePtr(os, *(params->phQueue)); + ur_print::printPtr(os, *(params->phQueue)); os << ", "; os << ".hSemaphore = "; - ur_params::serializePtr(os, *(params->phSemaphore)); + ur_print::printPtr(os, *(params->phSemaphore)); os << ", "; os << ".numEventsInWaitList = "; @@ -10772,14 +10751,14 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; } - ur_params::serializePtr(os, (*(params->pphEventWaitList))[i]); + ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_params::serializePtr(os, *(params->pphEvent)); + ur_print::printPtr(os, *(params->pphEvent)); return os; } @@ -10791,22 +10770,22 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_params::serializePtr(os, *(params->phDevice)); + ur_print::printPtr(os, *(params->phDevice)); os << ", "; os << ".pCommandBufferDesc = "; - ur_params::serializePtr(os, *(params->ppCommandBufferDesc)); + ur_print::printPtr(os, *(params->ppCommandBufferDesc)); os << ", "; os << ".phCommandBuffer = "; - ur_params::serializePtr(os, *(params->pphCommandBuffer)); + ur_print::printPtr(os, *(params->pphCommandBuffer)); return os; } @@ -10818,7 +10797,7 @@ operator<<(std::ostream &os, os << ".hCommandBuffer = "; - ur_params::serializePtr(os, *(params->phCommandBuffer)); + ur_print::printPtr(os, *(params->phCommandBuffer)); return os; } @@ -10830,7 +10809,7 @@ operator<<(std::ostream &os, os << ".hCommandBuffer = "; - ur_params::serializePtr(os, *(params->phCommandBuffer)); + ur_print::printPtr(os, *(params->phCommandBuffer)); return os; } @@ -10842,7 +10821,7 @@ operator<<(std::ostream &os, os << ".hCommandBuffer = "; - ur_params::serializePtr(os, *(params->phCommandBuffer)); + ur_print::printPtr(os, *(params->phCommandBuffer)); return os; } @@ -10853,12 +10832,12 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hCommandBuffer = "; - ur_params::serializePtr(os, *(params->phCommandBuffer)); + ur_print::printPtr(os, *(params->phCommandBuffer)); os << ", "; os << ".hKernel = "; - ur_params::serializePtr(os, *(params->phKernel)); + ur_print::printPtr(os, *(params->phKernel)); os << ", "; os << ".workDim = "; @@ -10868,17 +10847,17 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".pGlobalWorkOffset = "; - ur_params::serializePtr(os, *(params->ppGlobalWorkOffset)); + ur_print::printPtr(os, *(params->ppGlobalWorkOffset)); os << ", "; os << ".pGlobalWorkSize = "; - ur_params::serializePtr(os, *(params->ppGlobalWorkSize)); + ur_print::printPtr(os, *(params->ppGlobalWorkSize)); os << ", "; os << ".pLocalWorkSize = "; - ur_params::serializePtr(os, *(params->ppLocalWorkSize)); + ur_print::printPtr(os, *(params->ppLocalWorkSize)); os << ", "; os << ".numSyncPointsInWaitList = "; @@ -10888,12 +10867,12 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".pSyncPointWaitList = "; - ur_params::serializePtr(os, *(params->ppSyncPointWaitList)); + ur_print::printPtr(os, *(params->ppSyncPointWaitList)); os << ", "; os << ".pSyncPoint = "; - ur_params::serializePtr(os, *(params->ppSyncPoint)); + ur_print::printPtr(os, *(params->ppSyncPoint)); return os; } @@ -10904,17 +10883,17 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hCommandBuffer = "; - ur_params::serializePtr(os, *(params->phCommandBuffer)); + ur_print::printPtr(os, *(params->phCommandBuffer)); os << ", "; os << ".pDst = "; - ur_params::serializePtr(os, *(params->ppDst)); + ur_print::printPtr(os, *(params->ppDst)); os << ", "; os << ".pSrc = "; - ur_params::serializePtr(os, *(params->ppSrc)); + ur_print::printPtr(os, *(params->ppSrc)); os << ", "; os << ".size = "; @@ -10929,12 +10908,12 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".pSyncPointWaitList = "; - ur_params::serializePtr(os, *(params->ppSyncPointWaitList)); + ur_print::printPtr(os, *(params->ppSyncPointWaitList)); os << ", "; os << ".pSyncPoint = "; - ur_params::serializePtr(os, *(params->ppSyncPoint)); + ur_print::printPtr(os, *(params->ppSyncPoint)); return os; } @@ -10946,17 +10925,17 @@ inline std::ostream &operator<<( os << ".hCommandBuffer = "; - ur_params::serializePtr(os, *(params->phCommandBuffer)); + ur_print::printPtr(os, *(params->phCommandBuffer)); os << ", "; os << ".pMemory = "; - ur_params::serializePtr(os, *(params->ppMemory)); + ur_print::printPtr(os, *(params->ppMemory)); os << ", "; os << ".pPattern = "; - ur_params::serializePtr(os, *(params->ppPattern)); + ur_print::printPtr(os, *(params->ppPattern)); os << ", "; os << ".patternSize = "; @@ -10976,12 +10955,12 @@ inline std::ostream &operator<<( os << ", "; os << ".pSyncPointWaitList = "; - ur_params::serializePtr(os, *(params->ppSyncPointWaitList)); + ur_print::printPtr(os, *(params->ppSyncPointWaitList)); os << ", "; os << ".pSyncPoint = "; - ur_params::serializePtr(os, *(params->ppSyncPoint)); + ur_print::printPtr(os, *(params->ppSyncPoint)); return os; } @@ -10992,17 +10971,17 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hCommandBuffer = "; - ur_params::serializePtr(os, *(params->phCommandBuffer)); + ur_print::printPtr(os, *(params->phCommandBuffer)); os << ", "; os << ".hSrcMem = "; - ur_params::serializePtr(os, *(params->phSrcMem)); + ur_print::printPtr(os, *(params->phSrcMem)); os << ", "; os << ".hDstMem = "; - ur_params::serializePtr(os, *(params->phDstMem)); + ur_print::printPtr(os, *(params->phDstMem)); os << ", "; os << ".srcOffset = "; @@ -11027,12 +11006,12 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".pSyncPointWaitList = "; - ur_params::serializePtr(os, *(params->ppSyncPointWaitList)); + ur_print::printPtr(os, *(params->ppSyncPointWaitList)); os << ", "; os << ".pSyncPoint = "; - ur_params::serializePtr(os, *(params->ppSyncPoint)); + ur_print::printPtr(os, *(params->ppSyncPoint)); return os; } @@ -11043,12 +11022,12 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hCommandBuffer = "; - ur_params::serializePtr(os, *(params->phCommandBuffer)); + ur_print::printPtr(os, *(params->phCommandBuffer)); os << ", "; os << ".hBuffer = "; - ur_params::serializePtr(os, *(params->phBuffer)); + ur_print::printPtr(os, *(params->phBuffer)); os << ", "; os << ".offset = "; @@ -11063,7 +11042,7 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".pSrc = "; - ur_params::serializePtr(os, *(params->ppSrc)); + ur_print::printPtr(os, *(params->ppSrc)); os << ", "; os << ".numSyncPointsInWaitList = "; @@ -11073,12 +11052,12 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".pSyncPointWaitList = "; - ur_params::serializePtr(os, *(params->ppSyncPointWaitList)); + ur_print::printPtr(os, *(params->ppSyncPointWaitList)); os << ", "; os << ".pSyncPoint = "; - ur_params::serializePtr(os, *(params->ppSyncPoint)); + ur_print::printPtr(os, *(params->ppSyncPoint)); return os; } @@ -11089,12 +11068,12 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hCommandBuffer = "; - ur_params::serializePtr(os, *(params->phCommandBuffer)); + ur_print::printPtr(os, *(params->phCommandBuffer)); os << ", "; os << ".hBuffer = "; - ur_params::serializePtr(os, *(params->phBuffer)); + ur_print::printPtr(os, *(params->phBuffer)); os << ", "; os << ".offset = "; @@ -11109,7 +11088,7 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".pDst = "; - ur_params::serializePtr(os, *(params->ppDst)); + ur_print::printPtr(os, *(params->ppDst)); os << ", "; os << ".numSyncPointsInWaitList = "; @@ -11119,12 +11098,12 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".pSyncPointWaitList = "; - ur_params::serializePtr(os, *(params->ppSyncPointWaitList)); + ur_print::printPtr(os, *(params->ppSyncPointWaitList)); os << ", "; os << ".pSyncPoint = "; - ur_params::serializePtr(os, *(params->ppSyncPoint)); + ur_print::printPtr(os, *(params->ppSyncPoint)); return os; } @@ -11135,17 +11114,17 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hCommandBuffer = "; - ur_params::serializePtr(os, *(params->phCommandBuffer)); + ur_print::printPtr(os, *(params->phCommandBuffer)); os << ", "; os << ".hSrcMem = "; - ur_params::serializePtr(os, *(params->phSrcMem)); + ur_print::printPtr(os, *(params->phSrcMem)); os << ", "; os << ".hDstMem = "; - ur_params::serializePtr(os, *(params->phDstMem)); + ur_print::printPtr(os, *(params->phDstMem)); os << ", "; os << ".srcOrigin = "; @@ -11190,12 +11169,12 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".pSyncPointWaitList = "; - ur_params::serializePtr(os, *(params->ppSyncPointWaitList)); + ur_print::printPtr(os, *(params->ppSyncPointWaitList)); os << ", "; os << ".pSyncPoint = "; - ur_params::serializePtr(os, *(params->ppSyncPoint)); + ur_print::printPtr(os, *(params->ppSyncPoint)); return os; } @@ -11206,12 +11185,12 @@ inline std::ostream &operator<<( os << ".hCommandBuffer = "; - ur_params::serializePtr(os, *(params->phCommandBuffer)); + ur_print::printPtr(os, *(params->phCommandBuffer)); os << ", "; os << ".hBuffer = "; - ur_params::serializePtr(os, *(params->phBuffer)); + ur_print::printPtr(os, *(params->phBuffer)); os << ", "; os << ".bufferOffset = "; @@ -11251,7 +11230,7 @@ inline std::ostream &operator<<( os << ", "; os << ".pSrc = "; - ur_params::serializePtr(os, *(params->ppSrc)); + ur_print::printPtr(os, *(params->ppSrc)); os << ", "; os << ".numSyncPointsInWaitList = "; @@ -11261,12 +11240,12 @@ inline std::ostream &operator<<( os << ", "; os << ".pSyncPointWaitList = "; - ur_params::serializePtr(os, *(params->ppSyncPointWaitList)); + ur_print::printPtr(os, *(params->ppSyncPointWaitList)); os << ", "; os << ".pSyncPoint = "; - ur_params::serializePtr(os, *(params->ppSyncPoint)); + ur_print::printPtr(os, *(params->ppSyncPoint)); return os; } @@ -11277,12 +11256,12 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hCommandBuffer = "; - ur_params::serializePtr(os, *(params->phCommandBuffer)); + ur_print::printPtr(os, *(params->phCommandBuffer)); os << ", "; os << ".hBuffer = "; - ur_params::serializePtr(os, *(params->phBuffer)); + ur_print::printPtr(os, *(params->phBuffer)); os << ", "; os << ".bufferOffset = "; @@ -11322,7 +11301,7 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".pDst = "; - ur_params::serializePtr(os, *(params->ppDst)); + ur_print::printPtr(os, *(params->ppDst)); os << ", "; os << ".numSyncPointsInWaitList = "; @@ -11332,12 +11311,12 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".pSyncPointWaitList = "; - ur_params::serializePtr(os, *(params->ppSyncPointWaitList)); + ur_print::printPtr(os, *(params->ppSyncPointWaitList)); os << ", "; os << ".pSyncPoint = "; - ur_params::serializePtr(os, *(params->ppSyncPoint)); + ur_print::printPtr(os, *(params->ppSyncPoint)); return os; } @@ -11348,17 +11327,17 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hCommandBuffer = "; - ur_params::serializePtr(os, *(params->phCommandBuffer)); + ur_print::printPtr(os, *(params->phCommandBuffer)); os << ", "; os << ".hBuffer = "; - ur_params::serializePtr(os, *(params->phBuffer)); + ur_print::printPtr(os, *(params->phBuffer)); os << ", "; os << ".pPattern = "; - ur_params::serializePtr(os, *(params->ppPattern)); + ur_print::printPtr(os, *(params->ppPattern)); os << ", "; os << ".patternSize = "; @@ -11383,12 +11362,12 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".pSyncPointWaitList = "; - ur_params::serializePtr(os, *(params->ppSyncPointWaitList)); + ur_print::printPtr(os, *(params->ppSyncPointWaitList)); os << ", "; os << ".pSyncPoint = "; - ur_params::serializePtr(os, *(params->ppSyncPoint)); + ur_print::printPtr(os, *(params->ppSyncPoint)); return os; } @@ -11482,12 +11461,12 @@ operator<<(std::ostream &os, os << ".hCommandBuffer = "; - ur_params::serializePtr(os, *(params->phCommandBuffer)); + ur_print::printPtr(os, *(params->phCommandBuffer)); os << ", "; os << ".hQueue = "; - ur_params::serializePtr(os, *(params->phQueue)); + ur_print::printPtr(os, *(params->phQueue)); os << ", "; os << ".numEventsInWaitList = "; @@ -11503,14 +11482,14 @@ operator<<(std::ostream &os, os << ", "; } - ur_params::serializePtr(os, (*(params->pphEventWaitList))[i]); + ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_params::serializePtr(os, *(params->pphEvent)); + ur_print::printPtr(os, *(params->pphEvent)); return os; } @@ -11531,19 +11510,19 @@ operator<<(std::ostream &os, os << ", "; } - ur_params::serializePtr(os, (*(params->pphDevices))[i]); + ur_print::printPtr(os, (*(params->pphDevices))[i]); } os << "}"; os << ", "; os << ".pProperties = "; - ur_params::serializePtr(os, *(params->ppProperties)); + ur_print::printPtr(os, *(params->ppProperties)); os << ", "; os << ".phContext = "; - ur_params::serializePtr(os, *(params->pphContext)); + ur_print::printPtr(os, *(params->pphContext)); return os; } @@ -11554,7 +11533,7 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); return os; } @@ -11565,7 +11544,7 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); return os; } @@ -11576,7 +11555,7 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".propName = "; @@ -11590,13 +11569,13 @@ operator<<(std::ostream &os, os << ", "; os << ".pPropValue = "; - ur_params::serializeTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_params::serializePtr(os, *(params->ppPropSizeRet)); + ur_print::printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -11608,12 +11587,12 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".phNativeContext = "; - ur_params::serializePtr(os, *(params->pphNativeContext)); + ur_print::printPtr(os, *(params->pphNativeContext)); return os; } @@ -11625,7 +11604,7 @@ inline std::ostream &operator<<( os << ".hNativeContext = "; - ur_params::serializePtr(os, *(params->phNativeContext)); + ur_print::printPtr(os, *(params->phNativeContext)); os << ", "; os << ".numDevices = "; @@ -11640,19 +11619,19 @@ inline std::ostream &operator<<( os << ", "; } - ur_params::serializePtr(os, (*(params->pphDevices))[i]); + ur_print::printPtr(os, (*(params->pphDevices))[i]); } os << "}"; os << ", "; os << ".pProperties = "; - ur_params::serializePtr(os, *(params->ppProperties)); + ur_print::printPtr(os, *(params->ppProperties)); os << ", "; os << ".phContext = "; - ur_params::serializePtr(os, *(params->pphContext)); + ur_print::printPtr(os, *(params->pphContext)); return os; } @@ -11664,7 +11643,7 @@ inline std::ostream &operator<<( os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".pfnDeleter = "; @@ -11674,7 +11653,7 @@ inline std::ostream &operator<<( os << ", "; os << ".pUserData = "; - ur_params::serializePtr(os, *(params->ppUserData)); + ur_print::printPtr(os, *(params->ppUserData)); return os; } @@ -11685,12 +11664,12 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_params::serializePtr(os, *(params->phQueue)); + ur_print::printPtr(os, *(params->phQueue)); os << ", "; os << ".hKernel = "; - ur_params::serializePtr(os, *(params->phKernel)); + ur_print::printPtr(os, *(params->phKernel)); os << ", "; os << ".workDim = "; @@ -11700,17 +11679,17 @@ inline std::ostream &operator<<( os << ", "; os << ".pGlobalWorkOffset = "; - ur_params::serializePtr(os, *(params->ppGlobalWorkOffset)); + ur_print::printPtr(os, *(params->ppGlobalWorkOffset)); os << ", "; os << ".pGlobalWorkSize = "; - ur_params::serializePtr(os, *(params->ppGlobalWorkSize)); + ur_print::printPtr(os, *(params->ppGlobalWorkSize)); os << ", "; os << ".pLocalWorkSize = "; - ur_params::serializePtr(os, *(params->ppLocalWorkSize)); + ur_print::printPtr(os, *(params->ppLocalWorkSize)); os << ", "; os << ".numEventsInWaitList = "; @@ -11726,14 +11705,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_params::serializePtr(os, (*(params->pphEventWaitList))[i]); + ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_params::serializePtr(os, *(params->pphEvent)); + ur_print::printPtr(os, *(params->pphEvent)); return os; } @@ -11744,7 +11723,7 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_params::serializePtr(os, *(params->phQueue)); + ur_print::printPtr(os, *(params->phQueue)); os << ", "; os << ".numEventsInWaitList = "; @@ -11760,14 +11739,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_params::serializePtr(os, (*(params->pphEventWaitList))[i]); + ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_params::serializePtr(os, *(params->pphEvent)); + ur_print::printPtr(os, *(params->pphEvent)); return os; } @@ -11779,7 +11758,7 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_params::serializePtr(os, *(params->phQueue)); + ur_print::printPtr(os, *(params->phQueue)); os << ", "; os << ".numEventsInWaitList = "; @@ -11795,14 +11774,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_params::serializePtr(os, (*(params->pphEventWaitList))[i]); + ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_params::serializePtr(os, *(params->pphEvent)); + ur_print::printPtr(os, *(params->pphEvent)); return os; } @@ -11813,12 +11792,12 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_params::serializePtr(os, *(params->phQueue)); + ur_print::printPtr(os, *(params->phQueue)); os << ", "; os << ".hBuffer = "; - ur_params::serializePtr(os, *(params->phBuffer)); + ur_print::printPtr(os, *(params->phBuffer)); os << ", "; os << ".blockingRead = "; @@ -11838,7 +11817,7 @@ inline std::ostream &operator<<( os << ", "; os << ".pDst = "; - ur_params::serializePtr(os, *(params->ppDst)); + ur_print::printPtr(os, *(params->ppDst)); os << ", "; os << ".numEventsInWaitList = "; @@ -11854,14 +11833,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_params::serializePtr(os, (*(params->pphEventWaitList))[i]); + ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_params::serializePtr(os, *(params->pphEvent)); + ur_print::printPtr(os, *(params->pphEvent)); return os; } @@ -11873,12 +11852,12 @@ operator<<(std::ostream &os, os << ".hQueue = "; - ur_params::serializePtr(os, *(params->phQueue)); + ur_print::printPtr(os, *(params->phQueue)); os << ", "; os << ".hBuffer = "; - ur_params::serializePtr(os, *(params->phBuffer)); + ur_print::printPtr(os, *(params->phBuffer)); os << ", "; os << ".blockingWrite = "; @@ -11898,7 +11877,7 @@ operator<<(std::ostream &os, os << ", "; os << ".pSrc = "; - ur_params::serializePtr(os, *(params->ppSrc)); + ur_print::printPtr(os, *(params->ppSrc)); os << ", "; os << ".numEventsInWaitList = "; @@ -11914,14 +11893,14 @@ operator<<(std::ostream &os, os << ", "; } - ur_params::serializePtr(os, (*(params->pphEventWaitList))[i]); + ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_params::serializePtr(os, *(params->pphEvent)); + ur_print::printPtr(os, *(params->pphEvent)); return os; } @@ -11933,12 +11912,12 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_params::serializePtr(os, *(params->phQueue)); + ur_print::printPtr(os, *(params->phQueue)); os << ", "; os << ".hBuffer = "; - ur_params::serializePtr(os, *(params->phBuffer)); + ur_print::printPtr(os, *(params->phBuffer)); os << ", "; os << ".blockingRead = "; @@ -11983,7 +11962,7 @@ inline std::ostream &operator<<( os << ", "; os << ".pDst = "; - ur_params::serializePtr(os, *(params->ppDst)); + ur_print::printPtr(os, *(params->ppDst)); os << ", "; os << ".numEventsInWaitList = "; @@ -11999,14 +11978,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_params::serializePtr(os, (*(params->pphEventWaitList))[i]); + ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_params::serializePtr(os, *(params->pphEvent)); + ur_print::printPtr(os, *(params->pphEvent)); return os; } @@ -12018,12 +11997,12 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_params::serializePtr(os, *(params->phQueue)); + ur_print::printPtr(os, *(params->phQueue)); os << ", "; os << ".hBuffer = "; - ur_params::serializePtr(os, *(params->phBuffer)); + ur_print::printPtr(os, *(params->phBuffer)); os << ", "; os << ".blockingWrite = "; @@ -12068,7 +12047,7 @@ inline std::ostream &operator<<( os << ", "; os << ".pSrc = "; - ur_params::serializePtr(os, *(params->ppSrc)); + ur_print::printPtr(os, *(params->ppSrc)); os << ", "; os << ".numEventsInWaitList = "; @@ -12084,14 +12063,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_params::serializePtr(os, (*(params->pphEventWaitList))[i]); + ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_params::serializePtr(os, *(params->pphEvent)); + ur_print::printPtr(os, *(params->pphEvent)); return os; } @@ -12102,17 +12081,17 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_params::serializePtr(os, *(params->phQueue)); + ur_print::printPtr(os, *(params->phQueue)); os << ", "; os << ".hBufferSrc = "; - ur_params::serializePtr(os, *(params->phBufferSrc)); + ur_print::printPtr(os, *(params->phBufferSrc)); os << ", "; os << ".hBufferDst = "; - ur_params::serializePtr(os, *(params->phBufferDst)); + ur_print::printPtr(os, *(params->phBufferDst)); os << ", "; os << ".srcOffset = "; @@ -12143,14 +12122,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_params::serializePtr(os, (*(params->pphEventWaitList))[i]); + ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_params::serializePtr(os, *(params->pphEvent)); + ur_print::printPtr(os, *(params->pphEvent)); return os; } @@ -12162,17 +12141,17 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_params::serializePtr(os, *(params->phQueue)); + ur_print::printPtr(os, *(params->phQueue)); os << ", "; os << ".hBufferSrc = "; - ur_params::serializePtr(os, *(params->phBufferSrc)); + ur_print::printPtr(os, *(params->phBufferSrc)); os << ", "; os << ".hBufferDst = "; - ur_params::serializePtr(os, *(params->phBufferDst)); + ur_print::printPtr(os, *(params->phBufferDst)); os << ", "; os << ".srcOrigin = "; @@ -12223,14 +12202,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_params::serializePtr(os, (*(params->pphEventWaitList))[i]); + ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_params::serializePtr(os, *(params->pphEvent)); + ur_print::printPtr(os, *(params->pphEvent)); return os; } @@ -12241,17 +12220,17 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_params::serializePtr(os, *(params->phQueue)); + ur_print::printPtr(os, *(params->phQueue)); os << ", "; os << ".hBuffer = "; - ur_params::serializePtr(os, *(params->phBuffer)); + ur_print::printPtr(os, *(params->phBuffer)); os << ", "; os << ".pPattern = "; - ur_params::serializePtr(os, *(params->ppPattern)); + ur_print::printPtr(os, *(params->ppPattern)); os << ", "; os << ".patternSize = "; @@ -12282,14 +12261,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_params::serializePtr(os, (*(params->pphEventWaitList))[i]); + ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_params::serializePtr(os, *(params->pphEvent)); + ur_print::printPtr(os, *(params->pphEvent)); return os; } @@ -12300,12 +12279,12 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_params::serializePtr(os, *(params->phQueue)); + ur_print::printPtr(os, *(params->phQueue)); os << ", "; os << ".hImage = "; - ur_params::serializePtr(os, *(params->phImage)); + ur_print::printPtr(os, *(params->phImage)); os << ", "; os << ".blockingRead = "; @@ -12335,7 +12314,7 @@ inline std::ostream &operator<<( os << ", "; os << ".pDst = "; - ur_params::serializePtr(os, *(params->ppDst)); + ur_print::printPtr(os, *(params->ppDst)); os << ", "; os << ".numEventsInWaitList = "; @@ -12351,14 +12330,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_params::serializePtr(os, (*(params->pphEventWaitList))[i]); + ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_params::serializePtr(os, *(params->pphEvent)); + ur_print::printPtr(os, *(params->pphEvent)); return os; } @@ -12369,12 +12348,12 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_params::serializePtr(os, *(params->phQueue)); + ur_print::printPtr(os, *(params->phQueue)); os << ", "; os << ".hImage = "; - ur_params::serializePtr(os, *(params->phImage)); + ur_print::printPtr(os, *(params->phImage)); os << ", "; os << ".blockingWrite = "; @@ -12404,7 +12383,7 @@ inline std::ostream &operator<<( os << ", "; os << ".pSrc = "; - ur_params::serializePtr(os, *(params->ppSrc)); + ur_print::printPtr(os, *(params->ppSrc)); os << ", "; os << ".numEventsInWaitList = "; @@ -12420,14 +12399,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_params::serializePtr(os, (*(params->pphEventWaitList))[i]); + ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_params::serializePtr(os, *(params->pphEvent)); + ur_print::printPtr(os, *(params->pphEvent)); return os; } @@ -12438,17 +12417,17 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_params::serializePtr(os, *(params->phQueue)); + ur_print::printPtr(os, *(params->phQueue)); os << ", "; os << ".hImageSrc = "; - ur_params::serializePtr(os, *(params->phImageSrc)); + ur_print::printPtr(os, *(params->phImageSrc)); os << ", "; os << ".hImageDst = "; - ur_params::serializePtr(os, *(params->phImageDst)); + ur_print::printPtr(os, *(params->phImageDst)); os << ", "; os << ".srcOrigin = "; @@ -12479,14 +12458,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_params::serializePtr(os, (*(params->pphEventWaitList))[i]); + ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_params::serializePtr(os, *(params->pphEvent)); + ur_print::printPtr(os, *(params->pphEvent)); return os; } @@ -12497,12 +12476,12 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_params::serializePtr(os, *(params->phQueue)); + ur_print::printPtr(os, *(params->phQueue)); os << ", "; os << ".hBuffer = "; - ur_params::serializePtr(os, *(params->phBuffer)); + ur_print::printPtr(os, *(params->phBuffer)); os << ", "; os << ".blockingMap = "; @@ -12512,7 +12491,7 @@ inline std::ostream &operator<<( os << ", "; os << ".mapFlags = "; - ur_params::serializeFlag(os, *(params->pmapFlags)); + ur_print::printFlag(os, *(params->pmapFlags)); os << ", "; os << ".offset = "; @@ -12538,19 +12517,19 @@ inline std::ostream &operator<<( os << ", "; } - ur_params::serializePtr(os, (*(params->pphEventWaitList))[i]); + ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_params::serializePtr(os, *(params->pphEvent)); + ur_print::printPtr(os, *(params->pphEvent)); os << ", "; os << ".ppRetMap = "; - ur_params::serializePtr(os, *(params->pppRetMap)); + ur_print::printPtr(os, *(params->pppRetMap)); return os; } @@ -12561,17 +12540,17 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_params::serializePtr(os, *(params->phQueue)); + ur_print::printPtr(os, *(params->phQueue)); os << ", "; os << ".hMem = "; - ur_params::serializePtr(os, *(params->phMem)); + ur_print::printPtr(os, *(params->phMem)); os << ", "; os << ".pMappedPtr = "; - ur_params::serializePtr(os, *(params->ppMappedPtr)); + ur_print::printPtr(os, *(params->ppMappedPtr)); os << ", "; os << ".numEventsInWaitList = "; @@ -12587,14 +12566,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_params::serializePtr(os, (*(params->pphEventWaitList))[i]); + ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_params::serializePtr(os, *(params->pphEvent)); + ur_print::printPtr(os, *(params->pphEvent)); return os; } @@ -12605,12 +12584,12 @@ operator<<(std::ostream &os, os << ".hQueue = "; - ur_params::serializePtr(os, *(params->phQueue)); + ur_print::printPtr(os, *(params->phQueue)); os << ", "; os << ".ptr = "; - ur_params::serializePtr(os, *(params->pptr)); + ur_print::printPtr(os, *(params->pptr)); os << ", "; os << ".patternSize = "; @@ -12620,7 +12599,7 @@ operator<<(std::ostream &os, os << ", "; os << ".pPattern = "; - ur_params::serializePtr(os, *(params->ppPattern)); + ur_print::printPtr(os, *(params->ppPattern)); os << ", "; os << ".size = "; @@ -12641,14 +12620,14 @@ operator<<(std::ostream &os, os << ", "; } - ur_params::serializePtr(os, (*(params->pphEventWaitList))[i]); + ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_params::serializePtr(os, *(params->pphEvent)); + ur_print::printPtr(os, *(params->pphEvent)); return os; } @@ -12659,7 +12638,7 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_params::serializePtr(os, *(params->phQueue)); + ur_print::printPtr(os, *(params->phQueue)); os << ", "; os << ".blocking = "; @@ -12669,12 +12648,12 @@ inline std::ostream &operator<<( os << ", "; os << ".pDst = "; - ur_params::serializePtr(os, *(params->ppDst)); + ur_print::printPtr(os, *(params->ppDst)); os << ", "; os << ".pSrc = "; - ur_params::serializePtr(os, *(params->ppSrc)); + ur_print::printPtr(os, *(params->ppSrc)); os << ", "; os << ".size = "; @@ -12695,14 +12674,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_params::serializePtr(os, (*(params->pphEventWaitList))[i]); + ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_params::serializePtr(os, *(params->pphEvent)); + ur_print::printPtr(os, *(params->pphEvent)); return os; } @@ -12713,12 +12692,12 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_params::serializePtr(os, *(params->phQueue)); + ur_print::printPtr(os, *(params->phQueue)); os << ", "; os << ".pMem = "; - ur_params::serializePtr(os, *(params->ppMem)); + ur_print::printPtr(os, *(params->ppMem)); os << ", "; os << ".size = "; @@ -12728,7 +12707,7 @@ inline std::ostream &operator<<( os << ", "; os << ".flags = "; - ur_params::serializeFlag(os, *(params->pflags)); + ur_print::printFlag(os, *(params->pflags)); os << ", "; os << ".numEventsInWaitList = "; @@ -12744,14 +12723,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_params::serializePtr(os, (*(params->pphEventWaitList))[i]); + ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_params::serializePtr(os, *(params->pphEvent)); + ur_print::printPtr(os, *(params->pphEvent)); return os; } @@ -12762,12 +12741,12 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_params::serializePtr(os, *(params->phQueue)); + ur_print::printPtr(os, *(params->phQueue)); os << ", "; os << ".pMem = "; - ur_params::serializePtr(os, *(params->ppMem)); + ur_print::printPtr(os, *(params->ppMem)); os << ", "; os << ".size = "; @@ -12777,12 +12756,12 @@ inline std::ostream &operator<<( os << ", "; os << ".advice = "; - ur_params::serializeFlag(os, *(params->padvice)); + ur_print::printFlag(os, *(params->padvice)); os << ", "; os << ".phEvent = "; - ur_params::serializePtr(os, *(params->pphEvent)); + ur_print::printPtr(os, *(params->pphEvent)); return os; } @@ -12793,12 +12772,12 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_params::serializePtr(os, *(params->phQueue)); + ur_print::printPtr(os, *(params->phQueue)); os << ", "; os << ".pMem = "; - ur_params::serializePtr(os, *(params->ppMem)); + ur_print::printPtr(os, *(params->ppMem)); os << ", "; os << ".pitch = "; @@ -12813,7 +12792,7 @@ inline std::ostream &operator<<( os << ", "; os << ".pPattern = "; - ur_params::serializePtr(os, *(params->ppPattern)); + ur_print::printPtr(os, *(params->ppPattern)); os << ", "; os << ".width = "; @@ -12839,14 +12818,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_params::serializePtr(os, (*(params->pphEventWaitList))[i]); + ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_params::serializePtr(os, *(params->pphEvent)); + ur_print::printPtr(os, *(params->pphEvent)); return os; } @@ -12857,7 +12836,7 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_params::serializePtr(os, *(params->phQueue)); + ur_print::printPtr(os, *(params->phQueue)); os << ", "; os << ".blocking = "; @@ -12867,7 +12846,7 @@ inline std::ostream &operator<<( os << ", "; os << ".pDst = "; - ur_params::serializePtr(os, *(params->ppDst)); + ur_print::printPtr(os, *(params->ppDst)); os << ", "; os << ".dstPitch = "; @@ -12877,7 +12856,7 @@ inline std::ostream &operator<<( os << ", "; os << ".pSrc = "; - ur_params::serializePtr(os, *(params->ppSrc)); + ur_print::printPtr(os, *(params->ppSrc)); os << ", "; os << ".srcPitch = "; @@ -12908,14 +12887,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_params::serializePtr(os, (*(params->pphEventWaitList))[i]); + ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_params::serializePtr(os, *(params->pphEvent)); + ur_print::printPtr(os, *(params->pphEvent)); return os; } @@ -12926,17 +12905,17 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hQueue = "; - ur_params::serializePtr(os, *(params->phQueue)); + ur_print::printPtr(os, *(params->phQueue)); os << ", "; os << ".hProgram = "; - ur_params::serializePtr(os, *(params->phProgram)); + ur_print::printPtr(os, *(params->phProgram)); os << ", "; os << ".name = "; - ur_params::serializePtr(os, *(params->pname)); + ur_print::printPtr(os, *(params->pname)); os << ", "; os << ".blockingWrite = "; @@ -12956,7 +12935,7 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".pSrc = "; - ur_params::serializePtr(os, *(params->ppSrc)); + ur_print::printPtr(os, *(params->ppSrc)); os << ", "; os << ".numEventsInWaitList = "; @@ -12972,14 +12951,14 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; } - ur_params::serializePtr(os, (*(params->pphEventWaitList))[i]); + ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_params::serializePtr(os, *(params->pphEvent)); + ur_print::printPtr(os, *(params->pphEvent)); return os; } @@ -12990,17 +12969,17 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hQueue = "; - ur_params::serializePtr(os, *(params->phQueue)); + ur_print::printPtr(os, *(params->phQueue)); os << ", "; os << ".hProgram = "; - ur_params::serializePtr(os, *(params->phProgram)); + ur_print::printPtr(os, *(params->phProgram)); os << ", "; os << ".name = "; - ur_params::serializePtr(os, *(params->pname)); + ur_print::printPtr(os, *(params->pname)); os << ", "; os << ".blockingRead = "; @@ -13020,7 +12999,7 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".pDst = "; - ur_params::serializePtr(os, *(params->ppDst)); + ur_print::printPtr(os, *(params->ppDst)); os << ", "; os << ".numEventsInWaitList = "; @@ -13036,14 +13015,14 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; } - ur_params::serializePtr(os, (*(params->pphEventWaitList))[i]); + ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_params::serializePtr(os, *(params->pphEvent)); + ur_print::printPtr(os, *(params->pphEvent)); return os; } @@ -13054,17 +13033,17 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_params::serializePtr(os, *(params->phQueue)); + ur_print::printPtr(os, *(params->phQueue)); os << ", "; os << ".hProgram = "; - ur_params::serializePtr(os, *(params->phProgram)); + ur_print::printPtr(os, *(params->phProgram)); os << ", "; os << ".pipe_symbol = "; - ur_params::serializePtr(os, *(params->ppipe_symbol)); + ur_print::printPtr(os, *(params->ppipe_symbol)); os << ", "; os << ".blocking = "; @@ -13074,7 +13053,7 @@ inline std::ostream &operator<<( os << ", "; os << ".pDst = "; - ur_params::serializePtr(os, *(params->ppDst)); + ur_print::printPtr(os, *(params->ppDst)); os << ", "; os << ".size = "; @@ -13095,14 +13074,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_params::serializePtr(os, (*(params->pphEventWaitList))[i]); + ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_params::serializePtr(os, *(params->pphEvent)); + ur_print::printPtr(os, *(params->pphEvent)); return os; } @@ -13113,17 +13092,17 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_params::serializePtr(os, *(params->phQueue)); + ur_print::printPtr(os, *(params->phQueue)); os << ", "; os << ".hProgram = "; - ur_params::serializePtr(os, *(params->phProgram)); + ur_print::printPtr(os, *(params->phProgram)); os << ", "; os << ".pipe_symbol = "; - ur_params::serializePtr(os, *(params->ppipe_symbol)); + ur_print::printPtr(os, *(params->ppipe_symbol)); os << ", "; os << ".blocking = "; @@ -13133,7 +13112,7 @@ inline std::ostream &operator<<( os << ", "; os << ".pSrc = "; - ur_params::serializePtr(os, *(params->ppSrc)); + ur_print::printPtr(os, *(params->ppSrc)); os << ", "; os << ".size = "; @@ -13154,14 +13133,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_params::serializePtr(os, (*(params->pphEventWaitList))[i]); + ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_params::serializePtr(os, *(params->pphEvent)); + ur_print::printPtr(os, *(params->pphEvent)); return os; } @@ -13172,12 +13151,12 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hQueue = "; - ur_params::serializePtr(os, *(params->phQueue)); + ur_print::printPtr(os, *(params->phQueue)); os << ", "; os << ".hKernel = "; - ur_params::serializePtr(os, *(params->phKernel)); + ur_print::printPtr(os, *(params->phKernel)); os << ", "; os << ".workDim = "; @@ -13187,17 +13166,17 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".pGlobalWorkOffset = "; - ur_params::serializePtr(os, *(params->ppGlobalWorkOffset)); + ur_print::printPtr(os, *(params->ppGlobalWorkOffset)); os << ", "; os << ".pGlobalWorkSize = "; - ur_params::serializePtr(os, *(params->ppGlobalWorkSize)); + ur_print::printPtr(os, *(params->ppGlobalWorkSize)); os << ", "; os << ".pLocalWorkSize = "; - ur_params::serializePtr(os, *(params->ppLocalWorkSize)); + ur_print::printPtr(os, *(params->ppLocalWorkSize)); os << ", "; os << ".numEventsInWaitList = "; @@ -13213,14 +13192,14 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; } - ur_params::serializePtr(os, (*(params->pphEventWaitList))[i]); + ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_params::serializePtr(os, *(params->pphEvent)); + ur_print::printPtr(os, *(params->pphEvent)); return os; } @@ -13231,7 +13210,7 @@ operator<<(std::ostream &os, os << ".hEvent = "; - ur_params::serializePtr(os, *(params->phEvent)); + ur_print::printPtr(os, *(params->phEvent)); os << ", "; os << ".propName = "; @@ -13245,13 +13224,13 @@ operator<<(std::ostream &os, os << ", "; os << ".pPropValue = "; - ur_params::serializeTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_params::serializePtr(os, *(params->ppPropSizeRet)); + ur_print::printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -13263,7 +13242,7 @@ operator<<(std::ostream &os, os << ".hEvent = "; - ur_params::serializePtr(os, *(params->phEvent)); + ur_print::printPtr(os, *(params->phEvent)); os << ", "; os << ".propName = "; @@ -13277,13 +13256,13 @@ operator<<(std::ostream &os, os << ", "; os << ".pPropValue = "; - ur_params::serializeTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_params::serializePtr(os, *(params->ppPropSizeRet)); + ur_print::printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -13304,7 +13283,7 @@ operator<<(std::ostream &os, os << ", "; } - ur_params::serializePtr(os, (*(params->pphEventWaitList))[i]); + ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; @@ -13317,7 +13296,7 @@ operator<<(std::ostream &os, os << ".hEvent = "; - ur_params::serializePtr(os, *(params->phEvent)); + ur_print::printPtr(os, *(params->phEvent)); return os; } @@ -13328,7 +13307,7 @@ operator<<(std::ostream &os, os << ".hEvent = "; - ur_params::serializePtr(os, *(params->phEvent)); + ur_print::printPtr(os, *(params->phEvent)); return os; } @@ -13339,12 +13318,12 @@ inline std::ostream &operator<<( os << ".hEvent = "; - ur_params::serializePtr(os, *(params->phEvent)); + ur_print::printPtr(os, *(params->phEvent)); os << ", "; os << ".phNativeEvent = "; - ur_params::serializePtr(os, *(params->pphNativeEvent)); + ur_print::printPtr(os, *(params->pphNativeEvent)); return os; } @@ -13356,22 +13335,22 @@ inline std::ostream &operator<<( os << ".hNativeEvent = "; - ur_params::serializePtr(os, *(params->phNativeEvent)); + ur_print::printPtr(os, *(params->phNativeEvent)); os << ", "; os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".pProperties = "; - ur_params::serializePtr(os, *(params->ppProperties)); + ur_print::printPtr(os, *(params->ppProperties)); os << ", "; os << ".phEvent = "; - ur_params::serializePtr(os, *(params->pphEvent)); + ur_print::printPtr(os, *(params->pphEvent)); return os; } @@ -13382,7 +13361,7 @@ inline std::ostream &operator<<( os << ".hEvent = "; - ur_params::serializePtr(os, *(params->phEvent)); + ur_print::printPtr(os, *(params->phEvent)); os << ", "; os << ".execStatus = "; @@ -13397,7 +13376,7 @@ inline std::ostream &operator<<( os << ", "; os << ".pUserData = "; - ur_params::serializePtr(os, *(params->ppUserData)); + ur_print::printPtr(os, *(params->ppUserData)); return os; } @@ -13408,17 +13387,17 @@ operator<<(std::ostream &os, os << ".hProgram = "; - ur_params::serializePtr(os, *(params->phProgram)); + ur_print::printPtr(os, *(params->phProgram)); os << ", "; os << ".pKernelName = "; - ur_params::serializePtr(os, *(params->ppKernelName)); + ur_print::printPtr(os, *(params->ppKernelName)); os << ", "; os << ".phKernel = "; - ur_params::serializePtr(os, *(params->pphKernel)); + ur_print::printPtr(os, *(params->pphKernel)); return os; } @@ -13429,7 +13408,7 @@ operator<<(std::ostream &os, os << ".hKernel = "; - ur_params::serializePtr(os, *(params->phKernel)); + ur_print::printPtr(os, *(params->phKernel)); os << ", "; os << ".propName = "; @@ -13443,13 +13422,13 @@ operator<<(std::ostream &os, os << ", "; os << ".pPropValue = "; - ur_params::serializeTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_params::serializePtr(os, *(params->ppPropSizeRet)); + ur_print::printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -13460,12 +13439,12 @@ inline std::ostream &operator<<( os << ".hKernel = "; - ur_params::serializePtr(os, *(params->phKernel)); + ur_print::printPtr(os, *(params->phKernel)); os << ", "; os << ".hDevice = "; - ur_params::serializePtr(os, *(params->phDevice)); + ur_print::printPtr(os, *(params->phDevice)); os << ", "; os << ".propName = "; @@ -13479,13 +13458,13 @@ inline std::ostream &operator<<( os << ", "; os << ".pPropValue = "; - ur_params::serializeTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_params::serializePtr(os, *(params->ppPropSizeRet)); + ur_print::printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -13497,12 +13476,12 @@ operator<<(std::ostream &os, os << ".hKernel = "; - ur_params::serializePtr(os, *(params->phKernel)); + ur_print::printPtr(os, *(params->phKernel)); os << ", "; os << ".hDevice = "; - ur_params::serializePtr(os, *(params->phDevice)); + ur_print::printPtr(os, *(params->phDevice)); os << ", "; os << ".propName = "; @@ -13516,13 +13495,13 @@ operator<<(std::ostream &os, os << ", "; os << ".pPropValue = "; - ur_params::serializeTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_params::serializePtr(os, *(params->ppPropSizeRet)); + ur_print::printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -13533,7 +13512,7 @@ operator<<(std::ostream &os, os << ".hKernel = "; - ur_params::serializePtr(os, *(params->phKernel)); + ur_print::printPtr(os, *(params->phKernel)); return os; } @@ -13544,7 +13523,7 @@ operator<<(std::ostream &os, os << ".hKernel = "; - ur_params::serializePtr(os, *(params->phKernel)); + ur_print::printPtr(os, *(params->phKernel)); return os; } @@ -13556,12 +13535,12 @@ operator<<(std::ostream &os, os << ".hKernel = "; - ur_params::serializePtr(os, *(params->phKernel)); + ur_print::printPtr(os, *(params->phKernel)); os << ", "; os << ".phNativeKernel = "; - ur_params::serializePtr(os, *(params->pphNativeKernel)); + ur_print::printPtr(os, *(params->pphNativeKernel)); return os; } @@ -13573,27 +13552,27 @@ inline std::ostream &operator<<( os << ".hNativeKernel = "; - ur_params::serializePtr(os, *(params->phNativeKernel)); + ur_print::printPtr(os, *(params->phNativeKernel)); os << ", "; os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".hProgram = "; - ur_params::serializePtr(os, *(params->phProgram)); + ur_print::printPtr(os, *(params->phProgram)); os << ", "; os << ".pProperties = "; - ur_params::serializePtr(os, *(params->ppProperties)); + ur_print::printPtr(os, *(params->ppProperties)); os << ", "; os << ".phKernel = "; - ur_params::serializePtr(os, *(params->pphKernel)); + ur_print::printPtr(os, *(params->pphKernel)); return os; } @@ -13604,7 +13583,7 @@ inline std::ostream &operator<<( os << ".hKernel = "; - ur_params::serializePtr(os, *(params->phKernel)); + ur_print::printPtr(os, *(params->phKernel)); os << ", "; os << ".argIndex = "; @@ -13619,12 +13598,12 @@ inline std::ostream &operator<<( os << ", "; os << ".pProperties = "; - ur_params::serializePtr(os, *(params->ppProperties)); + ur_print::printPtr(os, *(params->ppProperties)); os << ", "; os << ".pArgValue = "; - ur_params::serializePtr(os, *(params->ppArgValue)); + ur_print::printPtr(os, *(params->ppArgValue)); return os; } @@ -13635,7 +13614,7 @@ inline std::ostream &operator<<( os << ".hKernel = "; - ur_params::serializePtr(os, *(params->phKernel)); + ur_print::printPtr(os, *(params->phKernel)); os << ", "; os << ".argIndex = "; @@ -13650,7 +13629,7 @@ inline std::ostream &operator<<( os << ", "; os << ".pProperties = "; - ur_params::serializePtr(os, *(params->ppProperties)); + ur_print::printPtr(os, *(params->ppProperties)); return os; } @@ -13661,7 +13640,7 @@ inline std::ostream &operator<<( os << ".hKernel = "; - ur_params::serializePtr(os, *(params->phKernel)); + ur_print::printPtr(os, *(params->phKernel)); os << ", "; os << ".argIndex = "; @@ -13671,12 +13650,12 @@ inline std::ostream &operator<<( os << ", "; os << ".pProperties = "; - ur_params::serializePtr(os, *(params->ppProperties)); + ur_print::printPtr(os, *(params->ppProperties)); os << ", "; os << ".pArgValue = "; - ur_params::serializePtr(os, *(params->ppArgValue)); + ur_print::printPtr(os, *(params->ppArgValue)); return os; } @@ -13687,7 +13666,7 @@ inline std::ostream &operator<<( os << ".hKernel = "; - ur_params::serializePtr(os, *(params->phKernel)); + ur_print::printPtr(os, *(params->phKernel)); os << ", "; os << ".propName = "; @@ -13702,12 +13681,12 @@ inline std::ostream &operator<<( os << ", "; os << ".pProperties = "; - ur_params::serializePtr(os, *(params->ppProperties)); + ur_print::printPtr(os, *(params->ppProperties)); os << ", "; os << ".pPropValue = "; - ur_params::serializeTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); return os; } @@ -13718,7 +13697,7 @@ inline std::ostream &operator<<( os << ".hKernel = "; - ur_params::serializePtr(os, *(params->phKernel)); + ur_print::printPtr(os, *(params->phKernel)); os << ", "; os << ".argIndex = "; @@ -13728,12 +13707,12 @@ inline std::ostream &operator<<( os << ", "; os << ".pProperties = "; - ur_params::serializePtr(os, *(params->ppProperties)); + ur_print::printPtr(os, *(params->ppProperties)); os << ", "; os << ".hArgValue = "; - ur_params::serializePtr(os, *(params->phArgValue)); + ur_print::printPtr(os, *(params->phArgValue)); return os; } @@ -13744,7 +13723,7 @@ inline std::ostream &operator<<( os << ".hKernel = "; - ur_params::serializePtr(os, *(params->phKernel)); + ur_print::printPtr(os, *(params->phKernel)); os << ", "; os << ".argIndex = "; @@ -13754,12 +13733,12 @@ inline std::ostream &operator<<( os << ", "; os << ".pProperties = "; - ur_params::serializePtr(os, *(params->ppProperties)); + ur_print::printPtr(os, *(params->ppProperties)); os << ", "; os << ".hArgValue = "; - ur_params::serializePtr(os, *(params->phArgValue)); + ur_print::printPtr(os, *(params->phArgValue)); return os; } @@ -13770,7 +13749,7 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hKernel = "; - ur_params::serializePtr(os, *(params->phKernel)); + ur_print::printPtr(os, *(params->phKernel)); os << ", "; os << ".count = "; @@ -13780,7 +13759,7 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".pSpecConstants = "; - ur_params::serializePtr(os, *(params->ppSpecConstants)); + ur_print::printPtr(os, *(params->ppSpecConstants)); return os; } @@ -13791,12 +13770,12 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hKernel = "; - ur_params::serializePtr(os, *(params->phKernel)); + ur_print::printPtr(os, *(params->phKernel)); os << ", "; os << ".pGroupCountRet = "; - ur_params::serializePtr(os, *(params->ppGroupCountRet)); + ur_print::printPtr(os, *(params->ppGroupCountRet)); return os; } @@ -13807,13 +13786,12 @@ operator<<(std::ostream &os, os << ".device_flags = "; - ur_params::serializeFlag(os, - *(params->pdevice_flags)); + ur_print::printFlag(os, *(params->pdevice_flags)); os << ", "; os << ".hLoaderConfig = "; - ur_params::serializePtr(os, *(params->phLoaderConfig)); + ur_print::printPtr(os, *(params->phLoaderConfig)); return os; } @@ -13831,7 +13809,7 @@ inline std::ostream &operator<<( os << ".phLoaderConfig = "; - ur_params::serializePtr(os, *(params->pphLoaderConfig)); + ur_print::printPtr(os, *(params->pphLoaderConfig)); return os; } @@ -13842,7 +13820,7 @@ inline std::ostream &operator<<( os << ".hLoaderConfig = "; - ur_params::serializePtr(os, *(params->phLoaderConfig)); + ur_print::printPtr(os, *(params->phLoaderConfig)); return os; } @@ -13853,7 +13831,7 @@ inline std::ostream &operator<<( os << ".hLoaderConfig = "; - ur_params::serializePtr(os, *(params->phLoaderConfig)); + ur_print::printPtr(os, *(params->phLoaderConfig)); return os; } @@ -13864,7 +13842,7 @@ inline std::ostream &operator<<( os << ".hLoaderConfig = "; - ur_params::serializePtr(os, *(params->phLoaderConfig)); + ur_print::printPtr(os, *(params->phLoaderConfig)); os << ", "; os << ".propName = "; @@ -13878,13 +13856,13 @@ inline std::ostream &operator<<( os << ", "; os << ".pPropValue = "; - ur_params::serializeTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_params::serializePtr(os, *(params->ppPropSizeRet)); + ur_print::printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -13896,12 +13874,12 @@ operator<<(std::ostream &os, os << ".hLoaderConfig = "; - ur_params::serializePtr(os, *(params->phLoaderConfig)); + ur_print::printPtr(os, *(params->phLoaderConfig)); os << ", "; os << ".pLayerName = "; - ur_params::serializePtr(os, *(params->ppLayerName)); + ur_print::printPtr(os, *(params->ppLayerName)); return os; } @@ -13933,32 +13911,32 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".flags = "; - ur_params::serializeFlag(os, *(params->pflags)); + ur_print::printFlag(os, *(params->pflags)); os << ", "; os << ".pImageFormat = "; - ur_params::serializePtr(os, *(params->ppImageFormat)); + ur_print::printPtr(os, *(params->ppImageFormat)); os << ", "; os << ".pImageDesc = "; - ur_params::serializePtr(os, *(params->ppImageDesc)); + ur_print::printPtr(os, *(params->ppImageDesc)); os << ", "; os << ".pHost = "; - ur_params::serializePtr(os, *(params->ppHost)); + ur_print::printPtr(os, *(params->ppHost)); os << ", "; os << ".phMem = "; - ur_params::serializePtr(os, *(params->pphMem)); + ur_print::printPtr(os, *(params->pphMem)); return os; } @@ -13969,12 +13947,12 @@ inline std::ostream &operator<<( os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".flags = "; - ur_params::serializeFlag(os, *(params->pflags)); + ur_print::printFlag(os, *(params->pflags)); os << ", "; os << ".size = "; @@ -13984,12 +13962,12 @@ inline std::ostream &operator<<( os << ", "; os << ".pProperties = "; - ur_params::serializePtr(os, *(params->ppProperties)); + ur_print::printPtr(os, *(params->ppProperties)); os << ", "; os << ".phBuffer = "; - ur_params::serializePtr(os, *(params->pphBuffer)); + ur_print::printPtr(os, *(params->pphBuffer)); return os; } @@ -14000,7 +13978,7 @@ operator<<(std::ostream &os, os << ".hMem = "; - ur_params::serializePtr(os, *(params->phMem)); + ur_print::printPtr(os, *(params->phMem)); return os; } @@ -14011,7 +13989,7 @@ operator<<(std::ostream &os, os << ".hMem = "; - ur_params::serializePtr(os, *(params->phMem)); + ur_print::printPtr(os, *(params->phMem)); return os; } @@ -14022,12 +14000,12 @@ inline std::ostream &operator<<( os << ".hBuffer = "; - ur_params::serializePtr(os, *(params->phBuffer)); + ur_print::printPtr(os, *(params->phBuffer)); os << ", "; os << ".flags = "; - ur_params::serializeFlag(os, *(params->pflags)); + ur_print::printFlag(os, *(params->pflags)); os << ", "; os << ".bufferCreateType = "; @@ -14037,12 +14015,12 @@ inline std::ostream &operator<<( os << ", "; os << ".pRegion = "; - ur_params::serializePtr(os, *(params->ppRegion)); + ur_print::printPtr(os, *(params->ppRegion)); os << ", "; os << ".phMem = "; - ur_params::serializePtr(os, *(params->pphMem)); + ur_print::printPtr(os, *(params->pphMem)); return os; } @@ -14053,12 +14031,12 @@ inline std::ostream &operator<<( os << ".hMem = "; - ur_params::serializePtr(os, *(params->phMem)); + ur_print::printPtr(os, *(params->phMem)); os << ", "; os << ".phNativeMem = "; - ur_params::serializePtr(os, *(params->pphNativeMem)); + ur_print::printPtr(os, *(params->pphNativeMem)); return os; } @@ -14069,22 +14047,22 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hNativeMem = "; - ur_params::serializePtr(os, *(params->phNativeMem)); + ur_print::printPtr(os, *(params->phNativeMem)); os << ", "; os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".pProperties = "; - ur_params::serializePtr(os, *(params->ppProperties)); + ur_print::printPtr(os, *(params->ppProperties)); os << ", "; os << ".phMem = "; - ur_params::serializePtr(os, *(params->pphMem)); + ur_print::printPtr(os, *(params->pphMem)); return os; } @@ -14095,32 +14073,32 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hNativeMem = "; - ur_params::serializePtr(os, *(params->phNativeMem)); + ur_print::printPtr(os, *(params->phNativeMem)); os << ", "; os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".pImageFormat = "; - ur_params::serializePtr(os, *(params->ppImageFormat)); + ur_print::printPtr(os, *(params->ppImageFormat)); os << ", "; os << ".pImageDesc = "; - ur_params::serializePtr(os, *(params->ppImageDesc)); + ur_print::printPtr(os, *(params->ppImageDesc)); os << ", "; os << ".pProperties = "; - ur_params::serializePtr(os, *(params->ppProperties)); + ur_print::printPtr(os, *(params->ppProperties)); os << ", "; os << ".phMem = "; - ur_params::serializePtr(os, *(params->pphMem)); + ur_print::printPtr(os, *(params->pphMem)); return os; } @@ -14131,7 +14109,7 @@ operator<<(std::ostream &os, os << ".hMemory = "; - ur_params::serializePtr(os, *(params->phMemory)); + ur_print::printPtr(os, *(params->phMemory)); os << ", "; os << ".propName = "; @@ -14145,13 +14123,13 @@ operator<<(std::ostream &os, os << ", "; os << ".pPropValue = "; - ur_params::serializeTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_params::serializePtr(os, *(params->ppPropSizeRet)); + ur_print::printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -14162,7 +14140,7 @@ inline std::ostream &operator<<( os << ".hMemory = "; - ur_params::serializePtr(os, *(params->phMemory)); + ur_print::printPtr(os, *(params->phMemory)); os << ", "; os << ".propName = "; @@ -14176,13 +14154,13 @@ inline std::ostream &operator<<( os << ", "; os << ".pPropValue = "; - ur_params::serializeTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_params::serializePtr(os, *(params->ppPropSizeRet)); + ur_print::printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -14193,12 +14171,12 @@ inline std::ostream &operator<<( os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_params::serializePtr(os, *(params->phDevice)); + ur_print::printPtr(os, *(params->phDevice)); os << ", "; os << ".size = "; @@ -14208,12 +14186,12 @@ inline std::ostream &operator<<( os << ", "; os << ".pProperties = "; - ur_params::serializePtr(os, *(params->ppProperties)); + ur_print::printPtr(os, *(params->ppProperties)); os << ", "; os << ".phPhysicalMem = "; - ur_params::serializePtr(os, *(params->pphPhysicalMem)); + ur_print::printPtr(os, *(params->pphPhysicalMem)); return os; } @@ -14224,7 +14202,7 @@ inline std::ostream &operator<<( os << ".hPhysicalMem = "; - ur_params::serializePtr(os, *(params->phPhysicalMem)); + ur_print::printPtr(os, *(params->phPhysicalMem)); return os; } @@ -14235,7 +14213,7 @@ inline std::ostream &operator<<( os << ".hPhysicalMem = "; - ur_params::serializePtr(os, *(params->phPhysicalMem)); + ur_print::printPtr(os, *(params->phPhysicalMem)); return os; } @@ -14251,7 +14229,7 @@ operator<<(std::ostream &os, os << ", "; } - ur_params::serializePtr(os, (*(params->pphAdapters))[i]); + ur_print::printPtr(os, (*(params->pphAdapters))[i]); } os << "}"; @@ -14273,14 +14251,14 @@ operator<<(std::ostream &os, os << ", "; } - ur_params::serializePtr(os, (*(params->pphPlatforms))[i]); + ur_print::printPtr(os, (*(params->pphPlatforms))[i]); } os << "}"; os << ", "; os << ".pNumPlatforms = "; - ur_params::serializePtr(os, *(params->ppNumPlatforms)); + ur_print::printPtr(os, *(params->ppNumPlatforms)); return os; } @@ -14291,7 +14269,7 @@ inline std::ostream &operator<<( os << ".hPlatform = "; - ur_params::serializePtr(os, *(params->phPlatform)); + ur_print::printPtr(os, *(params->phPlatform)); os << ", "; os << ".propName = "; @@ -14305,13 +14283,13 @@ inline std::ostream &operator<<( os << ", "; os << ".pPropValue = "; - ur_params::serializeTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_params::serializePtr(os, *(params->ppPropSizeRet)); + ur_print::printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -14323,12 +14301,12 @@ operator<<(std::ostream &os, os << ".hPlatform = "; - ur_params::serializePtr(os, *(params->phPlatform)); + ur_print::printPtr(os, *(params->phPlatform)); os << ", "; os << ".phNativePlatform = "; - ur_params::serializePtr(os, *(params->pphNativePlatform)); + ur_print::printPtr(os, *(params->pphNativePlatform)); return os; } @@ -14340,17 +14318,17 @@ inline std::ostream &operator<<( os << ".hNativePlatform = "; - ur_params::serializePtr(os, *(params->phNativePlatform)); + ur_print::printPtr(os, *(params->phNativePlatform)); os << ", "; os << ".pProperties = "; - ur_params::serializePtr(os, *(params->ppProperties)); + ur_print::printPtr(os, *(params->ppProperties)); os << ", "; os << ".phPlatform = "; - ur_params::serializePtr(os, *(params->pphPlatform)); + ur_print::printPtr(os, *(params->pphPlatform)); return os; } @@ -14362,12 +14340,12 @@ operator<<(std::ostream &os, os << ".hPlatform = "; - ur_params::serializePtr(os, *(params->phPlatform)); + ur_print::printPtr(os, *(params->phPlatform)); os << ", "; os << ".pVersion = "; - ur_params::serializePtr(os, *(params->ppVersion)); + ur_print::printPtr(os, *(params->ppVersion)); return os; } @@ -14379,17 +14357,17 @@ operator<<(std::ostream &os, os << ".hPlatform = "; - ur_params::serializePtr(os, *(params->phPlatform)); + ur_print::printPtr(os, *(params->phPlatform)); os << ", "; os << ".pFrontendOption = "; - ur_params::serializePtr(os, *(params->ppFrontendOption)); + ur_print::printPtr(os, *(params->ppFrontendOption)); os << ", "; os << ".ppPlatformOption = "; - ur_params::serializePtr(os, *(params->pppPlatformOption)); + ur_print::printPtr(os, *(params->pppPlatformOption)); return os; } @@ -14400,12 +14378,12 @@ inline std::ostream &operator<<( os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".pIL = "; - ur_params::serializePtr(os, *(params->ppIL)); + ur_print::printPtr(os, *(params->ppIL)); os << ", "; os << ".length = "; @@ -14415,12 +14393,12 @@ inline std::ostream &operator<<( os << ", "; os << ".pProperties = "; - ur_params::serializePtr(os, *(params->ppProperties)); + ur_print::printPtr(os, *(params->ppProperties)); os << ", "; os << ".phProgram = "; - ur_params::serializePtr(os, *(params->pphProgram)); + ur_print::printPtr(os, *(params->pphProgram)); return os; } @@ -14432,12 +14410,12 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_params::serializePtr(os, *(params->phDevice)); + ur_print::printPtr(os, *(params->phDevice)); os << ", "; os << ".size = "; @@ -14447,17 +14425,17 @@ operator<<(std::ostream &os, os << ", "; os << ".pBinary = "; - ur_params::serializePtr(os, *(params->ppBinary)); + ur_print::printPtr(os, *(params->ppBinary)); os << ", "; os << ".pProperties = "; - ur_params::serializePtr(os, *(params->ppProperties)); + ur_print::printPtr(os, *(params->ppProperties)); os << ", "; os << ".phProgram = "; - ur_params::serializePtr(os, *(params->pphProgram)); + ur_print::printPtr(os, *(params->pphProgram)); return os; } @@ -14468,17 +14446,17 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".hProgram = "; - ur_params::serializePtr(os, *(params->phProgram)); + ur_print::printPtr(os, *(params->phProgram)); os << ", "; os << ".pOptions = "; - ur_params::serializePtr(os, *(params->ppOptions)); + ur_print::printPtr(os, *(params->ppOptions)); return os; } @@ -14489,17 +14467,17 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".hProgram = "; - ur_params::serializePtr(os, *(params->phProgram)); + ur_print::printPtr(os, *(params->phProgram)); os << ", "; os << ".pOptions = "; - ur_params::serializePtr(os, *(params->ppOptions)); + ur_print::printPtr(os, *(params->ppOptions)); return os; } @@ -14510,7 +14488,7 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".count = "; @@ -14525,19 +14503,19 @@ operator<<(std::ostream &os, os << ", "; } - ur_params::serializePtr(os, (*(params->pphPrograms))[i]); + ur_print::printPtr(os, (*(params->pphPrograms))[i]); } os << "}"; os << ", "; os << ".pOptions = "; - ur_params::serializePtr(os, *(params->ppOptions)); + ur_print::printPtr(os, *(params->ppOptions)); os << ", "; os << ".phProgram = "; - ur_params::serializePtr(os, *(params->pphProgram)); + ur_print::printPtr(os, *(params->pphProgram)); return os; } @@ -14548,7 +14526,7 @@ operator<<(std::ostream &os, os << ".hProgram = "; - ur_params::serializePtr(os, *(params->phProgram)); + ur_print::printPtr(os, *(params->phProgram)); return os; } @@ -14559,7 +14537,7 @@ operator<<(std::ostream &os, os << ".hProgram = "; - ur_params::serializePtr(os, *(params->phProgram)); + ur_print::printPtr(os, *(params->phProgram)); return os; } @@ -14571,22 +14549,22 @@ inline std::ostream &operator<<( os << ".hDevice = "; - ur_params::serializePtr(os, *(params->phDevice)); + ur_print::printPtr(os, *(params->phDevice)); os << ", "; os << ".hProgram = "; - ur_params::serializePtr(os, *(params->phProgram)); + ur_print::printPtr(os, *(params->phProgram)); os << ", "; os << ".pFunctionName = "; - ur_params::serializePtr(os, *(params->ppFunctionName)); + ur_print::printPtr(os, *(params->ppFunctionName)); os << ", "; os << ".ppFunctionPointer = "; - ur_params::serializePtr(os, *(params->pppFunctionPointer)); + ur_print::printPtr(os, *(params->pppFunctionPointer)); return os; } @@ -14597,7 +14575,7 @@ operator<<(std::ostream &os, os << ".hProgram = "; - ur_params::serializePtr(os, *(params->phProgram)); + ur_print::printPtr(os, *(params->phProgram)); os << ", "; os << ".propName = "; @@ -14611,13 +14589,13 @@ operator<<(std::ostream &os, os << ", "; os << ".pPropValue = "; - ur_params::serializeTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_params::serializePtr(os, *(params->ppPropSizeRet)); + ur_print::printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -14628,12 +14606,12 @@ inline std::ostream &operator<<( os << ".hProgram = "; - ur_params::serializePtr(os, *(params->phProgram)); + ur_print::printPtr(os, *(params->phProgram)); os << ", "; os << ".hDevice = "; - ur_params::serializePtr(os, *(params->phDevice)); + ur_print::printPtr(os, *(params->phDevice)); os << ", "; os << ".propName = "; @@ -14647,13 +14625,13 @@ inline std::ostream &operator<<( os << ", "; os << ".pPropValue = "; - ur_params::serializeTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_params::serializePtr(os, *(params->ppPropSizeRet)); + ur_print::printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -14664,7 +14642,7 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hProgram = "; - ur_params::serializePtr(os, *(params->phProgram)); + ur_print::printPtr(os, *(params->phProgram)); os << ", "; os << ".count = "; @@ -14693,12 +14671,12 @@ operator<<(std::ostream &os, os << ".hProgram = "; - ur_params::serializePtr(os, *(params->phProgram)); + ur_print::printPtr(os, *(params->phProgram)); os << ", "; os << ".phNativeProgram = "; - ur_params::serializePtr(os, *(params->pphNativeProgram)); + ur_print::printPtr(os, *(params->pphNativeProgram)); return os; } @@ -14710,22 +14688,22 @@ inline std::ostream &operator<<( os << ".hNativeProgram = "; - ur_params::serializePtr(os, *(params->phNativeProgram)); + ur_print::printPtr(os, *(params->phNativeProgram)); os << ", "; os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".pProperties = "; - ur_params::serializePtr(os, *(params->ppProperties)); + ur_print::printPtr(os, *(params->ppProperties)); os << ", "; os << ".phProgram = "; - ur_params::serializePtr(os, *(params->pphProgram)); + ur_print::printPtr(os, *(params->pphProgram)); return os; } @@ -14736,7 +14714,7 @@ operator<<(std::ostream &os, os << ".hQueue = "; - ur_params::serializePtr(os, *(params->phQueue)); + ur_print::printPtr(os, *(params->phQueue)); os << ", "; os << ".propName = "; @@ -14750,13 +14728,13 @@ operator<<(std::ostream &os, os << ", "; os << ".pPropValue = "; - ur_params::serializeTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_params::serializePtr(os, *(params->ppPropSizeRet)); + ur_print::printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -14767,22 +14745,22 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_params::serializePtr(os, *(params->phDevice)); + ur_print::printPtr(os, *(params->phDevice)); os << ", "; os << ".pProperties = "; - ur_params::serializePtr(os, *(params->ppProperties)); + ur_print::printPtr(os, *(params->ppProperties)); os << ", "; os << ".phQueue = "; - ur_params::serializePtr(os, *(params->pphQueue)); + ur_print::printPtr(os, *(params->pphQueue)); return os; } @@ -14793,7 +14771,7 @@ operator<<(std::ostream &os, os << ".hQueue = "; - ur_params::serializePtr(os, *(params->phQueue)); + ur_print::printPtr(os, *(params->phQueue)); return os; } @@ -14804,7 +14782,7 @@ operator<<(std::ostream &os, os << ".hQueue = "; - ur_params::serializePtr(os, *(params->phQueue)); + ur_print::printPtr(os, *(params->phQueue)); return os; } @@ -14815,17 +14793,17 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_params::serializePtr(os, *(params->phQueue)); + ur_print::printPtr(os, *(params->phQueue)); os << ", "; os << ".pDesc = "; - ur_params::serializePtr(os, *(params->ppDesc)); + ur_print::printPtr(os, *(params->ppDesc)); os << ", "; os << ".phNativeQueue = "; - ur_params::serializePtr(os, *(params->pphNativeQueue)); + ur_print::printPtr(os, *(params->pphNativeQueue)); return os; } @@ -14837,27 +14815,27 @@ inline std::ostream &operator<<( os << ".hNativeQueue = "; - ur_params::serializePtr(os, *(params->phNativeQueue)); + ur_print::printPtr(os, *(params->phNativeQueue)); os << ", "; os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_params::serializePtr(os, *(params->phDevice)); + ur_print::printPtr(os, *(params->phDevice)); os << ", "; os << ".pProperties = "; - ur_params::serializePtr(os, *(params->ppProperties)); + ur_print::printPtr(os, *(params->ppProperties)); os << ", "; os << ".phQueue = "; - ur_params::serializePtr(os, *(params->pphQueue)); + ur_print::printPtr(os, *(params->pphQueue)); return os; } @@ -14868,7 +14846,7 @@ operator<<(std::ostream &os, os << ".hQueue = "; - ur_params::serializePtr(os, *(params->phQueue)); + ur_print::printPtr(os, *(params->phQueue)); return os; } @@ -14879,7 +14857,7 @@ operator<<(std::ostream &os, os << ".hQueue = "; - ur_params::serializePtr(os, *(params->phQueue)); + ur_print::printPtr(os, *(params->phQueue)); return os; } @@ -14890,17 +14868,17 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".pDesc = "; - ur_params::serializePtr(os, *(params->ppDesc)); + ur_print::printPtr(os, *(params->ppDesc)); os << ", "; os << ".phSampler = "; - ur_params::serializePtr(os, *(params->pphSampler)); + ur_print::printPtr(os, *(params->pphSampler)); return os; } @@ -14911,7 +14889,7 @@ operator<<(std::ostream &os, os << ".hSampler = "; - ur_params::serializePtr(os, *(params->phSampler)); + ur_print::printPtr(os, *(params->phSampler)); return os; } @@ -14922,7 +14900,7 @@ operator<<(std::ostream &os, os << ".hSampler = "; - ur_params::serializePtr(os, *(params->phSampler)); + ur_print::printPtr(os, *(params->phSampler)); return os; } @@ -14933,7 +14911,7 @@ operator<<(std::ostream &os, os << ".hSampler = "; - ur_params::serializePtr(os, *(params->phSampler)); + ur_print::printPtr(os, *(params->phSampler)); os << ", "; os << ".propName = "; @@ -14947,13 +14925,13 @@ operator<<(std::ostream &os, os << ", "; os << ".pPropValue = "; - ur_params::serializeTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_params::serializePtr(os, *(params->ppPropSizeRet)); + ur_print::printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -14965,12 +14943,12 @@ operator<<(std::ostream &os, os << ".hSampler = "; - ur_params::serializePtr(os, *(params->phSampler)); + ur_print::printPtr(os, *(params->phSampler)); os << ", "; os << ".phNativeSampler = "; - ur_params::serializePtr(os, *(params->pphNativeSampler)); + ur_print::printPtr(os, *(params->pphNativeSampler)); return os; } @@ -14982,22 +14960,22 @@ inline std::ostream &operator<<( os << ".hNativeSampler = "; - ur_params::serializePtr(os, *(params->phNativeSampler)); + ur_print::printPtr(os, *(params->phNativeSampler)); os << ", "; os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".pProperties = "; - ur_params::serializePtr(os, *(params->ppProperties)); + ur_print::printPtr(os, *(params->ppProperties)); os << ", "; os << ".phSampler = "; - ur_params::serializePtr(os, *(params->pphSampler)); + ur_print::printPtr(os, *(params->pphSampler)); return os; } @@ -15008,17 +14986,17 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".pUSMDesc = "; - ur_params::serializePtr(os, *(params->ppUSMDesc)); + ur_print::printPtr(os, *(params->ppUSMDesc)); os << ", "; os << ".pool = "; - ur_params::serializePtr(os, *(params->ppool)); + ur_print::printPtr(os, *(params->ppool)); os << ", "; os << ".size = "; @@ -15028,7 +15006,7 @@ operator<<(std::ostream &os, os << ", "; os << ".ppMem = "; - ur_params::serializePtr(os, *(params->pppMem)); + ur_print::printPtr(os, *(params->pppMem)); return os; } @@ -15039,22 +15017,22 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_params::serializePtr(os, *(params->phDevice)); + ur_print::printPtr(os, *(params->phDevice)); os << ", "; os << ".pUSMDesc = "; - ur_params::serializePtr(os, *(params->ppUSMDesc)); + ur_print::printPtr(os, *(params->ppUSMDesc)); os << ", "; os << ".pool = "; - ur_params::serializePtr(os, *(params->ppool)); + ur_print::printPtr(os, *(params->ppool)); os << ", "; os << ".size = "; @@ -15064,7 +15042,7 @@ operator<<(std::ostream &os, os << ", "; os << ".ppMem = "; - ur_params::serializePtr(os, *(params->pppMem)); + ur_print::printPtr(os, *(params->pppMem)); return os; } @@ -15075,22 +15053,22 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_params::serializePtr(os, *(params->phDevice)); + ur_print::printPtr(os, *(params->phDevice)); os << ", "; os << ".pUSMDesc = "; - ur_params::serializePtr(os, *(params->ppUSMDesc)); + ur_print::printPtr(os, *(params->ppUSMDesc)); os << ", "; os << ".pool = "; - ur_params::serializePtr(os, *(params->ppool)); + ur_print::printPtr(os, *(params->ppool)); os << ", "; os << ".size = "; @@ -15100,7 +15078,7 @@ operator<<(std::ostream &os, os << ", "; os << ".ppMem = "; - ur_params::serializePtr(os, *(params->pppMem)); + ur_print::printPtr(os, *(params->pppMem)); return os; } @@ -15111,12 +15089,12 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".pMem = "; - ur_params::serializePtr(os, *(params->ppMem)); + ur_print::printPtr(os, *(params->ppMem)); return os; } @@ -15127,12 +15105,12 @@ inline std::ostream &operator<<( os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".pMem = "; - ur_params::serializePtr(os, *(params->ppMem)); + ur_print::printPtr(os, *(params->ppMem)); os << ", "; os << ".propName = "; @@ -15146,13 +15124,13 @@ inline std::ostream &operator<<( os << ", "; os << ".pPropValue = "; - ur_params::serializeTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_params::serializePtr(os, *(params->ppPropSizeRet)); + ur_print::printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -15163,17 +15141,17 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".pPoolDesc = "; - ur_params::serializePtr(os, *(params->ppPoolDesc)); + ur_print::printPtr(os, *(params->ppPoolDesc)); os << ", "; os << ".ppPool = "; - ur_params::serializePtr(os, *(params->pppPool)); + ur_print::printPtr(os, *(params->pppPool)); return os; } @@ -15184,7 +15162,7 @@ operator<<(std::ostream &os, os << ".pPool = "; - ur_params::serializePtr(os, *(params->ppPool)); + ur_print::printPtr(os, *(params->ppPool)); return os; } @@ -15195,7 +15173,7 @@ operator<<(std::ostream &os, os << ".pPool = "; - ur_params::serializePtr(os, *(params->ppPool)); + ur_print::printPtr(os, *(params->ppPool)); return os; } @@ -15206,7 +15184,7 @@ inline std::ostream &operator<<( os << ".hPool = "; - ur_params::serializePtr(os, *(params->phPool)); + ur_print::printPtr(os, *(params->phPool)); os << ", "; os << ".propName = "; @@ -15220,13 +15198,13 @@ inline std::ostream &operator<<( os << ", "; os << ".pPropValue = "; - ur_params::serializeTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_params::serializePtr(os, *(params->ppPropSizeRet)); + ur_print::printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -15237,22 +15215,22 @@ inline std::ostream &operator<<( os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_params::serializePtr(os, *(params->phDevice)); + ur_print::printPtr(os, *(params->phDevice)); os << ", "; os << ".pUSMDesc = "; - ur_params::serializePtr(os, *(params->ppUSMDesc)); + ur_print::printPtr(os, *(params->ppUSMDesc)); os << ", "; os << ".pool = "; - ur_params::serializePtr(os, *(params->ppool)); + ur_print::printPtr(os, *(params->ppool)); os << ", "; os << ".widthInBytes = "; @@ -15272,12 +15250,12 @@ inline std::ostream &operator<<( os << ", "; os << ".ppMem = "; - ur_params::serializePtr(os, *(params->pppMem)); + ur_print::printPtr(os, *(params->pppMem)); os << ", "; os << ".pResultPitch = "; - ur_params::serializePtr(os, *(params->ppResultPitch)); + ur_print::printPtr(os, *(params->ppResultPitch)); return os; } @@ -15288,12 +15266,12 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".pMem = "; - ur_params::serializePtr(os, *(params->ppMem)); + ur_print::printPtr(os, *(params->ppMem)); os << ", "; os << ".size = "; @@ -15309,12 +15287,12 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".pMem = "; - ur_params::serializePtr(os, *(params->ppMem)); + ur_print::printPtr(os, *(params->ppMem)); return os; } @@ -15326,12 +15304,12 @@ inline std::ostream &operator<<( os << ".commandDevice = "; - ur_params::serializePtr(os, *(params->pcommandDevice)); + ur_print::printPtr(os, *(params->pcommandDevice)); os << ", "; os << ".peerDevice = "; - ur_params::serializePtr(os, *(params->ppeerDevice)); + ur_print::printPtr(os, *(params->ppeerDevice)); return os; } @@ -15343,12 +15321,12 @@ inline std::ostream &operator<<( os << ".commandDevice = "; - ur_params::serializePtr(os, *(params->pcommandDevice)); + ur_print::printPtr(os, *(params->pcommandDevice)); os << ", "; os << ".peerDevice = "; - ur_params::serializePtr(os, *(params->ppeerDevice)); + ur_print::printPtr(os, *(params->ppeerDevice)); return os; } @@ -15360,12 +15338,12 @@ inline std::ostream &operator<<( os << ".commandDevice = "; - ur_params::serializePtr(os, *(params->pcommandDevice)); + ur_print::printPtr(os, *(params->pcommandDevice)); os << ", "; os << ".peerDevice = "; - ur_params::serializePtr(os, *(params->ppeerDevice)); + ur_print::printPtr(os, *(params->ppeerDevice)); os << ", "; os << ".propName = "; @@ -15379,13 +15357,13 @@ inline std::ostream &operator<<( os << ", "; os << ".pPropValue = "; - ur_params::serializeTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_params::serializePtr(os, *(params->ppPropSizeRet)); + ur_print::printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -15397,12 +15375,12 @@ inline std::ostream &operator<<( os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_params::serializePtr(os, *(params->phDevice)); + ur_print::printPtr(os, *(params->phDevice)); os << ", "; os << ".propName = "; @@ -15416,13 +15394,13 @@ inline std::ostream &operator<<( os << ", "; os << ".pPropValue = "; - ur_params::serializeTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_params::serializePtr(os, *(params->ppPropSizeRet)); + ur_print::printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -15433,12 +15411,12 @@ inline std::ostream &operator<<( os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".pStart = "; - ur_params::serializePtr(os, *(params->ppStart)); + ur_print::printPtr(os, *(params->ppStart)); os << ", "; os << ".size = "; @@ -15448,7 +15426,7 @@ inline std::ostream &operator<<( os << ", "; os << ".ppStart = "; - ur_params::serializePtr(os, *(params->pppStart)); + ur_print::printPtr(os, *(params->pppStart)); return os; } @@ -15459,12 +15437,12 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".pStart = "; - ur_params::serializePtr(os, *(params->ppStart)); + ur_print::printPtr(os, *(params->ppStart)); os << ", "; os << ".size = "; @@ -15480,12 +15458,12 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".pStart = "; - ur_params::serializePtr(os, *(params->ppStart)); + ur_print::printPtr(os, *(params->ppStart)); os << ", "; os << ".size = "; @@ -15495,7 +15473,7 @@ operator<<(std::ostream &os, os << ", "; os << ".hPhysicalMem = "; - ur_params::serializePtr(os, *(params->phPhysicalMem)); + ur_print::printPtr(os, *(params->phPhysicalMem)); os << ", "; os << ".offset = "; @@ -15505,8 +15483,7 @@ operator<<(std::ostream &os, os << ", "; os << ".flags = "; - ur_params::serializeFlag(os, - *(params->pflags)); + ur_print::printFlag(os, *(params->pflags)); return os; } @@ -15517,12 +15494,12 @@ inline std::ostream &operator<<( os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".pStart = "; - ur_params::serializePtr(os, *(params->ppStart)); + ur_print::printPtr(os, *(params->ppStart)); os << ", "; os << ".size = "; @@ -15538,12 +15515,12 @@ inline std::ostream &operator<<( os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".pStart = "; - ur_params::serializePtr(os, *(params->ppStart)); + ur_print::printPtr(os, *(params->ppStart)); os << ", "; os << ".size = "; @@ -15553,8 +15530,7 @@ inline std::ostream &operator<<( os << ", "; os << ".flags = "; - ur_params::serializeFlag(os, - *(params->pflags)); + ur_print::printFlag(os, *(params->pflags)); return os; } @@ -15565,12 +15541,12 @@ inline std::ostream &operator<<( os << ".hContext = "; - ur_params::serializePtr(os, *(params->phContext)); + ur_print::printPtr(os, *(params->phContext)); os << ", "; os << ".pStart = "; - ur_params::serializePtr(os, *(params->ppStart)); + ur_print::printPtr(os, *(params->ppStart)); os << ", "; os << ".size = "; @@ -15589,13 +15565,13 @@ inline std::ostream &operator<<( os << ", "; os << ".pPropValue = "; - ur_params::serializeTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_params::serializePtr(os, *(params->ppPropSizeRet)); + ur_print::printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -15606,7 +15582,7 @@ operator<<(std::ostream &os, os << ".hPlatform = "; - ur_params::serializePtr(os, *(params->phPlatform)); + ur_print::printPtr(os, *(params->phPlatform)); os << ", "; os << ".DeviceType = "; @@ -15626,14 +15602,14 @@ operator<<(std::ostream &os, os << ", "; } - ur_params::serializePtr(os, (*(params->pphDevices))[i]); + ur_print::printPtr(os, (*(params->pphDevices))[i]); } os << "}"; os << ", "; os << ".pNumDevices = "; - ur_params::serializePtr(os, *(params->ppNumDevices)); + ur_print::printPtr(os, *(params->ppNumDevices)); return os; } @@ -15644,7 +15620,7 @@ operator<<(std::ostream &os, os << ".hDevice = "; - ur_params::serializePtr(os, *(params->phDevice)); + ur_print::printPtr(os, *(params->phDevice)); os << ", "; os << ".propName = "; @@ -15658,13 +15634,13 @@ operator<<(std::ostream &os, os << ", "; os << ".pPropValue = "; - ur_params::serializeTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_params::serializePtr(os, *(params->ppPropSizeRet)); + ur_print::printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -15675,7 +15651,7 @@ operator<<(std::ostream &os, os << ".hDevice = "; - ur_params::serializePtr(os, *(params->phDevice)); + ur_print::printPtr(os, *(params->phDevice)); return os; } @@ -15686,7 +15662,7 @@ operator<<(std::ostream &os, os << ".hDevice = "; - ur_params::serializePtr(os, *(params->phDevice)); + ur_print::printPtr(os, *(params->phDevice)); return os; } @@ -15697,12 +15673,12 @@ operator<<(std::ostream &os, os << ".hDevice = "; - ur_params::serializePtr(os, *(params->phDevice)); + ur_print::printPtr(os, *(params->phDevice)); os << ", "; os << ".pProperties = "; - ur_params::serializePtr(os, *(params->ppProperties)); + ur_print::printPtr(os, *(params->ppProperties)); os << ", "; os << ".NumDevices = "; @@ -15717,14 +15693,14 @@ operator<<(std::ostream &os, os << ", "; } - ur_params::serializePtr(os, (*(params->pphSubDevices))[i]); + ur_print::printPtr(os, (*(params->pphSubDevices))[i]); } os << "}"; os << ", "; os << ".pNumDevicesRet = "; - ur_params::serializePtr(os, *(params->ppNumDevicesRet)); + ur_print::printPtr(os, *(params->ppNumDevicesRet)); return os; } @@ -15735,12 +15711,12 @@ inline std::ostream &operator<<( os << ".hDevice = "; - ur_params::serializePtr(os, *(params->phDevice)); + ur_print::printPtr(os, *(params->phDevice)); os << ", "; os << ".pBinaries = "; - ur_params::serializePtr(os, *(params->ppBinaries)); + ur_print::printPtr(os, *(params->ppBinaries)); os << ", "; os << ".NumBinaries = "; @@ -15750,7 +15726,7 @@ inline std::ostream &operator<<( os << ", "; os << ".pSelectedBinary = "; - ur_params::serializePtr(os, *(params->ppSelectedBinary)); + ur_print::printPtr(os, *(params->ppSelectedBinary)); return os; } @@ -15762,12 +15738,12 @@ operator<<(std::ostream &os, os << ".hDevice = "; - ur_params::serializePtr(os, *(params->phDevice)); + ur_print::printPtr(os, *(params->phDevice)); os << ", "; os << ".phNativeDevice = "; - ur_params::serializePtr(os, *(params->pphNativeDevice)); + ur_print::printPtr(os, *(params->pphNativeDevice)); return os; } @@ -15779,22 +15755,22 @@ inline std::ostream &operator<<( os << ".hNativeDevice = "; - ur_params::serializePtr(os, *(params->phNativeDevice)); + ur_print::printPtr(os, *(params->phNativeDevice)); os << ", "; os << ".hPlatform = "; - ur_params::serializePtr(os, *(params->phPlatform)); + ur_print::printPtr(os, *(params->phPlatform)); os << ", "; os << ".pProperties = "; - ur_params::serializePtr(os, *(params->ppProperties)); + ur_print::printPtr(os, *(params->ppProperties)); os << ", "; os << ".phDevice = "; - ur_params::serializePtr(os, *(params->pphDevice)); + ur_print::printPtr(os, *(params->pphDevice)); return os; } @@ -15806,29 +15782,29 @@ inline std::ostream &operator<<( os << ".hDevice = "; - ur_params::serializePtr(os, *(params->phDevice)); + ur_print::printPtr(os, *(params->phDevice)); os << ", "; os << ".pDeviceTimestamp = "; - ur_params::serializePtr(os, *(params->ppDeviceTimestamp)); + ur_print::printPtr(os, *(params->ppDeviceTimestamp)); os << ", "; os << ".pHostTimestamp = "; - ur_params::serializePtr(os, *(params->ppHostTimestamp)); + ur_print::printPtr(os, *(params->ppHostTimestamp)); return os; } -namespace ur_params { +namespace ur_print { -template inline void serializePtr(std::ostream &os, const T *ptr) { +template inline void 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; @@ -15843,8 +15819,8 @@ template inline void serializePtr(std::ostream &os, const T *ptr) { } } -inline int serializeFunctionParams(std::ostream &os, uint32_t function, - const void *params) { +inline int printFunctionParams(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; @@ -16451,6 +16427,6 @@ inline int serializeFunctionParams(std::ostream &os, uint32_t function, } return 0; } -} // namespace ur_params +} // namespace ur_print -#endif /* UR_PARAMS_HPP */ +#endif /* UR_PRINT_HPP */ diff --git a/test/conformance/testing/include/uur/checks.h b/test/conformance/testing/include/uur/checks.h index 649edfefe0..2ad3925842 100644 --- a/test/conformance/testing/include/uur/checks.h +++ b/test/conformance/testing/include/uur/checks.h @@ -8,7 +8,7 @@ #include #include -#include +#include #include namespace uur { diff --git a/test/loader/loader_lifetime/urLoaderInit.cpp b/test/loader/loader_lifetime/urLoaderInit.cpp index 48060240b8..c2361faf6e 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::printFlag(ss, info.param); return GTestSanitizeString(ss.str()); }); diff --git a/test/loader/platforms/platforms.cpp b/test/loader/platforms/platforms.cpp index 8c8f5d7db5..0e3dd527e8 100644 --- a/test/loader/platforms/platforms.cpp +++ b/test/loader/platforms/platforms.cpp @@ -11,7 +11,7 @@ #include #include -#include +#include #include "ur_api.h" diff --git a/test/unit/utils/params.cpp b/test/unit/utils/params.cpp index d6310f8bbd..41e427ff0d 100644 --- a/test/unit/utils/params.cpp +++ b/test/unit/utils/params.cpp @@ -10,7 +10,7 @@ #include #include "ur_api.h" -#include "ur_params.hpp" +#include "ur_print.hpp" template class ParamsTest : public testing::Test { protected: @@ -405,22 +405,22 @@ typedef Typesparams.get_struct(); EXPECT_THAT(out.str(), MatchesRegex(this->params.get_expected())); } -TEST(SerializePtr, nested_void_ptrs) { +TEST(PrintPtr, nested_void_ptrs) { void *real = (void *)0xFEEDCAFEull; void **preal = ℜ void ***ppreal = &preal; void ****pppreal = &ppreal; std::ostringstream out; - serializePtr(out, pppreal); + printPtr(out, pppreal); EXPECT_THAT(out.str(), MatchesRegex(".+ \\(.+ \\(.+ \\(.+\\)\\)\\)")); } diff --git a/tools/urtrace/collector.cpp b/tools/urtrace/collector.cpp index 2d454afc37..7bf4cda012 100644 --- a/tools/urtrace/collector.cpp +++ b/tools/urtrace/collector.cpp @@ -28,7 +28,7 @@ #include "logger/ur_logger.hpp" #include "ur_api.h" -#include "ur_params.hpp" +#include "ur_print.hpp" #include "ur_util.hpp" #include "xpti/xpti_trace_framework.h" @@ -288,8 +288,6 @@ static std::unique_ptr &writer() { return writer; } -using namespace ur_params; - struct fn_context { uint64_t instance; std::optional start; @@ -333,8 +331,8 @@ XPTI_CALLBACK_API void trace_cb(uint16_t trace_type, xpti::trace_event_data_t *, if (cli_args.no_args) { args_str << "..."; } else { - ur_params::serializeFunctionParams(args_str, args->function_id, - args->args_data); + ur_print::printFunctionParams(args_str, args->function_id, + args->args_data); } if (trace_type == TRACE_FN_BEGIN) { From eed98998d060b8b3f718d7a9c826efe6acc669a7 Mon Sep 17 00:00:00 2001 From: Patryk Kaminski Date: Wed, 6 Sep 2023 10:28:07 +0200 Subject: [PATCH 2/3] Move print operators into the ur_print namespace --- scripts/templates/print.hpp.mako | 30 +- source/common/logger/ur_sinks.hpp | 2 + source/common/ur_print.hpp | 1640 ++++++++++++++--------------- 3 files changed, 799 insertions(+), 873 deletions(-) diff --git a/scripts/templates/print.hpp.mako b/scripts/templates/print.hpp.mako index ddf17dff29..51d33bf684 100644 --- a/scripts/templates/print.hpp.mako +++ b/scripts/templates/print.hpp.mako @@ -27,15 +27,15 @@ from templates import helper as th <%def name="member(iname, itype, loop)"> %if iname == "pNext": - ${x}_print::printStruct(os, ${caller.body()}); + printStruct(os, ${caller.body()}); %elif th.type_traits.is_flags(itype): - ${x}_print::printFlag<${th.type_traits.get_flag_type(itype)}>(os, ${caller.body()}); + printFlag<${th.type_traits.get_flag_type(itype)}>(os, ${caller.body()}); %elif not loop and th.type_traits.is_pointer(itype): - ${x}_print::printPtr(os, ${caller.body()}); + printPtr(os, ${caller.body()}); %elif loop and th.type_traits.is_pointer_to_pointer(itype): - ${x}_print::printPtr(os, ${caller.body()}); + printPtr(os, ${caller.body()}); %elif th.type_traits.is_handle(itype): - ${x}_print::printPtr(os, ${caller.body()}); + printPtr(os, ${caller.body()}); %elif iname and iname.startswith("pfn"): os << reinterpret_cast(${caller.body()}); %else: @@ -83,7 +83,7 @@ def findMemberType(_item): os << "}"; %elif findMemberType(item) is not None and findMemberType(item)['type'] == "union": os << ".${iname} = "; - ${x}_print::printUnion(os, ${deref}(params${access}${item['name']}), params${access}${th.param_traits.tagged_member(item)}); + 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++){ @@ -97,7 +97,7 @@ def findMemberType(_item): os << "}"; %elif typename is not None: os << ".${iname} = "; - ${x}_print::printTagged(os, ${deref}(params${access}${pname}), ${deref}(params${access}${prefix}${typename}), ${deref}(params${access}${prefix}${typename_size})); + printTagged(os, ${deref}(params${access}${pname}), ${deref}(params${access}${prefix}${typename}), ${deref}(params${access}${prefix}${typename_size})); %else: os << ".${iname} = "; <%call expr="member(iname, itype, False)"> @@ -147,7 +147,6 @@ template inline void printTagged(std::ostream &os, const void *ptr, %endif %endfor # obj in spec['objects'] %endfor -} // namespace ${x}_print %for spec in specs: %for obj in spec['objects']: @@ -188,7 +187,6 @@ template inline void printTagged(std::ostream &os, const void *ptr, } %endif %if obj.get('typed_etors', False) is True: - namespace ${x}_print { template <> inline void printTagged(std::ostream &os, const void *ptr, ${th.make_enum_name(n, tags, obj)} value, size_t size) { if (ptr == NULL) { @@ -248,12 +246,11 @@ template inline void printTagged(std::ostream &os, const void *ptr, break; } } - } + %elif "structure_type" in obj['name']: - namespace ${x}_print { inline void printStruct(std::ostream &os, const void *ptr) { if (ptr == NULL) { - ${x}_print::printPtr(os, ptr); + printPtr(os, ptr); return; } @@ -266,7 +263,7 @@ template inline void printTagged(std::ostream &os, const void *ptr, %> case ${ename}: { const ${th.subt(n, tags, item['desc'])} *pstruct = (const ${th.subt(n, tags, item['desc'])} *)ptr; - ${x}_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; %endfor default: @@ -274,10 +271,8 @@ template inline void printTagged(std::ostream &os, const void *ptr, break; } } - } // namespace ${x}_print %endif %if th.type_traits.is_flags(obj['name']): -namespace ${x}_print { template<> inline void printFlag<${th.make_enum_name(n, tags, obj)}>(std::ostream &os, uint32_t flag) { @@ -310,7 +305,6 @@ inline void printFlag<${th.make_enum_name(n, tags, obj)}>(std::ostream &os, uint os << "0"; } } -} // namespace ${x}_print %endif ## STRUCT/UNION ############################################################### %elif re.match(r"struct", obj['type']): @@ -332,7 +326,7 @@ inline std::ostream &operator<<(std::ostream &os, const ${obj['type']} ${th.make } %elif re.match(r"union", obj['type']) and obj['name']: <% tag = findUnionTag(obj) %> -inline void ${x}_print::printUnion( +inline void printUnion( std::ostream &os, const ${obj['type']} ${th.make_type_name(n, tags, obj)} params, const ${tag['type']} ${th.make_type_name(n, tags, tag)} tag @@ -381,8 +375,6 @@ inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct %endfor %endfor -namespace ${x}_print { - template inline void printPtr(std::ostream &os, const T *ptr) { if (ptr == nullptr) { os << "nullptr"; diff --git a/source/common/logger/ur_sinks.hpp b/source/common/logger/ur_sinks.hpp index 66322e98a6..4f3a0b9c80 100644 --- a/source/common/logger/ur_sinks.hpp +++ b/source/common/logger/ur_sinks.hpp @@ -13,8 +13,10 @@ #include "ur_filesystem_resolved.hpp" #include "ur_level.hpp" +#include "ur_print.hpp" namespace logger { +using namespace ur_print; class Sink { public: diff --git a/source/common/ur_print.hpp b/source/common/ur_print.hpp index 0f867dcfa3..a9f0bfb500 100644 --- a/source/common/ur_print.hpp +++ b/source/common/ur_print.hpp @@ -210,8 +210,6 @@ template <> inline void printTagged(std::ostream &os, const void *ptr, ur_exp_peer_info_t value, size_t size); -} // namespace ur_print - 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); @@ -1384,10 +1382,9 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_print { inline void printStruct(std::ostream &os, const void *ptr) { if (ptr == NULL) { - ur_print::printPtr(os, ptr); + printPtr(os, ptr); return; } @@ -1398,252 +1395,251 @@ inline void printStruct(std::ostream &os, const void *ptr) { case UR_STRUCTURE_TYPE_CONTEXT_PROPERTIES: { const ur_context_properties_t *pstruct = (const ur_context_properties_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_IMAGE_DESC: { const ur_image_desc_t *pstruct = (const ur_image_desc_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_BUFFER_PROPERTIES: { const ur_buffer_properties_t *pstruct = (const ur_buffer_properties_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_BUFFER_REGION: { const ur_buffer_region_t *pstruct = (const ur_buffer_region_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_BUFFER_CHANNEL_PROPERTIES: { const ur_buffer_channel_properties_t *pstruct = (const ur_buffer_channel_properties_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_BUFFER_ALLOC_LOCATION_PROPERTIES: { const ur_buffer_alloc_location_properties_t *pstruct = (const ur_buffer_alloc_location_properties_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_PROGRAM_PROPERTIES: { const ur_program_properties_t *pstruct = (const ur_program_properties_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_USM_DESC: { const ur_usm_desc_t *pstruct = (const ur_usm_desc_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_USM_HOST_DESC: { const ur_usm_host_desc_t *pstruct = (const ur_usm_host_desc_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_USM_DEVICE_DESC: { const ur_usm_device_desc_t *pstruct = (const ur_usm_device_desc_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_USM_POOL_DESC: { const ur_usm_pool_desc_t *pstruct = (const ur_usm_pool_desc_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_USM_POOL_LIMITS_DESC: { const ur_usm_pool_limits_desc_t *pstruct = (const ur_usm_pool_limits_desc_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_DEVICE_BINARY: { const ur_device_binary_t *pstruct = (const ur_device_binary_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_SAMPLER_DESC: { const ur_sampler_desc_t *pstruct = (const ur_sampler_desc_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_QUEUE_PROPERTIES: { const ur_queue_properties_t *pstruct = (const ur_queue_properties_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_QUEUE_INDEX_PROPERTIES: { const ur_queue_index_properties_t *pstruct = (const ur_queue_index_properties_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_CONTEXT_NATIVE_PROPERTIES: { const ur_context_native_properties_t *pstruct = (const ur_context_native_properties_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_KERNEL_NATIVE_PROPERTIES: { const ur_kernel_native_properties_t *pstruct = (const ur_kernel_native_properties_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_QUEUE_NATIVE_PROPERTIES: { const ur_queue_native_properties_t *pstruct = (const ur_queue_native_properties_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_MEM_NATIVE_PROPERTIES: { const ur_mem_native_properties_t *pstruct = (const ur_mem_native_properties_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_EVENT_NATIVE_PROPERTIES: { const ur_event_native_properties_t *pstruct = (const ur_event_native_properties_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_PLATFORM_NATIVE_PROPERTIES: { const ur_platform_native_properties_t *pstruct = (const ur_platform_native_properties_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_DEVICE_NATIVE_PROPERTIES: { const ur_device_native_properties_t *pstruct = (const ur_device_native_properties_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_PROGRAM_NATIVE_PROPERTIES: { const ur_program_native_properties_t *pstruct = (const ur_program_native_properties_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_SAMPLER_NATIVE_PROPERTIES: { const ur_sampler_native_properties_t *pstruct = (const ur_sampler_native_properties_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_QUEUE_NATIVE_DESC: { const ur_queue_native_desc_t *pstruct = (const ur_queue_native_desc_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_DEVICE_PARTITION_PROPERTIES: { const ur_device_partition_properties_t *pstruct = (const ur_device_partition_properties_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_KERNEL_ARG_MEM_OBJ_PROPERTIES: { const ur_kernel_arg_mem_obj_properties_t *pstruct = (const ur_kernel_arg_mem_obj_properties_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_PHYSICAL_MEM_PROPERTIES: { const ur_physical_mem_properties_t *pstruct = (const ur_physical_mem_properties_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_KERNEL_ARG_POINTER_PROPERTIES: { const ur_kernel_arg_pointer_properties_t *pstruct = (const ur_kernel_arg_pointer_properties_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_KERNEL_ARG_SAMPLER_PROPERTIES: { const ur_kernel_arg_sampler_properties_t *pstruct = (const ur_kernel_arg_sampler_properties_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_KERNEL_EXEC_INFO_PROPERTIES: { const ur_kernel_exec_info_properties_t *pstruct = (const ur_kernel_exec_info_properties_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_KERNEL_ARG_VALUE_PROPERTIES: { const ur_kernel_arg_value_properties_t *pstruct = (const ur_kernel_arg_value_properties_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_KERNEL_ARG_LOCAL_PROPERTIES: { const ur_kernel_arg_local_properties_t *pstruct = (const ur_kernel_arg_local_properties_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_DESC: { const ur_exp_command_buffer_desc_t *pstruct = (const ur_exp_command_buffer_desc_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_EXP_SAMPLER_MIP_PROPERTIES: { const ur_exp_sampler_mip_properties_t *pstruct = (const ur_exp_sampler_mip_properties_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_EXP_INTEROP_MEM_DESC: { const ur_exp_interop_mem_desc_t *pstruct = (const ur_exp_interop_mem_desc_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_EXP_INTEROP_SEMAPHORE_DESC: { const ur_exp_interop_semaphore_desc_t *pstruct = (const ur_exp_interop_semaphore_desc_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_EXP_FILE_DESCRIPTOR: { const ur_exp_file_descriptor_t *pstruct = (const ur_exp_file_descriptor_t *)ptr; - ur_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_EXP_WIN32_HANDLE: { const ur_exp_win32_handle_t *pstruct = (const ur_exp_win32_handle_t *)ptr; - ur_print::printPtr(os, pstruct); + 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_print::printPtr(os, pstruct); + printPtr(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_print::printPtr(os, pstruct); + printPtr(os, pstruct); } break; default: os << "unknown enumerator"; break; } } -} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_result_t value) { switch (value) { @@ -1955,7 +1951,7 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << "}"; return os; @@ -1971,7 +1967,7 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << "}"; return os; @@ -2047,7 +2043,6 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_print { template <> inline void printFlag(std::ostream &os, uint32_t flag) { @@ -2114,7 +2109,6 @@ inline void printFlag(std::ostream &os, uint32_t flag) { os << "0"; } } -} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_loader_config_info_t value) { switch (value) { @@ -2132,7 +2126,6 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_print { template <> inline void printTagged(std::ostream &os, const void *ptr, ur_loader_config_info_t value, size_t size) { @@ -2167,7 +2160,7 @@ inline void printTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_print + inline std::ostream &operator<<(std::ostream &os, const struct ur_code_location_t params) { os << "(struct ur_code_location_t){"; @@ -2211,7 +2204,6 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_print { template <> inline void printTagged(std::ostream &os, const void *ptr, ur_adapter_info_t value, size_t size) { @@ -2254,7 +2246,7 @@ inline void printTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_print + inline std::ostream &operator<<(std::ostream &os, enum ur_adapter_backend_t value) { switch (value) { @@ -2321,7 +2313,6 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_print { template <> inline void printTagged(std::ostream &os, const void *ptr, ur_platform_info_t value, size_t size) { @@ -2380,7 +2371,7 @@ inline void printTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_print + inline std::ostream &operator<<(std::ostream &os, enum ur_api_version_t value) { os << UR_MAJOR_VERSION(value) << "." << UR_MINOR_VERSION(value); return os; @@ -2397,7 +2388,7 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << ", "; os << ".isNativeHandleOwned = "; @@ -2451,12 +2442,12 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << ", "; os << ".pDeviceTargetSpec = "; - ur_print::printPtr(os, (params.pDeviceTargetSpec)); + printPtr(os, (params.pDeviceTargetSpec)); os << "}"; return os; @@ -3033,7 +3024,6 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_device_info_t value) { } return os; } -namespace ur_print { template <> inline void printTagged(std::ostream &os, const void *ptr, ur_device_info_t value, size_t size) { @@ -3154,7 +3144,7 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_print::printFlag(os, *tptr); + printFlag(os, *tptr); os << ")"; } break; @@ -3170,7 +3160,7 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_print::printFlag(os, *tptr); + printFlag(os, *tptr); os << ")"; } break; @@ -3186,7 +3176,7 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_print::printFlag(os, *tptr); + printFlag(os, *tptr); os << ")"; } break; @@ -3200,7 +3190,7 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_print::printFlag(os, *tptr); + printFlag(os, *tptr); os << ")"; } break; @@ -3890,7 +3880,7 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_print::printFlag(os, *tptr); + printFlag(os, *tptr); os << ")"; } break; @@ -3904,7 +3894,7 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_print::printFlag(os, *tptr); + printFlag(os, *tptr); os << ")"; } break; @@ -3918,7 +3908,7 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_print::printFlag(os, *tptr); + printFlag(os, *tptr); os << ")"; } break; @@ -3938,7 +3928,7 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_print::printPtr(os, *tptr); + printPtr(os, *tptr); os << ")"; } break; @@ -4042,7 +4032,7 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_print::printPtr(os, *tptr); + printPtr(os, *tptr); os << ")"; } break; @@ -4087,7 +4077,7 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_print::printFlag(os, *tptr); + printFlag(os, *tptr); os << ")"; } break; @@ -4161,7 +4151,7 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_print::printFlag(os, *tptr); + printFlag(os, *tptr); os << ")"; } break; @@ -4176,7 +4166,7 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_print::printFlag(os, *tptr); + printFlag(os, *tptr); os << ")"; } break; @@ -4191,7 +4181,7 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_print::printFlag(os, *tptr); + printFlag(os, *tptr); os << ")"; } break; @@ -4206,7 +4196,7 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_print::printFlag(os, *tptr); + printFlag(os, *tptr); os << ")"; } break; @@ -4221,7 +4211,7 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_print::printFlag(os, *tptr); + printFlag(os, *tptr); os << ")"; } break; @@ -4389,7 +4379,7 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_print::printFlag(os, *tptr); + printFlag(os, *tptr); os << ")"; } break; @@ -4405,7 +4395,7 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_print::printFlag(os, *tptr); + printFlag(os, *tptr); os << ")"; } break; @@ -4421,7 +4411,7 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_print::printFlag(os, *tptr); + printFlag(os, *tptr); os << ")"; } break; @@ -4437,7 +4427,7 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_print::printFlag(os, *tptr); + printFlag(os, *tptr); os << ")"; } break; @@ -4839,7 +4829,7 @@ inline void printTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_print + inline std::ostream &operator<<(std::ostream &os, enum ur_device_affinity_domain_flag_t value) { switch (value) { @@ -4873,7 +4863,6 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_print { template <> inline void printFlag(std::ostream &os, @@ -4956,7 +4945,6 @@ inline void printFlag(std::ostream &os, os << "0"; } } -} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_device_partition_t value) { switch (value) { @@ -4983,9 +4971,9 @@ inline std::ostream &operator<<(std::ostream &os, return os; } -inline void ur_print::printUnion(std::ostream &os, - const union ur_device_partition_value_t params, - const enum ur_device_partition_t tag) { +inline void printUnion(std::ostream &os, + const union ur_device_partition_value_t params, + const enum ur_device_partition_t tag) { os << "(union ur_device_partition_value_t){"; switch (tag) { @@ -5007,8 +4995,8 @@ inline void ur_print::printUnion(std::ostream &os, os << ".affinity_domain = "; - ur_print::printFlag( - os, (params.affinity_domain)); + printFlag(os, + (params.affinity_domain)); break; default: @@ -5028,7 +5016,7 @@ operator<<(std::ostream &os, os << ", "; os << ".value = "; - ur_print::printUnion(os, (params.value), params.type); + printUnion(os, (params.value), params.type); os << "}"; return os; @@ -5045,12 +5033,12 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << ", "; os << ".pProperties = "; - ur_print::printPtr(os, (params.pProperties)); + printPtr(os, (params.pProperties)); os << ", "; os << ".PropCount = "; @@ -5101,7 +5089,6 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_print { template <> inline void printFlag(std::ostream &os, @@ -5207,7 +5194,6 @@ inline void printFlag(std::ostream &os, os << "0"; } } -} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_device_mem_cache_type_t value) { switch (value) { @@ -5267,7 +5253,6 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_print { template <> inline void printFlag(std::ostream &os, @@ -5306,7 +5291,6 @@ inline void printFlag(std::ostream &os, os << "0"; } } -} // namespace ur_print inline std::ostream & operator<<(std::ostream &os, const struct ur_device_native_properties_t params) { @@ -5319,7 +5303,7 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << ", "; os << ".isNativeHandleOwned = "; @@ -5358,7 +5342,6 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_print { template <> inline void printFlag(std::ostream &os, @@ -5430,7 +5413,6 @@ inline void printFlag(std::ostream &os, os << "0"; } } -} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_memory_scope_capability_flag_t value) { switch (value) { @@ -5460,7 +5442,6 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_print { template <> inline void printFlag(std::ostream &os, @@ -5532,7 +5513,6 @@ inline void printFlag(std::ostream &os, os << "0"; } } -} // namespace ur_print inline std::ostream & operator<<(std::ostream &os, enum ur_device_usm_access_capability_flag_t value) { @@ -5559,7 +5539,6 @@ operator<<(std::ostream &os, } return os; } -namespace ur_print { template <> inline void printFlag(std::ostream &os, @@ -5622,7 +5601,6 @@ inline void printFlag(std::ostream &os, os << "0"; } } -} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_context_flag_t value) { switch (value) { @@ -5636,7 +5614,6 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_print { template <> inline void printFlag(std::ostream &os, uint32_t flag) { @@ -5662,7 +5639,6 @@ inline void printFlag(std::ostream &os, uint32_t flag) { os << "0"; } } -} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, const struct ur_context_properties_t params) { os << "(struct ur_context_properties_t){"; @@ -5674,12 +5650,12 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << ", "; os << ".flags = "; - ur_print::printFlag(os, (params.flags)); + printFlag(os, (params.flags)); os << "}"; return os; @@ -5729,7 +5705,6 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_print { template <> inline void printTagged(std::ostream &os, const void *ptr, ur_context_info_t value, size_t size) { @@ -5764,7 +5739,7 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ", "; } - ur_print::printPtr(os, tptr[i]); + printPtr(os, tptr[i]); } os << "}"; } break; @@ -5822,7 +5797,7 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_print::printFlag(os, *tptr); + printFlag(os, *tptr); os << ")"; } break; @@ -5838,7 +5813,7 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_print::printFlag(os, *tptr); + printFlag(os, *tptr); os << ")"; } break; @@ -5854,7 +5829,7 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_print::printFlag(os, *tptr); + printFlag(os, *tptr); os << ")"; } break; @@ -5870,7 +5845,7 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_print::printFlag(os, *tptr); + printFlag(os, *tptr); os << ")"; } break; @@ -5879,7 +5854,7 @@ inline void printTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_print + inline std::ostream & operator<<(std::ostream &os, const struct ur_context_native_properties_t params) { @@ -5892,7 +5867,7 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << ", "; os << ".isNativeHandleOwned = "; @@ -5934,7 +5909,6 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_mem_flag_t value) { } return os; } -namespace ur_print { template <> inline void printFlag(std::ostream &os, uint32_t flag) { @@ -6013,7 +5987,6 @@ inline void printFlag(std::ostream &os, uint32_t flag) { os << "0"; } } -} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_mem_type_t value) { switch (value) { @@ -6066,7 +6039,6 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_mem_info_t value) { } return os; } -namespace ur_print { template <> inline void printTagged(std::ostream &os, const void *ptr, ur_mem_info_t value, size_t size) { @@ -6100,7 +6072,7 @@ inline void printTagged(std::ostream &os, const void *ptr, ur_mem_info_t value, } os << (const void *)(tptr) << " ("; - ur_print::printPtr(os, *tptr); + printPtr(os, *tptr); os << ")"; } break; @@ -6109,7 +6081,7 @@ inline void printTagged(std::ostream &os, const void *ptr, ur_mem_info_t value, break; } } -} // namespace ur_print + inline std::ostream &operator<<(std::ostream &os, enum ur_image_channel_order_t value) { switch (value) { @@ -6284,7 +6256,6 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_image_info_t value) { } return os; } -namespace ur_print { template <> inline void printTagged(std::ostream &os, const void *ptr, ur_image_info_t value, size_t size) { @@ -6397,7 +6368,7 @@ inline void printTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_print + inline std::ostream &operator<<(std::ostream &os, const struct ur_image_format_t params) { os << "(struct ur_image_format_t){"; @@ -6425,7 +6396,7 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << ", "; os << ".type = "; @@ -6486,12 +6457,12 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << ", "; os << ".pHost = "; - ur_print::printPtr(os, (params.pHost)); + printPtr(os, (params.pHost)); os << "}"; return os; @@ -6508,7 +6479,7 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << ", "; os << ".channel = "; @@ -6530,7 +6501,7 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << ", "; os << ".location = "; @@ -6551,7 +6522,7 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << ", "; os << ".origin = "; @@ -6590,7 +6561,7 @@ operator<<(std::ostream &os, const struct ur_mem_native_properties_t params) { os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << ", "; os << ".isNativeHandleOwned = "; @@ -6675,7 +6646,6 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_print { template <> inline void printTagged(std::ostream &os, const void *ptr, ur_sampler_info_t value, size_t size) { @@ -6709,7 +6679,7 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_print::printPtr(os, *tptr); + printPtr(os, *tptr); os << ")"; } break; @@ -6763,7 +6733,7 @@ inline void printTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_print + inline std::ostream &operator<<(std::ostream &os, const struct ur_sampler_desc_t params) { os << "(struct ur_sampler_desc_t){"; @@ -6775,7 +6745,7 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << ", "; os << ".normalizedCoords = "; @@ -6807,7 +6777,7 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << ", "; os << ".isNativeHandleOwned = "; @@ -6830,7 +6800,6 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_print { template <> inline void printFlag(std::ostream &os, uint32_t flag) { @@ -6857,7 +6826,6 @@ inline void printFlag(std::ostream &os, uint32_t flag) { os << "0"; } } -} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_usm_device_mem_flag_t value) { switch (value) { @@ -6879,7 +6847,6 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_print { template <> inline void printFlag(std::ostream &os, @@ -6929,7 +6896,6 @@ inline void printFlag(std::ostream &os, os << "0"; } } -} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_usm_pool_flag_t value) { switch (value) { @@ -6943,7 +6909,6 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_print { template <> inline void printFlag(std::ostream &os, uint32_t flag) { @@ -6970,7 +6935,6 @@ inline void printFlag(std::ostream &os, uint32_t flag) { os << "0"; } } -} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_usm_type_t value) { switch (value) { @@ -7024,7 +6988,6 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_print { template <> inline void printTagged(std::ostream &os, const void *ptr, ur_usm_alloc_info_t value, size_t size) { @@ -7086,7 +7049,7 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_print::printPtr(os, *tptr); + printPtr(os, *tptr); os << ")"; } break; @@ -7100,7 +7063,7 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_print::printPtr(os, *tptr); + printPtr(os, *tptr); os << ")"; } break; @@ -7109,7 +7072,7 @@ inline void printTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_print + inline std::ostream &operator<<(std::ostream &os, enum ur_usm_advice_flag_t value) { switch (value) { @@ -7179,7 +7142,6 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_print { template <> inline void printFlag(std::ostream &os, uint32_t flag) { @@ -7360,7 +7322,6 @@ inline void printFlag(std::ostream &os, uint32_t flag) { os << "0"; } } -} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, const struct ur_usm_desc_t params) { os << "(struct ur_usm_desc_t){"; @@ -7372,12 +7333,12 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << ", "; os << ".hints = "; - ur_print::printFlag(os, (params.hints)); + printFlag(os, (params.hints)); os << ", "; os << ".align = "; @@ -7398,12 +7359,12 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << ", "; os << ".flags = "; - ur_print::printFlag(os, (params.flags)); + printFlag(os, (params.flags)); os << "}"; return os; @@ -7419,12 +7380,12 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << ", "; os << ".flags = "; - ur_print::printFlag(os, (params.flags)); + printFlag(os, (params.flags)); os << "}"; return os; @@ -7440,12 +7401,12 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << ", "; os << ".flags = "; - ur_print::printFlag(os, (params.flags)); + printFlag(os, (params.flags)); os << "}"; return os; @@ -7461,7 +7422,7 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << ", "; os << ".maxPoolableSize = "; @@ -7493,7 +7454,6 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_print { template <> inline void printTagged(std::ostream &os, const void *ptr, ur_usm_pool_info_t value, size_t size) { @@ -7527,7 +7487,7 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_print::printPtr(os, *tptr); + printPtr(os, *tptr); os << ")"; } break; @@ -7536,7 +7496,7 @@ inline void printTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_print + inline std::ostream &operator<<(std::ostream &os, enum ur_virtual_mem_granularity_info_t value) { switch (value) { @@ -7554,7 +7514,6 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_print { template <> inline void printTagged(std::ostream &os, const void *ptr, ur_virtual_mem_granularity_info_t value, size_t size) { @@ -7597,7 +7556,7 @@ inline void printTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_print + inline std::ostream &operator<<(std::ostream &os, enum ur_virtual_mem_access_flag_t value) { switch (value) { @@ -7619,7 +7578,6 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_print { template <> inline void printFlag(std::ostream &os, @@ -7669,7 +7627,6 @@ inline void printFlag(std::ostream &os, os << "0"; } } -} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_virtual_mem_info_t value) { switch (value) { @@ -7683,7 +7640,6 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_print { template <> inline void printTagged(std::ostream &os, const void *ptr, ur_virtual_mem_info_t value, size_t size) { @@ -7705,7 +7661,7 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_print::printFlag(os, *tptr); + printFlag(os, *tptr); os << ")"; } break; @@ -7714,7 +7670,7 @@ inline void printTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_print + inline std::ostream &operator<<(std::ostream &os, enum ur_physical_mem_flag_t value) { switch (value) { @@ -7728,7 +7684,6 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_print { template <> inline void printFlag(std::ostream &os, uint32_t flag) { @@ -7755,7 +7710,6 @@ inline void printFlag(std::ostream &os, uint32_t flag) { os << "0"; } } -} // namespace ur_print inline std::ostream & operator<<(std::ostream &os, const struct ur_physical_mem_properties_t params) { os << "(struct ur_physical_mem_properties_t){"; @@ -7767,12 +7721,12 @@ operator<<(std::ostream &os, const struct ur_physical_mem_properties_t params) { os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << ", "; os << ".flags = "; - ur_print::printFlag(os, (params.flags)); + printFlag(os, (params.flags)); os << "}"; return os; @@ -7803,9 +7757,9 @@ inline std::ostream &operator<<(std::ostream &os, return os; } -inline void ur_print::printUnion(std::ostream &os, - const union ur_program_metadata_value_t params, - const enum ur_program_metadata_type_t tag) { +inline void printUnion(std::ostream &os, + const union ur_program_metadata_value_t params, + const enum ur_program_metadata_type_t tag) { os << "(union ur_program_metadata_value_t){"; switch (tag) { @@ -7827,14 +7781,14 @@ inline void ur_print::printUnion(std::ostream &os, os << ".pString = "; - ur_print::printPtr(os, (params.pString)); + printPtr(os, (params.pString)); break; case UR_PROGRAM_METADATA_TYPE_BYTE_ARRAY: os << ".pData = "; - ur_print::printPtr(os, (params.pData)); + printPtr(os, (params.pData)); break; default: @@ -7849,7 +7803,7 @@ inline std::ostream &operator<<(std::ostream &os, os << ".pName = "; - ur_print::printPtr(os, (params.pName)); + printPtr(os, (params.pName)); os << ", "; os << ".type = "; @@ -7863,7 +7817,7 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".value = "; - ur_print::printUnion(os, (params.value), params.type); + printUnion(os, (params.value), params.type); os << "}"; return os; @@ -7879,7 +7833,7 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << ", "; os << ".count = "; @@ -7945,7 +7899,6 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_print { template <> inline void printTagged(std::ostream &os, const void *ptr, ur_program_info_t value, size_t size) { @@ -7979,7 +7932,7 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_print::printPtr(os, *tptr); + printPtr(os, *tptr); os << ")"; } break; @@ -8008,7 +7961,7 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ", "; } - ur_print::printPtr(os, tptr[i]); + printPtr(os, tptr[i]); } os << "}"; } break; @@ -8064,7 +8017,7 @@ inline void printTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_print + inline std::ostream &operator<<(std::ostream &os, enum ur_program_build_status_t value) { switch (value) { @@ -8140,7 +8093,6 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_print { template <> inline void printTagged(std::ostream &os, const void *ptr, ur_program_build_info_t value, size_t size) { @@ -8197,7 +8149,7 @@ inline void printTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_print + inline std::ostream & operator<<(std::ostream &os, const struct ur_specialization_constant_info_t params) { @@ -8215,7 +8167,7 @@ operator<<(std::ostream &os, os << ", "; os << ".pValue = "; - ur_print::printPtr(os, (params.pValue)); + printPtr(os, (params.pValue)); os << "}"; return os; @@ -8232,7 +8184,7 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << ", "; os << ".isNativeHandleOwned = "; @@ -8254,7 +8206,7 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << "}"; return os; @@ -8271,7 +8223,7 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << "}"; return os; @@ -8312,7 +8264,6 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_kernel_info_t value) { } return os; } -namespace ur_print { template <> inline void printTagged(std::ostream &os, const void *ptr, ur_kernel_info_t value, size_t size) { @@ -8366,7 +8317,7 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_print::printPtr(os, *tptr); + printPtr(os, *tptr); os << ")"; } break; @@ -8380,7 +8331,7 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_print::printPtr(os, *tptr); + printPtr(os, *tptr); os << ")"; } break; @@ -8409,7 +8360,7 @@ inline void printTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_print + inline std::ostream &operator<<(std::ostream &os, enum ur_kernel_group_info_t value) { switch (value) { @@ -8443,7 +8394,6 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_print { template <> inline void printTagged(std::ostream &os, const void *ptr, ur_kernel_group_info_t value, size_t size) { @@ -8544,7 +8494,7 @@ inline void printTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_print + inline std::ostream &operator<<(std::ostream &os, enum ur_kernel_sub_group_info_t value) { switch (value) { @@ -8570,7 +8520,6 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_print { template <> inline void printTagged(std::ostream &os, const void *ptr, ur_kernel_sub_group_info_t value, size_t size) { @@ -8641,7 +8590,7 @@ inline void printTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_print + inline std::ostream &operator<<(std::ostream &os, enum ur_kernel_cache_config_t value) { switch (value) { @@ -8684,7 +8633,6 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_print { template <> inline void printTagged(std::ostream &os, const void *ptr, ur_kernel_exec_info_t value, size_t size) { @@ -8743,7 +8691,7 @@ inline void printTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_print + inline std::ostream & operator<<(std::ostream &os, const struct ur_kernel_arg_pointer_properties_t params) { @@ -8756,7 +8704,7 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << "}"; return os; @@ -8773,7 +8721,7 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << "}"; return os; @@ -8790,7 +8738,7 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << "}"; return os; @@ -8807,12 +8755,12 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << ", "; os << ".memoryAccess = "; - ur_print::printFlag(os, (params.memoryAccess)); + printFlag(os, (params.memoryAccess)); os << "}"; return os; @@ -8829,7 +8777,7 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << ", "; os << ".isNativeHandleOwned = "; @@ -8875,7 +8823,6 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_queue_info_t value) { } return os; } -namespace ur_print { template <> inline void printTagged(std::ostream &os, const void *ptr, ur_queue_info_t value, size_t size) { @@ -8895,7 +8842,7 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_print::printPtr(os, *tptr); + printPtr(os, *tptr); os << ")"; } break; @@ -8909,7 +8856,7 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_print::printPtr(os, *tptr); + printPtr(os, *tptr); os << ")"; } break; @@ -8923,7 +8870,7 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_print::printPtr(os, *tptr); + printPtr(os, *tptr); os << ")"; } break; @@ -8937,7 +8884,7 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_print::printFlag(os, *tptr); + printFlag(os, *tptr); os << ")"; } break; @@ -8988,7 +8935,7 @@ inline void printTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_print + inline std::ostream &operator<<(std::ostream &os, enum ur_queue_flag_t value) { switch (value) { @@ -9041,7 +8988,6 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_queue_flag_t value) { } return os; } -namespace ur_print { template <> inline void printFlag(std::ostream &os, uint32_t flag) { @@ -9177,7 +9123,6 @@ inline void printFlag(std::ostream &os, uint32_t flag) { os << "0"; } } -} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, const struct ur_queue_properties_t params) { os << "(struct ur_queue_properties_t){"; @@ -9189,12 +9134,12 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << ", "; os << ".flags = "; - ur_print::printFlag(os, (params.flags)); + printFlag(os, (params.flags)); os << "}"; return os; @@ -9210,7 +9155,7 @@ operator<<(std::ostream &os, const struct ur_queue_index_properties_t params) { os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << ", "; os << ".computeIndex = "; @@ -9231,12 +9176,12 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << ", "; os << ".pNativeData = "; - ur_print::printPtr(os, (params.pNativeData)); + printPtr(os, (params.pNativeData)); os << "}"; return os; @@ -9252,7 +9197,7 @@ operator<<(std::ostream &os, const struct ur_queue_native_properties_t params) { os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << ", "; os << ".isNativeHandleOwned = "; @@ -9435,7 +9380,6 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_event_info_t value) { } return os; } -namespace ur_print { template <> inline void printTagged(std::ostream &os, const void *ptr, ur_event_info_t value, size_t size) { @@ -9455,7 +9399,7 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_print::printPtr(os, *tptr); + printPtr(os, *tptr); os << ")"; } break; @@ -9469,7 +9413,7 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << (const void *)(tptr) << " ("; - ur_print::printPtr(os, *tptr); + printPtr(os, *tptr); os << ")"; } break; @@ -9520,7 +9464,7 @@ inline void printTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_print + inline std::ostream &operator<<(std::ostream &os, enum ur_profiling_info_t value) { switch (value) { @@ -9550,7 +9494,6 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_print { template <> inline void printTagged(std::ostream &os, const void *ptr, ur_profiling_info_t value, size_t size) { @@ -9635,7 +9578,7 @@ inline void printTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_print + inline std::ostream & operator<<(std::ostream &os, const struct ur_event_native_properties_t params) { os << "(struct ur_event_native_properties_t){"; @@ -9647,7 +9590,7 @@ operator<<(std::ostream &os, const struct ur_event_native_properties_t params) { os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << ", "; os << ".isNativeHandleOwned = "; @@ -9702,7 +9645,6 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_map_flag_t value) { } return os; } -namespace ur_print { template <> inline void printFlag(std::ostream &os, uint32_t flag) { @@ -9749,7 +9691,6 @@ inline void printFlag(std::ostream &os, uint32_t flag) { os << "0"; } } -} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_usm_migration_flag_t value) { switch (value) { @@ -9763,7 +9704,6 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_print { template <> inline void printFlag(std::ostream &os, @@ -9791,7 +9731,6 @@ inline void printFlag(std::ostream &os, os << "0"; } } -} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, enum ur_exp_image_copy_flag_t value) { switch (value) { @@ -9813,7 +9752,6 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_print { template <> inline void printFlag(std::ostream &os, @@ -9863,7 +9801,6 @@ inline void printFlag(std::ostream &os, os << "0"; } } -} // namespace ur_print inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_file_descriptor_t params) { os << "(struct ur_exp_file_descriptor_t){"; @@ -9875,7 +9812,7 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << ", "; os << ".fd = "; @@ -9896,12 +9833,12 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << ", "; os << ".handle = "; - ur_print::printPtr(os, (params.handle)); + printPtr(os, (params.handle)); os << "}"; return os; @@ -9918,7 +9855,7 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << ", "; os << ".minMipmapLevelClamp = "; @@ -9954,7 +9891,7 @@ operator<<(std::ostream &os, const struct ur_exp_sampler_addr_modes_t params) { os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << ", "; os << ".addrModes = {"; @@ -9981,7 +9918,7 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << "}"; return os; @@ -9998,7 +9935,7 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << "}"; return os; @@ -10015,7 +9952,7 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << ", "; os << ".numLayers = "; @@ -10036,7 +9973,7 @@ operator<<(std::ostream &os, const struct ur_exp_command_buffer_desc_t params) { os << ", "; os << ".pNext = "; - ur_print::printStruct(os, (params.pNext)); + printStruct(os, (params.pNext)); os << "}"; return os; @@ -10058,7 +9995,6 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -namespace ur_print { template <> inline void printTagged(std::ostream &os, const void *ptr, ur_exp_peer_info_t value, size_t size) { @@ -10101,7 +10037,6 @@ inline void printTagged(std::ostream &os, const void *ptr, break; } } -} // namespace ur_print inline std::ostream & operator<<(std::ostream &os, @@ -10119,14 +10054,14 @@ operator<<(std::ostream &os, os << ", "; } - ur_print::printPtr(os, (*(params->pphAdapters))[i]); + printPtr(os, (*(params->pphAdapters))[i]); } os << "}"; os << ", "; os << ".pNumAdapters = "; - ur_print::printPtr(os, *(params->ppNumAdapters)); + printPtr(os, *(params->ppNumAdapters)); return os; } @@ -10137,7 +10072,7 @@ operator<<(std::ostream &os, os << ".hAdapter = "; - ur_print::printPtr(os, *(params->phAdapter)); + printPtr(os, *(params->phAdapter)); return os; } @@ -10148,7 +10083,7 @@ operator<<(std::ostream &os, os << ".hAdapter = "; - ur_print::printPtr(os, *(params->phAdapter)); + printPtr(os, *(params->phAdapter)); return os; } @@ -10159,17 +10094,17 @@ inline std::ostream &operator<<( os << ".hAdapter = "; - ur_print::printPtr(os, *(params->phAdapter)); + printPtr(os, *(params->phAdapter)); os << ", "; os << ".ppMessage = "; - ur_print::printPtr(os, *(params->pppMessage)); + printPtr(os, *(params->pppMessage)); os << ", "; os << ".pError = "; - ur_print::printPtr(os, *(params->ppError)); + printPtr(os, *(params->ppError)); return os; } @@ -10180,7 +10115,7 @@ operator<<(std::ostream &os, os << ".hAdapter = "; - ur_print::printPtr(os, *(params->phAdapter)); + printPtr(os, *(params->phAdapter)); os << ", "; os << ".propName = "; @@ -10194,13 +10129,13 @@ operator<<(std::ostream &os, os << ", "; os << ".pPropValue = "; - ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_print::printPtr(os, *(params->ppPropSizeRet)); + printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -10211,17 +10146,17 @@ inline std::ostream &operator<<( os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_print::printPtr(os, *(params->phDevice)); + printPtr(os, *(params->phDevice)); os << ", "; os << ".hImage = "; - ur_print::printPtr(os, *(params->phImage)); + printPtr(os, *(params->phImage)); return os; } @@ -10232,17 +10167,17 @@ inline std::ostream &operator<<( os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_print::printPtr(os, *(params->phDevice)); + printPtr(os, *(params->phDevice)); os << ", "; os << ".hImage = "; - ur_print::printPtr(os, *(params->phImage)); + printPtr(os, *(params->phImage)); return os; } @@ -10254,27 +10189,27 @@ inline std::ostream &operator<<( os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_print::printPtr(os, *(params->phDevice)); + printPtr(os, *(params->phDevice)); os << ", "; os << ".pImageFormat = "; - ur_print::printPtr(os, *(params->ppImageFormat)); + printPtr(os, *(params->ppImageFormat)); os << ", "; os << ".pImageDesc = "; - ur_print::printPtr(os, *(params->ppImageDesc)); + printPtr(os, *(params->ppImageDesc)); os << ", "; os << ".phImageMem = "; - ur_print::printPtr(os, *(params->pphImageMem)); + printPtr(os, *(params->pphImageMem)); return os; } @@ -10286,17 +10221,17 @@ inline std::ostream &operator<<( os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_print::printPtr(os, *(params->phDevice)); + printPtr(os, *(params->phDevice)); os << ", "; os << ".hImageMem = "; - ur_print::printPtr(os, *(params->phImageMem)); + printPtr(os, *(params->phImageMem)); return os; } @@ -10307,37 +10242,37 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_print::printPtr(os, *(params->phDevice)); + printPtr(os, *(params->phDevice)); os << ", "; os << ".hImageMem = "; - ur_print::printPtr(os, *(params->phImageMem)); + printPtr(os, *(params->phImageMem)); os << ", "; os << ".pImageFormat = "; - ur_print::printPtr(os, *(params->ppImageFormat)); + printPtr(os, *(params->ppImageFormat)); os << ", "; os << ".pImageDesc = "; - ur_print::printPtr(os, *(params->ppImageDesc)); + printPtr(os, *(params->ppImageDesc)); os << ", "; os << ".phMem = "; - ur_print::printPtr(os, *(params->pphMem)); + printPtr(os, *(params->pphMem)); os << ", "; os << ".phImage = "; - ur_print::printPtr(os, *(params->pphImage)); + printPtr(os, *(params->pphImage)); return os; } @@ -10348,42 +10283,42 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_print::printPtr(os, *(params->phDevice)); + printPtr(os, *(params->phDevice)); os << ", "; os << ".hImageMem = "; - ur_print::printPtr(os, *(params->phImageMem)); + printPtr(os, *(params->phImageMem)); os << ", "; os << ".pImageFormat = "; - ur_print::printPtr(os, *(params->ppImageFormat)); + printPtr(os, *(params->ppImageFormat)); os << ", "; os << ".pImageDesc = "; - ur_print::printPtr(os, *(params->ppImageDesc)); + printPtr(os, *(params->ppImageDesc)); os << ", "; os << ".hSampler = "; - ur_print::printPtr(os, *(params->phSampler)); + printPtr(os, *(params->phSampler)); os << ", "; os << ".phMem = "; - ur_print::printPtr(os, *(params->pphMem)); + printPtr(os, *(params->pphMem)); os << ", "; os << ".phImage = "; - ur_print::printPtr(os, *(params->pphImage)); + printPtr(os, *(params->pphImage)); return os; } @@ -10395,33 +10330,32 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_print::printPtr(os, *(params->phQueue)); + printPtr(os, *(params->phQueue)); os << ", "; os << ".pDst = "; - ur_print::printPtr(os, *(params->ppDst)); + printPtr(os, *(params->ppDst)); os << ", "; os << ".pSrc = "; - ur_print::printPtr(os, *(params->ppSrc)); + printPtr(os, *(params->ppSrc)); os << ", "; os << ".pImageFormat = "; - ur_print::printPtr(os, *(params->ppImageFormat)); + printPtr(os, *(params->ppImageFormat)); os << ", "; os << ".pImageDesc = "; - ur_print::printPtr(os, *(params->ppImageDesc)); + printPtr(os, *(params->ppImageDesc)); os << ", "; os << ".imageCopyFlags = "; - ur_print::printFlag(os, - *(params->pimageCopyFlags)); + printFlag(os, *(params->pimageCopyFlags)); os << ", "; os << ".srcOffset = "; @@ -10457,14 +10391,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); + printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_print::printPtr(os, *(params->pphEvent)); + printPtr(os, *(params->pphEvent)); return os; } @@ -10476,7 +10410,7 @@ inline std::ostream &operator<<( os << ".hImageMem = "; - ur_print::printPtr(os, *(params->phImageMem)); + printPtr(os, *(params->phImageMem)); os << ", "; os << ".propName = "; @@ -10486,12 +10420,12 @@ inline std::ostream &operator<<( os << ", "; os << ".pPropValue = "; - ur_print::printPtr(os, *(params->ppPropValue)); + printPtr(os, *(params->ppPropValue)); os << ", "; os << ".pPropSizeRet = "; - ur_print::printPtr(os, *(params->ppPropSizeRet)); + printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -10502,17 +10436,17 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_print::printPtr(os, *(params->phDevice)); + printPtr(os, *(params->phDevice)); os << ", "; os << ".hImageMem = "; - ur_print::printPtr(os, *(params->phImageMem)); + printPtr(os, *(params->phImageMem)); os << ", "; os << ".mipmapLevel = "; @@ -10522,7 +10456,7 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".phImageMem = "; - ur_print::printPtr(os, *(params->pphImageMem)); + printPtr(os, *(params->pphImageMem)); return os; } @@ -10534,17 +10468,17 @@ inline std::ostream &operator<<( os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_print::printPtr(os, *(params->phDevice)); + printPtr(os, *(params->phDevice)); os << ", "; os << ".hMem = "; - ur_print::printPtr(os, *(params->phMem)); + printPtr(os, *(params->phMem)); return os; } @@ -10555,12 +10489,12 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_print::printPtr(os, *(params->phDevice)); + printPtr(os, *(params->phDevice)); os << ", "; os << ".size = "; @@ -10570,12 +10504,12 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".pInteropMemDesc = "; - ur_print::printPtr(os, *(params->ppInteropMemDesc)); + printPtr(os, *(params->ppInteropMemDesc)); os << ", "; os << ".phInteropMem = "; - ur_print::printPtr(os, *(params->pphInteropMem)); + printPtr(os, *(params->pphInteropMem)); return os; } @@ -10586,32 +10520,32 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_print::printPtr(os, *(params->phDevice)); + printPtr(os, *(params->phDevice)); os << ", "; os << ".pImageFormat = "; - ur_print::printPtr(os, *(params->ppImageFormat)); + printPtr(os, *(params->ppImageFormat)); os << ", "; os << ".pImageDesc = "; - ur_print::printPtr(os, *(params->ppImageDesc)); + printPtr(os, *(params->ppImageDesc)); os << ", "; os << ".hInteropMem = "; - ur_print::printPtr(os, *(params->phInteropMem)); + printPtr(os, *(params->phInteropMem)); os << ", "; os << ".phImageMem = "; - ur_print::printPtr(os, *(params->pphImageMem)); + printPtr(os, *(params->pphImageMem)); return os; } @@ -10622,17 +10556,17 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_print::printPtr(os, *(params->phDevice)); + printPtr(os, *(params->phDevice)); os << ", "; os << ".hInteropMem = "; - ur_print::printPtr(os, *(params->phInteropMem)); + printPtr(os, *(params->phInteropMem)); return os; } @@ -10644,22 +10578,22 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_print::printPtr(os, *(params->phDevice)); + printPtr(os, *(params->phDevice)); os << ", "; os << ".pInteropSemaphoreDesc = "; - ur_print::printPtr(os, *(params->ppInteropSemaphoreDesc)); + printPtr(os, *(params->ppInteropSemaphoreDesc)); os << ", "; os << ".phInteropSemaphore = "; - ur_print::printPtr(os, *(params->pphInteropSemaphore)); + printPtr(os, *(params->pphInteropSemaphore)); return os; } @@ -10670,17 +10604,17 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_print::printPtr(os, *(params->phDevice)); + printPtr(os, *(params->phDevice)); os << ", "; os << ".hInteropSemaphore = "; - ur_print::printPtr(os, *(params->phInteropSemaphore)); + printPtr(os, *(params->phInteropSemaphore)); return os; } @@ -10691,12 +10625,12 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hQueue = "; - ur_print::printPtr(os, *(params->phQueue)); + printPtr(os, *(params->phQueue)); os << ", "; os << ".hSemaphore = "; - ur_print::printPtr(os, *(params->phSemaphore)); + printPtr(os, *(params->phSemaphore)); os << ", "; os << ".numEventsInWaitList = "; @@ -10712,14 +10646,14 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; } - ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); + printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_print::printPtr(os, *(params->pphEvent)); + printPtr(os, *(params->pphEvent)); return os; } @@ -10730,12 +10664,12 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hQueue = "; - ur_print::printPtr(os, *(params->phQueue)); + printPtr(os, *(params->phQueue)); os << ", "; os << ".hSemaphore = "; - ur_print::printPtr(os, *(params->phSemaphore)); + printPtr(os, *(params->phSemaphore)); os << ", "; os << ".numEventsInWaitList = "; @@ -10751,14 +10685,14 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; } - ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); + printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_print::printPtr(os, *(params->pphEvent)); + printPtr(os, *(params->pphEvent)); return os; } @@ -10770,22 +10704,22 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_print::printPtr(os, *(params->phDevice)); + printPtr(os, *(params->phDevice)); os << ", "; os << ".pCommandBufferDesc = "; - ur_print::printPtr(os, *(params->ppCommandBufferDesc)); + printPtr(os, *(params->ppCommandBufferDesc)); os << ", "; os << ".phCommandBuffer = "; - ur_print::printPtr(os, *(params->pphCommandBuffer)); + printPtr(os, *(params->pphCommandBuffer)); return os; } @@ -10797,7 +10731,7 @@ operator<<(std::ostream &os, os << ".hCommandBuffer = "; - ur_print::printPtr(os, *(params->phCommandBuffer)); + printPtr(os, *(params->phCommandBuffer)); return os; } @@ -10809,7 +10743,7 @@ operator<<(std::ostream &os, os << ".hCommandBuffer = "; - ur_print::printPtr(os, *(params->phCommandBuffer)); + printPtr(os, *(params->phCommandBuffer)); return os; } @@ -10821,7 +10755,7 @@ operator<<(std::ostream &os, os << ".hCommandBuffer = "; - ur_print::printPtr(os, *(params->phCommandBuffer)); + printPtr(os, *(params->phCommandBuffer)); return os; } @@ -10832,12 +10766,12 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hCommandBuffer = "; - ur_print::printPtr(os, *(params->phCommandBuffer)); + printPtr(os, *(params->phCommandBuffer)); os << ", "; os << ".hKernel = "; - ur_print::printPtr(os, *(params->phKernel)); + printPtr(os, *(params->phKernel)); os << ", "; os << ".workDim = "; @@ -10847,17 +10781,17 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".pGlobalWorkOffset = "; - ur_print::printPtr(os, *(params->ppGlobalWorkOffset)); + printPtr(os, *(params->ppGlobalWorkOffset)); os << ", "; os << ".pGlobalWorkSize = "; - ur_print::printPtr(os, *(params->ppGlobalWorkSize)); + printPtr(os, *(params->ppGlobalWorkSize)); os << ", "; os << ".pLocalWorkSize = "; - ur_print::printPtr(os, *(params->ppLocalWorkSize)); + printPtr(os, *(params->ppLocalWorkSize)); os << ", "; os << ".numSyncPointsInWaitList = "; @@ -10867,12 +10801,12 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".pSyncPointWaitList = "; - ur_print::printPtr(os, *(params->ppSyncPointWaitList)); + printPtr(os, *(params->ppSyncPointWaitList)); os << ", "; os << ".pSyncPoint = "; - ur_print::printPtr(os, *(params->ppSyncPoint)); + printPtr(os, *(params->ppSyncPoint)); return os; } @@ -10883,17 +10817,17 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hCommandBuffer = "; - ur_print::printPtr(os, *(params->phCommandBuffer)); + printPtr(os, *(params->phCommandBuffer)); os << ", "; os << ".pDst = "; - ur_print::printPtr(os, *(params->ppDst)); + printPtr(os, *(params->ppDst)); os << ", "; os << ".pSrc = "; - ur_print::printPtr(os, *(params->ppSrc)); + printPtr(os, *(params->ppSrc)); os << ", "; os << ".size = "; @@ -10908,12 +10842,12 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".pSyncPointWaitList = "; - ur_print::printPtr(os, *(params->ppSyncPointWaitList)); + printPtr(os, *(params->ppSyncPointWaitList)); os << ", "; os << ".pSyncPoint = "; - ur_print::printPtr(os, *(params->ppSyncPoint)); + printPtr(os, *(params->ppSyncPoint)); return os; } @@ -10925,17 +10859,17 @@ inline std::ostream &operator<<( os << ".hCommandBuffer = "; - ur_print::printPtr(os, *(params->phCommandBuffer)); + printPtr(os, *(params->phCommandBuffer)); os << ", "; os << ".pMemory = "; - ur_print::printPtr(os, *(params->ppMemory)); + printPtr(os, *(params->ppMemory)); os << ", "; os << ".pPattern = "; - ur_print::printPtr(os, *(params->ppPattern)); + printPtr(os, *(params->ppPattern)); os << ", "; os << ".patternSize = "; @@ -10955,12 +10889,12 @@ inline std::ostream &operator<<( os << ", "; os << ".pSyncPointWaitList = "; - ur_print::printPtr(os, *(params->ppSyncPointWaitList)); + printPtr(os, *(params->ppSyncPointWaitList)); os << ", "; os << ".pSyncPoint = "; - ur_print::printPtr(os, *(params->ppSyncPoint)); + printPtr(os, *(params->ppSyncPoint)); return os; } @@ -10971,17 +10905,17 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hCommandBuffer = "; - ur_print::printPtr(os, *(params->phCommandBuffer)); + printPtr(os, *(params->phCommandBuffer)); os << ", "; os << ".hSrcMem = "; - ur_print::printPtr(os, *(params->phSrcMem)); + printPtr(os, *(params->phSrcMem)); os << ", "; os << ".hDstMem = "; - ur_print::printPtr(os, *(params->phDstMem)); + printPtr(os, *(params->phDstMem)); os << ", "; os << ".srcOffset = "; @@ -11006,12 +10940,12 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".pSyncPointWaitList = "; - ur_print::printPtr(os, *(params->ppSyncPointWaitList)); + printPtr(os, *(params->ppSyncPointWaitList)); os << ", "; os << ".pSyncPoint = "; - ur_print::printPtr(os, *(params->ppSyncPoint)); + printPtr(os, *(params->ppSyncPoint)); return os; } @@ -11022,12 +10956,12 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hCommandBuffer = "; - ur_print::printPtr(os, *(params->phCommandBuffer)); + printPtr(os, *(params->phCommandBuffer)); os << ", "; os << ".hBuffer = "; - ur_print::printPtr(os, *(params->phBuffer)); + printPtr(os, *(params->phBuffer)); os << ", "; os << ".offset = "; @@ -11042,7 +10976,7 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".pSrc = "; - ur_print::printPtr(os, *(params->ppSrc)); + printPtr(os, *(params->ppSrc)); os << ", "; os << ".numSyncPointsInWaitList = "; @@ -11052,12 +10986,12 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".pSyncPointWaitList = "; - ur_print::printPtr(os, *(params->ppSyncPointWaitList)); + printPtr(os, *(params->ppSyncPointWaitList)); os << ", "; os << ".pSyncPoint = "; - ur_print::printPtr(os, *(params->ppSyncPoint)); + printPtr(os, *(params->ppSyncPoint)); return os; } @@ -11068,12 +11002,12 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hCommandBuffer = "; - ur_print::printPtr(os, *(params->phCommandBuffer)); + printPtr(os, *(params->phCommandBuffer)); os << ", "; os << ".hBuffer = "; - ur_print::printPtr(os, *(params->phBuffer)); + printPtr(os, *(params->phBuffer)); os << ", "; os << ".offset = "; @@ -11088,7 +11022,7 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".pDst = "; - ur_print::printPtr(os, *(params->ppDst)); + printPtr(os, *(params->ppDst)); os << ", "; os << ".numSyncPointsInWaitList = "; @@ -11098,12 +11032,12 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".pSyncPointWaitList = "; - ur_print::printPtr(os, *(params->ppSyncPointWaitList)); + printPtr(os, *(params->ppSyncPointWaitList)); os << ", "; os << ".pSyncPoint = "; - ur_print::printPtr(os, *(params->ppSyncPoint)); + printPtr(os, *(params->ppSyncPoint)); return os; } @@ -11114,17 +11048,17 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hCommandBuffer = "; - ur_print::printPtr(os, *(params->phCommandBuffer)); + printPtr(os, *(params->phCommandBuffer)); os << ", "; os << ".hSrcMem = "; - ur_print::printPtr(os, *(params->phSrcMem)); + printPtr(os, *(params->phSrcMem)); os << ", "; os << ".hDstMem = "; - ur_print::printPtr(os, *(params->phDstMem)); + printPtr(os, *(params->phDstMem)); os << ", "; os << ".srcOrigin = "; @@ -11169,12 +11103,12 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".pSyncPointWaitList = "; - ur_print::printPtr(os, *(params->ppSyncPointWaitList)); + printPtr(os, *(params->ppSyncPointWaitList)); os << ", "; os << ".pSyncPoint = "; - ur_print::printPtr(os, *(params->ppSyncPoint)); + printPtr(os, *(params->ppSyncPoint)); return os; } @@ -11185,12 +11119,12 @@ inline std::ostream &operator<<( os << ".hCommandBuffer = "; - ur_print::printPtr(os, *(params->phCommandBuffer)); + printPtr(os, *(params->phCommandBuffer)); os << ", "; os << ".hBuffer = "; - ur_print::printPtr(os, *(params->phBuffer)); + printPtr(os, *(params->phBuffer)); os << ", "; os << ".bufferOffset = "; @@ -11230,7 +11164,7 @@ inline std::ostream &operator<<( os << ", "; os << ".pSrc = "; - ur_print::printPtr(os, *(params->ppSrc)); + printPtr(os, *(params->ppSrc)); os << ", "; os << ".numSyncPointsInWaitList = "; @@ -11240,12 +11174,12 @@ inline std::ostream &operator<<( os << ", "; os << ".pSyncPointWaitList = "; - ur_print::printPtr(os, *(params->ppSyncPointWaitList)); + printPtr(os, *(params->ppSyncPointWaitList)); os << ", "; os << ".pSyncPoint = "; - ur_print::printPtr(os, *(params->ppSyncPoint)); + printPtr(os, *(params->ppSyncPoint)); return os; } @@ -11256,12 +11190,12 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hCommandBuffer = "; - ur_print::printPtr(os, *(params->phCommandBuffer)); + printPtr(os, *(params->phCommandBuffer)); os << ", "; os << ".hBuffer = "; - ur_print::printPtr(os, *(params->phBuffer)); + printPtr(os, *(params->phBuffer)); os << ", "; os << ".bufferOffset = "; @@ -11301,7 +11235,7 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".pDst = "; - ur_print::printPtr(os, *(params->ppDst)); + printPtr(os, *(params->ppDst)); os << ", "; os << ".numSyncPointsInWaitList = "; @@ -11311,12 +11245,12 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".pSyncPointWaitList = "; - ur_print::printPtr(os, *(params->ppSyncPointWaitList)); + printPtr(os, *(params->ppSyncPointWaitList)); os << ", "; os << ".pSyncPoint = "; - ur_print::printPtr(os, *(params->ppSyncPoint)); + printPtr(os, *(params->ppSyncPoint)); return os; } @@ -11327,17 +11261,17 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hCommandBuffer = "; - ur_print::printPtr(os, *(params->phCommandBuffer)); + printPtr(os, *(params->phCommandBuffer)); os << ", "; os << ".hBuffer = "; - ur_print::printPtr(os, *(params->phBuffer)); + printPtr(os, *(params->phBuffer)); os << ", "; os << ".pPattern = "; - ur_print::printPtr(os, *(params->ppPattern)); + printPtr(os, *(params->ppPattern)); os << ", "; os << ".patternSize = "; @@ -11362,12 +11296,12 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".pSyncPointWaitList = "; - ur_print::printPtr(os, *(params->ppSyncPointWaitList)); + printPtr(os, *(params->ppSyncPointWaitList)); os << ", "; os << ".pSyncPoint = "; - ur_print::printPtr(os, *(params->ppSyncPoint)); + printPtr(os, *(params->ppSyncPoint)); return os; } @@ -11461,12 +11395,12 @@ operator<<(std::ostream &os, os << ".hCommandBuffer = "; - ur_print::printPtr(os, *(params->phCommandBuffer)); + printPtr(os, *(params->phCommandBuffer)); os << ", "; os << ".hQueue = "; - ur_print::printPtr(os, *(params->phQueue)); + printPtr(os, *(params->phQueue)); os << ", "; os << ".numEventsInWaitList = "; @@ -11482,14 +11416,14 @@ operator<<(std::ostream &os, os << ", "; } - ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); + printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_print::printPtr(os, *(params->pphEvent)); + printPtr(os, *(params->pphEvent)); return os; } @@ -11510,19 +11444,19 @@ operator<<(std::ostream &os, os << ", "; } - ur_print::printPtr(os, (*(params->pphDevices))[i]); + printPtr(os, (*(params->pphDevices))[i]); } os << "}"; os << ", "; os << ".pProperties = "; - ur_print::printPtr(os, *(params->ppProperties)); + printPtr(os, *(params->ppProperties)); os << ", "; os << ".phContext = "; - ur_print::printPtr(os, *(params->pphContext)); + printPtr(os, *(params->pphContext)); return os; } @@ -11533,7 +11467,7 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); return os; } @@ -11544,7 +11478,7 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); return os; } @@ -11555,7 +11489,7 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".propName = "; @@ -11569,13 +11503,13 @@ operator<<(std::ostream &os, os << ", "; os << ".pPropValue = "; - ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_print::printPtr(os, *(params->ppPropSizeRet)); + printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -11587,12 +11521,12 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".phNativeContext = "; - ur_print::printPtr(os, *(params->pphNativeContext)); + printPtr(os, *(params->pphNativeContext)); return os; } @@ -11604,7 +11538,7 @@ inline std::ostream &operator<<( os << ".hNativeContext = "; - ur_print::printPtr(os, *(params->phNativeContext)); + printPtr(os, *(params->phNativeContext)); os << ", "; os << ".numDevices = "; @@ -11619,19 +11553,19 @@ inline std::ostream &operator<<( os << ", "; } - ur_print::printPtr(os, (*(params->pphDevices))[i]); + printPtr(os, (*(params->pphDevices))[i]); } os << "}"; os << ", "; os << ".pProperties = "; - ur_print::printPtr(os, *(params->ppProperties)); + printPtr(os, *(params->ppProperties)); os << ", "; os << ".phContext = "; - ur_print::printPtr(os, *(params->pphContext)); + printPtr(os, *(params->pphContext)); return os; } @@ -11643,7 +11577,7 @@ inline std::ostream &operator<<( os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".pfnDeleter = "; @@ -11653,7 +11587,7 @@ inline std::ostream &operator<<( os << ", "; os << ".pUserData = "; - ur_print::printPtr(os, *(params->ppUserData)); + printPtr(os, *(params->ppUserData)); return os; } @@ -11664,12 +11598,12 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_print::printPtr(os, *(params->phQueue)); + printPtr(os, *(params->phQueue)); os << ", "; os << ".hKernel = "; - ur_print::printPtr(os, *(params->phKernel)); + printPtr(os, *(params->phKernel)); os << ", "; os << ".workDim = "; @@ -11679,17 +11613,17 @@ inline std::ostream &operator<<( os << ", "; os << ".pGlobalWorkOffset = "; - ur_print::printPtr(os, *(params->ppGlobalWorkOffset)); + printPtr(os, *(params->ppGlobalWorkOffset)); os << ", "; os << ".pGlobalWorkSize = "; - ur_print::printPtr(os, *(params->ppGlobalWorkSize)); + printPtr(os, *(params->ppGlobalWorkSize)); os << ", "; os << ".pLocalWorkSize = "; - ur_print::printPtr(os, *(params->ppLocalWorkSize)); + printPtr(os, *(params->ppLocalWorkSize)); os << ", "; os << ".numEventsInWaitList = "; @@ -11705,14 +11639,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); + printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_print::printPtr(os, *(params->pphEvent)); + printPtr(os, *(params->pphEvent)); return os; } @@ -11723,7 +11657,7 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_print::printPtr(os, *(params->phQueue)); + printPtr(os, *(params->phQueue)); os << ", "; os << ".numEventsInWaitList = "; @@ -11739,14 +11673,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); + printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_print::printPtr(os, *(params->pphEvent)); + printPtr(os, *(params->pphEvent)); return os; } @@ -11758,7 +11692,7 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_print::printPtr(os, *(params->phQueue)); + printPtr(os, *(params->phQueue)); os << ", "; os << ".numEventsInWaitList = "; @@ -11774,14 +11708,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); + printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_print::printPtr(os, *(params->pphEvent)); + printPtr(os, *(params->pphEvent)); return os; } @@ -11792,12 +11726,12 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_print::printPtr(os, *(params->phQueue)); + printPtr(os, *(params->phQueue)); os << ", "; os << ".hBuffer = "; - ur_print::printPtr(os, *(params->phBuffer)); + printPtr(os, *(params->phBuffer)); os << ", "; os << ".blockingRead = "; @@ -11817,7 +11751,7 @@ inline std::ostream &operator<<( os << ", "; os << ".pDst = "; - ur_print::printPtr(os, *(params->ppDst)); + printPtr(os, *(params->ppDst)); os << ", "; os << ".numEventsInWaitList = "; @@ -11833,14 +11767,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); + printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_print::printPtr(os, *(params->pphEvent)); + printPtr(os, *(params->pphEvent)); return os; } @@ -11852,12 +11786,12 @@ operator<<(std::ostream &os, os << ".hQueue = "; - ur_print::printPtr(os, *(params->phQueue)); + printPtr(os, *(params->phQueue)); os << ", "; os << ".hBuffer = "; - ur_print::printPtr(os, *(params->phBuffer)); + printPtr(os, *(params->phBuffer)); os << ", "; os << ".blockingWrite = "; @@ -11877,7 +11811,7 @@ operator<<(std::ostream &os, os << ", "; os << ".pSrc = "; - ur_print::printPtr(os, *(params->ppSrc)); + printPtr(os, *(params->ppSrc)); os << ", "; os << ".numEventsInWaitList = "; @@ -11893,14 +11827,14 @@ operator<<(std::ostream &os, os << ", "; } - ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); + printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_print::printPtr(os, *(params->pphEvent)); + printPtr(os, *(params->pphEvent)); return os; } @@ -11912,12 +11846,12 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_print::printPtr(os, *(params->phQueue)); + printPtr(os, *(params->phQueue)); os << ", "; os << ".hBuffer = "; - ur_print::printPtr(os, *(params->phBuffer)); + printPtr(os, *(params->phBuffer)); os << ", "; os << ".blockingRead = "; @@ -11962,7 +11896,7 @@ inline std::ostream &operator<<( os << ", "; os << ".pDst = "; - ur_print::printPtr(os, *(params->ppDst)); + printPtr(os, *(params->ppDst)); os << ", "; os << ".numEventsInWaitList = "; @@ -11978,14 +11912,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); + printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_print::printPtr(os, *(params->pphEvent)); + printPtr(os, *(params->pphEvent)); return os; } @@ -11997,12 +11931,12 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_print::printPtr(os, *(params->phQueue)); + printPtr(os, *(params->phQueue)); os << ", "; os << ".hBuffer = "; - ur_print::printPtr(os, *(params->phBuffer)); + printPtr(os, *(params->phBuffer)); os << ", "; os << ".blockingWrite = "; @@ -12047,7 +11981,7 @@ inline std::ostream &operator<<( os << ", "; os << ".pSrc = "; - ur_print::printPtr(os, *(params->ppSrc)); + printPtr(os, *(params->ppSrc)); os << ", "; os << ".numEventsInWaitList = "; @@ -12063,14 +11997,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); + printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_print::printPtr(os, *(params->pphEvent)); + printPtr(os, *(params->pphEvent)); return os; } @@ -12081,17 +12015,17 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_print::printPtr(os, *(params->phQueue)); + printPtr(os, *(params->phQueue)); os << ", "; os << ".hBufferSrc = "; - ur_print::printPtr(os, *(params->phBufferSrc)); + printPtr(os, *(params->phBufferSrc)); os << ", "; os << ".hBufferDst = "; - ur_print::printPtr(os, *(params->phBufferDst)); + printPtr(os, *(params->phBufferDst)); os << ", "; os << ".srcOffset = "; @@ -12122,14 +12056,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); + printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_print::printPtr(os, *(params->pphEvent)); + printPtr(os, *(params->pphEvent)); return os; } @@ -12141,17 +12075,17 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_print::printPtr(os, *(params->phQueue)); + printPtr(os, *(params->phQueue)); os << ", "; os << ".hBufferSrc = "; - ur_print::printPtr(os, *(params->phBufferSrc)); + printPtr(os, *(params->phBufferSrc)); os << ", "; os << ".hBufferDst = "; - ur_print::printPtr(os, *(params->phBufferDst)); + printPtr(os, *(params->phBufferDst)); os << ", "; os << ".srcOrigin = "; @@ -12202,14 +12136,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); + printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_print::printPtr(os, *(params->pphEvent)); + printPtr(os, *(params->pphEvent)); return os; } @@ -12220,17 +12154,17 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_print::printPtr(os, *(params->phQueue)); + printPtr(os, *(params->phQueue)); os << ", "; os << ".hBuffer = "; - ur_print::printPtr(os, *(params->phBuffer)); + printPtr(os, *(params->phBuffer)); os << ", "; os << ".pPattern = "; - ur_print::printPtr(os, *(params->ppPattern)); + printPtr(os, *(params->ppPattern)); os << ", "; os << ".patternSize = "; @@ -12261,14 +12195,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); + printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_print::printPtr(os, *(params->pphEvent)); + printPtr(os, *(params->pphEvent)); return os; } @@ -12279,12 +12213,12 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_print::printPtr(os, *(params->phQueue)); + printPtr(os, *(params->phQueue)); os << ", "; os << ".hImage = "; - ur_print::printPtr(os, *(params->phImage)); + printPtr(os, *(params->phImage)); os << ", "; os << ".blockingRead = "; @@ -12314,7 +12248,7 @@ inline std::ostream &operator<<( os << ", "; os << ".pDst = "; - ur_print::printPtr(os, *(params->ppDst)); + printPtr(os, *(params->ppDst)); os << ", "; os << ".numEventsInWaitList = "; @@ -12330,14 +12264,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); + printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_print::printPtr(os, *(params->pphEvent)); + printPtr(os, *(params->pphEvent)); return os; } @@ -12348,12 +12282,12 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_print::printPtr(os, *(params->phQueue)); + printPtr(os, *(params->phQueue)); os << ", "; os << ".hImage = "; - ur_print::printPtr(os, *(params->phImage)); + printPtr(os, *(params->phImage)); os << ", "; os << ".blockingWrite = "; @@ -12383,7 +12317,7 @@ inline std::ostream &operator<<( os << ", "; os << ".pSrc = "; - ur_print::printPtr(os, *(params->ppSrc)); + printPtr(os, *(params->ppSrc)); os << ", "; os << ".numEventsInWaitList = "; @@ -12399,14 +12333,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); + printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_print::printPtr(os, *(params->pphEvent)); + printPtr(os, *(params->pphEvent)); return os; } @@ -12417,17 +12351,17 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_print::printPtr(os, *(params->phQueue)); + printPtr(os, *(params->phQueue)); os << ", "; os << ".hImageSrc = "; - ur_print::printPtr(os, *(params->phImageSrc)); + printPtr(os, *(params->phImageSrc)); os << ", "; os << ".hImageDst = "; - ur_print::printPtr(os, *(params->phImageDst)); + printPtr(os, *(params->phImageDst)); os << ", "; os << ".srcOrigin = "; @@ -12458,14 +12392,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); + printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_print::printPtr(os, *(params->pphEvent)); + printPtr(os, *(params->pphEvent)); return os; } @@ -12476,12 +12410,12 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_print::printPtr(os, *(params->phQueue)); + printPtr(os, *(params->phQueue)); os << ", "; os << ".hBuffer = "; - ur_print::printPtr(os, *(params->phBuffer)); + printPtr(os, *(params->phBuffer)); os << ", "; os << ".blockingMap = "; @@ -12491,7 +12425,7 @@ inline std::ostream &operator<<( os << ", "; os << ".mapFlags = "; - ur_print::printFlag(os, *(params->pmapFlags)); + printFlag(os, *(params->pmapFlags)); os << ", "; os << ".offset = "; @@ -12517,19 +12451,19 @@ inline std::ostream &operator<<( os << ", "; } - ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); + printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_print::printPtr(os, *(params->pphEvent)); + printPtr(os, *(params->pphEvent)); os << ", "; os << ".ppRetMap = "; - ur_print::printPtr(os, *(params->pppRetMap)); + printPtr(os, *(params->pppRetMap)); return os; } @@ -12540,17 +12474,17 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_print::printPtr(os, *(params->phQueue)); + printPtr(os, *(params->phQueue)); os << ", "; os << ".hMem = "; - ur_print::printPtr(os, *(params->phMem)); + printPtr(os, *(params->phMem)); os << ", "; os << ".pMappedPtr = "; - ur_print::printPtr(os, *(params->ppMappedPtr)); + printPtr(os, *(params->ppMappedPtr)); os << ", "; os << ".numEventsInWaitList = "; @@ -12566,14 +12500,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); + printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_print::printPtr(os, *(params->pphEvent)); + printPtr(os, *(params->pphEvent)); return os; } @@ -12584,12 +12518,12 @@ operator<<(std::ostream &os, os << ".hQueue = "; - ur_print::printPtr(os, *(params->phQueue)); + printPtr(os, *(params->phQueue)); os << ", "; os << ".ptr = "; - ur_print::printPtr(os, *(params->pptr)); + printPtr(os, *(params->pptr)); os << ", "; os << ".patternSize = "; @@ -12599,7 +12533,7 @@ operator<<(std::ostream &os, os << ", "; os << ".pPattern = "; - ur_print::printPtr(os, *(params->ppPattern)); + printPtr(os, *(params->ppPattern)); os << ", "; os << ".size = "; @@ -12620,14 +12554,14 @@ operator<<(std::ostream &os, os << ", "; } - ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); + printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_print::printPtr(os, *(params->pphEvent)); + printPtr(os, *(params->pphEvent)); return os; } @@ -12638,7 +12572,7 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_print::printPtr(os, *(params->phQueue)); + printPtr(os, *(params->phQueue)); os << ", "; os << ".blocking = "; @@ -12648,12 +12582,12 @@ inline std::ostream &operator<<( os << ", "; os << ".pDst = "; - ur_print::printPtr(os, *(params->ppDst)); + printPtr(os, *(params->ppDst)); os << ", "; os << ".pSrc = "; - ur_print::printPtr(os, *(params->ppSrc)); + printPtr(os, *(params->ppSrc)); os << ", "; os << ".size = "; @@ -12674,14 +12608,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); + printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_print::printPtr(os, *(params->pphEvent)); + printPtr(os, *(params->pphEvent)); return os; } @@ -12692,12 +12626,12 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_print::printPtr(os, *(params->phQueue)); + printPtr(os, *(params->phQueue)); os << ", "; os << ".pMem = "; - ur_print::printPtr(os, *(params->ppMem)); + printPtr(os, *(params->ppMem)); os << ", "; os << ".size = "; @@ -12707,7 +12641,7 @@ inline std::ostream &operator<<( os << ", "; os << ".flags = "; - ur_print::printFlag(os, *(params->pflags)); + printFlag(os, *(params->pflags)); os << ", "; os << ".numEventsInWaitList = "; @@ -12723,14 +12657,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); + printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_print::printPtr(os, *(params->pphEvent)); + printPtr(os, *(params->pphEvent)); return os; } @@ -12741,12 +12675,12 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_print::printPtr(os, *(params->phQueue)); + printPtr(os, *(params->phQueue)); os << ", "; os << ".pMem = "; - ur_print::printPtr(os, *(params->ppMem)); + printPtr(os, *(params->ppMem)); os << ", "; os << ".size = "; @@ -12756,12 +12690,12 @@ inline std::ostream &operator<<( os << ", "; os << ".advice = "; - ur_print::printFlag(os, *(params->padvice)); + printFlag(os, *(params->padvice)); os << ", "; os << ".phEvent = "; - ur_print::printPtr(os, *(params->pphEvent)); + printPtr(os, *(params->pphEvent)); return os; } @@ -12772,12 +12706,12 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_print::printPtr(os, *(params->phQueue)); + printPtr(os, *(params->phQueue)); os << ", "; os << ".pMem = "; - ur_print::printPtr(os, *(params->ppMem)); + printPtr(os, *(params->ppMem)); os << ", "; os << ".pitch = "; @@ -12792,7 +12726,7 @@ inline std::ostream &operator<<( os << ", "; os << ".pPattern = "; - ur_print::printPtr(os, *(params->ppPattern)); + printPtr(os, *(params->ppPattern)); os << ", "; os << ".width = "; @@ -12818,14 +12752,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); + printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_print::printPtr(os, *(params->pphEvent)); + printPtr(os, *(params->pphEvent)); return os; } @@ -12836,7 +12770,7 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_print::printPtr(os, *(params->phQueue)); + printPtr(os, *(params->phQueue)); os << ", "; os << ".blocking = "; @@ -12846,7 +12780,7 @@ inline std::ostream &operator<<( os << ", "; os << ".pDst = "; - ur_print::printPtr(os, *(params->ppDst)); + printPtr(os, *(params->ppDst)); os << ", "; os << ".dstPitch = "; @@ -12856,7 +12790,7 @@ inline std::ostream &operator<<( os << ", "; os << ".pSrc = "; - ur_print::printPtr(os, *(params->ppSrc)); + printPtr(os, *(params->ppSrc)); os << ", "; os << ".srcPitch = "; @@ -12887,14 +12821,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); + printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_print::printPtr(os, *(params->pphEvent)); + printPtr(os, *(params->pphEvent)); return os; } @@ -12905,17 +12839,17 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hQueue = "; - ur_print::printPtr(os, *(params->phQueue)); + printPtr(os, *(params->phQueue)); os << ", "; os << ".hProgram = "; - ur_print::printPtr(os, *(params->phProgram)); + printPtr(os, *(params->phProgram)); os << ", "; os << ".name = "; - ur_print::printPtr(os, *(params->pname)); + printPtr(os, *(params->pname)); os << ", "; os << ".blockingWrite = "; @@ -12935,7 +12869,7 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".pSrc = "; - ur_print::printPtr(os, *(params->ppSrc)); + printPtr(os, *(params->ppSrc)); os << ", "; os << ".numEventsInWaitList = "; @@ -12951,14 +12885,14 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; } - ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); + printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_print::printPtr(os, *(params->pphEvent)); + printPtr(os, *(params->pphEvent)); return os; } @@ -12969,17 +12903,17 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hQueue = "; - ur_print::printPtr(os, *(params->phQueue)); + printPtr(os, *(params->phQueue)); os << ", "; os << ".hProgram = "; - ur_print::printPtr(os, *(params->phProgram)); + printPtr(os, *(params->phProgram)); os << ", "; os << ".name = "; - ur_print::printPtr(os, *(params->pname)); + printPtr(os, *(params->pname)); os << ", "; os << ".blockingRead = "; @@ -12999,7 +12933,7 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".pDst = "; - ur_print::printPtr(os, *(params->ppDst)); + printPtr(os, *(params->ppDst)); os << ", "; os << ".numEventsInWaitList = "; @@ -13015,14 +12949,14 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; } - ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); + printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_print::printPtr(os, *(params->pphEvent)); + printPtr(os, *(params->pphEvent)); return os; } @@ -13033,17 +12967,17 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_print::printPtr(os, *(params->phQueue)); + printPtr(os, *(params->phQueue)); os << ", "; os << ".hProgram = "; - ur_print::printPtr(os, *(params->phProgram)); + printPtr(os, *(params->phProgram)); os << ", "; os << ".pipe_symbol = "; - ur_print::printPtr(os, *(params->ppipe_symbol)); + printPtr(os, *(params->ppipe_symbol)); os << ", "; os << ".blocking = "; @@ -13053,7 +12987,7 @@ inline std::ostream &operator<<( os << ", "; os << ".pDst = "; - ur_print::printPtr(os, *(params->ppDst)); + printPtr(os, *(params->ppDst)); os << ", "; os << ".size = "; @@ -13074,14 +13008,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); + printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_print::printPtr(os, *(params->pphEvent)); + printPtr(os, *(params->pphEvent)); return os; } @@ -13092,17 +13026,17 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_print::printPtr(os, *(params->phQueue)); + printPtr(os, *(params->phQueue)); os << ", "; os << ".hProgram = "; - ur_print::printPtr(os, *(params->phProgram)); + printPtr(os, *(params->phProgram)); os << ", "; os << ".pipe_symbol = "; - ur_print::printPtr(os, *(params->ppipe_symbol)); + printPtr(os, *(params->ppipe_symbol)); os << ", "; os << ".blocking = "; @@ -13112,7 +13046,7 @@ inline std::ostream &operator<<( os << ", "; os << ".pSrc = "; - ur_print::printPtr(os, *(params->ppSrc)); + printPtr(os, *(params->ppSrc)); os << ", "; os << ".size = "; @@ -13133,14 +13067,14 @@ inline std::ostream &operator<<( os << ", "; } - ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); + printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_print::printPtr(os, *(params->pphEvent)); + printPtr(os, *(params->pphEvent)); return os; } @@ -13151,12 +13085,12 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hQueue = "; - ur_print::printPtr(os, *(params->phQueue)); + printPtr(os, *(params->phQueue)); os << ", "; os << ".hKernel = "; - ur_print::printPtr(os, *(params->phKernel)); + printPtr(os, *(params->phKernel)); os << ", "; os << ".workDim = "; @@ -13166,17 +13100,17 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".pGlobalWorkOffset = "; - ur_print::printPtr(os, *(params->ppGlobalWorkOffset)); + printPtr(os, *(params->ppGlobalWorkOffset)); os << ", "; os << ".pGlobalWorkSize = "; - ur_print::printPtr(os, *(params->ppGlobalWorkSize)); + printPtr(os, *(params->ppGlobalWorkSize)); os << ", "; os << ".pLocalWorkSize = "; - ur_print::printPtr(os, *(params->ppLocalWorkSize)); + printPtr(os, *(params->ppLocalWorkSize)); os << ", "; os << ".numEventsInWaitList = "; @@ -13192,14 +13126,14 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; } - ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); + printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - ur_print::printPtr(os, *(params->pphEvent)); + printPtr(os, *(params->pphEvent)); return os; } @@ -13210,7 +13144,7 @@ operator<<(std::ostream &os, os << ".hEvent = "; - ur_print::printPtr(os, *(params->phEvent)); + printPtr(os, *(params->phEvent)); os << ", "; os << ".propName = "; @@ -13224,13 +13158,13 @@ operator<<(std::ostream &os, os << ", "; os << ".pPropValue = "; - ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_print::printPtr(os, *(params->ppPropSizeRet)); + printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -13242,7 +13176,7 @@ operator<<(std::ostream &os, os << ".hEvent = "; - ur_print::printPtr(os, *(params->phEvent)); + printPtr(os, *(params->phEvent)); os << ", "; os << ".propName = "; @@ -13256,13 +13190,13 @@ operator<<(std::ostream &os, os << ", "; os << ".pPropValue = "; - ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_print::printPtr(os, *(params->ppPropSizeRet)); + printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -13283,7 +13217,7 @@ operator<<(std::ostream &os, os << ", "; } - ur_print::printPtr(os, (*(params->pphEventWaitList))[i]); + printPtr(os, (*(params->pphEventWaitList))[i]); } os << "}"; @@ -13296,7 +13230,7 @@ operator<<(std::ostream &os, os << ".hEvent = "; - ur_print::printPtr(os, *(params->phEvent)); + printPtr(os, *(params->phEvent)); return os; } @@ -13307,7 +13241,7 @@ operator<<(std::ostream &os, os << ".hEvent = "; - ur_print::printPtr(os, *(params->phEvent)); + printPtr(os, *(params->phEvent)); return os; } @@ -13318,12 +13252,12 @@ inline std::ostream &operator<<( os << ".hEvent = "; - ur_print::printPtr(os, *(params->phEvent)); + printPtr(os, *(params->phEvent)); os << ", "; os << ".phNativeEvent = "; - ur_print::printPtr(os, *(params->pphNativeEvent)); + printPtr(os, *(params->pphNativeEvent)); return os; } @@ -13335,22 +13269,22 @@ inline std::ostream &operator<<( os << ".hNativeEvent = "; - ur_print::printPtr(os, *(params->phNativeEvent)); + printPtr(os, *(params->phNativeEvent)); os << ", "; os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".pProperties = "; - ur_print::printPtr(os, *(params->ppProperties)); + printPtr(os, *(params->ppProperties)); os << ", "; os << ".phEvent = "; - ur_print::printPtr(os, *(params->pphEvent)); + printPtr(os, *(params->pphEvent)); return os; } @@ -13361,7 +13295,7 @@ inline std::ostream &operator<<( os << ".hEvent = "; - ur_print::printPtr(os, *(params->phEvent)); + printPtr(os, *(params->phEvent)); os << ", "; os << ".execStatus = "; @@ -13376,7 +13310,7 @@ inline std::ostream &operator<<( os << ", "; os << ".pUserData = "; - ur_print::printPtr(os, *(params->ppUserData)); + printPtr(os, *(params->ppUserData)); return os; } @@ -13387,17 +13321,17 @@ operator<<(std::ostream &os, os << ".hProgram = "; - ur_print::printPtr(os, *(params->phProgram)); + printPtr(os, *(params->phProgram)); os << ", "; os << ".pKernelName = "; - ur_print::printPtr(os, *(params->ppKernelName)); + printPtr(os, *(params->ppKernelName)); os << ", "; os << ".phKernel = "; - ur_print::printPtr(os, *(params->pphKernel)); + printPtr(os, *(params->pphKernel)); return os; } @@ -13408,7 +13342,7 @@ operator<<(std::ostream &os, os << ".hKernel = "; - ur_print::printPtr(os, *(params->phKernel)); + printPtr(os, *(params->phKernel)); os << ", "; os << ".propName = "; @@ -13422,13 +13356,13 @@ operator<<(std::ostream &os, os << ", "; os << ".pPropValue = "; - ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_print::printPtr(os, *(params->ppPropSizeRet)); + printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -13439,12 +13373,12 @@ inline std::ostream &operator<<( os << ".hKernel = "; - ur_print::printPtr(os, *(params->phKernel)); + printPtr(os, *(params->phKernel)); os << ", "; os << ".hDevice = "; - ur_print::printPtr(os, *(params->phDevice)); + printPtr(os, *(params->phDevice)); os << ", "; os << ".propName = "; @@ -13458,13 +13392,13 @@ inline std::ostream &operator<<( os << ", "; os << ".pPropValue = "; - ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_print::printPtr(os, *(params->ppPropSizeRet)); + printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -13476,12 +13410,12 @@ operator<<(std::ostream &os, os << ".hKernel = "; - ur_print::printPtr(os, *(params->phKernel)); + printPtr(os, *(params->phKernel)); os << ", "; os << ".hDevice = "; - ur_print::printPtr(os, *(params->phDevice)); + printPtr(os, *(params->phDevice)); os << ", "; os << ".propName = "; @@ -13495,13 +13429,13 @@ operator<<(std::ostream &os, os << ", "; os << ".pPropValue = "; - ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_print::printPtr(os, *(params->ppPropSizeRet)); + printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -13512,7 +13446,7 @@ operator<<(std::ostream &os, os << ".hKernel = "; - ur_print::printPtr(os, *(params->phKernel)); + printPtr(os, *(params->phKernel)); return os; } @@ -13523,7 +13457,7 @@ operator<<(std::ostream &os, os << ".hKernel = "; - ur_print::printPtr(os, *(params->phKernel)); + printPtr(os, *(params->phKernel)); return os; } @@ -13535,12 +13469,12 @@ operator<<(std::ostream &os, os << ".hKernel = "; - ur_print::printPtr(os, *(params->phKernel)); + printPtr(os, *(params->phKernel)); os << ", "; os << ".phNativeKernel = "; - ur_print::printPtr(os, *(params->pphNativeKernel)); + printPtr(os, *(params->pphNativeKernel)); return os; } @@ -13552,27 +13486,27 @@ inline std::ostream &operator<<( os << ".hNativeKernel = "; - ur_print::printPtr(os, *(params->phNativeKernel)); + printPtr(os, *(params->phNativeKernel)); os << ", "; os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".hProgram = "; - ur_print::printPtr(os, *(params->phProgram)); + printPtr(os, *(params->phProgram)); os << ", "; os << ".pProperties = "; - ur_print::printPtr(os, *(params->ppProperties)); + printPtr(os, *(params->ppProperties)); os << ", "; os << ".phKernel = "; - ur_print::printPtr(os, *(params->pphKernel)); + printPtr(os, *(params->pphKernel)); return os; } @@ -13583,7 +13517,7 @@ inline std::ostream &operator<<( os << ".hKernel = "; - ur_print::printPtr(os, *(params->phKernel)); + printPtr(os, *(params->phKernel)); os << ", "; os << ".argIndex = "; @@ -13598,12 +13532,12 @@ inline std::ostream &operator<<( os << ", "; os << ".pProperties = "; - ur_print::printPtr(os, *(params->ppProperties)); + printPtr(os, *(params->ppProperties)); os << ", "; os << ".pArgValue = "; - ur_print::printPtr(os, *(params->ppArgValue)); + printPtr(os, *(params->ppArgValue)); return os; } @@ -13614,7 +13548,7 @@ inline std::ostream &operator<<( os << ".hKernel = "; - ur_print::printPtr(os, *(params->phKernel)); + printPtr(os, *(params->phKernel)); os << ", "; os << ".argIndex = "; @@ -13629,7 +13563,7 @@ inline std::ostream &operator<<( os << ", "; os << ".pProperties = "; - ur_print::printPtr(os, *(params->ppProperties)); + printPtr(os, *(params->ppProperties)); return os; } @@ -13640,7 +13574,7 @@ inline std::ostream &operator<<( os << ".hKernel = "; - ur_print::printPtr(os, *(params->phKernel)); + printPtr(os, *(params->phKernel)); os << ", "; os << ".argIndex = "; @@ -13650,12 +13584,12 @@ inline std::ostream &operator<<( os << ", "; os << ".pProperties = "; - ur_print::printPtr(os, *(params->ppProperties)); + printPtr(os, *(params->ppProperties)); os << ", "; os << ".pArgValue = "; - ur_print::printPtr(os, *(params->ppArgValue)); + printPtr(os, *(params->ppArgValue)); return os; } @@ -13666,7 +13600,7 @@ inline std::ostream &operator<<( os << ".hKernel = "; - ur_print::printPtr(os, *(params->phKernel)); + printPtr(os, *(params->phKernel)); os << ", "; os << ".propName = "; @@ -13681,12 +13615,12 @@ inline std::ostream &operator<<( os << ", "; os << ".pProperties = "; - ur_print::printPtr(os, *(params->ppProperties)); + printPtr(os, *(params->ppProperties)); os << ", "; os << ".pPropValue = "; - ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); return os; } @@ -13697,7 +13631,7 @@ inline std::ostream &operator<<( os << ".hKernel = "; - ur_print::printPtr(os, *(params->phKernel)); + printPtr(os, *(params->phKernel)); os << ", "; os << ".argIndex = "; @@ -13707,12 +13641,12 @@ inline std::ostream &operator<<( os << ", "; os << ".pProperties = "; - ur_print::printPtr(os, *(params->ppProperties)); + printPtr(os, *(params->ppProperties)); os << ", "; os << ".hArgValue = "; - ur_print::printPtr(os, *(params->phArgValue)); + printPtr(os, *(params->phArgValue)); return os; } @@ -13723,7 +13657,7 @@ inline std::ostream &operator<<( os << ".hKernel = "; - ur_print::printPtr(os, *(params->phKernel)); + printPtr(os, *(params->phKernel)); os << ", "; os << ".argIndex = "; @@ -13733,12 +13667,12 @@ inline std::ostream &operator<<( os << ", "; os << ".pProperties = "; - ur_print::printPtr(os, *(params->ppProperties)); + printPtr(os, *(params->ppProperties)); os << ", "; os << ".hArgValue = "; - ur_print::printPtr(os, *(params->phArgValue)); + printPtr(os, *(params->phArgValue)); return os; } @@ -13749,7 +13683,7 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hKernel = "; - ur_print::printPtr(os, *(params->phKernel)); + printPtr(os, *(params->phKernel)); os << ", "; os << ".count = "; @@ -13759,7 +13693,7 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".pSpecConstants = "; - ur_print::printPtr(os, *(params->ppSpecConstants)); + printPtr(os, *(params->ppSpecConstants)); return os; } @@ -13770,12 +13704,12 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hKernel = "; - ur_print::printPtr(os, *(params->phKernel)); + printPtr(os, *(params->phKernel)); os << ", "; os << ".pGroupCountRet = "; - ur_print::printPtr(os, *(params->ppGroupCountRet)); + printPtr(os, *(params->ppGroupCountRet)); return os; } @@ -13786,12 +13720,12 @@ operator<<(std::ostream &os, os << ".device_flags = "; - ur_print::printFlag(os, *(params->pdevice_flags)); + printFlag(os, *(params->pdevice_flags)); os << ", "; os << ".hLoaderConfig = "; - ur_print::printPtr(os, *(params->phLoaderConfig)); + printPtr(os, *(params->phLoaderConfig)); return os; } @@ -13809,7 +13743,7 @@ inline std::ostream &operator<<( os << ".phLoaderConfig = "; - ur_print::printPtr(os, *(params->pphLoaderConfig)); + printPtr(os, *(params->pphLoaderConfig)); return os; } @@ -13820,7 +13754,7 @@ inline std::ostream &operator<<( os << ".hLoaderConfig = "; - ur_print::printPtr(os, *(params->phLoaderConfig)); + printPtr(os, *(params->phLoaderConfig)); return os; } @@ -13831,7 +13765,7 @@ inline std::ostream &operator<<( os << ".hLoaderConfig = "; - ur_print::printPtr(os, *(params->phLoaderConfig)); + printPtr(os, *(params->phLoaderConfig)); return os; } @@ -13842,7 +13776,7 @@ inline std::ostream &operator<<( os << ".hLoaderConfig = "; - ur_print::printPtr(os, *(params->phLoaderConfig)); + printPtr(os, *(params->phLoaderConfig)); os << ", "; os << ".propName = "; @@ -13856,13 +13790,13 @@ inline std::ostream &operator<<( os << ", "; os << ".pPropValue = "; - ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_print::printPtr(os, *(params->ppPropSizeRet)); + printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -13874,12 +13808,12 @@ operator<<(std::ostream &os, os << ".hLoaderConfig = "; - ur_print::printPtr(os, *(params->phLoaderConfig)); + printPtr(os, *(params->phLoaderConfig)); os << ", "; os << ".pLayerName = "; - ur_print::printPtr(os, *(params->ppLayerName)); + printPtr(os, *(params->ppLayerName)); return os; } @@ -13911,32 +13845,32 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".flags = "; - ur_print::printFlag(os, *(params->pflags)); + printFlag(os, *(params->pflags)); os << ", "; os << ".pImageFormat = "; - ur_print::printPtr(os, *(params->ppImageFormat)); + printPtr(os, *(params->ppImageFormat)); os << ", "; os << ".pImageDesc = "; - ur_print::printPtr(os, *(params->ppImageDesc)); + printPtr(os, *(params->ppImageDesc)); os << ", "; os << ".pHost = "; - ur_print::printPtr(os, *(params->ppHost)); + printPtr(os, *(params->ppHost)); os << ", "; os << ".phMem = "; - ur_print::printPtr(os, *(params->pphMem)); + printPtr(os, *(params->pphMem)); return os; } @@ -13947,12 +13881,12 @@ inline std::ostream &operator<<( os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".flags = "; - ur_print::printFlag(os, *(params->pflags)); + printFlag(os, *(params->pflags)); os << ", "; os << ".size = "; @@ -13962,12 +13896,12 @@ inline std::ostream &operator<<( os << ", "; os << ".pProperties = "; - ur_print::printPtr(os, *(params->ppProperties)); + printPtr(os, *(params->ppProperties)); os << ", "; os << ".phBuffer = "; - ur_print::printPtr(os, *(params->pphBuffer)); + printPtr(os, *(params->pphBuffer)); return os; } @@ -13978,7 +13912,7 @@ operator<<(std::ostream &os, os << ".hMem = "; - ur_print::printPtr(os, *(params->phMem)); + printPtr(os, *(params->phMem)); return os; } @@ -13989,7 +13923,7 @@ operator<<(std::ostream &os, os << ".hMem = "; - ur_print::printPtr(os, *(params->phMem)); + printPtr(os, *(params->phMem)); return os; } @@ -14000,12 +13934,12 @@ inline std::ostream &operator<<( os << ".hBuffer = "; - ur_print::printPtr(os, *(params->phBuffer)); + printPtr(os, *(params->phBuffer)); os << ", "; os << ".flags = "; - ur_print::printFlag(os, *(params->pflags)); + printFlag(os, *(params->pflags)); os << ", "; os << ".bufferCreateType = "; @@ -14015,12 +13949,12 @@ inline std::ostream &operator<<( os << ", "; os << ".pRegion = "; - ur_print::printPtr(os, *(params->ppRegion)); + printPtr(os, *(params->ppRegion)); os << ", "; os << ".phMem = "; - ur_print::printPtr(os, *(params->pphMem)); + printPtr(os, *(params->pphMem)); return os; } @@ -14031,12 +13965,12 @@ inline std::ostream &operator<<( os << ".hMem = "; - ur_print::printPtr(os, *(params->phMem)); + printPtr(os, *(params->phMem)); os << ", "; os << ".phNativeMem = "; - ur_print::printPtr(os, *(params->pphNativeMem)); + printPtr(os, *(params->pphNativeMem)); return os; } @@ -14047,22 +13981,22 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hNativeMem = "; - ur_print::printPtr(os, *(params->phNativeMem)); + printPtr(os, *(params->phNativeMem)); os << ", "; os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".pProperties = "; - ur_print::printPtr(os, *(params->ppProperties)); + printPtr(os, *(params->ppProperties)); os << ", "; os << ".phMem = "; - ur_print::printPtr(os, *(params->pphMem)); + printPtr(os, *(params->pphMem)); return os; } @@ -14073,32 +14007,32 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hNativeMem = "; - ur_print::printPtr(os, *(params->phNativeMem)); + printPtr(os, *(params->phNativeMem)); os << ", "; os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".pImageFormat = "; - ur_print::printPtr(os, *(params->ppImageFormat)); + printPtr(os, *(params->ppImageFormat)); os << ", "; os << ".pImageDesc = "; - ur_print::printPtr(os, *(params->ppImageDesc)); + printPtr(os, *(params->ppImageDesc)); os << ", "; os << ".pProperties = "; - ur_print::printPtr(os, *(params->ppProperties)); + printPtr(os, *(params->ppProperties)); os << ", "; os << ".phMem = "; - ur_print::printPtr(os, *(params->pphMem)); + printPtr(os, *(params->pphMem)); return os; } @@ -14109,7 +14043,7 @@ operator<<(std::ostream &os, os << ".hMemory = "; - ur_print::printPtr(os, *(params->phMemory)); + printPtr(os, *(params->phMemory)); os << ", "; os << ".propName = "; @@ -14123,13 +14057,13 @@ operator<<(std::ostream &os, os << ", "; os << ".pPropValue = "; - ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_print::printPtr(os, *(params->ppPropSizeRet)); + printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -14140,7 +14074,7 @@ inline std::ostream &operator<<( os << ".hMemory = "; - ur_print::printPtr(os, *(params->phMemory)); + printPtr(os, *(params->phMemory)); os << ", "; os << ".propName = "; @@ -14154,13 +14088,13 @@ inline std::ostream &operator<<( os << ", "; os << ".pPropValue = "; - ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_print::printPtr(os, *(params->ppPropSizeRet)); + printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -14171,12 +14105,12 @@ inline std::ostream &operator<<( os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_print::printPtr(os, *(params->phDevice)); + printPtr(os, *(params->phDevice)); os << ", "; os << ".size = "; @@ -14186,12 +14120,12 @@ inline std::ostream &operator<<( os << ", "; os << ".pProperties = "; - ur_print::printPtr(os, *(params->ppProperties)); + printPtr(os, *(params->ppProperties)); os << ", "; os << ".phPhysicalMem = "; - ur_print::printPtr(os, *(params->pphPhysicalMem)); + printPtr(os, *(params->pphPhysicalMem)); return os; } @@ -14202,7 +14136,7 @@ inline std::ostream &operator<<( os << ".hPhysicalMem = "; - ur_print::printPtr(os, *(params->phPhysicalMem)); + printPtr(os, *(params->phPhysicalMem)); return os; } @@ -14213,7 +14147,7 @@ inline std::ostream &operator<<( os << ".hPhysicalMem = "; - ur_print::printPtr(os, *(params->phPhysicalMem)); + printPtr(os, *(params->phPhysicalMem)); return os; } @@ -14229,7 +14163,7 @@ operator<<(std::ostream &os, os << ", "; } - ur_print::printPtr(os, (*(params->pphAdapters))[i]); + printPtr(os, (*(params->pphAdapters))[i]); } os << "}"; @@ -14251,14 +14185,14 @@ operator<<(std::ostream &os, os << ", "; } - ur_print::printPtr(os, (*(params->pphPlatforms))[i]); + printPtr(os, (*(params->pphPlatforms))[i]); } os << "}"; os << ", "; os << ".pNumPlatforms = "; - ur_print::printPtr(os, *(params->ppNumPlatforms)); + printPtr(os, *(params->ppNumPlatforms)); return os; } @@ -14269,7 +14203,7 @@ inline std::ostream &operator<<( os << ".hPlatform = "; - ur_print::printPtr(os, *(params->phPlatform)); + printPtr(os, *(params->phPlatform)); os << ", "; os << ".propName = "; @@ -14283,13 +14217,13 @@ inline std::ostream &operator<<( os << ", "; os << ".pPropValue = "; - ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_print::printPtr(os, *(params->ppPropSizeRet)); + printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -14301,12 +14235,12 @@ operator<<(std::ostream &os, os << ".hPlatform = "; - ur_print::printPtr(os, *(params->phPlatform)); + printPtr(os, *(params->phPlatform)); os << ", "; os << ".phNativePlatform = "; - ur_print::printPtr(os, *(params->pphNativePlatform)); + printPtr(os, *(params->pphNativePlatform)); return os; } @@ -14318,17 +14252,17 @@ inline std::ostream &operator<<( os << ".hNativePlatform = "; - ur_print::printPtr(os, *(params->phNativePlatform)); + printPtr(os, *(params->phNativePlatform)); os << ", "; os << ".pProperties = "; - ur_print::printPtr(os, *(params->ppProperties)); + printPtr(os, *(params->ppProperties)); os << ", "; os << ".phPlatform = "; - ur_print::printPtr(os, *(params->pphPlatform)); + printPtr(os, *(params->pphPlatform)); return os; } @@ -14340,12 +14274,12 @@ operator<<(std::ostream &os, os << ".hPlatform = "; - ur_print::printPtr(os, *(params->phPlatform)); + printPtr(os, *(params->phPlatform)); os << ", "; os << ".pVersion = "; - ur_print::printPtr(os, *(params->ppVersion)); + printPtr(os, *(params->ppVersion)); return os; } @@ -14357,17 +14291,17 @@ operator<<(std::ostream &os, os << ".hPlatform = "; - ur_print::printPtr(os, *(params->phPlatform)); + printPtr(os, *(params->phPlatform)); os << ", "; os << ".pFrontendOption = "; - ur_print::printPtr(os, *(params->ppFrontendOption)); + printPtr(os, *(params->ppFrontendOption)); os << ", "; os << ".ppPlatformOption = "; - ur_print::printPtr(os, *(params->pppPlatformOption)); + printPtr(os, *(params->pppPlatformOption)); return os; } @@ -14378,12 +14312,12 @@ inline std::ostream &operator<<( os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".pIL = "; - ur_print::printPtr(os, *(params->ppIL)); + printPtr(os, *(params->ppIL)); os << ", "; os << ".length = "; @@ -14393,12 +14327,12 @@ inline std::ostream &operator<<( os << ", "; os << ".pProperties = "; - ur_print::printPtr(os, *(params->ppProperties)); + printPtr(os, *(params->ppProperties)); os << ", "; os << ".phProgram = "; - ur_print::printPtr(os, *(params->pphProgram)); + printPtr(os, *(params->pphProgram)); return os; } @@ -14410,12 +14344,12 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_print::printPtr(os, *(params->phDevice)); + printPtr(os, *(params->phDevice)); os << ", "; os << ".size = "; @@ -14425,17 +14359,17 @@ operator<<(std::ostream &os, os << ", "; os << ".pBinary = "; - ur_print::printPtr(os, *(params->ppBinary)); + printPtr(os, *(params->ppBinary)); os << ", "; os << ".pProperties = "; - ur_print::printPtr(os, *(params->ppProperties)); + printPtr(os, *(params->ppProperties)); os << ", "; os << ".phProgram = "; - ur_print::printPtr(os, *(params->pphProgram)); + printPtr(os, *(params->pphProgram)); return os; } @@ -14446,17 +14380,17 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".hProgram = "; - ur_print::printPtr(os, *(params->phProgram)); + printPtr(os, *(params->phProgram)); os << ", "; os << ".pOptions = "; - ur_print::printPtr(os, *(params->ppOptions)); + printPtr(os, *(params->ppOptions)); return os; } @@ -14467,17 +14401,17 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".hProgram = "; - ur_print::printPtr(os, *(params->phProgram)); + printPtr(os, *(params->phProgram)); os << ", "; os << ".pOptions = "; - ur_print::printPtr(os, *(params->ppOptions)); + printPtr(os, *(params->ppOptions)); return os; } @@ -14488,7 +14422,7 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".count = "; @@ -14503,19 +14437,19 @@ operator<<(std::ostream &os, os << ", "; } - ur_print::printPtr(os, (*(params->pphPrograms))[i]); + printPtr(os, (*(params->pphPrograms))[i]); } os << "}"; os << ", "; os << ".pOptions = "; - ur_print::printPtr(os, *(params->ppOptions)); + printPtr(os, *(params->ppOptions)); os << ", "; os << ".phProgram = "; - ur_print::printPtr(os, *(params->pphProgram)); + printPtr(os, *(params->pphProgram)); return os; } @@ -14526,7 +14460,7 @@ operator<<(std::ostream &os, os << ".hProgram = "; - ur_print::printPtr(os, *(params->phProgram)); + printPtr(os, *(params->phProgram)); return os; } @@ -14537,7 +14471,7 @@ operator<<(std::ostream &os, os << ".hProgram = "; - ur_print::printPtr(os, *(params->phProgram)); + printPtr(os, *(params->phProgram)); return os; } @@ -14549,22 +14483,22 @@ inline std::ostream &operator<<( os << ".hDevice = "; - ur_print::printPtr(os, *(params->phDevice)); + printPtr(os, *(params->phDevice)); os << ", "; os << ".hProgram = "; - ur_print::printPtr(os, *(params->phProgram)); + printPtr(os, *(params->phProgram)); os << ", "; os << ".pFunctionName = "; - ur_print::printPtr(os, *(params->ppFunctionName)); + printPtr(os, *(params->ppFunctionName)); os << ", "; os << ".ppFunctionPointer = "; - ur_print::printPtr(os, *(params->pppFunctionPointer)); + printPtr(os, *(params->pppFunctionPointer)); return os; } @@ -14575,7 +14509,7 @@ operator<<(std::ostream &os, os << ".hProgram = "; - ur_print::printPtr(os, *(params->phProgram)); + printPtr(os, *(params->phProgram)); os << ", "; os << ".propName = "; @@ -14589,13 +14523,13 @@ operator<<(std::ostream &os, os << ", "; os << ".pPropValue = "; - ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_print::printPtr(os, *(params->ppPropSizeRet)); + printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -14606,12 +14540,12 @@ inline std::ostream &operator<<( os << ".hProgram = "; - ur_print::printPtr(os, *(params->phProgram)); + printPtr(os, *(params->phProgram)); os << ", "; os << ".hDevice = "; - ur_print::printPtr(os, *(params->phDevice)); + printPtr(os, *(params->phDevice)); os << ", "; os << ".propName = "; @@ -14625,13 +14559,13 @@ inline std::ostream &operator<<( os << ", "; os << ".pPropValue = "; - ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_print::printPtr(os, *(params->ppPropSizeRet)); + printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -14642,7 +14576,7 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ".hProgram = "; - ur_print::printPtr(os, *(params->phProgram)); + printPtr(os, *(params->phProgram)); os << ", "; os << ".count = "; @@ -14671,12 +14605,12 @@ operator<<(std::ostream &os, os << ".hProgram = "; - ur_print::printPtr(os, *(params->phProgram)); + printPtr(os, *(params->phProgram)); os << ", "; os << ".phNativeProgram = "; - ur_print::printPtr(os, *(params->pphNativeProgram)); + printPtr(os, *(params->pphNativeProgram)); return os; } @@ -14688,22 +14622,22 @@ inline std::ostream &operator<<( os << ".hNativeProgram = "; - ur_print::printPtr(os, *(params->phNativeProgram)); + printPtr(os, *(params->phNativeProgram)); os << ", "; os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".pProperties = "; - ur_print::printPtr(os, *(params->ppProperties)); + printPtr(os, *(params->ppProperties)); os << ", "; os << ".phProgram = "; - ur_print::printPtr(os, *(params->pphProgram)); + printPtr(os, *(params->pphProgram)); return os; } @@ -14714,7 +14648,7 @@ operator<<(std::ostream &os, os << ".hQueue = "; - ur_print::printPtr(os, *(params->phQueue)); + printPtr(os, *(params->phQueue)); os << ", "; os << ".propName = "; @@ -14728,13 +14662,13 @@ operator<<(std::ostream &os, os << ", "; os << ".pPropValue = "; - ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_print::printPtr(os, *(params->ppPropSizeRet)); + printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -14745,22 +14679,22 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_print::printPtr(os, *(params->phDevice)); + printPtr(os, *(params->phDevice)); os << ", "; os << ".pProperties = "; - ur_print::printPtr(os, *(params->ppProperties)); + printPtr(os, *(params->ppProperties)); os << ", "; os << ".phQueue = "; - ur_print::printPtr(os, *(params->pphQueue)); + printPtr(os, *(params->pphQueue)); return os; } @@ -14771,7 +14705,7 @@ operator<<(std::ostream &os, os << ".hQueue = "; - ur_print::printPtr(os, *(params->phQueue)); + printPtr(os, *(params->phQueue)); return os; } @@ -14782,7 +14716,7 @@ operator<<(std::ostream &os, os << ".hQueue = "; - ur_print::printPtr(os, *(params->phQueue)); + printPtr(os, *(params->phQueue)); return os; } @@ -14793,17 +14727,17 @@ inline std::ostream &operator<<( os << ".hQueue = "; - ur_print::printPtr(os, *(params->phQueue)); + printPtr(os, *(params->phQueue)); os << ", "; os << ".pDesc = "; - ur_print::printPtr(os, *(params->ppDesc)); + printPtr(os, *(params->ppDesc)); os << ", "; os << ".phNativeQueue = "; - ur_print::printPtr(os, *(params->pphNativeQueue)); + printPtr(os, *(params->pphNativeQueue)); return os; } @@ -14815,27 +14749,27 @@ inline std::ostream &operator<<( os << ".hNativeQueue = "; - ur_print::printPtr(os, *(params->phNativeQueue)); + printPtr(os, *(params->phNativeQueue)); os << ", "; os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_print::printPtr(os, *(params->phDevice)); + printPtr(os, *(params->phDevice)); os << ", "; os << ".pProperties = "; - ur_print::printPtr(os, *(params->ppProperties)); + printPtr(os, *(params->ppProperties)); os << ", "; os << ".phQueue = "; - ur_print::printPtr(os, *(params->pphQueue)); + printPtr(os, *(params->pphQueue)); return os; } @@ -14846,7 +14780,7 @@ operator<<(std::ostream &os, os << ".hQueue = "; - ur_print::printPtr(os, *(params->phQueue)); + printPtr(os, *(params->phQueue)); return os; } @@ -14857,7 +14791,7 @@ operator<<(std::ostream &os, os << ".hQueue = "; - ur_print::printPtr(os, *(params->phQueue)); + printPtr(os, *(params->phQueue)); return os; } @@ -14868,17 +14802,17 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".pDesc = "; - ur_print::printPtr(os, *(params->ppDesc)); + printPtr(os, *(params->ppDesc)); os << ", "; os << ".phSampler = "; - ur_print::printPtr(os, *(params->pphSampler)); + printPtr(os, *(params->pphSampler)); return os; } @@ -14889,7 +14823,7 @@ operator<<(std::ostream &os, os << ".hSampler = "; - ur_print::printPtr(os, *(params->phSampler)); + printPtr(os, *(params->phSampler)); return os; } @@ -14900,7 +14834,7 @@ operator<<(std::ostream &os, os << ".hSampler = "; - ur_print::printPtr(os, *(params->phSampler)); + printPtr(os, *(params->phSampler)); return os; } @@ -14911,7 +14845,7 @@ operator<<(std::ostream &os, os << ".hSampler = "; - ur_print::printPtr(os, *(params->phSampler)); + printPtr(os, *(params->phSampler)); os << ", "; os << ".propName = "; @@ -14925,13 +14859,13 @@ operator<<(std::ostream &os, os << ", "; os << ".pPropValue = "; - ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_print::printPtr(os, *(params->ppPropSizeRet)); + printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -14943,12 +14877,12 @@ operator<<(std::ostream &os, os << ".hSampler = "; - ur_print::printPtr(os, *(params->phSampler)); + printPtr(os, *(params->phSampler)); os << ", "; os << ".phNativeSampler = "; - ur_print::printPtr(os, *(params->pphNativeSampler)); + printPtr(os, *(params->pphNativeSampler)); return os; } @@ -14960,22 +14894,22 @@ inline std::ostream &operator<<( os << ".hNativeSampler = "; - ur_print::printPtr(os, *(params->phNativeSampler)); + printPtr(os, *(params->phNativeSampler)); os << ", "; os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".pProperties = "; - ur_print::printPtr(os, *(params->ppProperties)); + printPtr(os, *(params->ppProperties)); os << ", "; os << ".phSampler = "; - ur_print::printPtr(os, *(params->pphSampler)); + printPtr(os, *(params->pphSampler)); return os; } @@ -14986,17 +14920,17 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".pUSMDesc = "; - ur_print::printPtr(os, *(params->ppUSMDesc)); + printPtr(os, *(params->ppUSMDesc)); os << ", "; os << ".pool = "; - ur_print::printPtr(os, *(params->ppool)); + printPtr(os, *(params->ppool)); os << ", "; os << ".size = "; @@ -15006,7 +14940,7 @@ operator<<(std::ostream &os, os << ", "; os << ".ppMem = "; - ur_print::printPtr(os, *(params->pppMem)); + printPtr(os, *(params->pppMem)); return os; } @@ -15017,22 +14951,22 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_print::printPtr(os, *(params->phDevice)); + printPtr(os, *(params->phDevice)); os << ", "; os << ".pUSMDesc = "; - ur_print::printPtr(os, *(params->ppUSMDesc)); + printPtr(os, *(params->ppUSMDesc)); os << ", "; os << ".pool = "; - ur_print::printPtr(os, *(params->ppool)); + printPtr(os, *(params->ppool)); os << ", "; os << ".size = "; @@ -15042,7 +14976,7 @@ operator<<(std::ostream &os, os << ", "; os << ".ppMem = "; - ur_print::printPtr(os, *(params->pppMem)); + printPtr(os, *(params->pppMem)); return os; } @@ -15053,22 +14987,22 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_print::printPtr(os, *(params->phDevice)); + printPtr(os, *(params->phDevice)); os << ", "; os << ".pUSMDesc = "; - ur_print::printPtr(os, *(params->ppUSMDesc)); + printPtr(os, *(params->ppUSMDesc)); os << ", "; os << ".pool = "; - ur_print::printPtr(os, *(params->ppool)); + printPtr(os, *(params->ppool)); os << ", "; os << ".size = "; @@ -15078,7 +15012,7 @@ operator<<(std::ostream &os, os << ", "; os << ".ppMem = "; - ur_print::printPtr(os, *(params->pppMem)); + printPtr(os, *(params->pppMem)); return os; } @@ -15089,12 +15023,12 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".pMem = "; - ur_print::printPtr(os, *(params->ppMem)); + printPtr(os, *(params->ppMem)); return os; } @@ -15105,12 +15039,12 @@ inline std::ostream &operator<<( os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".pMem = "; - ur_print::printPtr(os, *(params->ppMem)); + printPtr(os, *(params->ppMem)); os << ", "; os << ".propName = "; @@ -15124,13 +15058,13 @@ inline std::ostream &operator<<( os << ", "; os << ".pPropValue = "; - ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_print::printPtr(os, *(params->ppPropSizeRet)); + printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -15141,17 +15075,17 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".pPoolDesc = "; - ur_print::printPtr(os, *(params->ppPoolDesc)); + printPtr(os, *(params->ppPoolDesc)); os << ", "; os << ".ppPool = "; - ur_print::printPtr(os, *(params->pppPool)); + printPtr(os, *(params->pppPool)); return os; } @@ -15162,7 +15096,7 @@ operator<<(std::ostream &os, os << ".pPool = "; - ur_print::printPtr(os, *(params->ppPool)); + printPtr(os, *(params->ppPool)); return os; } @@ -15173,7 +15107,7 @@ operator<<(std::ostream &os, os << ".pPool = "; - ur_print::printPtr(os, *(params->ppPool)); + printPtr(os, *(params->ppPool)); return os; } @@ -15184,7 +15118,7 @@ inline std::ostream &operator<<( os << ".hPool = "; - ur_print::printPtr(os, *(params->phPool)); + printPtr(os, *(params->phPool)); os << ", "; os << ".propName = "; @@ -15198,13 +15132,13 @@ inline std::ostream &operator<<( os << ", "; os << ".pPropValue = "; - ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_print::printPtr(os, *(params->ppPropSizeRet)); + printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -15215,22 +15149,22 @@ inline std::ostream &operator<<( os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_print::printPtr(os, *(params->phDevice)); + printPtr(os, *(params->phDevice)); os << ", "; os << ".pUSMDesc = "; - ur_print::printPtr(os, *(params->ppUSMDesc)); + printPtr(os, *(params->ppUSMDesc)); os << ", "; os << ".pool = "; - ur_print::printPtr(os, *(params->ppool)); + printPtr(os, *(params->ppool)); os << ", "; os << ".widthInBytes = "; @@ -15250,12 +15184,12 @@ inline std::ostream &operator<<( os << ", "; os << ".ppMem = "; - ur_print::printPtr(os, *(params->pppMem)); + printPtr(os, *(params->pppMem)); os << ", "; os << ".pResultPitch = "; - ur_print::printPtr(os, *(params->ppResultPitch)); + printPtr(os, *(params->ppResultPitch)); return os; } @@ -15266,12 +15200,12 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".pMem = "; - ur_print::printPtr(os, *(params->ppMem)); + printPtr(os, *(params->ppMem)); os << ", "; os << ".size = "; @@ -15287,12 +15221,12 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".pMem = "; - ur_print::printPtr(os, *(params->ppMem)); + printPtr(os, *(params->ppMem)); return os; } @@ -15304,12 +15238,12 @@ inline std::ostream &operator<<( os << ".commandDevice = "; - ur_print::printPtr(os, *(params->pcommandDevice)); + printPtr(os, *(params->pcommandDevice)); os << ", "; os << ".peerDevice = "; - ur_print::printPtr(os, *(params->ppeerDevice)); + printPtr(os, *(params->ppeerDevice)); return os; } @@ -15321,12 +15255,12 @@ inline std::ostream &operator<<( os << ".commandDevice = "; - ur_print::printPtr(os, *(params->pcommandDevice)); + printPtr(os, *(params->pcommandDevice)); os << ", "; os << ".peerDevice = "; - ur_print::printPtr(os, *(params->ppeerDevice)); + printPtr(os, *(params->ppeerDevice)); return os; } @@ -15338,12 +15272,12 @@ inline std::ostream &operator<<( os << ".commandDevice = "; - ur_print::printPtr(os, *(params->pcommandDevice)); + printPtr(os, *(params->pcommandDevice)); os << ", "; os << ".peerDevice = "; - ur_print::printPtr(os, *(params->ppeerDevice)); + printPtr(os, *(params->ppeerDevice)); os << ", "; os << ".propName = "; @@ -15357,13 +15291,13 @@ inline std::ostream &operator<<( os << ", "; os << ".pPropValue = "; - ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_print::printPtr(os, *(params->ppPropSizeRet)); + printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -15375,12 +15309,12 @@ inline std::ostream &operator<<( os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".hDevice = "; - ur_print::printPtr(os, *(params->phDevice)); + printPtr(os, *(params->phDevice)); os << ", "; os << ".propName = "; @@ -15394,13 +15328,13 @@ inline std::ostream &operator<<( os << ", "; os << ".pPropValue = "; - ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_print::printPtr(os, *(params->ppPropSizeRet)); + printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -15411,12 +15345,12 @@ inline std::ostream &operator<<( os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".pStart = "; - ur_print::printPtr(os, *(params->ppStart)); + printPtr(os, *(params->ppStart)); os << ", "; os << ".size = "; @@ -15426,7 +15360,7 @@ inline std::ostream &operator<<( os << ", "; os << ".ppStart = "; - ur_print::printPtr(os, *(params->pppStart)); + printPtr(os, *(params->pppStart)); return os; } @@ -15437,12 +15371,12 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".pStart = "; - ur_print::printPtr(os, *(params->ppStart)); + printPtr(os, *(params->ppStart)); os << ", "; os << ".size = "; @@ -15458,12 +15392,12 @@ operator<<(std::ostream &os, os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".pStart = "; - ur_print::printPtr(os, *(params->ppStart)); + printPtr(os, *(params->ppStart)); os << ", "; os << ".size = "; @@ -15473,7 +15407,7 @@ operator<<(std::ostream &os, os << ", "; os << ".hPhysicalMem = "; - ur_print::printPtr(os, *(params->phPhysicalMem)); + printPtr(os, *(params->phPhysicalMem)); os << ", "; os << ".offset = "; @@ -15483,7 +15417,7 @@ operator<<(std::ostream &os, os << ", "; os << ".flags = "; - ur_print::printFlag(os, *(params->pflags)); + printFlag(os, *(params->pflags)); return os; } @@ -15494,12 +15428,12 @@ inline std::ostream &operator<<( os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".pStart = "; - ur_print::printPtr(os, *(params->ppStart)); + printPtr(os, *(params->ppStart)); os << ", "; os << ".size = "; @@ -15515,12 +15449,12 @@ inline std::ostream &operator<<( os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".pStart = "; - ur_print::printPtr(os, *(params->ppStart)); + printPtr(os, *(params->ppStart)); os << ", "; os << ".size = "; @@ -15530,7 +15464,7 @@ inline std::ostream &operator<<( os << ", "; os << ".flags = "; - ur_print::printFlag(os, *(params->pflags)); + printFlag(os, *(params->pflags)); return os; } @@ -15541,12 +15475,12 @@ inline std::ostream &operator<<( os << ".hContext = "; - ur_print::printPtr(os, *(params->phContext)); + printPtr(os, *(params->phContext)); os << ", "; os << ".pStart = "; - ur_print::printPtr(os, *(params->ppStart)); + printPtr(os, *(params->ppStart)); os << ", "; os << ".size = "; @@ -15565,13 +15499,13 @@ inline std::ostream &operator<<( os << ", "; os << ".pPropValue = "; - ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_print::printPtr(os, *(params->ppPropSizeRet)); + printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -15582,7 +15516,7 @@ operator<<(std::ostream &os, os << ".hPlatform = "; - ur_print::printPtr(os, *(params->phPlatform)); + printPtr(os, *(params->phPlatform)); os << ", "; os << ".DeviceType = "; @@ -15602,14 +15536,14 @@ operator<<(std::ostream &os, os << ", "; } - ur_print::printPtr(os, (*(params->pphDevices))[i]); + printPtr(os, (*(params->pphDevices))[i]); } os << "}"; os << ", "; os << ".pNumDevices = "; - ur_print::printPtr(os, *(params->ppNumDevices)); + printPtr(os, *(params->ppNumDevices)); return os; } @@ -15620,7 +15554,7 @@ operator<<(std::ostream &os, os << ".hDevice = "; - ur_print::printPtr(os, *(params->phDevice)); + printPtr(os, *(params->phDevice)); os << ", "; os << ".propName = "; @@ -15634,13 +15568,13 @@ operator<<(std::ostream &os, os << ", "; os << ".pPropValue = "; - ur_print::printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + printTagged(os, *(params->ppPropValue), *(params->ppropName), + *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - ur_print::printPtr(os, *(params->ppPropSizeRet)); + printPtr(os, *(params->ppPropSizeRet)); return os; } @@ -15651,7 +15585,7 @@ operator<<(std::ostream &os, os << ".hDevice = "; - ur_print::printPtr(os, *(params->phDevice)); + printPtr(os, *(params->phDevice)); return os; } @@ -15662,7 +15596,7 @@ operator<<(std::ostream &os, os << ".hDevice = "; - ur_print::printPtr(os, *(params->phDevice)); + printPtr(os, *(params->phDevice)); return os; } @@ -15673,12 +15607,12 @@ operator<<(std::ostream &os, os << ".hDevice = "; - ur_print::printPtr(os, *(params->phDevice)); + printPtr(os, *(params->phDevice)); os << ", "; os << ".pProperties = "; - ur_print::printPtr(os, *(params->ppProperties)); + printPtr(os, *(params->ppProperties)); os << ", "; os << ".NumDevices = "; @@ -15693,14 +15627,14 @@ operator<<(std::ostream &os, os << ", "; } - ur_print::printPtr(os, (*(params->pphSubDevices))[i]); + printPtr(os, (*(params->pphSubDevices))[i]); } os << "}"; os << ", "; os << ".pNumDevicesRet = "; - ur_print::printPtr(os, *(params->ppNumDevicesRet)); + printPtr(os, *(params->ppNumDevicesRet)); return os; } @@ -15711,12 +15645,12 @@ inline std::ostream &operator<<( os << ".hDevice = "; - ur_print::printPtr(os, *(params->phDevice)); + printPtr(os, *(params->phDevice)); os << ", "; os << ".pBinaries = "; - ur_print::printPtr(os, *(params->ppBinaries)); + printPtr(os, *(params->ppBinaries)); os << ", "; os << ".NumBinaries = "; @@ -15726,7 +15660,7 @@ inline std::ostream &operator<<( os << ", "; os << ".pSelectedBinary = "; - ur_print::printPtr(os, *(params->ppSelectedBinary)); + printPtr(os, *(params->ppSelectedBinary)); return os; } @@ -15738,12 +15672,12 @@ operator<<(std::ostream &os, os << ".hDevice = "; - ur_print::printPtr(os, *(params->phDevice)); + printPtr(os, *(params->phDevice)); os << ", "; os << ".phNativeDevice = "; - ur_print::printPtr(os, *(params->pphNativeDevice)); + printPtr(os, *(params->pphNativeDevice)); return os; } @@ -15755,22 +15689,22 @@ inline std::ostream &operator<<( os << ".hNativeDevice = "; - ur_print::printPtr(os, *(params->phNativeDevice)); + printPtr(os, *(params->phNativeDevice)); os << ", "; os << ".hPlatform = "; - ur_print::printPtr(os, *(params->phPlatform)); + printPtr(os, *(params->phPlatform)); os << ", "; os << ".pProperties = "; - ur_print::printPtr(os, *(params->ppProperties)); + printPtr(os, *(params->ppProperties)); os << ", "; os << ".phDevice = "; - ur_print::printPtr(os, *(params->pphDevice)); + printPtr(os, *(params->pphDevice)); return os; } @@ -15782,23 +15716,21 @@ inline std::ostream &operator<<( os << ".hDevice = "; - ur_print::printPtr(os, *(params->phDevice)); + printPtr(os, *(params->phDevice)); os << ", "; os << ".pDeviceTimestamp = "; - ur_print::printPtr(os, *(params->ppDeviceTimestamp)); + printPtr(os, *(params->ppDeviceTimestamp)); os << ", "; os << ".pHostTimestamp = "; - ur_print::printPtr(os, *(params->ppHostTimestamp)); + printPtr(os, *(params->ppHostTimestamp)); return os; } -namespace ur_print { - template inline void printPtr(std::ostream &os, const T *ptr) { if (ptr == nullptr) { os << "nullptr"; From 5f0e6d4eaff2a6afab13fe78dd7ced85811dab2f Mon Sep 17 00:00:00 2001 From: Patryk Kaminski Date: Mon, 18 Sep 2023 12:26:38 +0200 Subject: [PATCH 3/3] Move printing C++ API to include --- {source/common => include}/ur_print.hpp | 10840 ++++++++--------- scripts/Doxyfile | 3 +- scripts/core/INTRO.rst | 8 + scripts/generate_code.py | 5 +- scripts/templates/print.hpp.mako | 200 +- source/common/logger/ur_sinks.hpp | 2 +- test/loader/loader_lifetime/urLoaderInit.cpp | 2 +- test/unit/utils/params.cpp | 4 +- tools/urtrace/collector.cpp | 4 +- 9 files changed, 5533 insertions(+), 5535 deletions(-) rename {source/common => include}/ur_print.hpp (54%) diff --git a/source/common/ur_print.hpp b/include/ur_print.hpp similarity index 54% rename from source/common/ur_print.hpp rename to include/ur_print.hpp index a9f0bfb500..6a47b955bc 100644 --- a/source/common/ur_print.hpp +++ b/include/ur_print.hpp @@ -7,6 +7,7 @@ * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * * @file ur_print.hpp + * @version v0.8-r0 * */ #ifndef UR_PRINT_HPP @@ -16,1186 +17,858 @@ #include #include -namespace ur_print { -template struct is_handle : std::false_type {}; -template <> struct is_handle : std::true_type {}; -template <> struct is_handle : std::true_type {}; -template <> struct is_handle : std::true_type {}; -template <> struct is_handle : std::true_type {}; -template <> struct is_handle : std::true_type {}; -template <> struct is_handle : std::true_type {}; -template <> struct is_handle : std::true_type {}; -template <> struct is_handle : std::true_type {}; -template <> struct is_handle : std::true_type {}; -template <> struct is_handle : std::true_type {}; -template <> struct is_handle : std::true_type {}; -template <> struct is_handle : std::true_type {}; -template <> struct is_handle : std::true_type {}; -template <> struct is_handle : std::true_type {}; -template <> struct is_handle : std::true_type {}; -template <> struct is_handle : std::true_type {}; -template <> struct is_handle : std::true_type {}; +namespace ur { +namespace print { +namespace details { +template +struct is_handle : std::false_type {}; +template <> +struct is_handle : std::true_type {}; +template <> +struct is_handle : std::true_type {}; +template <> +struct is_handle : std::true_type {}; +template <> +struct is_handle : std::true_type {}; +template <> +struct is_handle : std::true_type {}; +template <> +struct is_handle : std::true_type {}; +template <> +struct is_handle : std::true_type {}; +template <> +struct is_handle : std::true_type {}; +template <> +struct is_handle : std::true_type {}; +template <> +struct is_handle : std::true_type {}; +template <> +struct is_handle : std::true_type {}; +template <> +struct is_handle : std::true_type {}; +template <> +struct is_handle : std::true_type {}; +template <> +struct is_handle : std::true_type {}; +template <> +struct is_handle : std::true_type {}; +template <> +struct is_handle : std::true_type {}; +template <> +struct is_handle : std::true_type {}; 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 printPtr(std::ostream &os, const T *ptr); -template inline void printFlag(std::ostream &os, uint32_t flag); template -inline void printTagged(std::ostream &os, const void *ptr, T value, - size_t size); +inline constexpr bool is_handle_v = is_handle::value; +template +inline ur_result_t printPtr(std::ostream &os, const T *ptr); +template +inline ur_result_t printFlag(std::ostream &os, uint32_t flag); +template +inline ur_result_t printTagged(std::ostream &os, const void *ptr, T value, size_t size); -inline void printStruct(std::ostream &os, const void *ptr); +inline ur_result_t printStruct(std::ostream &os, const void *ptr); template <> -inline void printFlag(std::ostream &os, uint32_t flag); +inline ur_result_t printFlag(std::ostream &os, uint32_t flag); template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_loader_config_info_t value, size_t size); +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_loader_config_info_t value, size_t size); template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_adapter_info_t value, size_t size); +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_adapter_info_t value, size_t size); template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_platform_info_t value, size_t size); +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_platform_info_t value, size_t size); template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_device_info_t value, size_t size); +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_device_info_t value, size_t size); template <> -inline void printFlag(std::ostream &os, - uint32_t flag); +inline ur_result_t printFlag(std::ostream &os, uint32_t flag); -inline void printUnion(std::ostream &os, - const union ur_device_partition_value_t params, - const enum ur_device_partition_t tag); +inline ur_result_t printUnion( + std::ostream &os, + const union ur_device_partition_value_t params, + const enum ur_device_partition_t tag); template <> -inline void printFlag(std::ostream &os, - uint32_t flag); +inline ur_result_t printFlag(std::ostream &os, uint32_t flag); template <> -inline void printFlag(std::ostream &os, - uint32_t flag); +inline ur_result_t printFlag(std::ostream &os, uint32_t flag); template <> -inline void printFlag(std::ostream &os, - uint32_t flag); +inline ur_result_t printFlag(std::ostream &os, uint32_t flag); template <> -inline void printFlag(std::ostream &os, - uint32_t flag); +inline ur_result_t printFlag(std::ostream &os, uint32_t flag); template <> -inline void printFlag(std::ostream &os, - uint32_t flag); +inline ur_result_t printFlag(std::ostream &os, uint32_t flag); template <> -inline void printFlag(std::ostream &os, uint32_t flag); +inline ur_result_t printFlag(std::ostream &os, uint32_t flag); template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_context_info_t value, size_t size); +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_context_info_t value, size_t size); template <> -inline void printFlag(std::ostream &os, uint32_t flag); +inline ur_result_t printFlag(std::ostream &os, uint32_t flag); template <> -inline void printTagged(std::ostream &os, const void *ptr, ur_mem_info_t value, - size_t size); +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_mem_info_t value, size_t size); template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_image_info_t value, size_t size); +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_image_info_t value, size_t size); template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_sampler_info_t value, size_t size); +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_sampler_info_t value, size_t size); template <> -inline void printFlag(std::ostream &os, uint32_t flag); +inline ur_result_t printFlag(std::ostream &os, uint32_t flag); template <> -inline void printFlag(std::ostream &os, - uint32_t flag); +inline ur_result_t printFlag(std::ostream &os, uint32_t flag); template <> -inline void printFlag(std::ostream &os, uint32_t flag); +inline ur_result_t printFlag(std::ostream &os, uint32_t flag); template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_usm_alloc_info_t value, size_t size); +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_usm_alloc_info_t value, size_t size); template <> -inline void printFlag(std::ostream &os, uint32_t flag); +inline ur_result_t printFlag(std::ostream &os, uint32_t flag); template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_usm_pool_info_t value, size_t size); +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_usm_pool_info_t value, size_t size); template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_virtual_mem_granularity_info_t value, size_t size); +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_virtual_mem_granularity_info_t value, size_t size); template <> -inline void printFlag(std::ostream &os, - uint32_t flag); +inline ur_result_t printFlag(std::ostream &os, uint32_t flag); template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_virtual_mem_info_t value, size_t size); +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_virtual_mem_info_t value, size_t size); template <> -inline void printFlag(std::ostream &os, uint32_t flag); +inline ur_result_t printFlag(std::ostream &os, uint32_t flag); -inline void printUnion(std::ostream &os, - const union ur_program_metadata_value_t params, - const enum ur_program_metadata_type_t tag); +inline ur_result_t printUnion( + std::ostream &os, + const union ur_program_metadata_value_t params, + const enum ur_program_metadata_type_t tag); template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_program_info_t value, size_t size); +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_program_info_t value, size_t size); template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_program_build_info_t value, size_t size); +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_program_build_info_t value, size_t size); template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_kernel_info_t value, size_t size); +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_kernel_info_t value, size_t size); template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_kernel_group_info_t value, size_t size); +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_kernel_group_info_t value, size_t size); template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_kernel_sub_group_info_t value, size_t size); +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_kernel_sub_group_info_t value, size_t size); template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_kernel_exec_info_t value, size_t size); +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_kernel_exec_info_t value, size_t size); template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_queue_info_t value, size_t size); +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_queue_info_t value, size_t size); template <> -inline void printFlag(std::ostream &os, uint32_t flag); +inline ur_result_t printFlag(std::ostream &os, uint32_t flag); template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_event_info_t value, size_t size); +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_event_info_t value, size_t size); template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_profiling_info_t value, size_t size); +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_profiling_info_t value, size_t size); template <> -inline void printFlag(std::ostream &os, uint32_t flag); +inline ur_result_t printFlag(std::ostream &os, uint32_t flag); template <> -inline void printFlag(std::ostream &os, uint32_t flag); +inline ur_result_t printFlag(std::ostream &os, uint32_t flag); template <> -inline void printFlag(std::ostream &os, - uint32_t flag); +inline ur_result_t printFlag(std::ostream &os, uint32_t flag); template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_exp_peer_info_t value, size_t size); - -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"; break; - case UR_FUNCTION_CONTEXT_RETAIN: os << "UR_FUNCTION_CONTEXT_RETAIN"; break; - case UR_FUNCTION_CONTEXT_RELEASE: os << "UR_FUNCTION_CONTEXT_RELEASE"; break; - case UR_FUNCTION_CONTEXT_GET_INFO: os << "UR_FUNCTION_CONTEXT_GET_INFO"; break; - case UR_FUNCTION_CONTEXT_GET_NATIVE_HANDLE: os << "UR_FUNCTION_CONTEXT_GET_NATIVE_HANDLE"; break; - case UR_FUNCTION_CONTEXT_CREATE_WITH_NATIVE_HANDLE: os << "UR_FUNCTION_CONTEXT_CREATE_WITH_NATIVE_HANDLE"; break; - case UR_FUNCTION_CONTEXT_SET_EXTENDED_DELETER: os << "UR_FUNCTION_CONTEXT_SET_EXTENDED_DELETER"; break; - case UR_FUNCTION_DEVICE_GET: os << "UR_FUNCTION_DEVICE_GET"; break; - case UR_FUNCTION_DEVICE_GET_INFO: os << "UR_FUNCTION_DEVICE_GET_INFO"; break; - case UR_FUNCTION_DEVICE_RETAIN: os << "UR_FUNCTION_DEVICE_RETAIN"; break; - case UR_FUNCTION_DEVICE_RELEASE: os << "UR_FUNCTION_DEVICE_RELEASE"; break; - case UR_FUNCTION_DEVICE_PARTITION: os << "UR_FUNCTION_DEVICE_PARTITION"; break; - case UR_FUNCTION_DEVICE_SELECT_BINARY: os << "UR_FUNCTION_DEVICE_SELECT_BINARY"; break; - case UR_FUNCTION_DEVICE_GET_NATIVE_HANDLE: os << "UR_FUNCTION_DEVICE_GET_NATIVE_HANDLE"; break; - case UR_FUNCTION_DEVICE_CREATE_WITH_NATIVE_HANDLE: os << "UR_FUNCTION_DEVICE_CREATE_WITH_NATIVE_HANDLE"; break; - case UR_FUNCTION_DEVICE_GET_GLOBAL_TIMESTAMPS: os << "UR_FUNCTION_DEVICE_GET_GLOBAL_TIMESTAMPS"; break; - case UR_FUNCTION_ENQUEUE_KERNEL_LAUNCH: os << "UR_FUNCTION_ENQUEUE_KERNEL_LAUNCH"; break; - case UR_FUNCTION_ENQUEUE_EVENTS_WAIT: os << "UR_FUNCTION_ENQUEUE_EVENTS_WAIT"; break; - case UR_FUNCTION_ENQUEUE_EVENTS_WAIT_WITH_BARRIER: os << "UR_FUNCTION_ENQUEUE_EVENTS_WAIT_WITH_BARRIER"; break; - case UR_FUNCTION_ENQUEUE_MEM_BUFFER_READ: os << "UR_FUNCTION_ENQUEUE_MEM_BUFFER_READ"; break; - case UR_FUNCTION_ENQUEUE_MEM_BUFFER_WRITE: os << "UR_FUNCTION_ENQUEUE_MEM_BUFFER_WRITE"; break; - case UR_FUNCTION_ENQUEUE_MEM_BUFFER_READ_RECT: os << "UR_FUNCTION_ENQUEUE_MEM_BUFFER_READ_RECT"; break; - case UR_FUNCTION_ENQUEUE_MEM_BUFFER_WRITE_RECT: os << "UR_FUNCTION_ENQUEUE_MEM_BUFFER_WRITE_RECT"; break; - case UR_FUNCTION_ENQUEUE_MEM_BUFFER_COPY: os << "UR_FUNCTION_ENQUEUE_MEM_BUFFER_COPY"; break; - case UR_FUNCTION_ENQUEUE_MEM_BUFFER_COPY_RECT: os << "UR_FUNCTION_ENQUEUE_MEM_BUFFER_COPY_RECT"; break; - case UR_FUNCTION_ENQUEUE_MEM_BUFFER_FILL: os << "UR_FUNCTION_ENQUEUE_MEM_BUFFER_FILL"; break; - case UR_FUNCTION_ENQUEUE_MEM_IMAGE_READ: os << "UR_FUNCTION_ENQUEUE_MEM_IMAGE_READ"; break; - case UR_FUNCTION_ENQUEUE_MEM_IMAGE_WRITE: os << "UR_FUNCTION_ENQUEUE_MEM_IMAGE_WRITE"; break; - case UR_FUNCTION_ENQUEUE_MEM_IMAGE_COPY: os << "UR_FUNCTION_ENQUEUE_MEM_IMAGE_COPY"; break; - case UR_FUNCTION_ENQUEUE_MEM_BUFFER_MAP: os << "UR_FUNCTION_ENQUEUE_MEM_BUFFER_MAP"; break; - case UR_FUNCTION_ENQUEUE_MEM_UNMAP: os << "UR_FUNCTION_ENQUEUE_MEM_UNMAP"; break; - case UR_FUNCTION_ENQUEUE_USM_FILL: os << "UR_FUNCTION_ENQUEUE_USM_FILL"; break; - case UR_FUNCTION_ENQUEUE_USM_MEMCPY: os << "UR_FUNCTION_ENQUEUE_USM_MEMCPY"; break; - case UR_FUNCTION_ENQUEUE_USM_PREFETCH: os << "UR_FUNCTION_ENQUEUE_USM_PREFETCH"; break; - case UR_FUNCTION_ENQUEUE_USM_ADVISE: os << "UR_FUNCTION_ENQUEUE_USM_ADVISE"; break; - case UR_FUNCTION_ENQUEUE_DEVICE_GLOBAL_VARIABLE_WRITE: os << "UR_FUNCTION_ENQUEUE_DEVICE_GLOBAL_VARIABLE_WRITE"; break; - case UR_FUNCTION_ENQUEUE_DEVICE_GLOBAL_VARIABLE_READ: os << "UR_FUNCTION_ENQUEUE_DEVICE_GLOBAL_VARIABLE_READ"; break; - case UR_FUNCTION_EVENT_GET_INFO: os << "UR_FUNCTION_EVENT_GET_INFO"; break; - case UR_FUNCTION_EVENT_GET_PROFILING_INFO: os << "UR_FUNCTION_EVENT_GET_PROFILING_INFO"; break; - case UR_FUNCTION_EVENT_WAIT: os << "UR_FUNCTION_EVENT_WAIT"; break; - case UR_FUNCTION_EVENT_RETAIN: os << "UR_FUNCTION_EVENT_RETAIN"; break; - case UR_FUNCTION_EVENT_RELEASE: os << "UR_FUNCTION_EVENT_RELEASE"; break; - case UR_FUNCTION_EVENT_GET_NATIVE_HANDLE: os << "UR_FUNCTION_EVENT_GET_NATIVE_HANDLE"; break; - case UR_FUNCTION_EVENT_CREATE_WITH_NATIVE_HANDLE: os << "UR_FUNCTION_EVENT_CREATE_WITH_NATIVE_HANDLE"; break; - case UR_FUNCTION_EVENT_SET_CALLBACK: os << "UR_FUNCTION_EVENT_SET_CALLBACK"; break; - case UR_FUNCTION_KERNEL_CREATE: os << "UR_FUNCTION_KERNEL_CREATE"; break; - case UR_FUNCTION_KERNEL_SET_ARG_VALUE: os << "UR_FUNCTION_KERNEL_SET_ARG_VALUE"; break; - case UR_FUNCTION_KERNEL_SET_ARG_LOCAL: os << "UR_FUNCTION_KERNEL_SET_ARG_LOCAL"; break; - case UR_FUNCTION_KERNEL_GET_INFO: os << "UR_FUNCTION_KERNEL_GET_INFO"; break; - case UR_FUNCTION_KERNEL_GET_GROUP_INFO: os << "UR_FUNCTION_KERNEL_GET_GROUP_INFO"; break; - case UR_FUNCTION_KERNEL_GET_SUB_GROUP_INFO: os << "UR_FUNCTION_KERNEL_GET_SUB_GROUP_INFO"; break; - case UR_FUNCTION_KERNEL_RETAIN: os << "UR_FUNCTION_KERNEL_RETAIN"; break; - case UR_FUNCTION_KERNEL_RELEASE: os << "UR_FUNCTION_KERNEL_RELEASE"; break; - case UR_FUNCTION_KERNEL_SET_ARG_POINTER: os << "UR_FUNCTION_KERNEL_SET_ARG_POINTER"; break; - case UR_FUNCTION_KERNEL_SET_EXEC_INFO: os << "UR_FUNCTION_KERNEL_SET_EXEC_INFO"; break; - case UR_FUNCTION_KERNEL_SET_ARG_SAMPLER: os << "UR_FUNCTION_KERNEL_SET_ARG_SAMPLER"; break; - case UR_FUNCTION_KERNEL_SET_ARG_MEM_OBJ: os << "UR_FUNCTION_KERNEL_SET_ARG_MEM_OBJ"; break; - case UR_FUNCTION_KERNEL_SET_SPECIALIZATION_CONSTANTS: os << "UR_FUNCTION_KERNEL_SET_SPECIALIZATION_CONSTANTS"; break; - case UR_FUNCTION_KERNEL_GET_NATIVE_HANDLE: os << "UR_FUNCTION_KERNEL_GET_NATIVE_HANDLE"; break; - case UR_FUNCTION_KERNEL_CREATE_WITH_NATIVE_HANDLE: os << "UR_FUNCTION_KERNEL_CREATE_WITH_NATIVE_HANDLE"; break; - case UR_FUNCTION_MEM_IMAGE_CREATE: os << "UR_FUNCTION_MEM_IMAGE_CREATE"; break; - case UR_FUNCTION_MEM_BUFFER_CREATE: os << "UR_FUNCTION_MEM_BUFFER_CREATE"; break; - case UR_FUNCTION_MEM_RETAIN: os << "UR_FUNCTION_MEM_RETAIN"; break; - case UR_FUNCTION_MEM_RELEASE: os << "UR_FUNCTION_MEM_RELEASE"; break; - case UR_FUNCTION_MEM_BUFFER_PARTITION: os << "UR_FUNCTION_MEM_BUFFER_PARTITION"; break; - case UR_FUNCTION_MEM_GET_NATIVE_HANDLE: os << "UR_FUNCTION_MEM_GET_NATIVE_HANDLE"; break; - case UR_FUNCTION_ENQUEUE_READ_HOST_PIPE: os << "UR_FUNCTION_ENQUEUE_READ_HOST_PIPE"; break; - case UR_FUNCTION_MEM_GET_INFO: os << "UR_FUNCTION_MEM_GET_INFO"; break; - case UR_FUNCTION_MEM_IMAGE_GET_INFO: os << "UR_FUNCTION_MEM_IMAGE_GET_INFO"; break; - case UR_FUNCTION_PLATFORM_GET: os << "UR_FUNCTION_PLATFORM_GET"; break; - case UR_FUNCTION_PLATFORM_GET_INFO: os << "UR_FUNCTION_PLATFORM_GET_INFO"; break; - case UR_FUNCTION_PLATFORM_GET_API_VERSION: os << "UR_FUNCTION_PLATFORM_GET_API_VERSION"; break; - case UR_FUNCTION_PLATFORM_GET_NATIVE_HANDLE: os << "UR_FUNCTION_PLATFORM_GET_NATIVE_HANDLE"; break; - case UR_FUNCTION_PLATFORM_CREATE_WITH_NATIVE_HANDLE: os << "UR_FUNCTION_PLATFORM_CREATE_WITH_NATIVE_HANDLE"; break; - case UR_FUNCTION_PROGRAM_CREATE_WITH_IL: os << "UR_FUNCTION_PROGRAM_CREATE_WITH_IL"; break; - case UR_FUNCTION_PROGRAM_CREATE_WITH_BINARY: os << "UR_FUNCTION_PROGRAM_CREATE_WITH_BINARY"; break; - case UR_FUNCTION_PROGRAM_BUILD: os << "UR_FUNCTION_PROGRAM_BUILD"; break; - case UR_FUNCTION_PROGRAM_COMPILE: os << "UR_FUNCTION_PROGRAM_COMPILE"; break; - case UR_FUNCTION_PROGRAM_LINK: os << "UR_FUNCTION_PROGRAM_LINK"; break; - case UR_FUNCTION_PROGRAM_RETAIN: os << "UR_FUNCTION_PROGRAM_RETAIN"; break; - case UR_FUNCTION_PROGRAM_RELEASE: os << "UR_FUNCTION_PROGRAM_RELEASE"; break; - case UR_FUNCTION_PROGRAM_GET_FUNCTION_POINTER: os << "UR_FUNCTION_PROGRAM_GET_FUNCTION_POINTER"; break; - case UR_FUNCTION_PROGRAM_GET_INFO: os << "UR_FUNCTION_PROGRAM_GET_INFO"; break; - case UR_FUNCTION_PROGRAM_GET_BUILD_INFO: os << "UR_FUNCTION_PROGRAM_GET_BUILD_INFO"; break; - case UR_FUNCTION_PROGRAM_SET_SPECIALIZATION_CONSTANTS: os << "UR_FUNCTION_PROGRAM_SET_SPECIALIZATION_CONSTANTS"; break; - case UR_FUNCTION_PROGRAM_GET_NATIVE_HANDLE: os << "UR_FUNCTION_PROGRAM_GET_NATIVE_HANDLE"; break; - case UR_FUNCTION_PROGRAM_CREATE_WITH_NATIVE_HANDLE: os << "UR_FUNCTION_PROGRAM_CREATE_WITH_NATIVE_HANDLE"; break; - case UR_FUNCTION_QUEUE_GET_INFO: os << "UR_FUNCTION_QUEUE_GET_INFO"; break; - case UR_FUNCTION_QUEUE_CREATE: os << "UR_FUNCTION_QUEUE_CREATE"; break; - case UR_FUNCTION_QUEUE_RETAIN: os << "UR_FUNCTION_QUEUE_RETAIN"; break; - case UR_FUNCTION_QUEUE_RELEASE: os << "UR_FUNCTION_QUEUE_RELEASE"; break; - case UR_FUNCTION_QUEUE_GET_NATIVE_HANDLE: os << "UR_FUNCTION_QUEUE_GET_NATIVE_HANDLE"; break; - case UR_FUNCTION_QUEUE_CREATE_WITH_NATIVE_HANDLE: os << "UR_FUNCTION_QUEUE_CREATE_WITH_NATIVE_HANDLE"; break; - case UR_FUNCTION_QUEUE_FINISH: os << "UR_FUNCTION_QUEUE_FINISH"; break; - case UR_FUNCTION_QUEUE_FLUSH: os << "UR_FUNCTION_QUEUE_FLUSH"; break; - case UR_FUNCTION_SAMPLER_CREATE: os << "UR_FUNCTION_SAMPLER_CREATE"; break; - case UR_FUNCTION_SAMPLER_RETAIN: os << "UR_FUNCTION_SAMPLER_RETAIN"; break; - case UR_FUNCTION_SAMPLER_RELEASE: os << "UR_FUNCTION_SAMPLER_RELEASE"; break; - case UR_FUNCTION_SAMPLER_GET_INFO: os << "UR_FUNCTION_SAMPLER_GET_INFO"; break; - case UR_FUNCTION_SAMPLER_GET_NATIVE_HANDLE: os << "UR_FUNCTION_SAMPLER_GET_NATIVE_HANDLE"; break; - case UR_FUNCTION_SAMPLER_CREATE_WITH_NATIVE_HANDLE: os << "UR_FUNCTION_SAMPLER_CREATE_WITH_NATIVE_HANDLE"; break; - case UR_FUNCTION_USM_HOST_ALLOC: os << "UR_FUNCTION_USM_HOST_ALLOC"; break; - case UR_FUNCTION_USM_DEVICE_ALLOC: os << "UR_FUNCTION_USM_DEVICE_ALLOC"; break; - case UR_FUNCTION_USM_SHARED_ALLOC: os << "UR_FUNCTION_USM_SHARED_ALLOC"; break; - case UR_FUNCTION_USM_FREE: os << "UR_FUNCTION_USM_FREE"; break; - case UR_FUNCTION_USM_GET_MEM_ALLOC_INFO: os << "UR_FUNCTION_USM_GET_MEM_ALLOC_INFO"; break; - case UR_FUNCTION_USM_POOL_CREATE: os << "UR_FUNCTION_USM_POOL_CREATE"; break; - case UR_FUNCTION_COMMAND_BUFFER_CREATE_EXP: os << "UR_FUNCTION_COMMAND_BUFFER_CREATE_EXP"; break; - case UR_FUNCTION_PLATFORM_GET_BACKEND_OPTION: os << "UR_FUNCTION_PLATFORM_GET_BACKEND_OPTION"; break; - case UR_FUNCTION_MEM_BUFFER_CREATE_WITH_NATIVE_HANDLE: os << "UR_FUNCTION_MEM_BUFFER_CREATE_WITH_NATIVE_HANDLE"; break; - case UR_FUNCTION_MEM_IMAGE_CREATE_WITH_NATIVE_HANDLE: os << "UR_FUNCTION_MEM_IMAGE_CREATE_WITH_NATIVE_HANDLE"; break; - case UR_FUNCTION_ENQUEUE_WRITE_HOST_PIPE: os << "UR_FUNCTION_ENQUEUE_WRITE_HOST_PIPE"; break; - case UR_FUNCTION_USM_POOL_RETAIN: os << "UR_FUNCTION_USM_POOL_RETAIN"; break; - case UR_FUNCTION_USM_POOL_RELEASE: os << "UR_FUNCTION_USM_POOL_RELEASE"; break; - case UR_FUNCTION_USM_POOL_GET_INFO: os << "UR_FUNCTION_USM_POOL_GET_INFO"; break; - case UR_FUNCTION_COMMAND_BUFFER_RETAIN_EXP: os << "UR_FUNCTION_COMMAND_BUFFER_RETAIN_EXP"; break; - case UR_FUNCTION_COMMAND_BUFFER_RELEASE_EXP: os << "UR_FUNCTION_COMMAND_BUFFER_RELEASE_EXP"; break; - case UR_FUNCTION_COMMAND_BUFFER_FINALIZE_EXP: os << "UR_FUNCTION_COMMAND_BUFFER_FINALIZE_EXP"; break; - case UR_FUNCTION_COMMAND_BUFFER_APPEND_KERNEL_LAUNCH_EXP: os << "UR_FUNCTION_COMMAND_BUFFER_APPEND_KERNEL_LAUNCH_EXP"; break; - case UR_FUNCTION_COMMAND_BUFFER_ENQUEUE_EXP: os << "UR_FUNCTION_COMMAND_BUFFER_ENQUEUE_EXP"; break; - case UR_FUNCTION_USM_PITCHED_ALLOC_EXP: os << "UR_FUNCTION_USM_PITCHED_ALLOC_EXP"; break; - case UR_FUNCTION_BINDLESS_IMAGES_UNSAMPLED_IMAGE_HANDLE_DESTROY_EXP: os << "UR_FUNCTION_BINDLESS_IMAGES_UNSAMPLED_IMAGE_HANDLE_DESTROY_EXP"; break; - case UR_FUNCTION_BINDLESS_IMAGES_SAMPLED_IMAGE_HANDLE_DESTROY_EXP: os << "UR_FUNCTION_BINDLESS_IMAGES_SAMPLED_IMAGE_HANDLE_DESTROY_EXP"; break; - case UR_FUNCTION_BINDLESS_IMAGES_IMAGE_ALLOCATE_EXP: os << "UR_FUNCTION_BINDLESS_IMAGES_IMAGE_ALLOCATE_EXP"; break; - case UR_FUNCTION_BINDLESS_IMAGES_IMAGE_FREE_EXP: os << "UR_FUNCTION_BINDLESS_IMAGES_IMAGE_FREE_EXP"; break; - case UR_FUNCTION_BINDLESS_IMAGES_UNSAMPLED_IMAGE_CREATE_EXP: os << "UR_FUNCTION_BINDLESS_IMAGES_UNSAMPLED_IMAGE_CREATE_EXP"; break; - case UR_FUNCTION_BINDLESS_IMAGES_SAMPLED_IMAGE_CREATE_EXP: os << "UR_FUNCTION_BINDLESS_IMAGES_SAMPLED_IMAGE_CREATE_EXP"; break; - case UR_FUNCTION_BINDLESS_IMAGES_IMAGE_COPY_EXP: os << "UR_FUNCTION_BINDLESS_IMAGES_IMAGE_COPY_EXP"; break; - case UR_FUNCTION_BINDLESS_IMAGES_IMAGE_GET_INFO_EXP: os << "UR_FUNCTION_BINDLESS_IMAGES_IMAGE_GET_INFO_EXP"; break; - case UR_FUNCTION_BINDLESS_IMAGES_MIPMAP_GET_LEVEL_EXP: os << "UR_FUNCTION_BINDLESS_IMAGES_MIPMAP_GET_LEVEL_EXP"; break; - case UR_FUNCTION_BINDLESS_IMAGES_MIPMAP_FREE_EXP: os << "UR_FUNCTION_BINDLESS_IMAGES_MIPMAP_FREE_EXP"; break; - case UR_FUNCTION_BINDLESS_IMAGES_IMPORT_OPAQUE_FD_EXP: os << "UR_FUNCTION_BINDLESS_IMAGES_IMPORT_OPAQUE_FD_EXP"; break; - case UR_FUNCTION_BINDLESS_IMAGES_MAP_EXTERNAL_ARRAY_EXP: os << "UR_FUNCTION_BINDLESS_IMAGES_MAP_EXTERNAL_ARRAY_EXP"; break; - case UR_FUNCTION_BINDLESS_IMAGES_RELEASE_INTEROP_EXP: os << "UR_FUNCTION_BINDLESS_IMAGES_RELEASE_INTEROP_EXP"; break; - case UR_FUNCTION_BINDLESS_IMAGES_IMPORT_EXTERNAL_SEMAPHORE_OPAQUE_FD_EXP: - os << "UR_FUNCTION_BINDLESS_IMAGES_IMPORT_EXTERNAL_SEMAPHORE_OPAQUE_FD_" - "EXP"; + os << "UR_FUNCTION_BINDLESS_IMAGES_IMPORT_EXTERNAL_SEMAPHORE_OPAQUE_FD_EXP"; break; - case UR_FUNCTION_BINDLESS_IMAGES_DESTROY_EXTERNAL_SEMAPHORE_EXP: os << "UR_FUNCTION_BINDLESS_IMAGES_DESTROY_EXTERNAL_SEMAPHORE_EXP"; break; - case UR_FUNCTION_BINDLESS_IMAGES_WAIT_EXTERNAL_SEMAPHORE_EXP: os << "UR_FUNCTION_BINDLESS_IMAGES_WAIT_EXTERNAL_SEMAPHORE_EXP"; break; - case UR_FUNCTION_BINDLESS_IMAGES_SIGNAL_EXTERNAL_SEMAPHORE_EXP: os << "UR_FUNCTION_BINDLESS_IMAGES_SIGNAL_EXTERNAL_SEMAPHORE_EXP"; break; - case UR_FUNCTION_ENQUEUE_USM_FILL_2D: os << "UR_FUNCTION_ENQUEUE_USM_FILL_2D"; break; - case UR_FUNCTION_ENQUEUE_USM_MEMCPY_2D: os << "UR_FUNCTION_ENQUEUE_USM_MEMCPY_2D"; break; - case UR_FUNCTION_VIRTUAL_MEM_GRANULARITY_GET_INFO: os << "UR_FUNCTION_VIRTUAL_MEM_GRANULARITY_GET_INFO"; break; - case UR_FUNCTION_VIRTUAL_MEM_RESERVE: os << "UR_FUNCTION_VIRTUAL_MEM_RESERVE"; break; - case UR_FUNCTION_VIRTUAL_MEM_FREE: os << "UR_FUNCTION_VIRTUAL_MEM_FREE"; break; - case UR_FUNCTION_VIRTUAL_MEM_MAP: os << "UR_FUNCTION_VIRTUAL_MEM_MAP"; break; - case UR_FUNCTION_VIRTUAL_MEM_UNMAP: os << "UR_FUNCTION_VIRTUAL_MEM_UNMAP"; break; - case UR_FUNCTION_VIRTUAL_MEM_SET_ACCESS: os << "UR_FUNCTION_VIRTUAL_MEM_SET_ACCESS"; break; - case UR_FUNCTION_VIRTUAL_MEM_GET_INFO: os << "UR_FUNCTION_VIRTUAL_MEM_GET_INFO"; break; - case UR_FUNCTION_PHYSICAL_MEM_CREATE: os << "UR_FUNCTION_PHYSICAL_MEM_CREATE"; break; - case UR_FUNCTION_PHYSICAL_MEM_RETAIN: os << "UR_FUNCTION_PHYSICAL_MEM_RETAIN"; break; - case UR_FUNCTION_PHYSICAL_MEM_RELEASE: os << "UR_FUNCTION_PHYSICAL_MEM_RELEASE"; break; - case UR_FUNCTION_USM_IMPORT_EXP: os << "UR_FUNCTION_USM_IMPORT_EXP"; break; - case UR_FUNCTION_USM_RELEASE_EXP: os << "UR_FUNCTION_USM_RELEASE_EXP"; break; - case UR_FUNCTION_USM_P2P_ENABLE_PEER_ACCESS_EXP: os << "UR_FUNCTION_USM_P2P_ENABLE_PEER_ACCESS_EXP"; break; - case UR_FUNCTION_USM_P2P_DISABLE_PEER_ACCESS_EXP: os << "UR_FUNCTION_USM_P2P_DISABLE_PEER_ACCESS_EXP"; break; - case UR_FUNCTION_USM_P2P_PEER_ACCESS_GET_INFO_EXP: os << "UR_FUNCTION_USM_P2P_PEER_ACCESS_GET_INFO_EXP"; break; - case UR_FUNCTION_LOADER_CONFIG_CREATE: os << "UR_FUNCTION_LOADER_CONFIG_CREATE"; break; - case UR_FUNCTION_LOADER_CONFIG_RELEASE: os << "UR_FUNCTION_LOADER_CONFIG_RELEASE"; break; - case UR_FUNCTION_LOADER_CONFIG_RETAIN: os << "UR_FUNCTION_LOADER_CONFIG_RETAIN"; break; - case UR_FUNCTION_LOADER_CONFIG_GET_INFO: os << "UR_FUNCTION_LOADER_CONFIG_GET_INFO"; break; - case UR_FUNCTION_LOADER_CONFIG_ENABLE_LAYER: os << "UR_FUNCTION_LOADER_CONFIG_ENABLE_LAYER"; break; - case UR_FUNCTION_ADAPTER_RELEASE: os << "UR_FUNCTION_ADAPTER_RELEASE"; break; - case UR_FUNCTION_ADAPTER_GET: os << "UR_FUNCTION_ADAPTER_GET"; break; - case UR_FUNCTION_ADAPTER_RETAIN: os << "UR_FUNCTION_ADAPTER_RETAIN"; break; - case UR_FUNCTION_ADAPTER_GET_LAST_ERROR: os << "UR_FUNCTION_ADAPTER_GET_LAST_ERROR"; break; - 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; @@ -1205,174 +878,135 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_function_t value) { } return os; } -inline std::ostream &operator<<(std::ostream &os, - enum ur_structure_type_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) { switch (value) { - case UR_STRUCTURE_TYPE_CONTEXT_PROPERTIES: os << "UR_STRUCTURE_TYPE_CONTEXT_PROPERTIES"; break; - case UR_STRUCTURE_TYPE_IMAGE_DESC: os << "UR_STRUCTURE_TYPE_IMAGE_DESC"; break; - case UR_STRUCTURE_TYPE_BUFFER_PROPERTIES: os << "UR_STRUCTURE_TYPE_BUFFER_PROPERTIES"; break; - case UR_STRUCTURE_TYPE_BUFFER_REGION: os << "UR_STRUCTURE_TYPE_BUFFER_REGION"; break; - case UR_STRUCTURE_TYPE_BUFFER_CHANNEL_PROPERTIES: os << "UR_STRUCTURE_TYPE_BUFFER_CHANNEL_PROPERTIES"; break; - case UR_STRUCTURE_TYPE_BUFFER_ALLOC_LOCATION_PROPERTIES: os << "UR_STRUCTURE_TYPE_BUFFER_ALLOC_LOCATION_PROPERTIES"; break; - case UR_STRUCTURE_TYPE_PROGRAM_PROPERTIES: os << "UR_STRUCTURE_TYPE_PROGRAM_PROPERTIES"; break; - case UR_STRUCTURE_TYPE_USM_DESC: os << "UR_STRUCTURE_TYPE_USM_DESC"; break; - case UR_STRUCTURE_TYPE_USM_HOST_DESC: os << "UR_STRUCTURE_TYPE_USM_HOST_DESC"; break; - case UR_STRUCTURE_TYPE_USM_DEVICE_DESC: os << "UR_STRUCTURE_TYPE_USM_DEVICE_DESC"; break; - case UR_STRUCTURE_TYPE_USM_POOL_DESC: os << "UR_STRUCTURE_TYPE_USM_POOL_DESC"; break; - case UR_STRUCTURE_TYPE_USM_POOL_LIMITS_DESC: os << "UR_STRUCTURE_TYPE_USM_POOL_LIMITS_DESC"; break; - case UR_STRUCTURE_TYPE_DEVICE_BINARY: os << "UR_STRUCTURE_TYPE_DEVICE_BINARY"; break; - case UR_STRUCTURE_TYPE_SAMPLER_DESC: os << "UR_STRUCTURE_TYPE_SAMPLER_DESC"; break; - case UR_STRUCTURE_TYPE_QUEUE_PROPERTIES: os << "UR_STRUCTURE_TYPE_QUEUE_PROPERTIES"; break; - case UR_STRUCTURE_TYPE_QUEUE_INDEX_PROPERTIES: os << "UR_STRUCTURE_TYPE_QUEUE_INDEX_PROPERTIES"; break; - case UR_STRUCTURE_TYPE_CONTEXT_NATIVE_PROPERTIES: os << "UR_STRUCTURE_TYPE_CONTEXT_NATIVE_PROPERTIES"; break; - case UR_STRUCTURE_TYPE_KERNEL_NATIVE_PROPERTIES: os << "UR_STRUCTURE_TYPE_KERNEL_NATIVE_PROPERTIES"; break; - case UR_STRUCTURE_TYPE_QUEUE_NATIVE_PROPERTIES: os << "UR_STRUCTURE_TYPE_QUEUE_NATIVE_PROPERTIES"; break; - case UR_STRUCTURE_TYPE_MEM_NATIVE_PROPERTIES: os << "UR_STRUCTURE_TYPE_MEM_NATIVE_PROPERTIES"; break; - case UR_STRUCTURE_TYPE_EVENT_NATIVE_PROPERTIES: os << "UR_STRUCTURE_TYPE_EVENT_NATIVE_PROPERTIES"; break; - case UR_STRUCTURE_TYPE_PLATFORM_NATIVE_PROPERTIES: os << "UR_STRUCTURE_TYPE_PLATFORM_NATIVE_PROPERTIES"; break; - case UR_STRUCTURE_TYPE_DEVICE_NATIVE_PROPERTIES: os << "UR_STRUCTURE_TYPE_DEVICE_NATIVE_PROPERTIES"; break; - case UR_STRUCTURE_TYPE_PROGRAM_NATIVE_PROPERTIES: os << "UR_STRUCTURE_TYPE_PROGRAM_NATIVE_PROPERTIES"; break; - case UR_STRUCTURE_TYPE_SAMPLER_NATIVE_PROPERTIES: os << "UR_STRUCTURE_TYPE_SAMPLER_NATIVE_PROPERTIES"; break; - case UR_STRUCTURE_TYPE_QUEUE_NATIVE_DESC: os << "UR_STRUCTURE_TYPE_QUEUE_NATIVE_DESC"; break; - case UR_STRUCTURE_TYPE_DEVICE_PARTITION_PROPERTIES: os << "UR_STRUCTURE_TYPE_DEVICE_PARTITION_PROPERTIES"; break; - case UR_STRUCTURE_TYPE_KERNEL_ARG_MEM_OBJ_PROPERTIES: os << "UR_STRUCTURE_TYPE_KERNEL_ARG_MEM_OBJ_PROPERTIES"; break; - case UR_STRUCTURE_TYPE_PHYSICAL_MEM_PROPERTIES: os << "UR_STRUCTURE_TYPE_PHYSICAL_MEM_PROPERTIES"; break; - case UR_STRUCTURE_TYPE_KERNEL_ARG_POINTER_PROPERTIES: os << "UR_STRUCTURE_TYPE_KERNEL_ARG_POINTER_PROPERTIES"; break; - case UR_STRUCTURE_TYPE_KERNEL_ARG_SAMPLER_PROPERTIES: os << "UR_STRUCTURE_TYPE_KERNEL_ARG_SAMPLER_PROPERTIES"; break; - case UR_STRUCTURE_TYPE_KERNEL_EXEC_INFO_PROPERTIES: os << "UR_STRUCTURE_TYPE_KERNEL_EXEC_INFO_PROPERTIES"; break; - case UR_STRUCTURE_TYPE_KERNEL_ARG_VALUE_PROPERTIES: os << "UR_STRUCTURE_TYPE_KERNEL_ARG_VALUE_PROPERTIES"; break; - case UR_STRUCTURE_TYPE_KERNEL_ARG_LOCAL_PROPERTIES: os << "UR_STRUCTURE_TYPE_KERNEL_ARG_LOCAL_PROPERTIES"; break; - case UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_DESC: os << "UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_DESC"; break; - case UR_STRUCTURE_TYPE_EXP_SAMPLER_MIP_PROPERTIES: os << "UR_STRUCTURE_TYPE_EXP_SAMPLER_MIP_PROPERTIES"; break; - case UR_STRUCTURE_TYPE_EXP_INTEROP_MEM_DESC: os << "UR_STRUCTURE_TYPE_EXP_INTEROP_MEM_DESC"; break; - case UR_STRUCTURE_TYPE_EXP_INTEROP_SEMAPHORE_DESC: os << "UR_STRUCTURE_TYPE_EXP_INTEROP_SEMAPHORE_DESC"; break; - case UR_STRUCTURE_TYPE_EXP_FILE_DESCRIPTOR: os << "UR_STRUCTURE_TYPE_EXP_FILE_DESCRIPTOR"; break; - 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; @@ -1382,19 +1016,19 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -inline void printStruct(std::ostream &os, const void *ptr) { +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_structure_type_t struct +inline ur_result_t printStruct(std::ostream &os, const void *ptr) { if (ptr == NULL) { - printPtr(os, ptr); - return; + 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: { - const ur_context_properties_t *pstruct = - (const ur_context_properties_t *)ptr; + const ur_context_properties_t *pstruct = (const ur_context_properties_t *)ptr; printPtr(os, pstruct); } break; @@ -1404,8 +1038,7 @@ inline void printStruct(std::ostream &os, const void *ptr) { } break; case UR_STRUCTURE_TYPE_BUFFER_PROPERTIES: { - const ur_buffer_properties_t *pstruct = - (const ur_buffer_properties_t *)ptr; + const ur_buffer_properties_t *pstruct = (const ur_buffer_properties_t *)ptr; printPtr(os, pstruct); } break; @@ -1415,20 +1048,17 @@ inline void printStruct(std::ostream &os, const void *ptr) { } break; case UR_STRUCTURE_TYPE_BUFFER_CHANNEL_PROPERTIES: { - const ur_buffer_channel_properties_t *pstruct = - (const ur_buffer_channel_properties_t *)ptr; + const ur_buffer_channel_properties_t *pstruct = (const ur_buffer_channel_properties_t *)ptr; printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_BUFFER_ALLOC_LOCATION_PROPERTIES: { - const ur_buffer_alloc_location_properties_t *pstruct = - (const ur_buffer_alloc_location_properties_t *)ptr; + const ur_buffer_alloc_location_properties_t *pstruct = (const ur_buffer_alloc_location_properties_t *)ptr; printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_PROGRAM_PROPERTIES: { - const ur_program_properties_t *pstruct = - (const ur_program_properties_t *)ptr; + const ur_program_properties_t *pstruct = (const ur_program_properties_t *)ptr; printPtr(os, pstruct); } break; @@ -1453,8 +1083,7 @@ inline void printStruct(std::ostream &os, const void *ptr) { } break; case UR_STRUCTURE_TYPE_USM_POOL_LIMITS_DESC: { - const ur_usm_pool_limits_desc_t *pstruct = - (const ur_usm_pool_limits_desc_t *)ptr; + const ur_usm_pool_limits_desc_t *pstruct = (const ur_usm_pool_limits_desc_t *)ptr; printPtr(os, pstruct); } break; @@ -1469,468 +1098,373 @@ inline void printStruct(std::ostream &os, const void *ptr) { } break; case UR_STRUCTURE_TYPE_QUEUE_PROPERTIES: { - const ur_queue_properties_t *pstruct = - (const ur_queue_properties_t *)ptr; + const ur_queue_properties_t *pstruct = (const ur_queue_properties_t *)ptr; printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_QUEUE_INDEX_PROPERTIES: { - const ur_queue_index_properties_t *pstruct = - (const ur_queue_index_properties_t *)ptr; + const ur_queue_index_properties_t *pstruct = (const ur_queue_index_properties_t *)ptr; printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_CONTEXT_NATIVE_PROPERTIES: { - const ur_context_native_properties_t *pstruct = - (const ur_context_native_properties_t *)ptr; + const ur_context_native_properties_t *pstruct = (const ur_context_native_properties_t *)ptr; printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_KERNEL_NATIVE_PROPERTIES: { - const ur_kernel_native_properties_t *pstruct = - (const ur_kernel_native_properties_t *)ptr; + const ur_kernel_native_properties_t *pstruct = (const ur_kernel_native_properties_t *)ptr; printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_QUEUE_NATIVE_PROPERTIES: { - const ur_queue_native_properties_t *pstruct = - (const ur_queue_native_properties_t *)ptr; + const ur_queue_native_properties_t *pstruct = (const ur_queue_native_properties_t *)ptr; printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_MEM_NATIVE_PROPERTIES: { - const ur_mem_native_properties_t *pstruct = - (const ur_mem_native_properties_t *)ptr; + const ur_mem_native_properties_t *pstruct = (const ur_mem_native_properties_t *)ptr; printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_EVENT_NATIVE_PROPERTIES: { - const ur_event_native_properties_t *pstruct = - (const ur_event_native_properties_t *)ptr; + const ur_event_native_properties_t *pstruct = (const ur_event_native_properties_t *)ptr; printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_PLATFORM_NATIVE_PROPERTIES: { - const ur_platform_native_properties_t *pstruct = - (const ur_platform_native_properties_t *)ptr; + const ur_platform_native_properties_t *pstruct = (const ur_platform_native_properties_t *)ptr; printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_DEVICE_NATIVE_PROPERTIES: { - const ur_device_native_properties_t *pstruct = - (const ur_device_native_properties_t *)ptr; + const ur_device_native_properties_t *pstruct = (const ur_device_native_properties_t *)ptr; printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_PROGRAM_NATIVE_PROPERTIES: { - const ur_program_native_properties_t *pstruct = - (const ur_program_native_properties_t *)ptr; + const ur_program_native_properties_t *pstruct = (const ur_program_native_properties_t *)ptr; printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_SAMPLER_NATIVE_PROPERTIES: { - const ur_sampler_native_properties_t *pstruct = - (const ur_sampler_native_properties_t *)ptr; + const ur_sampler_native_properties_t *pstruct = (const ur_sampler_native_properties_t *)ptr; printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_QUEUE_NATIVE_DESC: { - const ur_queue_native_desc_t *pstruct = - (const ur_queue_native_desc_t *)ptr; + const ur_queue_native_desc_t *pstruct = (const ur_queue_native_desc_t *)ptr; printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_DEVICE_PARTITION_PROPERTIES: { - const ur_device_partition_properties_t *pstruct = - (const ur_device_partition_properties_t *)ptr; + const ur_device_partition_properties_t *pstruct = (const ur_device_partition_properties_t *)ptr; printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_KERNEL_ARG_MEM_OBJ_PROPERTIES: { - const ur_kernel_arg_mem_obj_properties_t *pstruct = - (const ur_kernel_arg_mem_obj_properties_t *)ptr; + const ur_kernel_arg_mem_obj_properties_t *pstruct = (const ur_kernel_arg_mem_obj_properties_t *)ptr; printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_PHYSICAL_MEM_PROPERTIES: { - const ur_physical_mem_properties_t *pstruct = - (const ur_physical_mem_properties_t *)ptr; + const ur_physical_mem_properties_t *pstruct = (const ur_physical_mem_properties_t *)ptr; printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_KERNEL_ARG_POINTER_PROPERTIES: { - const ur_kernel_arg_pointer_properties_t *pstruct = - (const ur_kernel_arg_pointer_properties_t *)ptr; + const ur_kernel_arg_pointer_properties_t *pstruct = (const ur_kernel_arg_pointer_properties_t *)ptr; printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_KERNEL_ARG_SAMPLER_PROPERTIES: { - const ur_kernel_arg_sampler_properties_t *pstruct = - (const ur_kernel_arg_sampler_properties_t *)ptr; + const ur_kernel_arg_sampler_properties_t *pstruct = (const ur_kernel_arg_sampler_properties_t *)ptr; printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_KERNEL_EXEC_INFO_PROPERTIES: { - const ur_kernel_exec_info_properties_t *pstruct = - (const ur_kernel_exec_info_properties_t *)ptr; + const ur_kernel_exec_info_properties_t *pstruct = (const ur_kernel_exec_info_properties_t *)ptr; printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_KERNEL_ARG_VALUE_PROPERTIES: { - const ur_kernel_arg_value_properties_t *pstruct = - (const ur_kernel_arg_value_properties_t *)ptr; + const ur_kernel_arg_value_properties_t *pstruct = (const ur_kernel_arg_value_properties_t *)ptr; printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_KERNEL_ARG_LOCAL_PROPERTIES: { - const ur_kernel_arg_local_properties_t *pstruct = - (const ur_kernel_arg_local_properties_t *)ptr; + const ur_kernel_arg_local_properties_t *pstruct = (const ur_kernel_arg_local_properties_t *)ptr; printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_DESC: { - const ur_exp_command_buffer_desc_t *pstruct = - (const ur_exp_command_buffer_desc_t *)ptr; + const ur_exp_command_buffer_desc_t *pstruct = (const ur_exp_command_buffer_desc_t *)ptr; printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_EXP_SAMPLER_MIP_PROPERTIES: { - const ur_exp_sampler_mip_properties_t *pstruct = - (const ur_exp_sampler_mip_properties_t *)ptr; + const ur_exp_sampler_mip_properties_t *pstruct = (const ur_exp_sampler_mip_properties_t *)ptr; printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_EXP_INTEROP_MEM_DESC: { - const ur_exp_interop_mem_desc_t *pstruct = - (const ur_exp_interop_mem_desc_t *)ptr; + const ur_exp_interop_mem_desc_t *pstruct = (const ur_exp_interop_mem_desc_t *)ptr; printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_EXP_INTEROP_SEMAPHORE_DESC: { - const ur_exp_interop_semaphore_desc_t *pstruct = - (const ur_exp_interop_semaphore_desc_t *)ptr; + const ur_exp_interop_semaphore_desc_t *pstruct = (const ur_exp_interop_semaphore_desc_t *)ptr; printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_EXP_FILE_DESCRIPTOR: { - const ur_exp_file_descriptor_t *pstruct = - (const ur_exp_file_descriptor_t *)ptr; + const ur_exp_file_descriptor_t *pstruct = (const ur_exp_file_descriptor_t *)ptr; printPtr(os, pstruct); } break; case UR_STRUCTURE_TYPE_EXP_WIN32_HANDLE: { - const ur_exp_win32_handle_t *pstruct = - (const ur_exp_win32_handle_t *)ptr; + const ur_exp_win32_handle_t *pstruct = (const ur_exp_win32_handle_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; + const ur_exp_layered_image_properties_t *pstruct = (const ur_exp_layered_image_properties_t *)ptr; printPtr(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; + const ur_exp_sampler_addr_modes_t *pstruct = (const ur_exp_sampler_addr_modes_t *)ptr; printPtr(os, pstruct); } break; default: os << "unknown enumerator"; - break; + return UR_RESULT_ERROR_INVALID_ENUMERATION; } + return UR_RESULT_SUCCESS; } -inline std::ostream &operator<<(std::ostream &os, enum ur_result_t value) { +} // namespace details +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_result_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, ur_result_t value) { switch (value) { - case UR_RESULT_SUCCESS: os << "UR_RESULT_SUCCESS"; break; - case UR_RESULT_ERROR_INVALID_OPERATION: os << "UR_RESULT_ERROR_INVALID_OPERATION"; break; - case UR_RESULT_ERROR_INVALID_QUEUE_PROPERTIES: os << "UR_RESULT_ERROR_INVALID_QUEUE_PROPERTIES"; break; - case UR_RESULT_ERROR_INVALID_QUEUE: os << "UR_RESULT_ERROR_INVALID_QUEUE"; break; - case UR_RESULT_ERROR_INVALID_VALUE: os << "UR_RESULT_ERROR_INVALID_VALUE"; break; - case UR_RESULT_ERROR_INVALID_CONTEXT: os << "UR_RESULT_ERROR_INVALID_CONTEXT"; break; - case UR_RESULT_ERROR_INVALID_PLATFORM: os << "UR_RESULT_ERROR_INVALID_PLATFORM"; break; - case UR_RESULT_ERROR_INVALID_BINARY: os << "UR_RESULT_ERROR_INVALID_BINARY"; break; - case UR_RESULT_ERROR_INVALID_PROGRAM: os << "UR_RESULT_ERROR_INVALID_PROGRAM"; break; - case UR_RESULT_ERROR_INVALID_SAMPLER: os << "UR_RESULT_ERROR_INVALID_SAMPLER"; break; - case UR_RESULT_ERROR_INVALID_BUFFER_SIZE: os << "UR_RESULT_ERROR_INVALID_BUFFER_SIZE"; break; - case UR_RESULT_ERROR_INVALID_MEM_OBJECT: os << "UR_RESULT_ERROR_INVALID_MEM_OBJECT"; break; - case UR_RESULT_ERROR_INVALID_EVENT: os << "UR_RESULT_ERROR_INVALID_EVENT"; break; - case UR_RESULT_ERROR_INVALID_EVENT_WAIT_LIST: os << "UR_RESULT_ERROR_INVALID_EVENT_WAIT_LIST"; break; - case UR_RESULT_ERROR_MISALIGNED_SUB_BUFFER_OFFSET: os << "UR_RESULT_ERROR_MISALIGNED_SUB_BUFFER_OFFSET"; break; - case UR_RESULT_ERROR_INVALID_WORK_GROUP_SIZE: os << "UR_RESULT_ERROR_INVALID_WORK_GROUP_SIZE"; break; - case UR_RESULT_ERROR_COMPILER_NOT_AVAILABLE: os << "UR_RESULT_ERROR_COMPILER_NOT_AVAILABLE"; break; - case UR_RESULT_ERROR_PROFILING_INFO_NOT_AVAILABLE: os << "UR_RESULT_ERROR_PROFILING_INFO_NOT_AVAILABLE"; break; - case UR_RESULT_ERROR_DEVICE_NOT_FOUND: os << "UR_RESULT_ERROR_DEVICE_NOT_FOUND"; break; - case UR_RESULT_ERROR_INVALID_DEVICE: os << "UR_RESULT_ERROR_INVALID_DEVICE"; break; - case UR_RESULT_ERROR_DEVICE_LOST: os << "UR_RESULT_ERROR_DEVICE_LOST"; break; - case UR_RESULT_ERROR_DEVICE_REQUIRES_RESET: os << "UR_RESULT_ERROR_DEVICE_REQUIRES_RESET"; break; - case UR_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE: os << "UR_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE"; break; - case UR_RESULT_ERROR_DEVICE_PARTITION_FAILED: os << "UR_RESULT_ERROR_DEVICE_PARTITION_FAILED"; break; - case UR_RESULT_ERROR_INVALID_DEVICE_PARTITION_COUNT: os << "UR_RESULT_ERROR_INVALID_DEVICE_PARTITION_COUNT"; break; - case UR_RESULT_ERROR_INVALID_WORK_ITEM_SIZE: os << "UR_RESULT_ERROR_INVALID_WORK_ITEM_SIZE"; break; - case UR_RESULT_ERROR_INVALID_WORK_DIMENSION: os << "UR_RESULT_ERROR_INVALID_WORK_DIMENSION"; break; - case UR_RESULT_ERROR_INVALID_KERNEL_ARGS: os << "UR_RESULT_ERROR_INVALID_KERNEL_ARGS"; break; - case UR_RESULT_ERROR_INVALID_KERNEL: os << "UR_RESULT_ERROR_INVALID_KERNEL"; break; - case UR_RESULT_ERROR_INVALID_KERNEL_NAME: os << "UR_RESULT_ERROR_INVALID_KERNEL_NAME"; break; - case UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX: os << "UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX"; break; - case UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_SIZE: os << "UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_SIZE"; break; - case UR_RESULT_ERROR_INVALID_KERNEL_ATTRIBUTE_VALUE: os << "UR_RESULT_ERROR_INVALID_KERNEL_ATTRIBUTE_VALUE"; break; - case UR_RESULT_ERROR_INVALID_IMAGE_SIZE: os << "UR_RESULT_ERROR_INVALID_IMAGE_SIZE"; break; - case UR_RESULT_ERROR_INVALID_IMAGE_FORMAT_DESCRIPTOR: os << "UR_RESULT_ERROR_INVALID_IMAGE_FORMAT_DESCRIPTOR"; break; - case UR_RESULT_ERROR_IMAGE_FORMAT_NOT_SUPPORTED: os << "UR_RESULT_ERROR_IMAGE_FORMAT_NOT_SUPPORTED"; break; - case UR_RESULT_ERROR_MEM_OBJECT_ALLOCATION_FAILURE: os << "UR_RESULT_ERROR_MEM_OBJECT_ALLOCATION_FAILURE"; break; - case UR_RESULT_ERROR_INVALID_PROGRAM_EXECUTABLE: os << "UR_RESULT_ERROR_INVALID_PROGRAM_EXECUTABLE"; break; - case UR_RESULT_ERROR_UNINITIALIZED: os << "UR_RESULT_ERROR_UNINITIALIZED"; break; - case UR_RESULT_ERROR_OUT_OF_HOST_MEMORY: os << "UR_RESULT_ERROR_OUT_OF_HOST_MEMORY"; break; - case UR_RESULT_ERROR_OUT_OF_DEVICE_MEMORY: os << "UR_RESULT_ERROR_OUT_OF_DEVICE_MEMORY"; break; - case UR_RESULT_ERROR_OUT_OF_RESOURCES: os << "UR_RESULT_ERROR_OUT_OF_RESOURCES"; break; - case UR_RESULT_ERROR_PROGRAM_BUILD_FAILURE: os << "UR_RESULT_ERROR_PROGRAM_BUILD_FAILURE"; break; - case UR_RESULT_ERROR_PROGRAM_LINK_FAILURE: os << "UR_RESULT_ERROR_PROGRAM_LINK_FAILURE"; break; - case UR_RESULT_ERROR_UNSUPPORTED_VERSION: os << "UR_RESULT_ERROR_UNSUPPORTED_VERSION"; break; - case UR_RESULT_ERROR_UNSUPPORTED_FEATURE: os << "UR_RESULT_ERROR_UNSUPPORTED_FEATURE"; break; - case UR_RESULT_ERROR_INVALID_ARGUMENT: os << "UR_RESULT_ERROR_INVALID_ARGUMENT"; break; - case UR_RESULT_ERROR_INVALID_NULL_HANDLE: os << "UR_RESULT_ERROR_INVALID_NULL_HANDLE"; break; - case UR_RESULT_ERROR_HANDLE_OBJECT_IN_USE: os << "UR_RESULT_ERROR_HANDLE_OBJECT_IN_USE"; break; - case UR_RESULT_ERROR_INVALID_NULL_POINTER: os << "UR_RESULT_ERROR_INVALID_NULL_POINTER"; break; - case UR_RESULT_ERROR_INVALID_SIZE: os << "UR_RESULT_ERROR_INVALID_SIZE"; break; - case UR_RESULT_ERROR_UNSUPPORTED_SIZE: os << "UR_RESULT_ERROR_UNSUPPORTED_SIZE"; break; - case UR_RESULT_ERROR_UNSUPPORTED_ALIGNMENT: os << "UR_RESULT_ERROR_UNSUPPORTED_ALIGNMENT"; break; - case UR_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT: os << "UR_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT"; break; - case UR_RESULT_ERROR_INVALID_ENUMERATION: os << "UR_RESULT_ERROR_INVALID_ENUMERATION"; break; - case UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION: os << "UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION"; break; - case UR_RESULT_ERROR_UNSUPPORTED_IMAGE_FORMAT: os << "UR_RESULT_ERROR_UNSUPPORTED_IMAGE_FORMAT"; break; - case UR_RESULT_ERROR_INVALID_NATIVE_BINARY: os << "UR_RESULT_ERROR_INVALID_NATIVE_BINARY"; break; - case UR_RESULT_ERROR_INVALID_GLOBAL_NAME: os << "UR_RESULT_ERROR_INVALID_GLOBAL_NAME"; break; - case UR_RESULT_ERROR_INVALID_FUNCTION_NAME: os << "UR_RESULT_ERROR_INVALID_FUNCTION_NAME"; break; - case UR_RESULT_ERROR_INVALID_GROUP_SIZE_DIMENSION: os << "UR_RESULT_ERROR_INVALID_GROUP_SIZE_DIMENSION"; break; - case UR_RESULT_ERROR_INVALID_GLOBAL_WIDTH_DIMENSION: os << "UR_RESULT_ERROR_INVALID_GLOBAL_WIDTH_DIMENSION"; break; - case UR_RESULT_ERROR_PROGRAM_UNLINKED: os << "UR_RESULT_ERROR_PROGRAM_UNLINKED"; break; - case UR_RESULT_ERROR_OVERLAPPING_REGIONS: os << "UR_RESULT_ERROR_OVERLAPPING_REGIONS"; break; - case UR_RESULT_ERROR_INVALID_HOST_PTR: os << "UR_RESULT_ERROR_INVALID_HOST_PTR"; break; - case UR_RESULT_ERROR_INVALID_USM_SIZE: os << "UR_RESULT_ERROR_INVALID_USM_SIZE"; break; - case UR_RESULT_ERROR_OBJECT_ALLOCATION_FAILURE: os << "UR_RESULT_ERROR_OBJECT_ALLOCATION_FAILURE"; break; - case UR_RESULT_ERROR_ADAPTER_SPECIFIC: os << "UR_RESULT_ERROR_ADAPTER_SPECIFIC"; break; - case UR_RESULT_ERROR_LAYER_NOT_PRESENT: os << "UR_RESULT_ERROR_LAYER_NOT_PRESENT"; break; - case UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_EXP: os << "UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_EXP"; break; - case UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_SYNC_POINT_EXP: os << "UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_SYNC_POINT_EXP"; break; - case UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_SYNC_POINT_WAIT_LIST_EXP: os << "UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_SYNC_POINT_WAIT_LIST_EXP"; break; - case UR_RESULT_ERROR_UNKNOWN: os << "UR_RESULT_ERROR_UNKNOWN"; break; @@ -1940,8 +1474,11 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_result_t value) { } return os; } -inline std::ostream &operator<<(std::ostream &os, - const struct ur_base_properties_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_base_properties_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_base_properties_t params) { os << "(struct ur_base_properties_t){"; os << ".stype = "; @@ -1951,13 +1488,17 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << "}"; return os; } -inline std::ostream &operator<<(std::ostream &os, - const struct ur_base_desc_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_base_desc_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_base_desc_t params) { os << "(struct ur_base_desc_t){"; os << ".stype = "; @@ -1967,13 +1508,17 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << "}"; return os; } -inline std::ostream &operator<<(std::ostream &os, - const struct ur_rect_offset_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_rect_offset_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_rect_offset_t params) { os << "(struct ur_rect_offset_t){"; os << ".x = "; @@ -1993,8 +1538,11 @@ inline std::ostream &operator<<(std::ostream &os, os << "}"; return os; } -inline std::ostream &operator<<(std::ostream &os, - const struct ur_rect_region_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_rect_region_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_rect_region_t params) { os << "(struct ur_rect_region_t){"; os << ".width = "; @@ -2014,26 +1562,24 @@ inline std::ostream &operator<<(std::ostream &os, os << "}"; return os; } -inline std::ostream &operator<<(std::ostream &os, - enum ur_device_init_flag_t value) { +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_DEVICE_INIT_FLAG_GPU: os << "UR_DEVICE_INIT_FLAG_GPU"; break; - case UR_DEVICE_INIT_FLAG_CPU: os << "UR_DEVICE_INIT_FLAG_CPU"; break; - case UR_DEVICE_INIT_FLAG_FPGA: os << "UR_DEVICE_INIT_FLAG_FPGA"; break; - case UR_DEVICE_INIT_FLAG_MCA: os << "UR_DEVICE_INIT_FLAG_MCA"; break; - case UR_DEVICE_INIT_FLAG_VPU: os << "UR_DEVICE_INIT_FLAG_VPU"; break; @@ -2044,8 +1590,11 @@ inline std::ostream &operator<<(std::ostream &os, return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_device_init_flag_t flag template <> -inline void printFlag(std::ostream &os, uint32_t flag) { +inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { uint32_t val = flag; bool first = true; @@ -2069,8 +1618,7 @@ inline void printFlag(std::ostream &os, uint32_t flag) { os << UR_DEVICE_INIT_FLAG_CPU; } - if ((val & UR_DEVICE_INIT_FLAG_FPGA) == - (uint32_t)UR_DEVICE_INIT_FLAG_FPGA) { + if ((val & UR_DEVICE_INIT_FLAG_FPGA) == (uint32_t)UR_DEVICE_INIT_FLAG_FPGA) { val ^= (uint32_t)UR_DEVICE_INIT_FLAG_FPGA; if (!first) { os << " | "; @@ -2108,15 +1656,18 @@ inline void printFlag(std::ostream &os, uint32_t flag) { } else if (first) { os << "0"; } + return UR_RESULT_SUCCESS; } -inline std::ostream &operator<<(std::ostream &os, - enum ur_loader_config_info_t value) { +} // namespace details +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_LOADER_CONFIG_INFO_AVAILABLE_LAYERS: os << "UR_LOADER_CONFIG_INFO_AVAILABLE_LAYERS"; break; - case UR_LOADER_CONFIG_INFO_REFERENCE_COUNT: os << "UR_LOADER_CONFIG_INFO_REFERENCE_COUNT"; break; @@ -2126,28 +1677,26 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_loader_config_info_t enum value template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_loader_config_info_t value, size_t size) { +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_loader_config_info_t value, size_t size) { if (ptr == NULL) { - printPtr(os, ptr); - return; + return printPtr(os, ptr); } switch (value) { - case UR_LOADER_CONFIG_INFO_AVAILABLE_LAYERS: { const char *tptr = (const char *)ptr; printPtr(os, tptr); } break; - case UR_LOADER_CONFIG_INFO_REFERENCE_COUNT: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -2157,22 +1706,29 @@ inline void printTagged(std::ostream &os, const void *ptr, } break; default: os << "unknown enumerator"; - break; + return UR_RESULT_ERROR_INVALID_ENUMERATION; } + return UR_RESULT_SUCCESS; } +} // namespace details -inline std::ostream &operator<<(std::ostream &os, - const struct ur_code_location_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_code_location_t type +/// @returns +/// std::ostream & +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)); + details::printPtr(os, + (params.functionName)); os << ", "; os << ".sourceFile = "; - ur_params::serializePtr(os, (params.sourceFile)); + details::printPtr(os, + (params.sourceFile)); os << ", "; os << ".lineNumber = "; @@ -2187,14 +1743,15 @@ inline std::ostream &operator<<(std::ostream &os, os << "}"; return os; } -inline std::ostream &operator<<(std::ostream &os, - enum ur_adapter_info_t value) { +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_ADAPTER_INFO_BACKEND: os << "UR_ADAPTER_INFO_BACKEND"; break; - case UR_ADAPTER_INFO_REFERENCE_COUNT: os << "UR_ADAPTER_INFO_REFERENCE_COUNT"; break; @@ -2204,22 +1761,21 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_adapter_info_t enum value template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_adapter_info_t value, size_t size) { +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_adapter_info_t value, size_t size) { if (ptr == NULL) { - printPtr(os, ptr); - return; + return printPtr(os, ptr); } switch (value) { - case UR_ADAPTER_INFO_BACKEND: { const ur_adapter_backend_t *tptr = (const ur_adapter_backend_t *)ptr; if (sizeof(ur_adapter_backend_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_adapter_backend_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_adapter_backend_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -2227,13 +1783,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_ADAPTER_INFO_REFERENCE_COUNT: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -2243,34 +1797,33 @@ inline void printTagged(std::ostream &os, const void *ptr, } break; default: os << "unknown enumerator"; - break; + return UR_RESULT_ERROR_INVALID_ENUMERATION; } + return UR_RESULT_SUCCESS; } +} // namespace details -inline std::ostream &operator<<(std::ostream &os, - enum ur_adapter_backend_t value) { +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_ADAPTER_BACKEND_UNKNOWN: os << "UR_ADAPTER_BACKEND_UNKNOWN"; break; - case UR_ADAPTER_BACKEND_LEVEL_ZERO: os << "UR_ADAPTER_BACKEND_LEVEL_ZERO"; break; - case UR_ADAPTER_BACKEND_OPENCL: os << "UR_ADAPTER_BACKEND_OPENCL"; break; - case UR_ADAPTER_BACKEND_CUDA: os << "UR_ADAPTER_BACKEND_CUDA"; break; - case UR_ADAPTER_BACKEND_HIP: os << "UR_ADAPTER_BACKEND_HIP"; break; - case UR_ADAPTER_BACKEND_NATIVE_CPU: os << "UR_ADAPTER_BACKEND_NATIVE_CPU"; break; @@ -2280,30 +1833,27 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -inline std::ostream &operator<<(std::ostream &os, - enum ur_platform_info_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) { switch (value) { - case UR_PLATFORM_INFO_NAME: os << "UR_PLATFORM_INFO_NAME"; break; - case UR_PLATFORM_INFO_VENDOR_NAME: os << "UR_PLATFORM_INFO_VENDOR_NAME"; break; - case UR_PLATFORM_INFO_VERSION: os << "UR_PLATFORM_INFO_VERSION"; break; - case UR_PLATFORM_INFO_EXTENSIONS: os << "UR_PLATFORM_INFO_EXTENSIONS"; break; - case UR_PLATFORM_INFO_PROFILE: os << "UR_PLATFORM_INFO_PROFILE"; break; - case UR_PLATFORM_INFO_BACKEND: os << "UR_PLATFORM_INFO_BACKEND"; break; @@ -2313,52 +1863,46 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_platform_info_t enum value template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_platform_info_t value, size_t size) { +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_platform_info_t value, size_t size) { if (ptr == NULL) { - printPtr(os, ptr); - return; + return printPtr(os, ptr); } switch (value) { - case UR_PLATFORM_INFO_NAME: { const char *tptr = (const char *)ptr; printPtr(os, tptr); } break; - case UR_PLATFORM_INFO_VENDOR_NAME: { const char *tptr = (const char *)ptr; printPtr(os, tptr); } break; - case UR_PLATFORM_INFO_VERSION: { const char *tptr = (const char *)ptr; printPtr(os, tptr); } break; - case UR_PLATFORM_INFO_EXTENSIONS: { const char *tptr = (const char *)ptr; printPtr(os, tptr); } break; - case UR_PLATFORM_INFO_PROFILE: { const char *tptr = (const char *)ptr; printPtr(os, tptr); } break; - case UR_PLATFORM_INFO_BACKEND: { const ur_platform_backend_t *tptr = (const ur_platform_backend_t *)ptr; if (sizeof(ur_platform_backend_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_platform_backend_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_platform_backend_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -2368,17 +1912,25 @@ inline void printTagged(std::ostream &os, const void *ptr, } break; default: os << "unknown enumerator"; - break; + return UR_RESULT_ERROR_INVALID_ENUMERATION; } + return UR_RESULT_SUCCESS; } +} // namespace details -inline std::ostream &operator<<(std::ostream &os, enum ur_api_version_t value) { +/////////////////////////////////////////////////////////////////////////////// +/// @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) { os << UR_MAJOR_VERSION(value) << "." << UR_MINOR_VERSION(value); return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_platform_native_properties_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_platform_native_properties_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_platform_native_properties_t params) { os << "(struct ur_platform_native_properties_t){"; os << ".stype = "; @@ -2388,7 +1940,8 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << ", "; os << ".isNativeHandleOwned = "; @@ -2398,30 +1951,27 @@ operator<<(std::ostream &os, os << "}"; return os; } -inline std::ostream &operator<<(std::ostream &os, - enum ur_platform_backend_t value) { +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_PLATFORM_BACKEND_UNKNOWN: os << "UR_PLATFORM_BACKEND_UNKNOWN"; break; - case UR_PLATFORM_BACKEND_LEVEL_ZERO: os << "UR_PLATFORM_BACKEND_LEVEL_ZERO"; break; - case UR_PLATFORM_BACKEND_OPENCL: os << "UR_PLATFORM_BACKEND_OPENCL"; break; - case UR_PLATFORM_BACKEND_CUDA: os << "UR_PLATFORM_BACKEND_CUDA"; break; - case UR_PLATFORM_BACKEND_HIP: os << "UR_PLATFORM_BACKEND_HIP"; break; - case UR_PLATFORM_BACKEND_NATIVE_CPU: os << "UR_PLATFORM_BACKEND_NATIVE_CPU"; break; @@ -2431,8 +1981,11 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -inline std::ostream &operator<<(std::ostream &os, - const struct ur_device_binary_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_device_binary_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_device_binary_t params) { os << "(struct ur_device_binary_t){"; os << ".stype = "; @@ -2442,43 +1995,42 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << ", "; os << ".pDeviceTargetSpec = "; - printPtr(os, (params.pDeviceTargetSpec)); + details::printPtr(os, + (params.pDeviceTargetSpec)); os << "}"; return os; } -inline std::ostream &operator<<(std::ostream &os, enum ur_device_type_t value) { +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_DEVICE_TYPE_DEFAULT: os << "UR_DEVICE_TYPE_DEFAULT"; break; - case UR_DEVICE_TYPE_ALL: os << "UR_DEVICE_TYPE_ALL"; break; - case UR_DEVICE_TYPE_GPU: os << "UR_DEVICE_TYPE_GPU"; break; - case UR_DEVICE_TYPE_CPU: os << "UR_DEVICE_TYPE_CPU"; break; - case UR_DEVICE_TYPE_FPGA: os << "UR_DEVICE_TYPE_FPGA"; break; - case UR_DEVICE_TYPE_MCA: os << "UR_DEVICE_TYPE_MCA"; break; - case UR_DEVICE_TYPE_VPU: os << "UR_DEVICE_TYPE_VPU"; break; @@ -2488,533 +2040,405 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_device_type_t value) { } return os; } -inline std::ostream &operator<<(std::ostream &os, enum ur_device_info_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) { switch (value) { - case UR_DEVICE_INFO_TYPE: os << "UR_DEVICE_INFO_TYPE"; break; - case UR_DEVICE_INFO_VENDOR_ID: os << "UR_DEVICE_INFO_VENDOR_ID"; break; - case UR_DEVICE_INFO_DEVICE_ID: os << "UR_DEVICE_INFO_DEVICE_ID"; break; - case UR_DEVICE_INFO_MAX_COMPUTE_UNITS: os << "UR_DEVICE_INFO_MAX_COMPUTE_UNITS"; break; - case UR_DEVICE_INFO_MAX_WORK_ITEM_DIMENSIONS: os << "UR_DEVICE_INFO_MAX_WORK_ITEM_DIMENSIONS"; break; - case UR_DEVICE_INFO_MAX_WORK_ITEM_SIZES: os << "UR_DEVICE_INFO_MAX_WORK_ITEM_SIZES"; break; - case UR_DEVICE_INFO_MAX_WORK_GROUP_SIZE: os << "UR_DEVICE_INFO_MAX_WORK_GROUP_SIZE"; break; - case UR_DEVICE_INFO_SINGLE_FP_CONFIG: os << "UR_DEVICE_INFO_SINGLE_FP_CONFIG"; break; - case UR_DEVICE_INFO_HALF_FP_CONFIG: os << "UR_DEVICE_INFO_HALF_FP_CONFIG"; break; - case UR_DEVICE_INFO_DOUBLE_FP_CONFIG: os << "UR_DEVICE_INFO_DOUBLE_FP_CONFIG"; break; - case UR_DEVICE_INFO_QUEUE_PROPERTIES: os << "UR_DEVICE_INFO_QUEUE_PROPERTIES"; break; - case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_CHAR: os << "UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_CHAR"; break; - case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_SHORT: os << "UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_SHORT"; break; - case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_INT: os << "UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_INT"; break; - case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG: os << "UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG"; break; - case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_FLOAT: os << "UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_FLOAT"; break; - case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_DOUBLE: os << "UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_DOUBLE"; break; - case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_HALF: os << "UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_HALF"; break; - case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_CHAR: os << "UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_CHAR"; break; - case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_SHORT: os << "UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_SHORT"; break; - case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_INT: os << "UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_INT"; break; - case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG: os << "UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG"; break; - case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_FLOAT: os << "UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_FLOAT"; break; - case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_DOUBLE: os << "UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_DOUBLE"; break; - case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_HALF: os << "UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_HALF"; break; - case UR_DEVICE_INFO_MAX_CLOCK_FREQUENCY: os << "UR_DEVICE_INFO_MAX_CLOCK_FREQUENCY"; break; - case UR_DEVICE_INFO_MEMORY_CLOCK_RATE: os << "UR_DEVICE_INFO_MEMORY_CLOCK_RATE"; break; - case UR_DEVICE_INFO_ADDRESS_BITS: os << "UR_DEVICE_INFO_ADDRESS_BITS"; break; - case UR_DEVICE_INFO_MAX_MEM_ALLOC_SIZE: os << "UR_DEVICE_INFO_MAX_MEM_ALLOC_SIZE"; break; - case UR_DEVICE_INFO_IMAGE_SUPPORTED: os << "UR_DEVICE_INFO_IMAGE_SUPPORTED"; break; - case UR_DEVICE_INFO_MAX_READ_IMAGE_ARGS: os << "UR_DEVICE_INFO_MAX_READ_IMAGE_ARGS"; break; - case UR_DEVICE_INFO_MAX_WRITE_IMAGE_ARGS: os << "UR_DEVICE_INFO_MAX_WRITE_IMAGE_ARGS"; break; - case UR_DEVICE_INFO_MAX_READ_WRITE_IMAGE_ARGS: os << "UR_DEVICE_INFO_MAX_READ_WRITE_IMAGE_ARGS"; break; - case UR_DEVICE_INFO_IMAGE2D_MAX_WIDTH: os << "UR_DEVICE_INFO_IMAGE2D_MAX_WIDTH"; break; - case UR_DEVICE_INFO_IMAGE2D_MAX_HEIGHT: os << "UR_DEVICE_INFO_IMAGE2D_MAX_HEIGHT"; break; - case UR_DEVICE_INFO_IMAGE3D_MAX_WIDTH: os << "UR_DEVICE_INFO_IMAGE3D_MAX_WIDTH"; break; - case UR_DEVICE_INFO_IMAGE3D_MAX_HEIGHT: os << "UR_DEVICE_INFO_IMAGE3D_MAX_HEIGHT"; break; - case UR_DEVICE_INFO_IMAGE3D_MAX_DEPTH: os << "UR_DEVICE_INFO_IMAGE3D_MAX_DEPTH"; break; - case UR_DEVICE_INFO_IMAGE_MAX_BUFFER_SIZE: os << "UR_DEVICE_INFO_IMAGE_MAX_BUFFER_SIZE"; break; - case UR_DEVICE_INFO_IMAGE_MAX_ARRAY_SIZE: os << "UR_DEVICE_INFO_IMAGE_MAX_ARRAY_SIZE"; break; - case UR_DEVICE_INFO_MAX_SAMPLERS: os << "UR_DEVICE_INFO_MAX_SAMPLERS"; break; - case UR_DEVICE_INFO_MAX_PARAMETER_SIZE: os << "UR_DEVICE_INFO_MAX_PARAMETER_SIZE"; break; - case UR_DEVICE_INFO_MEM_BASE_ADDR_ALIGN: os << "UR_DEVICE_INFO_MEM_BASE_ADDR_ALIGN"; break; - case UR_DEVICE_INFO_GLOBAL_MEM_CACHE_TYPE: os << "UR_DEVICE_INFO_GLOBAL_MEM_CACHE_TYPE"; break; - case UR_DEVICE_INFO_GLOBAL_MEM_CACHELINE_SIZE: os << "UR_DEVICE_INFO_GLOBAL_MEM_CACHELINE_SIZE"; break; - case UR_DEVICE_INFO_GLOBAL_MEM_CACHE_SIZE: os << "UR_DEVICE_INFO_GLOBAL_MEM_CACHE_SIZE"; break; - case UR_DEVICE_INFO_GLOBAL_MEM_SIZE: os << "UR_DEVICE_INFO_GLOBAL_MEM_SIZE"; break; - case UR_DEVICE_INFO_GLOBAL_MEM_FREE: os << "UR_DEVICE_INFO_GLOBAL_MEM_FREE"; break; - case UR_DEVICE_INFO_MAX_CONSTANT_BUFFER_SIZE: os << "UR_DEVICE_INFO_MAX_CONSTANT_BUFFER_SIZE"; break; - case UR_DEVICE_INFO_MAX_CONSTANT_ARGS: os << "UR_DEVICE_INFO_MAX_CONSTANT_ARGS"; break; - case UR_DEVICE_INFO_LOCAL_MEM_TYPE: os << "UR_DEVICE_INFO_LOCAL_MEM_TYPE"; break; - case UR_DEVICE_INFO_LOCAL_MEM_SIZE: os << "UR_DEVICE_INFO_LOCAL_MEM_SIZE"; break; - case UR_DEVICE_INFO_ERROR_CORRECTION_SUPPORT: os << "UR_DEVICE_INFO_ERROR_CORRECTION_SUPPORT"; break; - case UR_DEVICE_INFO_HOST_UNIFIED_MEMORY: os << "UR_DEVICE_INFO_HOST_UNIFIED_MEMORY"; break; - case UR_DEVICE_INFO_PROFILING_TIMER_RESOLUTION: os << "UR_DEVICE_INFO_PROFILING_TIMER_RESOLUTION"; break; - case UR_DEVICE_INFO_ENDIAN_LITTLE: os << "UR_DEVICE_INFO_ENDIAN_LITTLE"; break; - case UR_DEVICE_INFO_AVAILABLE: os << "UR_DEVICE_INFO_AVAILABLE"; break; - case UR_DEVICE_INFO_COMPILER_AVAILABLE: os << "UR_DEVICE_INFO_COMPILER_AVAILABLE"; break; - case UR_DEVICE_INFO_LINKER_AVAILABLE: os << "UR_DEVICE_INFO_LINKER_AVAILABLE"; break; - case UR_DEVICE_INFO_EXECUTION_CAPABILITIES: os << "UR_DEVICE_INFO_EXECUTION_CAPABILITIES"; break; - case UR_DEVICE_INFO_QUEUE_ON_DEVICE_PROPERTIES: os << "UR_DEVICE_INFO_QUEUE_ON_DEVICE_PROPERTIES"; break; - case UR_DEVICE_INFO_QUEUE_ON_HOST_PROPERTIES: os << "UR_DEVICE_INFO_QUEUE_ON_HOST_PROPERTIES"; break; - case UR_DEVICE_INFO_BUILT_IN_KERNELS: os << "UR_DEVICE_INFO_BUILT_IN_KERNELS"; break; - case UR_DEVICE_INFO_PLATFORM: os << "UR_DEVICE_INFO_PLATFORM"; break; - case UR_DEVICE_INFO_REFERENCE_COUNT: os << "UR_DEVICE_INFO_REFERENCE_COUNT"; break; - case UR_DEVICE_INFO_IL_VERSION: os << "UR_DEVICE_INFO_IL_VERSION"; break; - case UR_DEVICE_INFO_NAME: os << "UR_DEVICE_INFO_NAME"; break; - case UR_DEVICE_INFO_VENDOR: os << "UR_DEVICE_INFO_VENDOR"; break; - case UR_DEVICE_INFO_DRIVER_VERSION: os << "UR_DEVICE_INFO_DRIVER_VERSION"; break; - case UR_DEVICE_INFO_PROFILE: os << "UR_DEVICE_INFO_PROFILE"; break; - case UR_DEVICE_INFO_VERSION: os << "UR_DEVICE_INFO_VERSION"; break; - case UR_DEVICE_INFO_BACKEND_RUNTIME_VERSION: os << "UR_DEVICE_INFO_BACKEND_RUNTIME_VERSION"; break; - case UR_DEVICE_INFO_EXTENSIONS: os << "UR_DEVICE_INFO_EXTENSIONS"; break; - case UR_DEVICE_INFO_PRINTF_BUFFER_SIZE: os << "UR_DEVICE_INFO_PRINTF_BUFFER_SIZE"; break; - case UR_DEVICE_INFO_PREFERRED_INTEROP_USER_SYNC: os << "UR_DEVICE_INFO_PREFERRED_INTEROP_USER_SYNC"; break; - case UR_DEVICE_INFO_PARENT_DEVICE: os << "UR_DEVICE_INFO_PARENT_DEVICE"; break; - case UR_DEVICE_INFO_SUPPORTED_PARTITIONS: os << "UR_DEVICE_INFO_SUPPORTED_PARTITIONS"; break; - case UR_DEVICE_INFO_PARTITION_MAX_SUB_DEVICES: os << "UR_DEVICE_INFO_PARTITION_MAX_SUB_DEVICES"; break; - case UR_DEVICE_INFO_PARTITION_AFFINITY_DOMAIN: os << "UR_DEVICE_INFO_PARTITION_AFFINITY_DOMAIN"; break; - case UR_DEVICE_INFO_PARTITION_TYPE: os << "UR_DEVICE_INFO_PARTITION_TYPE"; break; - case UR_DEVICE_INFO_MAX_NUM_SUB_GROUPS: os << "UR_DEVICE_INFO_MAX_NUM_SUB_GROUPS"; break; - case UR_DEVICE_INFO_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS: os << "UR_DEVICE_INFO_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS"; break; - case UR_DEVICE_INFO_SUB_GROUP_SIZES_INTEL: os << "UR_DEVICE_INFO_SUB_GROUP_SIZES_INTEL"; break; - case UR_DEVICE_INFO_USM_HOST_SUPPORT: os << "UR_DEVICE_INFO_USM_HOST_SUPPORT"; break; - case UR_DEVICE_INFO_USM_DEVICE_SUPPORT: os << "UR_DEVICE_INFO_USM_DEVICE_SUPPORT"; break; - case UR_DEVICE_INFO_USM_SINGLE_SHARED_SUPPORT: os << "UR_DEVICE_INFO_USM_SINGLE_SHARED_SUPPORT"; break; - case UR_DEVICE_INFO_USM_CROSS_SHARED_SUPPORT: os << "UR_DEVICE_INFO_USM_CROSS_SHARED_SUPPORT"; break; - case UR_DEVICE_INFO_USM_SYSTEM_SHARED_SUPPORT: os << "UR_DEVICE_INFO_USM_SYSTEM_SHARED_SUPPORT"; break; - case UR_DEVICE_INFO_UUID: os << "UR_DEVICE_INFO_UUID"; break; - case UR_DEVICE_INFO_PCI_ADDRESS: os << "UR_DEVICE_INFO_PCI_ADDRESS"; break; - case UR_DEVICE_INFO_GPU_EU_COUNT: os << "UR_DEVICE_INFO_GPU_EU_COUNT"; break; - case UR_DEVICE_INFO_GPU_EU_SIMD_WIDTH: os << "UR_DEVICE_INFO_GPU_EU_SIMD_WIDTH"; break; - case UR_DEVICE_INFO_GPU_EU_SLICES: os << "UR_DEVICE_INFO_GPU_EU_SLICES"; break; - case UR_DEVICE_INFO_GPU_EU_COUNT_PER_SUBSLICE: os << "UR_DEVICE_INFO_GPU_EU_COUNT_PER_SUBSLICE"; break; - case UR_DEVICE_INFO_GPU_SUBSLICES_PER_SLICE: os << "UR_DEVICE_INFO_GPU_SUBSLICES_PER_SLICE"; break; - case UR_DEVICE_INFO_GPU_HW_THREADS_PER_EU: os << "UR_DEVICE_INFO_GPU_HW_THREADS_PER_EU"; break; - case UR_DEVICE_INFO_MAX_MEMORY_BANDWIDTH: os << "UR_DEVICE_INFO_MAX_MEMORY_BANDWIDTH"; break; - case UR_DEVICE_INFO_IMAGE_SRGB: os << "UR_DEVICE_INFO_IMAGE_SRGB"; break; - case UR_DEVICE_INFO_BUILD_ON_SUBDEVICE: os << "UR_DEVICE_INFO_BUILD_ON_SUBDEVICE"; break; - case UR_DEVICE_INFO_ATOMIC_64: os << "UR_DEVICE_INFO_ATOMIC_64"; break; - case UR_DEVICE_INFO_ATOMIC_MEMORY_ORDER_CAPABILITIES: os << "UR_DEVICE_INFO_ATOMIC_MEMORY_ORDER_CAPABILITIES"; break; - case UR_DEVICE_INFO_ATOMIC_MEMORY_SCOPE_CAPABILITIES: os << "UR_DEVICE_INFO_ATOMIC_MEMORY_SCOPE_CAPABILITIES"; break; - case UR_DEVICE_INFO_ATOMIC_FENCE_ORDER_CAPABILITIES: os << "UR_DEVICE_INFO_ATOMIC_FENCE_ORDER_CAPABILITIES"; break; - case UR_DEVICE_INFO_ATOMIC_FENCE_SCOPE_CAPABILITIES: os << "UR_DEVICE_INFO_ATOMIC_FENCE_SCOPE_CAPABILITIES"; break; - case UR_DEVICE_INFO_BFLOAT16: os << "UR_DEVICE_INFO_BFLOAT16"; break; - case UR_DEVICE_INFO_MAX_COMPUTE_QUEUE_INDICES: os << "UR_DEVICE_INFO_MAX_COMPUTE_QUEUE_INDICES"; break; - case UR_DEVICE_INFO_KERNEL_SET_SPECIALIZATION_CONSTANTS: os << "UR_DEVICE_INFO_KERNEL_SET_SPECIALIZATION_CONSTANTS"; break; - case UR_DEVICE_INFO_MEMORY_BUS_WIDTH: os << "UR_DEVICE_INFO_MEMORY_BUS_WIDTH"; break; - case UR_DEVICE_INFO_MAX_WORK_GROUPS_3D: os << "UR_DEVICE_INFO_MAX_WORK_GROUPS_3D"; break; - case UR_DEVICE_INFO_ASYNC_BARRIER: os << "UR_DEVICE_INFO_ASYNC_BARRIER"; break; - case UR_DEVICE_INFO_MEM_CHANNEL_SUPPORT: os << "UR_DEVICE_INFO_MEM_CHANNEL_SUPPORT"; break; - case UR_DEVICE_INFO_HOST_PIPE_READ_WRITE_SUPPORTED: os << "UR_DEVICE_INFO_HOST_PIPE_READ_WRITE_SUPPORTED"; break; - case UR_DEVICE_INFO_MAX_REGISTERS_PER_WORK_GROUP: os << "UR_DEVICE_INFO_MAX_REGISTERS_PER_WORK_GROUP"; break; - case UR_DEVICE_INFO_IP_VERSION: os << "UR_DEVICE_INFO_IP_VERSION"; break; - 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; - case UR_DEVICE_INFO_BINDLESS_IMAGES_SHARED_USM_SUPPORT_EXP: os << "UR_DEVICE_INFO_BINDLESS_IMAGES_SHARED_USM_SUPPORT_EXP"; break; - case UR_DEVICE_INFO_BINDLESS_IMAGES_1D_USM_SUPPORT_EXP: os << "UR_DEVICE_INFO_BINDLESS_IMAGES_1D_USM_SUPPORT_EXP"; break; - case UR_DEVICE_INFO_BINDLESS_IMAGES_2D_USM_SUPPORT_EXP: os << "UR_DEVICE_INFO_BINDLESS_IMAGES_2D_USM_SUPPORT_EXP"; break; - case UR_DEVICE_INFO_IMAGE_PITCH_ALIGN_EXP: os << "UR_DEVICE_INFO_IMAGE_PITCH_ALIGN_EXP"; break; - case UR_DEVICE_INFO_MAX_IMAGE_LINEAR_WIDTH_EXP: os << "UR_DEVICE_INFO_MAX_IMAGE_LINEAR_WIDTH_EXP"; break; - case UR_DEVICE_INFO_MAX_IMAGE_LINEAR_HEIGHT_EXP: os << "UR_DEVICE_INFO_MAX_IMAGE_LINEAR_HEIGHT_EXP"; break; - case UR_DEVICE_INFO_MAX_IMAGE_LINEAR_PITCH_EXP: os << "UR_DEVICE_INFO_MAX_IMAGE_LINEAR_PITCH_EXP"; break; - case UR_DEVICE_INFO_MIPMAP_SUPPORT_EXP: os << "UR_DEVICE_INFO_MIPMAP_SUPPORT_EXP"; break; - case UR_DEVICE_INFO_MIPMAP_ANISOTROPY_SUPPORT_EXP: os << "UR_DEVICE_INFO_MIPMAP_ANISOTROPY_SUPPORT_EXP"; break; - case UR_DEVICE_INFO_MIPMAP_MAX_ANISOTROPY_EXP: os << "UR_DEVICE_INFO_MIPMAP_MAX_ANISOTROPY_EXP"; break; - case UR_DEVICE_INFO_MIPMAP_LEVEL_REFERENCE_SUPPORT_EXP: os << "UR_DEVICE_INFO_MIPMAP_LEVEL_REFERENCE_SUPPORT_EXP"; break; - case UR_DEVICE_INFO_INTEROP_MEMORY_IMPORT_SUPPORT_EXP: os << "UR_DEVICE_INFO_INTEROP_MEMORY_IMPORT_SUPPORT_EXP"; break; - case UR_DEVICE_INFO_INTEROP_MEMORY_EXPORT_SUPPORT_EXP: os << "UR_DEVICE_INFO_INTEROP_MEMORY_EXPORT_SUPPORT_EXP"; break; - case UR_DEVICE_INFO_INTEROP_SEMAPHORE_IMPORT_SUPPORT_EXP: os << "UR_DEVICE_INFO_INTEROP_SEMAPHORE_IMPORT_SUPPORT_EXP"; break; - case UR_DEVICE_INFO_INTEROP_SEMAPHORE_EXPORT_SUPPORT_EXP: os << "UR_DEVICE_INFO_INTEROP_SEMAPHORE_EXPORT_SUPPORT_EXP"; break; @@ -3024,22 +2448,21 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_device_info_t value) { } return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_device_info_t enum value template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_device_info_t value, size_t size) { +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_device_info_t value, size_t size) { if (ptr == NULL) { - printPtr(os, ptr); - return; + return printPtr(os, ptr); } switch (value) { - case UR_DEVICE_INFO_TYPE: { const ur_device_type_t *tptr = (const ur_device_type_t *)ptr; if (sizeof(ur_device_type_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_device_type_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_device_type_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3047,13 +2470,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_VENDOR_ID: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3061,13 +2482,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_DEVICE_ID: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3075,13 +2494,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_MAX_COMPUTE_UNITS: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3089,13 +2506,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_MAX_WORK_ITEM_DIMENSIONS: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3103,7 +2518,6 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_MAX_WORK_ITEM_SIZES: { const size_t *tptr = (const size_t *)ptr; @@ -3118,13 +2532,11 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << "}"; } break; - case UR_DEVICE_INFO_MAX_WORK_GROUP_SIZE: { const size_t *tptr = (const size_t *)ptr; if (sizeof(size_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(size_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(size_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3132,75 +2544,63 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_SINGLE_FP_CONFIG: { - const ur_device_fp_capability_flags_t *tptr = - (const ur_device_fp_capability_flags_t *)ptr; + const ur_device_fp_capability_flags_t *tptr = (const ur_device_fp_capability_flags_t *)ptr; if (sizeof(ur_device_fp_capability_flags_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_device_fp_capability_flags_t) - << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_device_fp_capability_flags_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; - printFlag(os, *tptr); + details::printFlag(os, + *tptr); os << ")"; } break; - case UR_DEVICE_INFO_HALF_FP_CONFIG: { - const ur_device_fp_capability_flags_t *tptr = - (const ur_device_fp_capability_flags_t *)ptr; + const ur_device_fp_capability_flags_t *tptr = (const ur_device_fp_capability_flags_t *)ptr; if (sizeof(ur_device_fp_capability_flags_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_device_fp_capability_flags_t) - << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_device_fp_capability_flags_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; - printFlag(os, *tptr); + details::printFlag(os, + *tptr); os << ")"; } break; - case UR_DEVICE_INFO_DOUBLE_FP_CONFIG: { - const ur_device_fp_capability_flags_t *tptr = - (const ur_device_fp_capability_flags_t *)ptr; + const ur_device_fp_capability_flags_t *tptr = (const ur_device_fp_capability_flags_t *)ptr; if (sizeof(ur_device_fp_capability_flags_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_device_fp_capability_flags_t) - << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_device_fp_capability_flags_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; - printFlag(os, *tptr); + details::printFlag(os, + *tptr); os << ")"; } break; - case UR_DEVICE_INFO_QUEUE_PROPERTIES: { const ur_queue_flags_t *tptr = (const ur_queue_flags_t *)ptr; if (sizeof(ur_queue_flags_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_queue_flags_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_queue_flags_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; - printFlag(os, *tptr); + details::printFlag(os, + *tptr); os << ")"; } break; - case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_CHAR: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3208,13 +2608,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_SHORT: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3222,13 +2620,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_INT: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3236,13 +2632,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3250,13 +2644,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_FLOAT: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3264,13 +2656,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_DOUBLE: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3278,13 +2668,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_HALF: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3292,13 +2680,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_CHAR: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3306,13 +2692,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_SHORT: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3320,13 +2704,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_INT: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3334,13 +2716,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3348,13 +2728,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_FLOAT: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3362,13 +2740,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_DOUBLE: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3376,13 +2752,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_HALF: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3390,13 +2764,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_MAX_CLOCK_FREQUENCY: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3404,13 +2776,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_MEMORY_CLOCK_RATE: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3418,13 +2788,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_ADDRESS_BITS: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3432,13 +2800,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_MAX_MEM_ALLOC_SIZE: { const uint64_t *tptr = (const uint64_t *)ptr; if (sizeof(uint64_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint64_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint64_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3446,13 +2812,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_IMAGE_SUPPORTED: { 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 << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3460,13 +2824,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_MAX_READ_IMAGE_ARGS: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3474,13 +2836,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_MAX_WRITE_IMAGE_ARGS: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3488,13 +2848,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_MAX_READ_WRITE_IMAGE_ARGS: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3502,13 +2860,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_IMAGE2D_MAX_WIDTH: { const size_t *tptr = (const size_t *)ptr; if (sizeof(size_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(size_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(size_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3516,13 +2872,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_IMAGE2D_MAX_HEIGHT: { const size_t *tptr = (const size_t *)ptr; if (sizeof(size_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(size_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(size_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3530,13 +2884,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_IMAGE3D_MAX_WIDTH: { const size_t *tptr = (const size_t *)ptr; if (sizeof(size_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(size_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(size_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3544,13 +2896,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_IMAGE3D_MAX_HEIGHT: { const size_t *tptr = (const size_t *)ptr; if (sizeof(size_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(size_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(size_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3558,13 +2908,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_IMAGE3D_MAX_DEPTH: { const size_t *tptr = (const size_t *)ptr; if (sizeof(size_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(size_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(size_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3572,13 +2920,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_IMAGE_MAX_BUFFER_SIZE: { const size_t *tptr = (const size_t *)ptr; if (sizeof(size_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(size_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(size_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3586,13 +2932,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_IMAGE_MAX_ARRAY_SIZE: { const size_t *tptr = (const size_t *)ptr; if (sizeof(size_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(size_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(size_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3600,13 +2944,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_MAX_SAMPLERS: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3614,13 +2956,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_MAX_PARAMETER_SIZE: { const size_t *tptr = (const size_t *)ptr; if (sizeof(size_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(size_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(size_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3628,13 +2968,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_MEM_BASE_ADDR_ALIGN: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3642,14 +2980,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_GLOBAL_MEM_CACHE_TYPE: { - const ur_device_mem_cache_type_t *tptr = - (const ur_device_mem_cache_type_t *)ptr; + const ur_device_mem_cache_type_t *tptr = (const ur_device_mem_cache_type_t *)ptr; if (sizeof(ur_device_mem_cache_type_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_device_mem_cache_type_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_device_mem_cache_type_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3657,13 +2992,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_GLOBAL_MEM_CACHELINE_SIZE: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3671,13 +3004,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_GLOBAL_MEM_CACHE_SIZE: { const uint64_t *tptr = (const uint64_t *)ptr; if (sizeof(uint64_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint64_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint64_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3685,13 +3016,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_GLOBAL_MEM_SIZE: { const uint64_t *tptr = (const uint64_t *)ptr; if (sizeof(uint64_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint64_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint64_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3699,13 +3028,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_GLOBAL_MEM_FREE: { const uint64_t *tptr = (const uint64_t *)ptr; if (sizeof(uint64_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint64_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint64_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3713,13 +3040,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_MAX_CONSTANT_BUFFER_SIZE: { const uint64_t *tptr = (const uint64_t *)ptr; if (sizeof(uint64_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint64_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint64_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3727,13 +3052,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_MAX_CONSTANT_ARGS: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3741,14 +3064,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_LOCAL_MEM_TYPE: { - const ur_device_local_mem_type_t *tptr = - (const ur_device_local_mem_type_t *)ptr; + const ur_device_local_mem_type_t *tptr = (const ur_device_local_mem_type_t *)ptr; if (sizeof(ur_device_local_mem_type_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_device_local_mem_type_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_device_local_mem_type_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3756,13 +3076,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_LOCAL_MEM_SIZE: { const uint64_t *tptr = (const uint64_t *)ptr; if (sizeof(uint64_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint64_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint64_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3770,13 +3088,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_ERROR_CORRECTION_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 << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3784,13 +3100,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_HOST_UNIFIED_MEMORY: { 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 << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3798,13 +3112,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_PROFILING_TIMER_RESOLUTION: { const size_t *tptr = (const size_t *)ptr; if (sizeof(size_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(size_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(size_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3812,13 +3124,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_ENDIAN_LITTLE: { 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 << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3826,13 +3136,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_AVAILABLE: { 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 << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3840,13 +3148,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_COMPILER_AVAILABLE: { 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 << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3854,13 +3160,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_LINKER_AVAILABLE: { 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 << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3868,77 +3172,68 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_EXECUTION_CAPABILITIES: { - const ur_device_exec_capability_flags_t *tptr = - (const ur_device_exec_capability_flags_t *)ptr; + const ur_device_exec_capability_flags_t *tptr = (const ur_device_exec_capability_flags_t *)ptr; if (sizeof(ur_device_exec_capability_flags_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_device_exec_capability_flags_t) - << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_device_exec_capability_flags_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; - printFlag(os, *tptr); + details::printFlag(os, + *tptr); os << ")"; } break; - case UR_DEVICE_INFO_QUEUE_ON_DEVICE_PROPERTIES: { const ur_queue_flags_t *tptr = (const ur_queue_flags_t *)ptr; if (sizeof(ur_queue_flags_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_queue_flags_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_queue_flags_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; - printFlag(os, *tptr); + details::printFlag(os, + *tptr); os << ")"; } break; - case UR_DEVICE_INFO_QUEUE_ON_HOST_PROPERTIES: { const ur_queue_flags_t *tptr = (const ur_queue_flags_t *)ptr; if (sizeof(ur_queue_flags_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_queue_flags_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_queue_flags_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; - printFlag(os, *tptr); + details::printFlag(os, + *tptr); os << ")"; } break; - case UR_DEVICE_INFO_BUILT_IN_KERNELS: { const char *tptr = (const char *)ptr; printPtr(os, tptr); } break; - case UR_DEVICE_INFO_PLATFORM: { const ur_platform_handle_t *tptr = (const ur_platform_handle_t *)ptr; if (sizeof(ur_platform_handle_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_platform_handle_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_platform_handle_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; - printPtr(os, *tptr); + details::printPtr(os, + *tptr); os << ")"; } break; - case UR_DEVICE_INFO_REFERENCE_COUNT: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -3946,61 +3241,51 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_IL_VERSION: { const char *tptr = (const char *)ptr; printPtr(os, tptr); } break; - case UR_DEVICE_INFO_NAME: { const char *tptr = (const char *)ptr; printPtr(os, tptr); } break; - case UR_DEVICE_INFO_VENDOR: { const char *tptr = (const char *)ptr; printPtr(os, tptr); } break; - case UR_DEVICE_INFO_DRIVER_VERSION: { const char *tptr = (const char *)ptr; printPtr(os, tptr); } break; - case UR_DEVICE_INFO_PROFILE: { const char *tptr = (const char *)ptr; printPtr(os, tptr); } break; - case UR_DEVICE_INFO_VERSION: { const char *tptr = (const char *)ptr; printPtr(os, tptr); } break; - case UR_DEVICE_INFO_BACKEND_RUNTIME_VERSION: { const char *tptr = (const char *)ptr; printPtr(os, tptr); } break; - case UR_DEVICE_INFO_EXTENSIONS: { const char *tptr = (const char *)ptr; printPtr(os, tptr); } break; - case UR_DEVICE_INFO_PRINTF_BUFFER_SIZE: { const size_t *tptr = (const size_t *)ptr; if (sizeof(size_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(size_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(size_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4008,13 +3293,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_PREFERRED_INTEROP_USER_SYNC: { 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 << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4022,21 +3305,19 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_PARENT_DEVICE: { const ur_device_handle_t *tptr = (const ur_device_handle_t *)ptr; if (sizeof(ur_device_handle_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_device_handle_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_device_handle_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; - printPtr(os, *tptr); + details::printPtr(os, + *tptr); os << ")"; } break; - case UR_DEVICE_INFO_SUPPORTED_PARTITIONS: { const ur_device_partition_t *tptr = (const ur_device_partition_t *)ptr; @@ -4051,13 +3332,11 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << "}"; } break; - case UR_DEVICE_INFO_PARTITION_MAX_SUB_DEVICES: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4065,27 +3344,22 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_PARTITION_AFFINITY_DOMAIN: { - const ur_device_affinity_domain_flags_t *tptr = - (const ur_device_affinity_domain_flags_t *)ptr; + const ur_device_affinity_domain_flags_t *tptr = (const ur_device_affinity_domain_flags_t *)ptr; if (sizeof(ur_device_affinity_domain_flags_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_device_affinity_domain_flags_t) - << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_device_affinity_domain_flags_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; - printFlag(os, *tptr); + details::printFlag(os, + *tptr); os << ")"; } break; - case UR_DEVICE_INFO_PARTITION_TYPE: { - const ur_device_partition_property_t *tptr = - (const ur_device_partition_property_t *)ptr; + const ur_device_partition_property_t *tptr = (const ur_device_partition_property_t *)ptr; os << "{"; size_t nelems = size / sizeof(ur_device_partition_property_t); for (size_t i = 0; i < nelems; ++i) { @@ -4097,13 +3371,11 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << "}"; } break; - case UR_DEVICE_INFO_MAX_NUM_SUB_GROUPS: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4111,13 +3383,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS: { 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 << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4125,7 +3395,6 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_SUB_GROUP_SIZES_INTEL: { const uint32_t *tptr = (const uint32_t *)ptr; @@ -4140,100 +3409,86 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << "}"; } break; - case UR_DEVICE_INFO_USM_HOST_SUPPORT: { - const ur_device_usm_access_capability_flags_t *tptr = - (const ur_device_usm_access_capability_flags_t *)ptr; + const ur_device_usm_access_capability_flags_t *tptr = (const ur_device_usm_access_capability_flags_t *)ptr; if (sizeof(ur_device_usm_access_capability_flags_t) > size) { - os << "invalid size (is: " << size << ", expected: >=" - << sizeof(ur_device_usm_access_capability_flags_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_device_usm_access_capability_flags_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; - printFlag(os, *tptr); + details::printFlag(os, + *tptr); os << ")"; } break; - case UR_DEVICE_INFO_USM_DEVICE_SUPPORT: { - const ur_device_usm_access_capability_flags_t *tptr = - (const ur_device_usm_access_capability_flags_t *)ptr; + const ur_device_usm_access_capability_flags_t *tptr = (const ur_device_usm_access_capability_flags_t *)ptr; if (sizeof(ur_device_usm_access_capability_flags_t) > size) { - os << "invalid size (is: " << size << ", expected: >=" - << sizeof(ur_device_usm_access_capability_flags_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_device_usm_access_capability_flags_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; - printFlag(os, *tptr); + details::printFlag(os, + *tptr); os << ")"; } break; - case UR_DEVICE_INFO_USM_SINGLE_SHARED_SUPPORT: { - const ur_device_usm_access_capability_flags_t *tptr = - (const ur_device_usm_access_capability_flags_t *)ptr; + const ur_device_usm_access_capability_flags_t *tptr = (const ur_device_usm_access_capability_flags_t *)ptr; if (sizeof(ur_device_usm_access_capability_flags_t) > size) { - os << "invalid size (is: " << size << ", expected: >=" - << sizeof(ur_device_usm_access_capability_flags_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_device_usm_access_capability_flags_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; - printFlag(os, *tptr); + details::printFlag(os, + *tptr); os << ")"; } break; - case UR_DEVICE_INFO_USM_CROSS_SHARED_SUPPORT: { - const ur_device_usm_access_capability_flags_t *tptr = - (const ur_device_usm_access_capability_flags_t *)ptr; + const ur_device_usm_access_capability_flags_t *tptr = (const ur_device_usm_access_capability_flags_t *)ptr; if (sizeof(ur_device_usm_access_capability_flags_t) > size) { - os << "invalid size (is: " << size << ", expected: >=" - << sizeof(ur_device_usm_access_capability_flags_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_device_usm_access_capability_flags_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; - printFlag(os, *tptr); + details::printFlag(os, + *tptr); os << ")"; } break; - case UR_DEVICE_INFO_USM_SYSTEM_SHARED_SUPPORT: { - const ur_device_usm_access_capability_flags_t *tptr = - (const ur_device_usm_access_capability_flags_t *)ptr; + const ur_device_usm_access_capability_flags_t *tptr = (const ur_device_usm_access_capability_flags_t *)ptr; if (sizeof(ur_device_usm_access_capability_flags_t) > size) { - os << "invalid size (is: " << size << ", expected: >=" - << sizeof(ur_device_usm_access_capability_flags_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_device_usm_access_capability_flags_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; - printFlag(os, *tptr); + details::printFlag(os, + *tptr); os << ")"; } break; - case UR_DEVICE_INFO_UUID: { const char *tptr = (const char *)ptr; printPtr(os, tptr); } break; - case UR_DEVICE_INFO_PCI_ADDRESS: { const char *tptr = (const char *)ptr; printPtr(os, tptr); } break; - case UR_DEVICE_INFO_GPU_EU_COUNT: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4241,13 +3496,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_GPU_EU_SIMD_WIDTH: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4255,13 +3508,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_GPU_EU_SLICES: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4269,13 +3520,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_GPU_EU_COUNT_PER_SUBSLICE: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4283,13 +3532,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_GPU_SUBSLICES_PER_SLICE: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4297,13 +3544,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_GPU_HW_THREADS_PER_EU: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4311,13 +3556,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_MAX_MEMORY_BANDWIDTH: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4325,13 +3568,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_IMAGE_SRGB: { 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 << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4339,13 +3580,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_BUILD_ON_SUBDEVICE: { 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 << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4353,13 +3592,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_ATOMIC_64: { 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 << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4367,77 +3604,63 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_ATOMIC_MEMORY_ORDER_CAPABILITIES: { - const ur_memory_order_capability_flags_t *tptr = - (const ur_memory_order_capability_flags_t *)ptr; + const ur_memory_order_capability_flags_t *tptr = (const ur_memory_order_capability_flags_t *)ptr; if (sizeof(ur_memory_order_capability_flags_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_memory_order_capability_flags_t) - << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_memory_order_capability_flags_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; - printFlag(os, *tptr); + details::printFlag(os, + *tptr); os << ")"; } break; - case UR_DEVICE_INFO_ATOMIC_MEMORY_SCOPE_CAPABILITIES: { - const ur_memory_scope_capability_flags_t *tptr = - (const ur_memory_scope_capability_flags_t *)ptr; + const ur_memory_scope_capability_flags_t *tptr = (const ur_memory_scope_capability_flags_t *)ptr; if (sizeof(ur_memory_scope_capability_flags_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_memory_scope_capability_flags_t) - << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_memory_scope_capability_flags_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; - printFlag(os, *tptr); + details::printFlag(os, + *tptr); os << ")"; } break; - case UR_DEVICE_INFO_ATOMIC_FENCE_ORDER_CAPABILITIES: { - const ur_memory_order_capability_flags_t *tptr = - (const ur_memory_order_capability_flags_t *)ptr; + const ur_memory_order_capability_flags_t *tptr = (const ur_memory_order_capability_flags_t *)ptr; if (sizeof(ur_memory_order_capability_flags_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_memory_order_capability_flags_t) - << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_memory_order_capability_flags_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; - printFlag(os, *tptr); + details::printFlag(os, + *tptr); os << ")"; } break; - case UR_DEVICE_INFO_ATOMIC_FENCE_SCOPE_CAPABILITIES: { - const ur_memory_scope_capability_flags_t *tptr = - (const ur_memory_scope_capability_flags_t *)ptr; + const ur_memory_scope_capability_flags_t *tptr = (const ur_memory_scope_capability_flags_t *)ptr; if (sizeof(ur_memory_scope_capability_flags_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_memory_scope_capability_flags_t) - << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_memory_scope_capability_flags_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; - printFlag(os, *tptr); + details::printFlag(os, + *tptr); os << ")"; } break; - case UR_DEVICE_INFO_BFLOAT16: { 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 << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4445,13 +3668,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_MAX_COMPUTE_QUEUE_INDICES: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4459,13 +3680,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_KERNEL_SET_SPECIALIZATION_CONSTANTS: { 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 << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4473,13 +3692,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_MEMORY_BUS_WIDTH: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4487,7 +3704,6 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_MAX_WORK_GROUPS_3D: { const size_t *tptr = (const size_t *)ptr; @@ -4502,13 +3718,11 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << "}"; } break; - case UR_DEVICE_INFO_ASYNC_BARRIER: { 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 << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4516,13 +3730,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_MEM_CHANNEL_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 << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4530,13 +3742,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_HOST_PIPE_READ_WRITE_SUPPORTED: { 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 << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4544,13 +3754,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_MAX_REGISTERS_PER_WORK_GROUP: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4558,13 +3766,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_IP_VERSION: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4572,13 +3778,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_VIRTUAL_MEMORY_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 << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4586,13 +3790,11 @@ inline void printTagged(std::ostream &os, const void *ptr, 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 << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4600,13 +3802,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_BINDLESS_IMAGES_SUPPORT_EXP: { 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 << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4614,13 +3814,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_BINDLESS_IMAGES_SHARED_USM_SUPPORT_EXP: { 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 << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4628,13 +3826,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_BINDLESS_IMAGES_1D_USM_SUPPORT_EXP: { 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 << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4642,13 +3838,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_BINDLESS_IMAGES_2D_USM_SUPPORT_EXP: { 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 << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4656,13 +3850,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_IMAGE_PITCH_ALIGN_EXP: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4670,13 +3862,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_MAX_IMAGE_LINEAR_WIDTH_EXP: { const size_t *tptr = (const size_t *)ptr; if (sizeof(size_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(size_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(size_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4684,13 +3874,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_MAX_IMAGE_LINEAR_HEIGHT_EXP: { const size_t *tptr = (const size_t *)ptr; if (sizeof(size_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(size_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(size_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4698,13 +3886,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_MAX_IMAGE_LINEAR_PITCH_EXP: { const size_t *tptr = (const size_t *)ptr; if (sizeof(size_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(size_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(size_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4712,13 +3898,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_MIPMAP_SUPPORT_EXP: { 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 << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4726,13 +3910,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_MIPMAP_ANISOTROPY_SUPPORT_EXP: { 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 << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4740,13 +3922,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_MIPMAP_MAX_ANISOTROPY_EXP: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4754,13 +3934,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_MIPMAP_LEVEL_REFERENCE_SUPPORT_EXP: { 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 << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4768,13 +3946,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_INTEROP_MEMORY_IMPORT_SUPPORT_EXP: { 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 << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4782,13 +3958,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_INTEROP_MEMORY_EXPORT_SUPPORT_EXP: { 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 << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4796,13 +3970,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_INTEROP_SEMAPHORE_IMPORT_SUPPORT_EXP: { 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 << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4810,13 +3982,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_DEVICE_INFO_INTEROP_SEMAPHORE_EXPORT_SUPPORT_EXP: { 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 << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -4826,34 +3996,33 @@ inline void printTagged(std::ostream &os, const void *ptr, } break; default: os << "unknown enumerator"; - break; + return UR_RESULT_ERROR_INVALID_ENUMERATION; } + return UR_RESULT_SUCCESS; } +} // namespace details -inline std::ostream &operator<<(std::ostream &os, - enum ur_device_affinity_domain_flag_t value) { +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_DEVICE_AFFINITY_DOMAIN_FLAG_NUMA: os << "UR_DEVICE_AFFINITY_DOMAIN_FLAG_NUMA"; break; - case UR_DEVICE_AFFINITY_DOMAIN_FLAG_L4_CACHE: os << "UR_DEVICE_AFFINITY_DOMAIN_FLAG_L4_CACHE"; break; - case UR_DEVICE_AFFINITY_DOMAIN_FLAG_L3_CACHE: os << "UR_DEVICE_AFFINITY_DOMAIN_FLAG_L3_CACHE"; break; - case UR_DEVICE_AFFINITY_DOMAIN_FLAG_L2_CACHE: os << "UR_DEVICE_AFFINITY_DOMAIN_FLAG_L2_CACHE"; break; - case UR_DEVICE_AFFINITY_DOMAIN_FLAG_L1_CACHE: os << "UR_DEVICE_AFFINITY_DOMAIN_FLAG_L1_CACHE"; break; - case UR_DEVICE_AFFINITY_DOMAIN_FLAG_NEXT_PARTITIONABLE: os << "UR_DEVICE_AFFINITY_DOMAIN_FLAG_NEXT_PARTITIONABLE"; break; @@ -4864,14 +4033,15 @@ inline std::ostream &operator<<(std::ostream &os, return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_device_affinity_domain_flag_t flag template <> -inline void printFlag(std::ostream &os, - uint32_t flag) { +inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { uint32_t val = flag; bool first = true; - if ((val & UR_DEVICE_AFFINITY_DOMAIN_FLAG_NUMA) == - (uint32_t)UR_DEVICE_AFFINITY_DOMAIN_FLAG_NUMA) { + if ((val & UR_DEVICE_AFFINITY_DOMAIN_FLAG_NUMA) == (uint32_t)UR_DEVICE_AFFINITY_DOMAIN_FLAG_NUMA) { val ^= (uint32_t)UR_DEVICE_AFFINITY_DOMAIN_FLAG_NUMA; if (!first) { os << " | "; @@ -4881,8 +4051,7 @@ inline void printFlag(std::ostream &os, os << UR_DEVICE_AFFINITY_DOMAIN_FLAG_NUMA; } - if ((val & UR_DEVICE_AFFINITY_DOMAIN_FLAG_L4_CACHE) == - (uint32_t)UR_DEVICE_AFFINITY_DOMAIN_FLAG_L4_CACHE) { + if ((val & UR_DEVICE_AFFINITY_DOMAIN_FLAG_L4_CACHE) == (uint32_t)UR_DEVICE_AFFINITY_DOMAIN_FLAG_L4_CACHE) { val ^= (uint32_t)UR_DEVICE_AFFINITY_DOMAIN_FLAG_L4_CACHE; if (!first) { os << " | "; @@ -4892,8 +4061,7 @@ inline void printFlag(std::ostream &os, os << UR_DEVICE_AFFINITY_DOMAIN_FLAG_L4_CACHE; } - if ((val & UR_DEVICE_AFFINITY_DOMAIN_FLAG_L3_CACHE) == - (uint32_t)UR_DEVICE_AFFINITY_DOMAIN_FLAG_L3_CACHE) { + if ((val & UR_DEVICE_AFFINITY_DOMAIN_FLAG_L3_CACHE) == (uint32_t)UR_DEVICE_AFFINITY_DOMAIN_FLAG_L3_CACHE) { val ^= (uint32_t)UR_DEVICE_AFFINITY_DOMAIN_FLAG_L3_CACHE; if (!first) { os << " | "; @@ -4903,8 +4071,7 @@ inline void printFlag(std::ostream &os, os << UR_DEVICE_AFFINITY_DOMAIN_FLAG_L3_CACHE; } - if ((val & UR_DEVICE_AFFINITY_DOMAIN_FLAG_L2_CACHE) == - (uint32_t)UR_DEVICE_AFFINITY_DOMAIN_FLAG_L2_CACHE) { + if ((val & UR_DEVICE_AFFINITY_DOMAIN_FLAG_L2_CACHE) == (uint32_t)UR_DEVICE_AFFINITY_DOMAIN_FLAG_L2_CACHE) { val ^= (uint32_t)UR_DEVICE_AFFINITY_DOMAIN_FLAG_L2_CACHE; if (!first) { os << " | "; @@ -4914,8 +4081,7 @@ inline void printFlag(std::ostream &os, os << UR_DEVICE_AFFINITY_DOMAIN_FLAG_L2_CACHE; } - if ((val & UR_DEVICE_AFFINITY_DOMAIN_FLAG_L1_CACHE) == - (uint32_t)UR_DEVICE_AFFINITY_DOMAIN_FLAG_L1_CACHE) { + if ((val & UR_DEVICE_AFFINITY_DOMAIN_FLAG_L1_CACHE) == (uint32_t)UR_DEVICE_AFFINITY_DOMAIN_FLAG_L1_CACHE) { val ^= (uint32_t)UR_DEVICE_AFFINITY_DOMAIN_FLAG_L1_CACHE; if (!first) { os << " | "; @@ -4925,8 +4091,7 @@ inline void printFlag(std::ostream &os, os << UR_DEVICE_AFFINITY_DOMAIN_FLAG_L1_CACHE; } - if ((val & UR_DEVICE_AFFINITY_DOMAIN_FLAG_NEXT_PARTITIONABLE) == - (uint32_t)UR_DEVICE_AFFINITY_DOMAIN_FLAG_NEXT_PARTITIONABLE) { + if ((val & UR_DEVICE_AFFINITY_DOMAIN_FLAG_NEXT_PARTITIONABLE) == (uint32_t)UR_DEVICE_AFFINITY_DOMAIN_FLAG_NEXT_PARTITIONABLE) { val ^= (uint32_t)UR_DEVICE_AFFINITY_DOMAIN_FLAG_NEXT_PARTITIONABLE; if (!first) { os << " | "; @@ -4944,23 +4109,24 @@ inline void printFlag(std::ostream &os, } else if (first) { os << "0"; } + return UR_RESULT_SUCCESS; } -inline std::ostream &operator<<(std::ostream &os, - enum ur_device_partition_t value) { +} // namespace details +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_DEVICE_PARTITION_EQUALLY: os << "UR_DEVICE_PARTITION_EQUALLY"; break; - case UR_DEVICE_PARTITION_BY_COUNTS: os << "UR_DEVICE_PARTITION_BY_COUNTS"; break; - case UR_DEVICE_PARTITION_BY_AFFINITY_DOMAIN: os << "UR_DEVICE_PARTITION_BY_AFFINITY_DOMAIN"; break; - case UR_DEVICE_PARTITION_BY_CSLICE: os << "UR_DEVICE_PARTITION_BY_CSLICE"; break; @@ -4970,10 +4136,14 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } +namespace details { -inline void printUnion(std::ostream &os, - const union ur_device_partition_value_t params, - const enum ur_device_partition_t tag) { +/////////////////////////////////////////////////////////////////////////////// +// @brief Print ur_device_partition_value_t union +inline ur_result_t printUnion( + std::ostream &os, + const union ur_device_partition_value_t params, + const enum ur_device_partition_t tag) { os << "(union ur_device_partition_value_t){"; switch (tag) { @@ -4995,19 +4165,23 @@ inline void printUnion(std::ostream &os, os << ".affinity_domain = "; - printFlag(os, - (params.affinity_domain)); + details::printFlag(os, + (params.affinity_domain)); break; default: os << ""; - break; + return UR_RESULT_ERROR_INVALID_ENUMERATION; } os << "}"; -} -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_device_partition_property_t params) { + return UR_RESULT_SUCCESS; +} +} // namespace details +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_device_partition_property_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_device_partition_property_t params) { os << "(struct ur_device_partition_property_t){"; os << ".type = "; @@ -5016,14 +4190,16 @@ operator<<(std::ostream &os, os << ", "; os << ".value = "; - printUnion(os, (params.value), params.type); + details::printUnion(os, (params.value), params.type); os << "}"; return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_device_partition_properties_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_device_partition_properties_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_device_partition_properties_t params) { os << "(struct ur_device_partition_properties_t){"; os << ".stype = "; @@ -5033,12 +4209,14 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << ", "; os << ".pProperties = "; - printPtr(os, (params.pProperties)); + details::printPtr(os, + (params.pProperties)); os << ", "; os << ".PropCount = "; @@ -5048,38 +4226,33 @@ operator<<(std::ostream &os, os << "}"; return os; } -inline std::ostream &operator<<(std::ostream &os, - enum ur_device_fp_capability_flag_t value) { +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_DEVICE_FP_CAPABILITY_FLAG_CORRECTLY_ROUNDED_DIVIDE_SQRT: os << "UR_DEVICE_FP_CAPABILITY_FLAG_CORRECTLY_ROUNDED_DIVIDE_SQRT"; break; - case UR_DEVICE_FP_CAPABILITY_FLAG_ROUND_TO_NEAREST: os << "UR_DEVICE_FP_CAPABILITY_FLAG_ROUND_TO_NEAREST"; break; - case UR_DEVICE_FP_CAPABILITY_FLAG_ROUND_TO_ZERO: os << "UR_DEVICE_FP_CAPABILITY_FLAG_ROUND_TO_ZERO"; break; - case UR_DEVICE_FP_CAPABILITY_FLAG_ROUND_TO_INF: os << "UR_DEVICE_FP_CAPABILITY_FLAG_ROUND_TO_INF"; break; - case UR_DEVICE_FP_CAPABILITY_FLAG_INF_NAN: os << "UR_DEVICE_FP_CAPABILITY_FLAG_INF_NAN"; break; - case UR_DEVICE_FP_CAPABILITY_FLAG_DENORM: os << "UR_DEVICE_FP_CAPABILITY_FLAG_DENORM"; break; - case UR_DEVICE_FP_CAPABILITY_FLAG_FMA: os << "UR_DEVICE_FP_CAPABILITY_FLAG_FMA"; break; - case UR_DEVICE_FP_CAPABILITY_FLAG_SOFT_FLOAT: os << "UR_DEVICE_FP_CAPABILITY_FLAG_SOFT_FLOAT"; break; @@ -5090,16 +4263,16 @@ inline std::ostream &operator<<(std::ostream &os, return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_device_fp_capability_flag_t flag template <> -inline void printFlag(std::ostream &os, - uint32_t flag) { +inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { uint32_t val = flag; bool first = true; - if ((val & UR_DEVICE_FP_CAPABILITY_FLAG_CORRECTLY_ROUNDED_DIVIDE_SQRT) == - (uint32_t)UR_DEVICE_FP_CAPABILITY_FLAG_CORRECTLY_ROUNDED_DIVIDE_SQRT) { - val ^= (uint32_t) - UR_DEVICE_FP_CAPABILITY_FLAG_CORRECTLY_ROUNDED_DIVIDE_SQRT; + if ((val & UR_DEVICE_FP_CAPABILITY_FLAG_CORRECTLY_ROUNDED_DIVIDE_SQRT) == (uint32_t)UR_DEVICE_FP_CAPABILITY_FLAG_CORRECTLY_ROUNDED_DIVIDE_SQRT) { + val ^= (uint32_t)UR_DEVICE_FP_CAPABILITY_FLAG_CORRECTLY_ROUNDED_DIVIDE_SQRT; if (!first) { os << " | "; } else { @@ -5108,8 +4281,7 @@ inline void printFlag(std::ostream &os, os << UR_DEVICE_FP_CAPABILITY_FLAG_CORRECTLY_ROUNDED_DIVIDE_SQRT; } - if ((val & UR_DEVICE_FP_CAPABILITY_FLAG_ROUND_TO_NEAREST) == - (uint32_t)UR_DEVICE_FP_CAPABILITY_FLAG_ROUND_TO_NEAREST) { + if ((val & UR_DEVICE_FP_CAPABILITY_FLAG_ROUND_TO_NEAREST) == (uint32_t)UR_DEVICE_FP_CAPABILITY_FLAG_ROUND_TO_NEAREST) { val ^= (uint32_t)UR_DEVICE_FP_CAPABILITY_FLAG_ROUND_TO_NEAREST; if (!first) { os << " | "; @@ -5119,8 +4291,7 @@ inline void printFlag(std::ostream &os, os << UR_DEVICE_FP_CAPABILITY_FLAG_ROUND_TO_NEAREST; } - if ((val & UR_DEVICE_FP_CAPABILITY_FLAG_ROUND_TO_ZERO) == - (uint32_t)UR_DEVICE_FP_CAPABILITY_FLAG_ROUND_TO_ZERO) { + if ((val & UR_DEVICE_FP_CAPABILITY_FLAG_ROUND_TO_ZERO) == (uint32_t)UR_DEVICE_FP_CAPABILITY_FLAG_ROUND_TO_ZERO) { val ^= (uint32_t)UR_DEVICE_FP_CAPABILITY_FLAG_ROUND_TO_ZERO; if (!first) { os << " | "; @@ -5130,8 +4301,7 @@ inline void printFlag(std::ostream &os, os << UR_DEVICE_FP_CAPABILITY_FLAG_ROUND_TO_ZERO; } - if ((val & UR_DEVICE_FP_CAPABILITY_FLAG_ROUND_TO_INF) == - (uint32_t)UR_DEVICE_FP_CAPABILITY_FLAG_ROUND_TO_INF) { + if ((val & UR_DEVICE_FP_CAPABILITY_FLAG_ROUND_TO_INF) == (uint32_t)UR_DEVICE_FP_CAPABILITY_FLAG_ROUND_TO_INF) { val ^= (uint32_t)UR_DEVICE_FP_CAPABILITY_FLAG_ROUND_TO_INF; if (!first) { os << " | "; @@ -5141,8 +4311,7 @@ inline void printFlag(std::ostream &os, os << UR_DEVICE_FP_CAPABILITY_FLAG_ROUND_TO_INF; } - if ((val & UR_DEVICE_FP_CAPABILITY_FLAG_INF_NAN) == - (uint32_t)UR_DEVICE_FP_CAPABILITY_FLAG_INF_NAN) { + if ((val & UR_DEVICE_FP_CAPABILITY_FLAG_INF_NAN) == (uint32_t)UR_DEVICE_FP_CAPABILITY_FLAG_INF_NAN) { val ^= (uint32_t)UR_DEVICE_FP_CAPABILITY_FLAG_INF_NAN; if (!first) { os << " | "; @@ -5152,8 +4321,7 @@ inline void printFlag(std::ostream &os, os << UR_DEVICE_FP_CAPABILITY_FLAG_INF_NAN; } - if ((val & UR_DEVICE_FP_CAPABILITY_FLAG_DENORM) == - (uint32_t)UR_DEVICE_FP_CAPABILITY_FLAG_DENORM) { + if ((val & UR_DEVICE_FP_CAPABILITY_FLAG_DENORM) == (uint32_t)UR_DEVICE_FP_CAPABILITY_FLAG_DENORM) { val ^= (uint32_t)UR_DEVICE_FP_CAPABILITY_FLAG_DENORM; if (!first) { os << " | "; @@ -5163,8 +4331,7 @@ inline void printFlag(std::ostream &os, os << UR_DEVICE_FP_CAPABILITY_FLAG_DENORM; } - if ((val & UR_DEVICE_FP_CAPABILITY_FLAG_FMA) == - (uint32_t)UR_DEVICE_FP_CAPABILITY_FLAG_FMA) { + if ((val & UR_DEVICE_FP_CAPABILITY_FLAG_FMA) == (uint32_t)UR_DEVICE_FP_CAPABILITY_FLAG_FMA) { val ^= (uint32_t)UR_DEVICE_FP_CAPABILITY_FLAG_FMA; if (!first) { os << " | "; @@ -5174,8 +4341,7 @@ inline void printFlag(std::ostream &os, os << UR_DEVICE_FP_CAPABILITY_FLAG_FMA; } - if ((val & UR_DEVICE_FP_CAPABILITY_FLAG_SOFT_FLOAT) == - (uint32_t)UR_DEVICE_FP_CAPABILITY_FLAG_SOFT_FLOAT) { + if ((val & UR_DEVICE_FP_CAPABILITY_FLAG_SOFT_FLOAT) == (uint32_t)UR_DEVICE_FP_CAPABILITY_FLAG_SOFT_FLOAT) { val ^= (uint32_t)UR_DEVICE_FP_CAPABILITY_FLAG_SOFT_FLOAT; if (!first) { os << " | "; @@ -5193,19 +4359,21 @@ inline void printFlag(std::ostream &os, } else if (first) { os << "0"; } + return UR_RESULT_SUCCESS; } -inline std::ostream &operator<<(std::ostream &os, - enum ur_device_mem_cache_type_t value) { +} // namespace details +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_DEVICE_MEM_CACHE_TYPE_NONE: os << "UR_DEVICE_MEM_CACHE_TYPE_NONE"; break; - case UR_DEVICE_MEM_CACHE_TYPE_READ_ONLY_CACHE: os << "UR_DEVICE_MEM_CACHE_TYPE_READ_ONLY_CACHE"; break; - case UR_DEVICE_MEM_CACHE_TYPE_READ_WRITE_CACHE: os << "UR_DEVICE_MEM_CACHE_TYPE_READ_WRITE_CACHE"; break; @@ -5215,18 +4383,18 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -inline std::ostream &operator<<(std::ostream &os, - enum ur_device_local_mem_type_t value) { +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_DEVICE_LOCAL_MEM_TYPE_NONE: os << "UR_DEVICE_LOCAL_MEM_TYPE_NONE"; break; - case UR_DEVICE_LOCAL_MEM_TYPE_LOCAL: os << "UR_DEVICE_LOCAL_MEM_TYPE_LOCAL"; break; - case UR_DEVICE_LOCAL_MEM_TYPE_GLOBAL: os << "UR_DEVICE_LOCAL_MEM_TYPE_GLOBAL"; break; @@ -5236,14 +4404,15 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -inline std::ostream &operator<<(std::ostream &os, - enum ur_device_exec_capability_flag_t value) { +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_DEVICE_EXEC_CAPABILITY_FLAG_KERNEL: os << "UR_DEVICE_EXEC_CAPABILITY_FLAG_KERNEL"; break; - case UR_DEVICE_EXEC_CAPABILITY_FLAG_NATIVE_KERNEL: os << "UR_DEVICE_EXEC_CAPABILITY_FLAG_NATIVE_KERNEL"; break; @@ -5254,14 +4423,15 @@ inline std::ostream &operator<<(std::ostream &os, return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_device_exec_capability_flag_t flag template <> -inline void printFlag(std::ostream &os, - uint32_t flag) { +inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { uint32_t val = flag; bool first = true; - if ((val & UR_DEVICE_EXEC_CAPABILITY_FLAG_KERNEL) == - (uint32_t)UR_DEVICE_EXEC_CAPABILITY_FLAG_KERNEL) { + if ((val & UR_DEVICE_EXEC_CAPABILITY_FLAG_KERNEL) == (uint32_t)UR_DEVICE_EXEC_CAPABILITY_FLAG_KERNEL) { val ^= (uint32_t)UR_DEVICE_EXEC_CAPABILITY_FLAG_KERNEL; if (!first) { os << " | "; @@ -5271,8 +4441,7 @@ inline void printFlag(std::ostream &os, os << UR_DEVICE_EXEC_CAPABILITY_FLAG_KERNEL; } - if ((val & UR_DEVICE_EXEC_CAPABILITY_FLAG_NATIVE_KERNEL) == - (uint32_t)UR_DEVICE_EXEC_CAPABILITY_FLAG_NATIVE_KERNEL) { + if ((val & UR_DEVICE_EXEC_CAPABILITY_FLAG_NATIVE_KERNEL) == (uint32_t)UR_DEVICE_EXEC_CAPABILITY_FLAG_NATIVE_KERNEL) { val ^= (uint32_t)UR_DEVICE_EXEC_CAPABILITY_FLAG_NATIVE_KERNEL; if (!first) { os << " | "; @@ -5290,10 +4459,14 @@ inline void printFlag(std::ostream &os, } else if (first) { os << "0"; } + return UR_RESULT_SUCCESS; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_device_native_properties_t params) { +} // namespace details +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_device_native_properties_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_device_native_properties_t params) { os << "(struct ur_device_native_properties_t){"; os << ".stype = "; @@ -5303,7 +4476,8 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << ", "; os << ".isNativeHandleOwned = "; @@ -5313,26 +4487,24 @@ operator<<(std::ostream &os, os << "}"; return os; } -inline std::ostream &operator<<(std::ostream &os, - enum ur_memory_order_capability_flag_t value) { +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_MEMORY_ORDER_CAPABILITY_FLAG_RELAXED: os << "UR_MEMORY_ORDER_CAPABILITY_FLAG_RELAXED"; break; - case UR_MEMORY_ORDER_CAPABILITY_FLAG_ACQUIRE: os << "UR_MEMORY_ORDER_CAPABILITY_FLAG_ACQUIRE"; break; - case UR_MEMORY_ORDER_CAPABILITY_FLAG_RELEASE: os << "UR_MEMORY_ORDER_CAPABILITY_FLAG_RELEASE"; break; - case UR_MEMORY_ORDER_CAPABILITY_FLAG_ACQ_REL: os << "UR_MEMORY_ORDER_CAPABILITY_FLAG_ACQ_REL"; break; - case UR_MEMORY_ORDER_CAPABILITY_FLAG_SEQ_CST: os << "UR_MEMORY_ORDER_CAPABILITY_FLAG_SEQ_CST"; break; @@ -5343,14 +4515,15 @@ inline std::ostream &operator<<(std::ostream &os, return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_memory_order_capability_flag_t flag template <> -inline void printFlag(std::ostream &os, - uint32_t flag) { +inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { uint32_t val = flag; bool first = true; - if ((val & UR_MEMORY_ORDER_CAPABILITY_FLAG_RELAXED) == - (uint32_t)UR_MEMORY_ORDER_CAPABILITY_FLAG_RELAXED) { + if ((val & UR_MEMORY_ORDER_CAPABILITY_FLAG_RELAXED) == (uint32_t)UR_MEMORY_ORDER_CAPABILITY_FLAG_RELAXED) { val ^= (uint32_t)UR_MEMORY_ORDER_CAPABILITY_FLAG_RELAXED; if (!first) { os << " | "; @@ -5360,8 +4533,7 @@ inline void printFlag(std::ostream &os, os << UR_MEMORY_ORDER_CAPABILITY_FLAG_RELAXED; } - if ((val & UR_MEMORY_ORDER_CAPABILITY_FLAG_ACQUIRE) == - (uint32_t)UR_MEMORY_ORDER_CAPABILITY_FLAG_ACQUIRE) { + if ((val & UR_MEMORY_ORDER_CAPABILITY_FLAG_ACQUIRE) == (uint32_t)UR_MEMORY_ORDER_CAPABILITY_FLAG_ACQUIRE) { val ^= (uint32_t)UR_MEMORY_ORDER_CAPABILITY_FLAG_ACQUIRE; if (!first) { os << " | "; @@ -5371,8 +4543,7 @@ inline void printFlag(std::ostream &os, os << UR_MEMORY_ORDER_CAPABILITY_FLAG_ACQUIRE; } - if ((val & UR_MEMORY_ORDER_CAPABILITY_FLAG_RELEASE) == - (uint32_t)UR_MEMORY_ORDER_CAPABILITY_FLAG_RELEASE) { + if ((val & UR_MEMORY_ORDER_CAPABILITY_FLAG_RELEASE) == (uint32_t)UR_MEMORY_ORDER_CAPABILITY_FLAG_RELEASE) { val ^= (uint32_t)UR_MEMORY_ORDER_CAPABILITY_FLAG_RELEASE; if (!first) { os << " | "; @@ -5382,8 +4553,7 @@ inline void printFlag(std::ostream &os, os << UR_MEMORY_ORDER_CAPABILITY_FLAG_RELEASE; } - if ((val & UR_MEMORY_ORDER_CAPABILITY_FLAG_ACQ_REL) == - (uint32_t)UR_MEMORY_ORDER_CAPABILITY_FLAG_ACQ_REL) { + if ((val & UR_MEMORY_ORDER_CAPABILITY_FLAG_ACQ_REL) == (uint32_t)UR_MEMORY_ORDER_CAPABILITY_FLAG_ACQ_REL) { val ^= (uint32_t)UR_MEMORY_ORDER_CAPABILITY_FLAG_ACQ_REL; if (!first) { os << " | "; @@ -5393,8 +4563,7 @@ inline void printFlag(std::ostream &os, os << UR_MEMORY_ORDER_CAPABILITY_FLAG_ACQ_REL; } - if ((val & UR_MEMORY_ORDER_CAPABILITY_FLAG_SEQ_CST) == - (uint32_t)UR_MEMORY_ORDER_CAPABILITY_FLAG_SEQ_CST) { + if ((val & UR_MEMORY_ORDER_CAPABILITY_FLAG_SEQ_CST) == (uint32_t)UR_MEMORY_ORDER_CAPABILITY_FLAG_SEQ_CST) { val ^= (uint32_t)UR_MEMORY_ORDER_CAPABILITY_FLAG_SEQ_CST; if (!first) { os << " | "; @@ -5412,27 +4581,27 @@ inline void printFlag(std::ostream &os, } else if (first) { os << "0"; } + return UR_RESULT_SUCCESS; } -inline std::ostream &operator<<(std::ostream &os, - enum ur_memory_scope_capability_flag_t value) { +} // namespace details +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_ITEM: os << "UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_ITEM"; break; - case UR_MEMORY_SCOPE_CAPABILITY_FLAG_SUB_GROUP: os << "UR_MEMORY_SCOPE_CAPABILITY_FLAG_SUB_GROUP"; break; - case UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_GROUP: os << "UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_GROUP"; break; - case UR_MEMORY_SCOPE_CAPABILITY_FLAG_DEVICE: os << "UR_MEMORY_SCOPE_CAPABILITY_FLAG_DEVICE"; break; - case UR_MEMORY_SCOPE_CAPABILITY_FLAG_SYSTEM: os << "UR_MEMORY_SCOPE_CAPABILITY_FLAG_SYSTEM"; break; @@ -5443,14 +4612,15 @@ inline std::ostream &operator<<(std::ostream &os, return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_memory_scope_capability_flag_t flag template <> -inline void printFlag(std::ostream &os, - uint32_t flag) { +inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { uint32_t val = flag; bool first = true; - if ((val & UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_ITEM) == - (uint32_t)UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_ITEM) { + if ((val & UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_ITEM) == (uint32_t)UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_ITEM) { val ^= (uint32_t)UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_ITEM; if (!first) { os << " | "; @@ -5460,8 +4630,7 @@ inline void printFlag(std::ostream &os, os << UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_ITEM; } - if ((val & UR_MEMORY_SCOPE_CAPABILITY_FLAG_SUB_GROUP) == - (uint32_t)UR_MEMORY_SCOPE_CAPABILITY_FLAG_SUB_GROUP) { + if ((val & UR_MEMORY_SCOPE_CAPABILITY_FLAG_SUB_GROUP) == (uint32_t)UR_MEMORY_SCOPE_CAPABILITY_FLAG_SUB_GROUP) { val ^= (uint32_t)UR_MEMORY_SCOPE_CAPABILITY_FLAG_SUB_GROUP; if (!first) { os << " | "; @@ -5471,8 +4640,7 @@ inline void printFlag(std::ostream &os, os << UR_MEMORY_SCOPE_CAPABILITY_FLAG_SUB_GROUP; } - if ((val & UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_GROUP) == - (uint32_t)UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_GROUP) { + if ((val & UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_GROUP) == (uint32_t)UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_GROUP) { val ^= (uint32_t)UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_GROUP; if (!first) { os << " | "; @@ -5482,8 +4650,7 @@ inline void printFlag(std::ostream &os, os << UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_GROUP; } - if ((val & UR_MEMORY_SCOPE_CAPABILITY_FLAG_DEVICE) == - (uint32_t)UR_MEMORY_SCOPE_CAPABILITY_FLAG_DEVICE) { + if ((val & UR_MEMORY_SCOPE_CAPABILITY_FLAG_DEVICE) == (uint32_t)UR_MEMORY_SCOPE_CAPABILITY_FLAG_DEVICE) { val ^= (uint32_t)UR_MEMORY_SCOPE_CAPABILITY_FLAG_DEVICE; if (!first) { os << " | "; @@ -5493,8 +4660,7 @@ inline void printFlag(std::ostream &os, os << UR_MEMORY_SCOPE_CAPABILITY_FLAG_DEVICE; } - if ((val & UR_MEMORY_SCOPE_CAPABILITY_FLAG_SYSTEM) == - (uint32_t)UR_MEMORY_SCOPE_CAPABILITY_FLAG_SYSTEM) { + if ((val & UR_MEMORY_SCOPE_CAPABILITY_FLAG_SYSTEM) == (uint32_t)UR_MEMORY_SCOPE_CAPABILITY_FLAG_SYSTEM) { val ^= (uint32_t)UR_MEMORY_SCOPE_CAPABILITY_FLAG_SYSTEM; if (!first) { os << " | "; @@ -5512,24 +4678,24 @@ inline void printFlag(std::ostream &os, } else if (first) { os << "0"; } + return UR_RESULT_SUCCESS; } -inline std::ostream & -operator<<(std::ostream &os, - enum ur_device_usm_access_capability_flag_t value) { +} // namespace details +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_ACCESS: os << "UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_ACCESS"; break; - case UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_ATOMIC_ACCESS: os << "UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_ATOMIC_ACCESS"; break; - case UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_CONCURRENT_ACCESS: os << "UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_CONCURRENT_ACCESS"; break; - case UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_ATOMIC_CONCURRENT_ACCESS: os << "UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_ATOMIC_CONCURRENT_ACCESS"; break; @@ -5540,14 +4706,15 @@ operator<<(std::ostream &os, return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_device_usm_access_capability_flag_t flag template <> -inline void printFlag(std::ostream &os, - uint32_t flag) { +inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { uint32_t val = flag; bool first = true; - if ((val & UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_ACCESS) == - (uint32_t)UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_ACCESS) { + if ((val & UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_ACCESS) == (uint32_t)UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_ACCESS) { val ^= (uint32_t)UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_ACCESS; if (!first) { os << " | "; @@ -5557,8 +4724,7 @@ inline void printFlag(std::ostream &os, os << UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_ACCESS; } - if ((val & UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_ATOMIC_ACCESS) == - (uint32_t)UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_ATOMIC_ACCESS) { + if ((val & UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_ATOMIC_ACCESS) == (uint32_t)UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_ATOMIC_ACCESS) { val ^= (uint32_t)UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_ATOMIC_ACCESS; if (!first) { os << " | "; @@ -5568,8 +4734,7 @@ inline void printFlag(std::ostream &os, os << UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_ATOMIC_ACCESS; } - if ((val & UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_CONCURRENT_ACCESS) == - (uint32_t)UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_CONCURRENT_ACCESS) { + if ((val & UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_CONCURRENT_ACCESS) == (uint32_t)UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_CONCURRENT_ACCESS) { val ^= (uint32_t)UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_CONCURRENT_ACCESS; if (!first) { os << " | "; @@ -5579,11 +4744,8 @@ inline void printFlag(std::ostream &os, os << UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_CONCURRENT_ACCESS; } - if ((val & UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_ATOMIC_CONCURRENT_ACCESS) == - (uint32_t) - UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_ATOMIC_CONCURRENT_ACCESS) { - val ^= (uint32_t) - UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_ATOMIC_CONCURRENT_ACCESS; + if ((val & UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_ATOMIC_CONCURRENT_ACCESS) == (uint32_t)UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_ATOMIC_CONCURRENT_ACCESS) { + val ^= (uint32_t)UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_ATOMIC_CONCURRENT_ACCESS; if (!first) { os << " | "; } else { @@ -5600,11 +4762,15 @@ inline void printFlag(std::ostream &os, } else if (first) { os << "0"; } + return UR_RESULT_SUCCESS; } -inline std::ostream &operator<<(std::ostream &os, - enum ur_context_flag_t value) { +} // namespace details +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_CONTEXT_FLAG_TBD: os << "UR_CONTEXT_FLAG_TBD"; break; @@ -5615,8 +4781,11 @@ inline std::ostream &operator<<(std::ostream &os, return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_context_flag_t flag template <> -inline void printFlag(std::ostream &os, uint32_t flag) { +inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { uint32_t val = flag; bool first = true; @@ -5638,9 +4807,14 @@ inline void printFlag(std::ostream &os, uint32_t flag) { } else if (first) { os << "0"; } + return UR_RESULT_SUCCESS; } -inline std::ostream &operator<<(std::ostream &os, - const struct ur_context_properties_t params) { +} // namespace details +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_context_properties_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_context_properties_t params) { os << "(struct ur_context_properties_t){"; os << ".stype = "; @@ -5650,52 +4824,48 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << ", "; os << ".flags = "; - printFlag(os, (params.flags)); + details::printFlag(os, + (params.flags)); os << "}"; return os; } -inline std::ostream &operator<<(std::ostream &os, - enum ur_context_info_t value) { +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_CONTEXT_INFO_NUM_DEVICES: os << "UR_CONTEXT_INFO_NUM_DEVICES"; break; - case UR_CONTEXT_INFO_DEVICES: os << "UR_CONTEXT_INFO_DEVICES"; break; - case UR_CONTEXT_INFO_REFERENCE_COUNT: os << "UR_CONTEXT_INFO_REFERENCE_COUNT"; break; - case UR_CONTEXT_INFO_USM_MEMCPY2D_SUPPORT: os << "UR_CONTEXT_INFO_USM_MEMCPY2D_SUPPORT"; break; - case UR_CONTEXT_INFO_USM_FILL2D_SUPPORT: os << "UR_CONTEXT_INFO_USM_FILL2D_SUPPORT"; break; - case UR_CONTEXT_INFO_ATOMIC_MEMORY_ORDER_CAPABILITIES: os << "UR_CONTEXT_INFO_ATOMIC_MEMORY_ORDER_CAPABILITIES"; break; - case UR_CONTEXT_INFO_ATOMIC_MEMORY_SCOPE_CAPABILITIES: os << "UR_CONTEXT_INFO_ATOMIC_MEMORY_SCOPE_CAPABILITIES"; break; - case UR_CONTEXT_INFO_ATOMIC_FENCE_ORDER_CAPABILITIES: os << "UR_CONTEXT_INFO_ATOMIC_FENCE_ORDER_CAPABILITIES"; break; - case UR_CONTEXT_INFO_ATOMIC_FENCE_SCOPE_CAPABILITIES: os << "UR_CONTEXT_INFO_ATOMIC_FENCE_SCOPE_CAPABILITIES"; break; @@ -5705,22 +4875,21 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_context_info_t enum value template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_context_info_t value, size_t size) { +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_context_info_t value, size_t size) { if (ptr == NULL) { - printPtr(os, ptr); - return; + return printPtr(os, ptr); } switch (value) { - case UR_CONTEXT_INFO_NUM_DEVICES: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -5728,7 +4897,6 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_CONTEXT_INFO_DEVICES: { const ur_device_handle_t *tptr = (const ur_device_handle_t *)ptr; @@ -5739,17 +4907,16 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ", "; } - printPtr(os, tptr[i]); + details::printPtr(os, + tptr[i]); } os << "}"; } break; - case UR_CONTEXT_INFO_REFERENCE_COUNT: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -5757,13 +4924,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_CONTEXT_INFO_USM_MEMCPY2D_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 << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -5771,13 +4936,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_CONTEXT_INFO_USM_FILL2D_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 << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -5785,79 +4948,71 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_CONTEXT_INFO_ATOMIC_MEMORY_ORDER_CAPABILITIES: { - const ur_memory_order_capability_flags_t *tptr = - (const ur_memory_order_capability_flags_t *)ptr; + const ur_memory_order_capability_flags_t *tptr = (const ur_memory_order_capability_flags_t *)ptr; if (sizeof(ur_memory_order_capability_flags_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_memory_order_capability_flags_t) - << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_memory_order_capability_flags_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; - printFlag(os, *tptr); + details::printFlag(os, + *tptr); os << ")"; } break; - case UR_CONTEXT_INFO_ATOMIC_MEMORY_SCOPE_CAPABILITIES: { - const ur_memory_scope_capability_flags_t *tptr = - (const ur_memory_scope_capability_flags_t *)ptr; + const ur_memory_scope_capability_flags_t *tptr = (const ur_memory_scope_capability_flags_t *)ptr; if (sizeof(ur_memory_scope_capability_flags_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_memory_scope_capability_flags_t) - << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_memory_scope_capability_flags_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; - printFlag(os, *tptr); + details::printFlag(os, + *tptr); os << ")"; } break; - case UR_CONTEXT_INFO_ATOMIC_FENCE_ORDER_CAPABILITIES: { - const ur_memory_order_capability_flags_t *tptr = - (const ur_memory_order_capability_flags_t *)ptr; + const ur_memory_order_capability_flags_t *tptr = (const ur_memory_order_capability_flags_t *)ptr; if (sizeof(ur_memory_order_capability_flags_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_memory_order_capability_flags_t) - << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_memory_order_capability_flags_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; - printFlag(os, *tptr); + details::printFlag(os, + *tptr); os << ")"; } break; - case UR_CONTEXT_INFO_ATOMIC_FENCE_SCOPE_CAPABILITIES: { - const ur_memory_scope_capability_flags_t *tptr = - (const ur_memory_scope_capability_flags_t *)ptr; + const ur_memory_scope_capability_flags_t *tptr = (const ur_memory_scope_capability_flags_t *)ptr; if (sizeof(ur_memory_scope_capability_flags_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_memory_scope_capability_flags_t) - << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_memory_scope_capability_flags_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; - printFlag(os, *tptr); + details::printFlag(os, + *tptr); os << ")"; } break; default: os << "unknown enumerator"; - break; + return UR_RESULT_ERROR_INVALID_ENUMERATION; } + return UR_RESULT_SUCCESS; } +} // namespace details -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_context_native_properties_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_context_native_properties_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_context_native_properties_t params) { os << "(struct ur_context_native_properties_t){"; os << ".stype = "; @@ -5867,7 +5022,8 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << ", "; os << ".isNativeHandleOwned = "; @@ -5877,29 +5033,27 @@ operator<<(std::ostream &os, os << "}"; return os; } -inline std::ostream &operator<<(std::ostream &os, enum ur_mem_flag_t value) { +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_MEM_FLAG_READ_WRITE: os << "UR_MEM_FLAG_READ_WRITE"; break; - case UR_MEM_FLAG_WRITE_ONLY: os << "UR_MEM_FLAG_WRITE_ONLY"; break; - case UR_MEM_FLAG_READ_ONLY: os << "UR_MEM_FLAG_READ_ONLY"; break; - case UR_MEM_FLAG_USE_HOST_POINTER: os << "UR_MEM_FLAG_USE_HOST_POINTER"; break; - case UR_MEM_FLAG_ALLOC_HOST_POINTER: os << "UR_MEM_FLAG_ALLOC_HOST_POINTER"; break; - case UR_MEM_FLAG_ALLOC_COPY_HOST_POINTER: os << "UR_MEM_FLAG_ALLOC_COPY_HOST_POINTER"; break; @@ -5910,8 +5064,11 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_mem_flag_t value) { return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_mem_flag_t flag template <> -inline void printFlag(std::ostream &os, uint32_t flag) { +inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { uint32_t val = flag; bool first = true; @@ -5945,8 +5102,7 @@ inline void printFlag(std::ostream &os, uint32_t flag) { os << UR_MEM_FLAG_READ_ONLY; } - if ((val & UR_MEM_FLAG_USE_HOST_POINTER) == - (uint32_t)UR_MEM_FLAG_USE_HOST_POINTER) { + if ((val & UR_MEM_FLAG_USE_HOST_POINTER) == (uint32_t)UR_MEM_FLAG_USE_HOST_POINTER) { val ^= (uint32_t)UR_MEM_FLAG_USE_HOST_POINTER; if (!first) { os << " | "; @@ -5956,8 +5112,7 @@ inline void printFlag(std::ostream &os, uint32_t flag) { os << UR_MEM_FLAG_USE_HOST_POINTER; } - if ((val & UR_MEM_FLAG_ALLOC_HOST_POINTER) == - (uint32_t)UR_MEM_FLAG_ALLOC_HOST_POINTER) { + if ((val & UR_MEM_FLAG_ALLOC_HOST_POINTER) == (uint32_t)UR_MEM_FLAG_ALLOC_HOST_POINTER) { val ^= (uint32_t)UR_MEM_FLAG_ALLOC_HOST_POINTER; if (!first) { os << " | "; @@ -5967,8 +5122,7 @@ inline void printFlag(std::ostream &os, uint32_t flag) { os << UR_MEM_FLAG_ALLOC_HOST_POINTER; } - if ((val & UR_MEM_FLAG_ALLOC_COPY_HOST_POINTER) == - (uint32_t)UR_MEM_FLAG_ALLOC_COPY_HOST_POINTER) { + if ((val & UR_MEM_FLAG_ALLOC_COPY_HOST_POINTER) == (uint32_t)UR_MEM_FLAG_ALLOC_COPY_HOST_POINTER) { val ^= (uint32_t)UR_MEM_FLAG_ALLOC_COPY_HOST_POINTER; if (!first) { os << " | "; @@ -5986,34 +5140,33 @@ inline void printFlag(std::ostream &os, uint32_t flag) { } else if (first) { os << "0"; } + return UR_RESULT_SUCCESS; } -inline std::ostream &operator<<(std::ostream &os, enum ur_mem_type_t value) { +} // namespace details +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_MEM_TYPE_BUFFER: os << "UR_MEM_TYPE_BUFFER"; break; - case UR_MEM_TYPE_IMAGE2D: os << "UR_MEM_TYPE_IMAGE2D"; break; - case UR_MEM_TYPE_IMAGE3D: os << "UR_MEM_TYPE_IMAGE3D"; break; - case UR_MEM_TYPE_IMAGE2D_ARRAY: os << "UR_MEM_TYPE_IMAGE2D_ARRAY"; break; - case UR_MEM_TYPE_IMAGE1D: os << "UR_MEM_TYPE_IMAGE1D"; break; - case UR_MEM_TYPE_IMAGE1D_ARRAY: os << "UR_MEM_TYPE_IMAGE1D_ARRAY"; break; - case UR_MEM_TYPE_IMAGE1D_BUFFER: os << "UR_MEM_TYPE_IMAGE1D_BUFFER"; break; @@ -6023,13 +5176,15 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_mem_type_t value) { } return os; } -inline std::ostream &operator<<(std::ostream &os, enum ur_mem_info_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) { switch (value) { - case UR_MEM_INFO_SIZE: os << "UR_MEM_INFO_SIZE"; break; - case UR_MEM_INFO_CONTEXT: os << "UR_MEM_INFO_CONTEXT"; break; @@ -6039,22 +5194,21 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_mem_info_t value) { } return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_mem_info_t enum value template <> -inline void printTagged(std::ostream &os, const void *ptr, ur_mem_info_t value, - size_t size) { +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_mem_info_t value, size_t size) { if (ptr == NULL) { - printPtr(os, ptr); - return; + return printPtr(os, ptr); } switch (value) { - case UR_MEM_INFO_SIZE: { const size_t *tptr = (const size_t *)ptr; if (sizeof(size_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(size_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(size_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -6062,86 +5216,75 @@ inline void printTagged(std::ostream &os, const void *ptr, ur_mem_info_t value, os << ")"; } break; - case UR_MEM_INFO_CONTEXT: { const ur_context_handle_t *tptr = (const ur_context_handle_t *)ptr; if (sizeof(ur_context_handle_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_context_handle_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_context_handle_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; - printPtr(os, *tptr); + details::printPtr(os, + *tptr); os << ")"; } break; default: os << "unknown enumerator"; - break; + return UR_RESULT_ERROR_INVALID_ENUMERATION; } + return UR_RESULT_SUCCESS; } +} // namespace details -inline std::ostream &operator<<(std::ostream &os, - enum ur_image_channel_order_t value) { +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_IMAGE_CHANNEL_ORDER_A: os << "UR_IMAGE_CHANNEL_ORDER_A"; break; - case UR_IMAGE_CHANNEL_ORDER_R: os << "UR_IMAGE_CHANNEL_ORDER_R"; break; - case UR_IMAGE_CHANNEL_ORDER_RG: os << "UR_IMAGE_CHANNEL_ORDER_RG"; break; - case UR_IMAGE_CHANNEL_ORDER_RA: os << "UR_IMAGE_CHANNEL_ORDER_RA"; break; - case UR_IMAGE_CHANNEL_ORDER_RGB: os << "UR_IMAGE_CHANNEL_ORDER_RGB"; break; - case UR_IMAGE_CHANNEL_ORDER_RGBA: os << "UR_IMAGE_CHANNEL_ORDER_RGBA"; break; - case UR_IMAGE_CHANNEL_ORDER_BGRA: os << "UR_IMAGE_CHANNEL_ORDER_BGRA"; break; - case UR_IMAGE_CHANNEL_ORDER_ARGB: os << "UR_IMAGE_CHANNEL_ORDER_ARGB"; break; - case UR_IMAGE_CHANNEL_ORDER_ABGR: os << "UR_IMAGE_CHANNEL_ORDER_ABGR"; break; - case UR_IMAGE_CHANNEL_ORDER_INTENSITY: os << "UR_IMAGE_CHANNEL_ORDER_INTENSITY"; break; - case UR_IMAGE_CHANNEL_ORDER_LUMINANCE: os << "UR_IMAGE_CHANNEL_ORDER_LUMINANCE"; break; - case UR_IMAGE_CHANNEL_ORDER_RX: os << "UR_IMAGE_CHANNEL_ORDER_RX"; break; - case UR_IMAGE_CHANNEL_ORDER_RGX: os << "UR_IMAGE_CHANNEL_ORDER_RGX"; break; - case UR_IMAGE_CHANNEL_ORDER_RGBX: os << "UR_IMAGE_CHANNEL_ORDER_RGBX"; break; - case UR_IMAGE_CHANNEL_ORDER_SRGBA: os << "UR_IMAGE_CHANNEL_ORDER_SRGBA"; break; @@ -6151,66 +5294,54 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -inline std::ostream &operator<<(std::ostream &os, - enum ur_image_channel_type_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) { switch (value) { - case UR_IMAGE_CHANNEL_TYPE_SNORM_INT8: os << "UR_IMAGE_CHANNEL_TYPE_SNORM_INT8"; break; - case UR_IMAGE_CHANNEL_TYPE_SNORM_INT16: os << "UR_IMAGE_CHANNEL_TYPE_SNORM_INT16"; break; - case UR_IMAGE_CHANNEL_TYPE_UNORM_INT8: os << "UR_IMAGE_CHANNEL_TYPE_UNORM_INT8"; break; - case UR_IMAGE_CHANNEL_TYPE_UNORM_INT16: os << "UR_IMAGE_CHANNEL_TYPE_UNORM_INT16"; break; - case UR_IMAGE_CHANNEL_TYPE_UNORM_SHORT_565: os << "UR_IMAGE_CHANNEL_TYPE_UNORM_SHORT_565"; break; - case UR_IMAGE_CHANNEL_TYPE_UNORM_SHORT_555: os << "UR_IMAGE_CHANNEL_TYPE_UNORM_SHORT_555"; break; - case UR_IMAGE_CHANNEL_TYPE_INT_101010: os << "UR_IMAGE_CHANNEL_TYPE_INT_101010"; break; - case UR_IMAGE_CHANNEL_TYPE_SIGNED_INT8: os << "UR_IMAGE_CHANNEL_TYPE_SIGNED_INT8"; break; - case UR_IMAGE_CHANNEL_TYPE_SIGNED_INT16: os << "UR_IMAGE_CHANNEL_TYPE_SIGNED_INT16"; break; - case UR_IMAGE_CHANNEL_TYPE_SIGNED_INT32: os << "UR_IMAGE_CHANNEL_TYPE_SIGNED_INT32"; break; - case UR_IMAGE_CHANNEL_TYPE_UNSIGNED_INT8: os << "UR_IMAGE_CHANNEL_TYPE_UNSIGNED_INT8"; break; - case UR_IMAGE_CHANNEL_TYPE_UNSIGNED_INT16: os << "UR_IMAGE_CHANNEL_TYPE_UNSIGNED_INT16"; break; - case UR_IMAGE_CHANNEL_TYPE_UNSIGNED_INT32: os << "UR_IMAGE_CHANNEL_TYPE_UNSIGNED_INT32"; break; - case UR_IMAGE_CHANNEL_TYPE_HALF_FLOAT: os << "UR_IMAGE_CHANNEL_TYPE_HALF_FLOAT"; break; - case UR_IMAGE_CHANNEL_TYPE_FLOAT: os << "UR_IMAGE_CHANNEL_TYPE_FLOAT"; break; @@ -6220,33 +5351,30 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -inline std::ostream &operator<<(std::ostream &os, enum ur_image_info_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) { switch (value) { - case UR_IMAGE_INFO_FORMAT: os << "UR_IMAGE_INFO_FORMAT"; break; - case UR_IMAGE_INFO_ELEMENT_SIZE: os << "UR_IMAGE_INFO_ELEMENT_SIZE"; break; - case UR_IMAGE_INFO_ROW_PITCH: os << "UR_IMAGE_INFO_ROW_PITCH"; break; - case UR_IMAGE_INFO_SLICE_PITCH: os << "UR_IMAGE_INFO_SLICE_PITCH"; break; - case UR_IMAGE_INFO_WIDTH: os << "UR_IMAGE_INFO_WIDTH"; break; - case UR_IMAGE_INFO_HEIGHT: os << "UR_IMAGE_INFO_HEIGHT"; break; - case UR_IMAGE_INFO_DEPTH: os << "UR_IMAGE_INFO_DEPTH"; break; @@ -6256,22 +5384,21 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_image_info_t value) { } return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_image_info_t enum value template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_image_info_t value, size_t size) { +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_image_info_t value, size_t size) { if (ptr == NULL) { - printPtr(os, ptr); - return; + return printPtr(os, ptr); } switch (value) { - case UR_IMAGE_INFO_FORMAT: { const ur_image_format_t *tptr = (const ur_image_format_t *)ptr; if (sizeof(ur_image_format_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_image_format_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_image_format_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -6279,13 +5406,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_IMAGE_INFO_ELEMENT_SIZE: { const size_t *tptr = (const size_t *)ptr; if (sizeof(size_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(size_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(size_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -6293,13 +5418,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_IMAGE_INFO_ROW_PITCH: { const size_t *tptr = (const size_t *)ptr; if (sizeof(size_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(size_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(size_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -6307,13 +5430,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_IMAGE_INFO_SLICE_PITCH: { const size_t *tptr = (const size_t *)ptr; if (sizeof(size_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(size_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(size_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -6321,13 +5442,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_IMAGE_INFO_WIDTH: { const size_t *tptr = (const size_t *)ptr; if (sizeof(size_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(size_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(size_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -6335,13 +5454,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_IMAGE_INFO_HEIGHT: { const size_t *tptr = (const size_t *)ptr; if (sizeof(size_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(size_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(size_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -6349,13 +5466,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_IMAGE_INFO_DEPTH: { const size_t *tptr = (const size_t *)ptr; if (sizeof(size_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(size_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(size_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -6365,12 +5480,17 @@ inline void printTagged(std::ostream &os, const void *ptr, } break; default: os << "unknown enumerator"; - break; + return UR_RESULT_ERROR_INVALID_ENUMERATION; } + return UR_RESULT_SUCCESS; } +} // namespace details -inline std::ostream &operator<<(std::ostream &os, - const struct ur_image_format_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_image_format_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_image_format_t params) { os << "(struct ur_image_format_t){"; os << ".channelOrder = "; @@ -6385,8 +5505,11 @@ inline std::ostream &operator<<(std::ostream &os, os << "}"; return os; } -inline std::ostream &operator<<(std::ostream &os, - const struct ur_image_desc_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_image_desc_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_image_desc_t params) { os << "(struct ur_image_desc_t){"; os << ".stype = "; @@ -6396,7 +5519,8 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << ", "; os << ".type = "; @@ -6446,8 +5570,11 @@ inline std::ostream &operator<<(std::ostream &os, os << "}"; return os; } -inline std::ostream &operator<<(std::ostream &os, - const struct ur_buffer_properties_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_buffer_properties_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_buffer_properties_t params) { os << "(struct ur_buffer_properties_t){"; os << ".stype = "; @@ -6457,19 +5584,23 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << ", "; os << ".pHost = "; - printPtr(os, (params.pHost)); + details::printPtr(os, + (params.pHost)); os << "}"; return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_buffer_channel_properties_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_buffer_channel_properties_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_buffer_channel_properties_t params) { os << "(struct ur_buffer_channel_properties_t){"; os << ".stype = "; @@ -6479,7 +5610,8 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << ", "; os << ".channel = "; @@ -6489,9 +5621,11 @@ operator<<(std::ostream &os, os << "}"; return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_buffer_alloc_location_properties_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_buffer_alloc_location_properties_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_buffer_alloc_location_properties_t params) { os << "(struct ur_buffer_alloc_location_properties_t){"; os << ".stype = "; @@ -6501,7 +5635,8 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << ", "; os << ".location = "; @@ -6511,8 +5646,11 @@ operator<<(std::ostream &os, os << "}"; return os; } -inline std::ostream &operator<<(std::ostream &os, - const struct ur_buffer_region_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_buffer_region_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_buffer_region_t params) { os << "(struct ur_buffer_region_t){"; os << ".stype = "; @@ -6522,7 +5660,8 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << ", "; os << ".origin = "; @@ -6537,10 +5676,12 @@ inline std::ostream &operator<<(std::ostream &os, os << "}"; return os; } -inline std::ostream &operator<<(std::ostream &os, - enum ur_buffer_create_type_t value) { +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_BUFFER_CREATE_TYPE_REGION: os << "UR_BUFFER_CREATE_TYPE_REGION"; break; @@ -6550,8 +5691,11 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -inline std::ostream & -operator<<(std::ostream &os, const struct ur_mem_native_properties_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_mem_native_properties_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_mem_native_properties_t params) { os << "(struct ur_mem_native_properties_t){"; os << ".stype = "; @@ -6561,7 +5705,8 @@ operator<<(std::ostream &os, const struct ur_mem_native_properties_t params) { os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << ", "; os << ".isNativeHandleOwned = "; @@ -6571,14 +5716,15 @@ operator<<(std::ostream &os, const struct ur_mem_native_properties_t params) { os << "}"; return os; } -inline std::ostream &operator<<(std::ostream &os, - enum ur_sampler_filter_mode_t value) { +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_SAMPLER_FILTER_MODE_NEAREST: os << "UR_SAMPLER_FILTER_MODE_NEAREST"; break; - case UR_SAMPLER_FILTER_MODE_LINEAR: os << "UR_SAMPLER_FILTER_MODE_LINEAR"; break; @@ -6588,26 +5734,24 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -inline std::ostream &operator<<(std::ostream &os, - enum ur_sampler_addressing_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) { switch (value) { - case UR_SAMPLER_ADDRESSING_MODE_NONE: os << "UR_SAMPLER_ADDRESSING_MODE_NONE"; break; - case UR_SAMPLER_ADDRESSING_MODE_CLAMP_TO_EDGE: os << "UR_SAMPLER_ADDRESSING_MODE_CLAMP_TO_EDGE"; break; - case UR_SAMPLER_ADDRESSING_MODE_CLAMP: os << "UR_SAMPLER_ADDRESSING_MODE_CLAMP"; break; - case UR_SAMPLER_ADDRESSING_MODE_REPEAT: os << "UR_SAMPLER_ADDRESSING_MODE_REPEAT"; break; - case UR_SAMPLER_ADDRESSING_MODE_MIRRORED_REPEAT: os << "UR_SAMPLER_ADDRESSING_MODE_MIRRORED_REPEAT"; break; @@ -6617,26 +5761,24 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -inline std::ostream &operator<<(std::ostream &os, - enum ur_sampler_info_t value) { +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_SAMPLER_INFO_REFERENCE_COUNT: os << "UR_SAMPLER_INFO_REFERENCE_COUNT"; break; - case UR_SAMPLER_INFO_CONTEXT: os << "UR_SAMPLER_INFO_CONTEXT"; break; - case UR_SAMPLER_INFO_NORMALIZED_COORDS: os << "UR_SAMPLER_INFO_NORMALIZED_COORDS"; break; - case UR_SAMPLER_INFO_ADDRESSING_MODE: os << "UR_SAMPLER_INFO_ADDRESSING_MODE"; break; - case UR_SAMPLER_INFO_FILTER_MODE: os << "UR_SAMPLER_INFO_FILTER_MODE"; break; @@ -6646,22 +5788,21 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_sampler_info_t enum value template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_sampler_info_t value, size_t size) { +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_sampler_info_t value, size_t size) { if (ptr == NULL) { - printPtr(os, ptr); - return; + return printPtr(os, ptr); } switch (value) { - case UR_SAMPLER_INFO_REFERENCE_COUNT: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -6669,27 +5810,24 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_SAMPLER_INFO_CONTEXT: { const ur_context_handle_t *tptr = (const ur_context_handle_t *)ptr; if (sizeof(ur_context_handle_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_context_handle_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_context_handle_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; - printPtr(os, *tptr); + details::printPtr(os, + *tptr); os << ")"; } break; - case UR_SAMPLER_INFO_NORMALIZED_COORDS: { 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 << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -6697,15 +5835,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_SAMPLER_INFO_ADDRESSING_MODE: { - const ur_sampler_addressing_mode_t *tptr = - (const ur_sampler_addressing_mode_t *)ptr; + const ur_sampler_addressing_mode_t *tptr = (const ur_sampler_addressing_mode_t *)ptr; if (sizeof(ur_sampler_addressing_mode_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_sampler_addressing_mode_t) - << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_sampler_addressing_mode_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -6713,14 +5847,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_SAMPLER_INFO_FILTER_MODE: { - const ur_sampler_filter_mode_t *tptr = - (const ur_sampler_filter_mode_t *)ptr; + const ur_sampler_filter_mode_t *tptr = (const ur_sampler_filter_mode_t *)ptr; if (sizeof(ur_sampler_filter_mode_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_sampler_filter_mode_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_sampler_filter_mode_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -6730,12 +5861,17 @@ inline void printTagged(std::ostream &os, const void *ptr, } break; default: os << "unknown enumerator"; - break; + return UR_RESULT_ERROR_INVALID_ENUMERATION; } + return UR_RESULT_SUCCESS; } +} // namespace details -inline std::ostream &operator<<(std::ostream &os, - const struct ur_sampler_desc_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_sampler_desc_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_sampler_desc_t params) { os << "(struct ur_sampler_desc_t){"; os << ".stype = "; @@ -6745,7 +5881,8 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << ", "; os << ".normalizedCoords = "; @@ -6765,9 +5902,11 @@ inline std::ostream &operator<<(std::ostream &os, os << "}"; return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_sampler_native_properties_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_sampler_native_properties_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_sampler_native_properties_t params) { os << "(struct ur_sampler_native_properties_t){"; os << ".stype = "; @@ -6777,7 +5916,8 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << ", "; os << ".isNativeHandleOwned = "; @@ -6787,10 +5927,12 @@ operator<<(std::ostream &os, os << "}"; return os; } -inline std::ostream &operator<<(std::ostream &os, - enum ur_usm_host_mem_flag_t value) { +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_USM_HOST_MEM_FLAG_INITIAL_PLACEMENT: os << "UR_USM_HOST_MEM_FLAG_INITIAL_PLACEMENT"; break; @@ -6801,13 +5943,15 @@ inline std::ostream &operator<<(std::ostream &os, return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_usm_host_mem_flag_t flag template <> -inline void printFlag(std::ostream &os, uint32_t flag) { +inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { uint32_t val = flag; bool first = true; - if ((val & UR_USM_HOST_MEM_FLAG_INITIAL_PLACEMENT) == - (uint32_t)UR_USM_HOST_MEM_FLAG_INITIAL_PLACEMENT) { + if ((val & UR_USM_HOST_MEM_FLAG_INITIAL_PLACEMENT) == (uint32_t)UR_USM_HOST_MEM_FLAG_INITIAL_PLACEMENT) { val ^= (uint32_t)UR_USM_HOST_MEM_FLAG_INITIAL_PLACEMENT; if (!first) { os << " | "; @@ -6825,19 +5969,21 @@ inline void printFlag(std::ostream &os, uint32_t flag) { } else if (first) { os << "0"; } + return UR_RESULT_SUCCESS; } -inline std::ostream &operator<<(std::ostream &os, - enum ur_usm_device_mem_flag_t value) { +} // namespace details +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_USM_DEVICE_MEM_FLAG_WRITE_COMBINED: os << "UR_USM_DEVICE_MEM_FLAG_WRITE_COMBINED"; break; - case UR_USM_DEVICE_MEM_FLAG_INITIAL_PLACEMENT: os << "UR_USM_DEVICE_MEM_FLAG_INITIAL_PLACEMENT"; break; - case UR_USM_DEVICE_MEM_FLAG_DEVICE_READ_ONLY: os << "UR_USM_DEVICE_MEM_FLAG_DEVICE_READ_ONLY"; break; @@ -6848,14 +5994,15 @@ inline std::ostream &operator<<(std::ostream &os, return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_usm_device_mem_flag_t flag template <> -inline void printFlag(std::ostream &os, - uint32_t flag) { +inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { uint32_t val = flag; bool first = true; - if ((val & UR_USM_DEVICE_MEM_FLAG_WRITE_COMBINED) == - (uint32_t)UR_USM_DEVICE_MEM_FLAG_WRITE_COMBINED) { + if ((val & UR_USM_DEVICE_MEM_FLAG_WRITE_COMBINED) == (uint32_t)UR_USM_DEVICE_MEM_FLAG_WRITE_COMBINED) { val ^= (uint32_t)UR_USM_DEVICE_MEM_FLAG_WRITE_COMBINED; if (!first) { os << " | "; @@ -6865,8 +6012,7 @@ inline void printFlag(std::ostream &os, os << UR_USM_DEVICE_MEM_FLAG_WRITE_COMBINED; } - if ((val & UR_USM_DEVICE_MEM_FLAG_INITIAL_PLACEMENT) == - (uint32_t)UR_USM_DEVICE_MEM_FLAG_INITIAL_PLACEMENT) { + if ((val & UR_USM_DEVICE_MEM_FLAG_INITIAL_PLACEMENT) == (uint32_t)UR_USM_DEVICE_MEM_FLAG_INITIAL_PLACEMENT) { val ^= (uint32_t)UR_USM_DEVICE_MEM_FLAG_INITIAL_PLACEMENT; if (!first) { os << " | "; @@ -6876,8 +6022,7 @@ inline void printFlag(std::ostream &os, os << UR_USM_DEVICE_MEM_FLAG_INITIAL_PLACEMENT; } - if ((val & UR_USM_DEVICE_MEM_FLAG_DEVICE_READ_ONLY) == - (uint32_t)UR_USM_DEVICE_MEM_FLAG_DEVICE_READ_ONLY) { + if ((val & UR_USM_DEVICE_MEM_FLAG_DEVICE_READ_ONLY) == (uint32_t)UR_USM_DEVICE_MEM_FLAG_DEVICE_READ_ONLY) { val ^= (uint32_t)UR_USM_DEVICE_MEM_FLAG_DEVICE_READ_ONLY; if (!first) { os << " | "; @@ -6895,11 +6040,15 @@ inline void printFlag(std::ostream &os, } else if (first) { os << "0"; } + return UR_RESULT_SUCCESS; } -inline std::ostream &operator<<(std::ostream &os, - enum ur_usm_pool_flag_t value) { +} // namespace details +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_USM_POOL_FLAG_ZERO_INITIALIZE_BLOCK: os << "UR_USM_POOL_FLAG_ZERO_INITIALIZE_BLOCK"; break; @@ -6910,13 +6059,15 @@ inline std::ostream &operator<<(std::ostream &os, return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_usm_pool_flag_t flag template <> -inline void printFlag(std::ostream &os, uint32_t flag) { +inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { uint32_t val = flag; bool first = true; - if ((val & UR_USM_POOL_FLAG_ZERO_INITIALIZE_BLOCK) == - (uint32_t)UR_USM_POOL_FLAG_ZERO_INITIALIZE_BLOCK) { + if ((val & UR_USM_POOL_FLAG_ZERO_INITIALIZE_BLOCK) == (uint32_t)UR_USM_POOL_FLAG_ZERO_INITIALIZE_BLOCK) { val ^= (uint32_t)UR_USM_POOL_FLAG_ZERO_INITIALIZE_BLOCK; if (!first) { os << " | "; @@ -6934,22 +6085,24 @@ inline void printFlag(std::ostream &os, uint32_t flag) { } else if (first) { os << "0"; } + return UR_RESULT_SUCCESS; } -inline std::ostream &operator<<(std::ostream &os, enum ur_usm_type_t value) { +} // namespace details +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_USM_TYPE_UNKNOWN: os << "UR_USM_TYPE_UNKNOWN"; break; - case UR_USM_TYPE_HOST: os << "UR_USM_TYPE_HOST"; break; - case UR_USM_TYPE_DEVICE: os << "UR_USM_TYPE_DEVICE"; break; - case UR_USM_TYPE_SHARED: os << "UR_USM_TYPE_SHARED"; break; @@ -6959,26 +6112,24 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_usm_type_t value) { } return os; } -inline std::ostream &operator<<(std::ostream &os, - enum ur_usm_alloc_info_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) { switch (value) { - case UR_USM_ALLOC_INFO_TYPE: os << "UR_USM_ALLOC_INFO_TYPE"; break; - case UR_USM_ALLOC_INFO_BASE_PTR: os << "UR_USM_ALLOC_INFO_BASE_PTR"; break; - case UR_USM_ALLOC_INFO_SIZE: os << "UR_USM_ALLOC_INFO_SIZE"; break; - case UR_USM_ALLOC_INFO_DEVICE: os << "UR_USM_ALLOC_INFO_DEVICE"; break; - case UR_USM_ALLOC_INFO_POOL: os << "UR_USM_ALLOC_INFO_POOL"; break; @@ -6988,22 +6139,21 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_usm_alloc_info_t enum value template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_usm_alloc_info_t value, size_t size) { +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_usm_alloc_info_t value, size_t size) { if (ptr == NULL) { - printPtr(os, ptr); - return; + return printPtr(os, ptr); } switch (value) { - case UR_USM_ALLOC_INFO_TYPE: { const ur_usm_type_t *tptr = (const ur_usm_type_t *)ptr; if (sizeof(ur_usm_type_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_usm_type_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_usm_type_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -7011,13 +6161,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_USM_ALLOC_INFO_BASE_PTR: { const void *const *tptr = (const void *const *)ptr; if (sizeof(void *) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(void *) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(void *) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -7025,13 +6173,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_USM_ALLOC_INFO_SIZE: { const size_t *tptr = (const size_t *)ptr; if (sizeof(size_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(size_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(size_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -7039,100 +6185,88 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_USM_ALLOC_INFO_DEVICE: { const ur_device_handle_t *tptr = (const ur_device_handle_t *)ptr; if (sizeof(ur_device_handle_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_device_handle_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_device_handle_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; - printPtr(os, *tptr); + details::printPtr(os, + *tptr); os << ")"; } break; - case UR_USM_ALLOC_INFO_POOL: { const ur_usm_pool_handle_t *tptr = (const ur_usm_pool_handle_t *)ptr; if (sizeof(ur_usm_pool_handle_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_usm_pool_handle_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_usm_pool_handle_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; - printPtr(os, *tptr); + details::printPtr(os, + *tptr); os << ")"; } break; default: os << "unknown enumerator"; - break; + return UR_RESULT_ERROR_INVALID_ENUMERATION; } + return UR_RESULT_SUCCESS; } +} // namespace details -inline std::ostream &operator<<(std::ostream &os, - enum ur_usm_advice_flag_t value) { +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_USM_ADVICE_FLAG_DEFAULT: os << "UR_USM_ADVICE_FLAG_DEFAULT"; break; - case UR_USM_ADVICE_FLAG_SET_READ_MOSTLY: os << "UR_USM_ADVICE_FLAG_SET_READ_MOSTLY"; break; - case UR_USM_ADVICE_FLAG_CLEAR_READ_MOSTLY: os << "UR_USM_ADVICE_FLAG_CLEAR_READ_MOSTLY"; break; - case UR_USM_ADVICE_FLAG_SET_PREFERRED_LOCATION: os << "UR_USM_ADVICE_FLAG_SET_PREFERRED_LOCATION"; break; - case UR_USM_ADVICE_FLAG_CLEAR_PREFERRED_LOCATION: os << "UR_USM_ADVICE_FLAG_CLEAR_PREFERRED_LOCATION"; break; - case UR_USM_ADVICE_FLAG_SET_NON_ATOMIC_MOSTLY: os << "UR_USM_ADVICE_FLAG_SET_NON_ATOMIC_MOSTLY"; break; - case UR_USM_ADVICE_FLAG_CLEAR_NON_ATOMIC_MOSTLY: os << "UR_USM_ADVICE_FLAG_CLEAR_NON_ATOMIC_MOSTLY"; break; - case UR_USM_ADVICE_FLAG_BIAS_CACHED: os << "UR_USM_ADVICE_FLAG_BIAS_CACHED"; break; - case UR_USM_ADVICE_FLAG_BIAS_UNCACHED: os << "UR_USM_ADVICE_FLAG_BIAS_UNCACHED"; break; - case UR_USM_ADVICE_FLAG_SET_ACCESSED_BY_DEVICE: os << "UR_USM_ADVICE_FLAG_SET_ACCESSED_BY_DEVICE"; break; - case UR_USM_ADVICE_FLAG_CLEAR_ACCESSED_BY_DEVICE: os << "UR_USM_ADVICE_FLAG_CLEAR_ACCESSED_BY_DEVICE"; break; - case UR_USM_ADVICE_FLAG_SET_ACCESSED_BY_HOST: os << "UR_USM_ADVICE_FLAG_SET_ACCESSED_BY_HOST"; break; - case UR_USM_ADVICE_FLAG_CLEAR_ACCESSED_BY_HOST: os << "UR_USM_ADVICE_FLAG_CLEAR_ACCESSED_BY_HOST"; break; - case UR_USM_ADVICE_FLAG_SET_PREFERRED_LOCATION_HOST: os << "UR_USM_ADVICE_FLAG_SET_PREFERRED_LOCATION_HOST"; break; - case UR_USM_ADVICE_FLAG_CLEAR_PREFERRED_LOCATION_HOST: os << "UR_USM_ADVICE_FLAG_CLEAR_PREFERRED_LOCATION_HOST"; break; @@ -7143,13 +6277,15 @@ inline std::ostream &operator<<(std::ostream &os, return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_usm_advice_flag_t flag template <> -inline void printFlag(std::ostream &os, uint32_t flag) { +inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { uint32_t val = flag; bool first = true; - if ((val & UR_USM_ADVICE_FLAG_DEFAULT) == - (uint32_t)UR_USM_ADVICE_FLAG_DEFAULT) { + if ((val & UR_USM_ADVICE_FLAG_DEFAULT) == (uint32_t)UR_USM_ADVICE_FLAG_DEFAULT) { val ^= (uint32_t)UR_USM_ADVICE_FLAG_DEFAULT; if (!first) { os << " | "; @@ -7159,8 +6295,7 @@ inline void printFlag(std::ostream &os, uint32_t flag) { os << UR_USM_ADVICE_FLAG_DEFAULT; } - if ((val & UR_USM_ADVICE_FLAG_SET_READ_MOSTLY) == - (uint32_t)UR_USM_ADVICE_FLAG_SET_READ_MOSTLY) { + if ((val & UR_USM_ADVICE_FLAG_SET_READ_MOSTLY) == (uint32_t)UR_USM_ADVICE_FLAG_SET_READ_MOSTLY) { val ^= (uint32_t)UR_USM_ADVICE_FLAG_SET_READ_MOSTLY; if (!first) { os << " | "; @@ -7170,8 +6305,7 @@ inline void printFlag(std::ostream &os, uint32_t flag) { os << UR_USM_ADVICE_FLAG_SET_READ_MOSTLY; } - if ((val & UR_USM_ADVICE_FLAG_CLEAR_READ_MOSTLY) == - (uint32_t)UR_USM_ADVICE_FLAG_CLEAR_READ_MOSTLY) { + if ((val & UR_USM_ADVICE_FLAG_CLEAR_READ_MOSTLY) == (uint32_t)UR_USM_ADVICE_FLAG_CLEAR_READ_MOSTLY) { val ^= (uint32_t)UR_USM_ADVICE_FLAG_CLEAR_READ_MOSTLY; if (!first) { os << " | "; @@ -7181,8 +6315,7 @@ inline void printFlag(std::ostream &os, uint32_t flag) { os << UR_USM_ADVICE_FLAG_CLEAR_READ_MOSTLY; } - if ((val & UR_USM_ADVICE_FLAG_SET_PREFERRED_LOCATION) == - (uint32_t)UR_USM_ADVICE_FLAG_SET_PREFERRED_LOCATION) { + if ((val & UR_USM_ADVICE_FLAG_SET_PREFERRED_LOCATION) == (uint32_t)UR_USM_ADVICE_FLAG_SET_PREFERRED_LOCATION) { val ^= (uint32_t)UR_USM_ADVICE_FLAG_SET_PREFERRED_LOCATION; if (!first) { os << " | "; @@ -7192,8 +6325,7 @@ inline void printFlag(std::ostream &os, uint32_t flag) { os << UR_USM_ADVICE_FLAG_SET_PREFERRED_LOCATION; } - if ((val & UR_USM_ADVICE_FLAG_CLEAR_PREFERRED_LOCATION) == - (uint32_t)UR_USM_ADVICE_FLAG_CLEAR_PREFERRED_LOCATION) { + if ((val & UR_USM_ADVICE_FLAG_CLEAR_PREFERRED_LOCATION) == (uint32_t)UR_USM_ADVICE_FLAG_CLEAR_PREFERRED_LOCATION) { val ^= (uint32_t)UR_USM_ADVICE_FLAG_CLEAR_PREFERRED_LOCATION; if (!first) { os << " | "; @@ -7203,8 +6335,7 @@ inline void printFlag(std::ostream &os, uint32_t flag) { os << UR_USM_ADVICE_FLAG_CLEAR_PREFERRED_LOCATION; } - if ((val & UR_USM_ADVICE_FLAG_SET_NON_ATOMIC_MOSTLY) == - (uint32_t)UR_USM_ADVICE_FLAG_SET_NON_ATOMIC_MOSTLY) { + if ((val & UR_USM_ADVICE_FLAG_SET_NON_ATOMIC_MOSTLY) == (uint32_t)UR_USM_ADVICE_FLAG_SET_NON_ATOMIC_MOSTLY) { val ^= (uint32_t)UR_USM_ADVICE_FLAG_SET_NON_ATOMIC_MOSTLY; if (!first) { os << " | "; @@ -7214,8 +6345,7 @@ inline void printFlag(std::ostream &os, uint32_t flag) { os << UR_USM_ADVICE_FLAG_SET_NON_ATOMIC_MOSTLY; } - if ((val & UR_USM_ADVICE_FLAG_CLEAR_NON_ATOMIC_MOSTLY) == - (uint32_t)UR_USM_ADVICE_FLAG_CLEAR_NON_ATOMIC_MOSTLY) { + if ((val & UR_USM_ADVICE_FLAG_CLEAR_NON_ATOMIC_MOSTLY) == (uint32_t)UR_USM_ADVICE_FLAG_CLEAR_NON_ATOMIC_MOSTLY) { val ^= (uint32_t)UR_USM_ADVICE_FLAG_CLEAR_NON_ATOMIC_MOSTLY; if (!first) { os << " | "; @@ -7225,8 +6355,7 @@ inline void printFlag(std::ostream &os, uint32_t flag) { os << UR_USM_ADVICE_FLAG_CLEAR_NON_ATOMIC_MOSTLY; } - if ((val & UR_USM_ADVICE_FLAG_BIAS_CACHED) == - (uint32_t)UR_USM_ADVICE_FLAG_BIAS_CACHED) { + if ((val & UR_USM_ADVICE_FLAG_BIAS_CACHED) == (uint32_t)UR_USM_ADVICE_FLAG_BIAS_CACHED) { val ^= (uint32_t)UR_USM_ADVICE_FLAG_BIAS_CACHED; if (!first) { os << " | "; @@ -7236,8 +6365,7 @@ inline void printFlag(std::ostream &os, uint32_t flag) { os << UR_USM_ADVICE_FLAG_BIAS_CACHED; } - if ((val & UR_USM_ADVICE_FLAG_BIAS_UNCACHED) == - (uint32_t)UR_USM_ADVICE_FLAG_BIAS_UNCACHED) { + if ((val & UR_USM_ADVICE_FLAG_BIAS_UNCACHED) == (uint32_t)UR_USM_ADVICE_FLAG_BIAS_UNCACHED) { val ^= (uint32_t)UR_USM_ADVICE_FLAG_BIAS_UNCACHED; if (!first) { os << " | "; @@ -7247,8 +6375,7 @@ inline void printFlag(std::ostream &os, uint32_t flag) { os << UR_USM_ADVICE_FLAG_BIAS_UNCACHED; } - if ((val & UR_USM_ADVICE_FLAG_SET_ACCESSED_BY_DEVICE) == - (uint32_t)UR_USM_ADVICE_FLAG_SET_ACCESSED_BY_DEVICE) { + if ((val & UR_USM_ADVICE_FLAG_SET_ACCESSED_BY_DEVICE) == (uint32_t)UR_USM_ADVICE_FLAG_SET_ACCESSED_BY_DEVICE) { val ^= (uint32_t)UR_USM_ADVICE_FLAG_SET_ACCESSED_BY_DEVICE; if (!first) { os << " | "; @@ -7258,8 +6385,7 @@ inline void printFlag(std::ostream &os, uint32_t flag) { os << UR_USM_ADVICE_FLAG_SET_ACCESSED_BY_DEVICE; } - if ((val & UR_USM_ADVICE_FLAG_CLEAR_ACCESSED_BY_DEVICE) == - (uint32_t)UR_USM_ADVICE_FLAG_CLEAR_ACCESSED_BY_DEVICE) { + if ((val & UR_USM_ADVICE_FLAG_CLEAR_ACCESSED_BY_DEVICE) == (uint32_t)UR_USM_ADVICE_FLAG_CLEAR_ACCESSED_BY_DEVICE) { val ^= (uint32_t)UR_USM_ADVICE_FLAG_CLEAR_ACCESSED_BY_DEVICE; if (!first) { os << " | "; @@ -7269,8 +6395,7 @@ inline void printFlag(std::ostream &os, uint32_t flag) { os << UR_USM_ADVICE_FLAG_CLEAR_ACCESSED_BY_DEVICE; } - if ((val & UR_USM_ADVICE_FLAG_SET_ACCESSED_BY_HOST) == - (uint32_t)UR_USM_ADVICE_FLAG_SET_ACCESSED_BY_HOST) { + if ((val & UR_USM_ADVICE_FLAG_SET_ACCESSED_BY_HOST) == (uint32_t)UR_USM_ADVICE_FLAG_SET_ACCESSED_BY_HOST) { val ^= (uint32_t)UR_USM_ADVICE_FLAG_SET_ACCESSED_BY_HOST; if (!first) { os << " | "; @@ -7280,8 +6405,7 @@ inline void printFlag(std::ostream &os, uint32_t flag) { os << UR_USM_ADVICE_FLAG_SET_ACCESSED_BY_HOST; } - if ((val & UR_USM_ADVICE_FLAG_CLEAR_ACCESSED_BY_HOST) == - (uint32_t)UR_USM_ADVICE_FLAG_CLEAR_ACCESSED_BY_HOST) { + if ((val & UR_USM_ADVICE_FLAG_CLEAR_ACCESSED_BY_HOST) == (uint32_t)UR_USM_ADVICE_FLAG_CLEAR_ACCESSED_BY_HOST) { val ^= (uint32_t)UR_USM_ADVICE_FLAG_CLEAR_ACCESSED_BY_HOST; if (!first) { os << " | "; @@ -7291,8 +6415,7 @@ inline void printFlag(std::ostream &os, uint32_t flag) { os << UR_USM_ADVICE_FLAG_CLEAR_ACCESSED_BY_HOST; } - if ((val & UR_USM_ADVICE_FLAG_SET_PREFERRED_LOCATION_HOST) == - (uint32_t)UR_USM_ADVICE_FLAG_SET_PREFERRED_LOCATION_HOST) { + if ((val & UR_USM_ADVICE_FLAG_SET_PREFERRED_LOCATION_HOST) == (uint32_t)UR_USM_ADVICE_FLAG_SET_PREFERRED_LOCATION_HOST) { val ^= (uint32_t)UR_USM_ADVICE_FLAG_SET_PREFERRED_LOCATION_HOST; if (!first) { os << " | "; @@ -7302,8 +6425,7 @@ inline void printFlag(std::ostream &os, uint32_t flag) { os << UR_USM_ADVICE_FLAG_SET_PREFERRED_LOCATION_HOST; } - if ((val & UR_USM_ADVICE_FLAG_CLEAR_PREFERRED_LOCATION_HOST) == - (uint32_t)UR_USM_ADVICE_FLAG_CLEAR_PREFERRED_LOCATION_HOST) { + if ((val & UR_USM_ADVICE_FLAG_CLEAR_PREFERRED_LOCATION_HOST) == (uint32_t)UR_USM_ADVICE_FLAG_CLEAR_PREFERRED_LOCATION_HOST) { val ^= (uint32_t)UR_USM_ADVICE_FLAG_CLEAR_PREFERRED_LOCATION_HOST; if (!first) { os << " | "; @@ -7321,9 +6443,14 @@ inline void printFlag(std::ostream &os, uint32_t flag) { } else if (first) { os << "0"; } + return UR_RESULT_SUCCESS; } -inline std::ostream &operator<<(std::ostream &os, - const struct ur_usm_desc_t params) { +} // namespace details +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_usm_desc_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_usm_desc_t params) { os << "(struct ur_usm_desc_t){"; os << ".stype = "; @@ -7333,12 +6460,14 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << ", "; os << ".hints = "; - printFlag(os, (params.hints)); + details::printFlag(os, + (params.hints)); os << ", "; os << ".align = "; @@ -7348,8 +6477,11 @@ inline std::ostream &operator<<(std::ostream &os, os << "}"; return os; } -inline std::ostream &operator<<(std::ostream &os, - const struct ur_usm_host_desc_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_usm_host_desc_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_usm_host_desc_t params) { os << "(struct ur_usm_host_desc_t){"; os << ".stype = "; @@ -7359,18 +6491,23 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << ", "; os << ".flags = "; - printFlag(os, (params.flags)); + details::printFlag(os, + (params.flags)); os << "}"; return os; } -inline std::ostream &operator<<(std::ostream &os, - const struct ur_usm_device_desc_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_usm_device_desc_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_usm_device_desc_t params) { os << "(struct ur_usm_device_desc_t){"; os << ".stype = "; @@ -7380,18 +6517,23 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << ", "; os << ".flags = "; - printFlag(os, (params.flags)); + details::printFlag(os, + (params.flags)); os << "}"; return os; } -inline std::ostream &operator<<(std::ostream &os, - const struct ur_usm_pool_desc_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_usm_pool_desc_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_usm_pool_desc_t params) { os << "(struct ur_usm_pool_desc_t){"; os << ".stype = "; @@ -7401,18 +6543,23 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << ", "; os << ".flags = "; - printFlag(os, (params.flags)); + details::printFlag(os, + (params.flags)); os << "}"; return os; } -inline std::ostream &operator<<(std::ostream &os, - const struct ur_usm_pool_limits_desc_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_usm_pool_limits_desc_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_usm_pool_limits_desc_t params) { os << "(struct ur_usm_pool_limits_desc_t){"; os << ".stype = "; @@ -7422,7 +6569,8 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << ", "; os << ".maxPoolableSize = "; @@ -7437,14 +6585,15 @@ inline std::ostream &operator<<(std::ostream &os, os << "}"; return os; } -inline std::ostream &operator<<(std::ostream &os, - enum ur_usm_pool_info_t value) { +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_USM_POOL_INFO_REFERENCE_COUNT: os << "UR_USM_POOL_INFO_REFERENCE_COUNT"; break; - case UR_USM_POOL_INFO_CONTEXT: os << "UR_USM_POOL_INFO_CONTEXT"; break; @@ -7454,22 +6603,21 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_usm_pool_info_t enum value template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_usm_pool_info_t value, size_t size) { +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_usm_pool_info_t value, size_t size) { if (ptr == NULL) { - printPtr(os, ptr); - return; + return printPtr(os, ptr); } switch (value) { - case UR_USM_POOL_INFO_REFERENCE_COUNT: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -7477,34 +6625,36 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_USM_POOL_INFO_CONTEXT: { const ur_context_handle_t *tptr = (const ur_context_handle_t *)ptr; if (sizeof(ur_context_handle_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_context_handle_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_context_handle_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; - printPtr(os, *tptr); + details::printPtr(os, + *tptr); os << ")"; } break; default: os << "unknown enumerator"; - break; + return UR_RESULT_ERROR_INVALID_ENUMERATION; } + return UR_RESULT_SUCCESS; } +} // namespace details -inline std::ostream &operator<<(std::ostream &os, - enum ur_virtual_mem_granularity_info_t value) { +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_VIRTUAL_MEM_GRANULARITY_INFO_MINIMUM: os << "UR_VIRTUAL_MEM_GRANULARITY_INFO_MINIMUM"; break; - case UR_VIRTUAL_MEM_GRANULARITY_INFO_RECOMMENDED: os << "UR_VIRTUAL_MEM_GRANULARITY_INFO_RECOMMENDED"; break; @@ -7514,22 +6664,21 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_virtual_mem_granularity_info_t enum value template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_virtual_mem_granularity_info_t value, size_t size) { +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_virtual_mem_granularity_info_t value, size_t size) { if (ptr == NULL) { - printPtr(os, ptr); - return; + return printPtr(os, ptr); } switch (value) { - case UR_VIRTUAL_MEM_GRANULARITY_INFO_MINIMUM: { const size_t *tptr = (const size_t *)ptr; if (sizeof(size_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(size_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(size_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -7537,13 +6686,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_VIRTUAL_MEM_GRANULARITY_INFO_RECOMMENDED: { const size_t *tptr = (const size_t *)ptr; if (sizeof(size_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(size_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(size_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -7553,22 +6700,24 @@ inline void printTagged(std::ostream &os, const void *ptr, } break; default: os << "unknown enumerator"; - break; + return UR_RESULT_ERROR_INVALID_ENUMERATION; } + return UR_RESULT_SUCCESS; } +} // namespace details -inline std::ostream &operator<<(std::ostream &os, - enum ur_virtual_mem_access_flag_t value) { +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_VIRTUAL_MEM_ACCESS_FLAG_NONE: os << "UR_VIRTUAL_MEM_ACCESS_FLAG_NONE"; break; - case UR_VIRTUAL_MEM_ACCESS_FLAG_READ_WRITE: os << "UR_VIRTUAL_MEM_ACCESS_FLAG_READ_WRITE"; break; - case UR_VIRTUAL_MEM_ACCESS_FLAG_READ_ONLY: os << "UR_VIRTUAL_MEM_ACCESS_FLAG_READ_ONLY"; break; @@ -7579,14 +6728,15 @@ inline std::ostream &operator<<(std::ostream &os, return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_virtual_mem_access_flag_t flag template <> -inline void printFlag(std::ostream &os, - uint32_t flag) { +inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { uint32_t val = flag; bool first = true; - if ((val & UR_VIRTUAL_MEM_ACCESS_FLAG_NONE) == - (uint32_t)UR_VIRTUAL_MEM_ACCESS_FLAG_NONE) { + if ((val & UR_VIRTUAL_MEM_ACCESS_FLAG_NONE) == (uint32_t)UR_VIRTUAL_MEM_ACCESS_FLAG_NONE) { val ^= (uint32_t)UR_VIRTUAL_MEM_ACCESS_FLAG_NONE; if (!first) { os << " | "; @@ -7596,8 +6746,7 @@ inline void printFlag(std::ostream &os, os << UR_VIRTUAL_MEM_ACCESS_FLAG_NONE; } - if ((val & UR_VIRTUAL_MEM_ACCESS_FLAG_READ_WRITE) == - (uint32_t)UR_VIRTUAL_MEM_ACCESS_FLAG_READ_WRITE) { + if ((val & UR_VIRTUAL_MEM_ACCESS_FLAG_READ_WRITE) == (uint32_t)UR_VIRTUAL_MEM_ACCESS_FLAG_READ_WRITE) { val ^= (uint32_t)UR_VIRTUAL_MEM_ACCESS_FLAG_READ_WRITE; if (!first) { os << " | "; @@ -7607,8 +6756,7 @@ inline void printFlag(std::ostream &os, os << UR_VIRTUAL_MEM_ACCESS_FLAG_READ_WRITE; } - if ((val & UR_VIRTUAL_MEM_ACCESS_FLAG_READ_ONLY) == - (uint32_t)UR_VIRTUAL_MEM_ACCESS_FLAG_READ_ONLY) { + if ((val & UR_VIRTUAL_MEM_ACCESS_FLAG_READ_ONLY) == (uint32_t)UR_VIRTUAL_MEM_ACCESS_FLAG_READ_ONLY) { val ^= (uint32_t)UR_VIRTUAL_MEM_ACCESS_FLAG_READ_ONLY; if (!first) { os << " | "; @@ -7626,11 +6774,15 @@ inline void printFlag(std::ostream &os, } else if (first) { os << "0"; } + return UR_RESULT_SUCCESS; } -inline std::ostream &operator<<(std::ostream &os, - enum ur_virtual_mem_info_t value) { +} // namespace details +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_VIRTUAL_MEM_INFO_ACCESS_MODE: os << "UR_VIRTUAL_MEM_INFO_ACCESS_MODE"; break; @@ -7640,41 +6792,43 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_virtual_mem_info_t enum value template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_virtual_mem_info_t value, size_t size) { +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_virtual_mem_info_t value, size_t size) { if (ptr == NULL) { - printPtr(os, ptr); - return; + return printPtr(os, ptr); } switch (value) { - case UR_VIRTUAL_MEM_INFO_ACCESS_MODE: { - const ur_virtual_mem_access_flags_t *tptr = - (const ur_virtual_mem_access_flags_t *)ptr; + const ur_virtual_mem_access_flags_t *tptr = (const ur_virtual_mem_access_flags_t *)ptr; if (sizeof(ur_virtual_mem_access_flags_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_virtual_mem_access_flags_t) - << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_virtual_mem_access_flags_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; - printFlag(os, *tptr); + details::printFlag(os, + *tptr); os << ")"; } break; default: os << "unknown enumerator"; - break; + return UR_RESULT_ERROR_INVALID_ENUMERATION; } + return UR_RESULT_SUCCESS; } +} // namespace details -inline std::ostream &operator<<(std::ostream &os, - enum ur_physical_mem_flag_t value) { +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_PHYSICAL_MEM_FLAG_TBD: os << "UR_PHYSICAL_MEM_FLAG_TBD"; break; @@ -7685,13 +6839,15 @@ inline std::ostream &operator<<(std::ostream &os, return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_physical_mem_flag_t flag template <> -inline void printFlag(std::ostream &os, uint32_t flag) { +inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { uint32_t val = flag; bool first = true; - if ((val & UR_PHYSICAL_MEM_FLAG_TBD) == - (uint32_t)UR_PHYSICAL_MEM_FLAG_TBD) { + if ((val & UR_PHYSICAL_MEM_FLAG_TBD) == (uint32_t)UR_PHYSICAL_MEM_FLAG_TBD) { val ^= (uint32_t)UR_PHYSICAL_MEM_FLAG_TBD; if (!first) { os << " | "; @@ -7709,9 +6865,14 @@ inline void printFlag(std::ostream &os, uint32_t flag) { } else if (first) { os << "0"; } + return UR_RESULT_SUCCESS; } -inline std::ostream & -operator<<(std::ostream &os, const struct ur_physical_mem_properties_t params) { +} // namespace details +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_physical_mem_properties_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_physical_mem_properties_t params) { os << "(struct ur_physical_mem_properties_t){"; os << ".stype = "; @@ -7721,32 +6882,33 @@ operator<<(std::ostream &os, const struct ur_physical_mem_properties_t params) { os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << ", "; os << ".flags = "; - printFlag(os, (params.flags)); + details::printFlag(os, + (params.flags)); os << "}"; return os; } -inline std::ostream &operator<<(std::ostream &os, - enum ur_program_metadata_type_t value) { +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_PROGRAM_METADATA_TYPE_UINT32: os << "UR_PROGRAM_METADATA_TYPE_UINT32"; break; - case UR_PROGRAM_METADATA_TYPE_UINT64: os << "UR_PROGRAM_METADATA_TYPE_UINT64"; break; - case UR_PROGRAM_METADATA_TYPE_BYTE_ARRAY: os << "UR_PROGRAM_METADATA_TYPE_BYTE_ARRAY"; break; - case UR_PROGRAM_METADATA_TYPE_STRING: os << "UR_PROGRAM_METADATA_TYPE_STRING"; break; @@ -7756,10 +6918,14 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } +namespace details { -inline void printUnion(std::ostream &os, - const union ur_program_metadata_value_t params, - const enum ur_program_metadata_type_t tag) { +/////////////////////////////////////////////////////////////////////////////// +// @brief Print ur_program_metadata_value_t union +inline ur_result_t printUnion( + std::ostream &os, + const union ur_program_metadata_value_t params, + const enum ur_program_metadata_type_t tag) { os << "(union ur_program_metadata_value_t){"; switch (tag) { @@ -7781,29 +6947,37 @@ inline void printUnion(std::ostream &os, os << ".pString = "; - printPtr(os, (params.pString)); + details::printPtr(os, + (params.pString)); break; case UR_PROGRAM_METADATA_TYPE_BYTE_ARRAY: os << ".pData = "; - printPtr(os, (params.pData)); + details::printPtr(os, + (params.pData)); break; default: os << ""; - break; + return UR_RESULT_ERROR_INVALID_ENUMERATION; } os << "}"; -} -inline std::ostream &operator<<(std::ostream &os, - const struct ur_program_metadata_t params) { + return UR_RESULT_SUCCESS; +} +} // namespace details +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_program_metadata_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_program_metadata_t params) { os << "(struct ur_program_metadata_t){"; os << ".pName = "; - printPtr(os, (params.pName)); + details::printPtr(os, + (params.pName)); os << ", "; os << ".type = "; @@ -7817,13 +6991,16 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".value = "; - printUnion(os, (params.value), params.type); + details::printUnion(os, (params.value), params.type); os << "}"; return os; } -inline std::ostream &operator<<(std::ostream &os, - const struct ur_program_properties_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_program_properties_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_program_properties_t params) { os << "(struct ur_program_properties_t){"; os << ".stype = "; @@ -7833,7 +7010,8 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << ", "; os << ".count = "; @@ -7854,42 +7032,36 @@ inline std::ostream &operator<<(std::ostream &os, os << "}"; return os; } -inline std::ostream &operator<<(std::ostream &os, - enum ur_program_info_t value) { +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_PROGRAM_INFO_REFERENCE_COUNT: os << "UR_PROGRAM_INFO_REFERENCE_COUNT"; break; - case UR_PROGRAM_INFO_CONTEXT: os << "UR_PROGRAM_INFO_CONTEXT"; break; - case UR_PROGRAM_INFO_NUM_DEVICES: os << "UR_PROGRAM_INFO_NUM_DEVICES"; break; - case UR_PROGRAM_INFO_DEVICES: os << "UR_PROGRAM_INFO_DEVICES"; break; - case UR_PROGRAM_INFO_SOURCE: os << "UR_PROGRAM_INFO_SOURCE"; break; - case UR_PROGRAM_INFO_BINARY_SIZES: os << "UR_PROGRAM_INFO_BINARY_SIZES"; break; - case UR_PROGRAM_INFO_BINARIES: os << "UR_PROGRAM_INFO_BINARIES"; break; - case UR_PROGRAM_INFO_NUM_KERNELS: os << "UR_PROGRAM_INFO_NUM_KERNELS"; break; - case UR_PROGRAM_INFO_KERNEL_NAMES: os << "UR_PROGRAM_INFO_KERNEL_NAMES"; break; @@ -7899,22 +7071,21 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_program_info_t enum value template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_program_info_t value, size_t size) { +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_program_info_t value, size_t size) { if (ptr == NULL) { - printPtr(os, ptr); - return; + return printPtr(os, ptr); } switch (value) { - case UR_PROGRAM_INFO_REFERENCE_COUNT: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -7922,27 +7093,24 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_PROGRAM_INFO_CONTEXT: { const ur_context_handle_t *tptr = (const ur_context_handle_t *)ptr; if (sizeof(ur_context_handle_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_context_handle_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_context_handle_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; - printPtr(os, *tptr); + details::printPtr(os, + *tptr); os << ")"; } break; - case UR_PROGRAM_INFO_NUM_DEVICES: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -7950,7 +7118,6 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_PROGRAM_INFO_DEVICES: { const ur_device_handle_t *tptr = (const ur_device_handle_t *)ptr; @@ -7961,17 +7128,16 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ", "; } - printPtr(os, tptr[i]); + details::printPtr(os, + tptr[i]); } os << "}"; } break; - case UR_PROGRAM_INFO_SOURCE: { const char *tptr = (const char *)ptr; printPtr(os, tptr); } break; - case UR_PROGRAM_INFO_BINARY_SIZES: { const size_t *tptr = (const size_t *)ptr; @@ -7986,19 +7152,16 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << "}"; } break; - case UR_PROGRAM_INFO_BINARIES: { const unsigned char *tptr = (const unsigned char *)ptr; printPtr(os, tptr); } break; - case UR_PROGRAM_INFO_NUM_KERNELS: { const size_t *tptr = (const size_t *)ptr; if (sizeof(size_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(size_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(size_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -8006,7 +7169,6 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_PROGRAM_INFO_KERNEL_NAMES: { const char *tptr = (const char *)ptr; @@ -8014,26 +7176,27 @@ inline void printTagged(std::ostream &os, const void *ptr, } break; default: os << "unknown enumerator"; - break; + return UR_RESULT_ERROR_INVALID_ENUMERATION; } + return UR_RESULT_SUCCESS; } +} // namespace details -inline std::ostream &operator<<(std::ostream &os, - enum ur_program_build_status_t value) { +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_PROGRAM_BUILD_STATUS_NONE: os << "UR_PROGRAM_BUILD_STATUS_NONE"; break; - case UR_PROGRAM_BUILD_STATUS_ERROR: os << "UR_PROGRAM_BUILD_STATUS_ERROR"; break; - case UR_PROGRAM_BUILD_STATUS_SUCCESS: os << "UR_PROGRAM_BUILD_STATUS_SUCCESS"; break; - case UR_PROGRAM_BUILD_STATUS_IN_PROGRESS: os << "UR_PROGRAM_BUILD_STATUS_IN_PROGRESS"; break; @@ -8043,22 +7206,21 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -inline std::ostream &operator<<(std::ostream &os, - enum ur_program_binary_type_t value) { +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_PROGRAM_BINARY_TYPE_NONE: os << "UR_PROGRAM_BINARY_TYPE_NONE"; break; - case UR_PROGRAM_BINARY_TYPE_COMPILED_OBJECT: os << "UR_PROGRAM_BINARY_TYPE_COMPILED_OBJECT"; break; - case UR_PROGRAM_BINARY_TYPE_LIBRARY: os << "UR_PROGRAM_BINARY_TYPE_LIBRARY"; break; - case UR_PROGRAM_BINARY_TYPE_EXECUTABLE: os << "UR_PROGRAM_BINARY_TYPE_EXECUTABLE"; break; @@ -8068,22 +7230,21 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -inline std::ostream &operator<<(std::ostream &os, - enum ur_program_build_info_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) { switch (value) { - case UR_PROGRAM_BUILD_INFO_STATUS: os << "UR_PROGRAM_BUILD_INFO_STATUS"; break; - case UR_PROGRAM_BUILD_INFO_OPTIONS: os << "UR_PROGRAM_BUILD_INFO_OPTIONS"; break; - case UR_PROGRAM_BUILD_INFO_LOG: os << "UR_PROGRAM_BUILD_INFO_LOG"; break; - case UR_PROGRAM_BUILD_INFO_BINARY_TYPE: os << "UR_PROGRAM_BUILD_INFO_BINARY_TYPE"; break; @@ -8093,23 +7254,21 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_program_build_info_t enum value template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_program_build_info_t value, size_t size) { +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_program_build_info_t value, size_t size) { if (ptr == NULL) { - printPtr(os, ptr); - return; + return printPtr(os, ptr); } switch (value) { - case UR_PROGRAM_BUILD_INFO_STATUS: { - const ur_program_build_status_t *tptr = - (const ur_program_build_status_t *)ptr; + const ur_program_build_status_t *tptr = (const ur_program_build_status_t *)ptr; if (sizeof(ur_program_build_status_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_program_build_status_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_program_build_status_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -8117,26 +7276,21 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_PROGRAM_BUILD_INFO_OPTIONS: { const char *tptr = (const char *)ptr; printPtr(os, tptr); } break; - case UR_PROGRAM_BUILD_INFO_LOG: { const char *tptr = (const char *)ptr; printPtr(os, tptr); } break; - case UR_PROGRAM_BUILD_INFO_BINARY_TYPE: { - const ur_program_binary_type_t *tptr = - (const ur_program_binary_type_t *)ptr; + const ur_program_binary_type_t *tptr = (const ur_program_binary_type_t *)ptr; if (sizeof(ur_program_binary_type_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_program_binary_type_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_program_binary_type_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -8146,13 +7300,17 @@ inline void printTagged(std::ostream &os, const void *ptr, } break; default: os << "unknown enumerator"; - break; + return UR_RESULT_ERROR_INVALID_ENUMERATION; } + return UR_RESULT_SUCCESS; } +} // namespace details -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_specialization_constant_info_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_specialization_constant_info_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_specialization_constant_info_t params) { os << "(struct ur_specialization_constant_info_t){"; os << ".id = "; @@ -8167,14 +7325,17 @@ operator<<(std::ostream &os, os << ", "; os << ".pValue = "; - printPtr(os, (params.pValue)); + details::printPtr(os, + (params.pValue)); os << "}"; return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_program_native_properties_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_program_native_properties_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_program_native_properties_t params) { os << "(struct ur_program_native_properties_t){"; os << ".stype = "; @@ -8184,7 +7345,8 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << ", "; os << ".isNativeHandleOwned = "; @@ -8194,9 +7356,11 @@ operator<<(std::ostream &os, os << "}"; return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_kernel_arg_value_properties_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_kernel_arg_value_properties_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_kernel_arg_value_properties_t params) { os << "(struct ur_kernel_arg_value_properties_t){"; os << ".stype = "; @@ -8206,14 +7370,17 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << "}"; return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_kernel_arg_local_properties_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_kernel_arg_local_properties_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_kernel_arg_local_properties_t params) { os << "(struct ur_kernel_arg_local_properties_t){"; os << ".stype = "; @@ -8223,38 +7390,36 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << "}"; return os; } -inline std::ostream &operator<<(std::ostream &os, enum ur_kernel_info_t value) { +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_KERNEL_INFO_FUNCTION_NAME: os << "UR_KERNEL_INFO_FUNCTION_NAME"; break; - case UR_KERNEL_INFO_NUM_ARGS: os << "UR_KERNEL_INFO_NUM_ARGS"; break; - case UR_KERNEL_INFO_REFERENCE_COUNT: os << "UR_KERNEL_INFO_REFERENCE_COUNT"; break; - case UR_KERNEL_INFO_CONTEXT: os << "UR_KERNEL_INFO_CONTEXT"; break; - case UR_KERNEL_INFO_PROGRAM: os << "UR_KERNEL_INFO_PROGRAM"; break; - case UR_KERNEL_INFO_ATTRIBUTES: os << "UR_KERNEL_INFO_ATTRIBUTES"; break; - case UR_KERNEL_INFO_NUM_REGS: os << "UR_KERNEL_INFO_NUM_REGS"; break; @@ -8264,28 +7429,26 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_kernel_info_t value) { } return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_kernel_info_t enum value template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_kernel_info_t value, size_t size) { +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_kernel_info_t value, size_t size) { if (ptr == NULL) { - printPtr(os, ptr); - return; + return printPtr(os, ptr); } switch (value) { - case UR_KERNEL_INFO_FUNCTION_NAME: { const char *tptr = (const char *)ptr; printPtr(os, tptr); } break; - case UR_KERNEL_INFO_NUM_ARGS: { const size_t *tptr = (const size_t *)ptr; if (sizeof(size_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(size_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(size_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -8293,13 +7456,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_KERNEL_INFO_REFERENCE_COUNT: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -8307,47 +7468,42 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_KERNEL_INFO_CONTEXT: { const ur_context_handle_t *tptr = (const ur_context_handle_t *)ptr; if (sizeof(ur_context_handle_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_context_handle_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_context_handle_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; - printPtr(os, *tptr); + details::printPtr(os, + *tptr); os << ")"; } break; - case UR_KERNEL_INFO_PROGRAM: { const ur_program_handle_t *tptr = (const ur_program_handle_t *)ptr; if (sizeof(ur_program_handle_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_program_handle_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_program_handle_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; - printPtr(os, *tptr); + details::printPtr(os, + *tptr); os << ")"; } break; - case UR_KERNEL_INFO_ATTRIBUTES: { const char *tptr = (const char *)ptr; printPtr(os, tptr); } break; - case UR_KERNEL_INFO_NUM_REGS: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -8357,34 +7513,33 @@ inline void printTagged(std::ostream &os, const void *ptr, } break; default: os << "unknown enumerator"; - break; + return UR_RESULT_ERROR_INVALID_ENUMERATION; } + return UR_RESULT_SUCCESS; } +} // namespace details -inline std::ostream &operator<<(std::ostream &os, - enum ur_kernel_group_info_t value) { +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_KERNEL_GROUP_INFO_GLOBAL_WORK_SIZE: os << "UR_KERNEL_GROUP_INFO_GLOBAL_WORK_SIZE"; break; - case UR_KERNEL_GROUP_INFO_WORK_GROUP_SIZE: os << "UR_KERNEL_GROUP_INFO_WORK_GROUP_SIZE"; break; - case UR_KERNEL_GROUP_INFO_COMPILE_WORK_GROUP_SIZE: os << "UR_KERNEL_GROUP_INFO_COMPILE_WORK_GROUP_SIZE"; break; - case UR_KERNEL_GROUP_INFO_LOCAL_MEM_SIZE: os << "UR_KERNEL_GROUP_INFO_LOCAL_MEM_SIZE"; break; - case UR_KERNEL_GROUP_INFO_PREFERRED_WORK_GROUP_SIZE_MULTIPLE: os << "UR_KERNEL_GROUP_INFO_PREFERRED_WORK_GROUP_SIZE_MULTIPLE"; break; - case UR_KERNEL_GROUP_INFO_PRIVATE_MEM_SIZE: os << "UR_KERNEL_GROUP_INFO_PRIVATE_MEM_SIZE"; break; @@ -8394,16 +7549,16 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_kernel_group_info_t enum value template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_kernel_group_info_t value, size_t size) { +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_kernel_group_info_t value, size_t size) { if (ptr == NULL) { - printPtr(os, ptr); - return; + return printPtr(os, ptr); } switch (value) { - case UR_KERNEL_GROUP_INFO_GLOBAL_WORK_SIZE: { const size_t *tptr = (const size_t *)ptr; @@ -8418,13 +7573,11 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << "}"; } break; - case UR_KERNEL_GROUP_INFO_WORK_GROUP_SIZE: { const size_t *tptr = (const size_t *)ptr; if (sizeof(size_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(size_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(size_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -8432,7 +7585,6 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_KERNEL_GROUP_INFO_COMPILE_WORK_GROUP_SIZE: { const size_t *tptr = (const size_t *)ptr; @@ -8447,13 +7599,11 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << "}"; } break; - case UR_KERNEL_GROUP_INFO_LOCAL_MEM_SIZE: { const size_t *tptr = (const size_t *)ptr; if (sizeof(size_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(size_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(size_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -8461,13 +7611,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_KERNEL_GROUP_INFO_PREFERRED_WORK_GROUP_SIZE_MULTIPLE: { const size_t *tptr = (const size_t *)ptr; if (sizeof(size_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(size_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(size_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -8475,13 +7623,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_KERNEL_GROUP_INFO_PRIVATE_MEM_SIZE: { const size_t *tptr = (const size_t *)ptr; if (sizeof(size_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(size_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(size_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -8491,26 +7637,27 @@ inline void printTagged(std::ostream &os, const void *ptr, } break; default: os << "unknown enumerator"; - break; + return UR_RESULT_ERROR_INVALID_ENUMERATION; } + return UR_RESULT_SUCCESS; } +} // namespace details -inline std::ostream &operator<<(std::ostream &os, - enum ur_kernel_sub_group_info_t value) { +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_KERNEL_SUB_GROUP_INFO_MAX_SUB_GROUP_SIZE: os << "UR_KERNEL_SUB_GROUP_INFO_MAX_SUB_GROUP_SIZE"; break; - case UR_KERNEL_SUB_GROUP_INFO_MAX_NUM_SUB_GROUPS: os << "UR_KERNEL_SUB_GROUP_INFO_MAX_NUM_SUB_GROUPS"; break; - case UR_KERNEL_SUB_GROUP_INFO_COMPILE_NUM_SUB_GROUPS: os << "UR_KERNEL_SUB_GROUP_INFO_COMPILE_NUM_SUB_GROUPS"; break; - case UR_KERNEL_SUB_GROUP_INFO_SUB_GROUP_SIZE_INTEL: os << "UR_KERNEL_SUB_GROUP_INFO_SUB_GROUP_SIZE_INTEL"; break; @@ -8520,22 +7667,21 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_kernel_sub_group_info_t enum value template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_kernel_sub_group_info_t value, size_t size) { +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_kernel_sub_group_info_t value, size_t size) { if (ptr == NULL) { - printPtr(os, ptr); - return; + return printPtr(os, ptr); } switch (value) { - case UR_KERNEL_SUB_GROUP_INFO_MAX_SUB_GROUP_SIZE: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -8543,13 +7689,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_KERNEL_SUB_GROUP_INFO_MAX_NUM_SUB_GROUPS: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -8557,13 +7701,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_KERNEL_SUB_GROUP_INFO_COMPILE_NUM_SUB_GROUPS: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -8571,13 +7713,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_KERNEL_SUB_GROUP_INFO_SUB_GROUP_SIZE_INTEL: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -8587,22 +7727,24 @@ inline void printTagged(std::ostream &os, const void *ptr, } break; default: os << "unknown enumerator"; - break; + return UR_RESULT_ERROR_INVALID_ENUMERATION; } + return UR_RESULT_SUCCESS; } +} // namespace details -inline std::ostream &operator<<(std::ostream &os, - enum ur_kernel_cache_config_t value) { +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_KERNEL_CACHE_CONFIG_DEFAULT: os << "UR_KERNEL_CACHE_CONFIG_DEFAULT"; break; - case UR_KERNEL_CACHE_CONFIG_LARGE_SLM: os << "UR_KERNEL_CACHE_CONFIG_LARGE_SLM"; break; - case UR_KERNEL_CACHE_CONFIG_LARGE_DATA: os << "UR_KERNEL_CACHE_CONFIG_LARGE_DATA"; break; @@ -8612,18 +7754,18 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -inline std::ostream &operator<<(std::ostream &os, - enum ur_kernel_exec_info_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) { switch (value) { - case UR_KERNEL_EXEC_INFO_USM_INDIRECT_ACCESS: os << "UR_KERNEL_EXEC_INFO_USM_INDIRECT_ACCESS"; break; - case UR_KERNEL_EXEC_INFO_USM_PTRS: os << "UR_KERNEL_EXEC_INFO_USM_PTRS"; break; - case UR_KERNEL_EXEC_INFO_CACHE_CONFIG: os << "UR_KERNEL_EXEC_INFO_CACHE_CONFIG"; break; @@ -8633,22 +7775,21 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_kernel_exec_info_t enum value template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_kernel_exec_info_t value, size_t size) { +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_kernel_exec_info_t value, size_t size) { if (ptr == NULL) { - printPtr(os, ptr); - return; + return printPtr(os, ptr); } switch (value) { - case UR_KERNEL_EXEC_INFO_USM_INDIRECT_ACCESS: { 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 << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -8656,7 +7797,6 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_KERNEL_EXEC_INFO_USM_PTRS: { const void *const *tptr = (const void *const *)ptr; @@ -8671,14 +7811,11 @@ inline void printTagged(std::ostream &os, const void *ptr, } os << "}"; } break; - case UR_KERNEL_EXEC_INFO_CACHE_CONFIG: { - const ur_kernel_cache_config_t *tptr = - (const ur_kernel_cache_config_t *)ptr; + const ur_kernel_cache_config_t *tptr = (const ur_kernel_cache_config_t *)ptr; if (sizeof(ur_kernel_cache_config_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_kernel_cache_config_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_kernel_cache_config_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -8688,13 +7825,17 @@ inline void printTagged(std::ostream &os, const void *ptr, } break; default: os << "unknown enumerator"; - break; + return UR_RESULT_ERROR_INVALID_ENUMERATION; } + return UR_RESULT_SUCCESS; } +} // namespace details -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_kernel_arg_pointer_properties_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_kernel_arg_pointer_properties_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_kernel_arg_pointer_properties_t params) { os << "(struct ur_kernel_arg_pointer_properties_t){"; os << ".stype = "; @@ -8704,14 +7845,17 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << "}"; return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_kernel_exec_info_properties_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_kernel_exec_info_properties_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_kernel_exec_info_properties_t params) { os << "(struct ur_kernel_exec_info_properties_t){"; os << ".stype = "; @@ -8721,14 +7865,17 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << "}"; return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_kernel_arg_sampler_properties_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_kernel_arg_sampler_properties_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_kernel_arg_sampler_properties_t params) { os << "(struct ur_kernel_arg_sampler_properties_t){"; os << ".stype = "; @@ -8738,14 +7885,17 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << "}"; return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_kernel_arg_mem_obj_properties_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_kernel_arg_mem_obj_properties_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_kernel_arg_mem_obj_properties_t params) { os << "(struct ur_kernel_arg_mem_obj_properties_t){"; os << ".stype = "; @@ -8755,19 +7905,23 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << ", "; os << ".memoryAccess = "; - printFlag(os, (params.memoryAccess)); + details::printFlag(os, + (params.memoryAccess)); os << "}"; return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_kernel_native_properties_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_kernel_native_properties_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_kernel_native_properties_t params) { os << "(struct ur_kernel_native_properties_t){"; os << ".stype = "; @@ -8777,7 +7931,8 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << ", "; os << ".isNativeHandleOwned = "; @@ -8787,33 +7942,30 @@ operator<<(std::ostream &os, os << "}"; return os; } -inline std::ostream &operator<<(std::ostream &os, enum ur_queue_info_t value) { +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_QUEUE_INFO_CONTEXT: os << "UR_QUEUE_INFO_CONTEXT"; break; - case UR_QUEUE_INFO_DEVICE: os << "UR_QUEUE_INFO_DEVICE"; break; - case UR_QUEUE_INFO_DEVICE_DEFAULT: os << "UR_QUEUE_INFO_DEVICE_DEFAULT"; break; - case UR_QUEUE_INFO_FLAGS: os << "UR_QUEUE_INFO_FLAGS"; break; - case UR_QUEUE_INFO_REFERENCE_COUNT: os << "UR_QUEUE_INFO_REFERENCE_COUNT"; break; - case UR_QUEUE_INFO_SIZE: os << "UR_QUEUE_INFO_SIZE"; break; - case UR_QUEUE_INFO_EMPTY: os << "UR_QUEUE_INFO_EMPTY"; break; @@ -8823,78 +7975,73 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_queue_info_t value) { } return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_queue_info_t enum value template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_queue_info_t value, size_t size) { +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_queue_info_t value, size_t size) { if (ptr == NULL) { - printPtr(os, ptr); - return; + return printPtr(os, ptr); } switch (value) { - case UR_QUEUE_INFO_CONTEXT: { const ur_queue_handle_t *tptr = (const ur_queue_handle_t *)ptr; if (sizeof(ur_queue_handle_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_queue_handle_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_queue_handle_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; - printPtr(os, *tptr); + details::printPtr(os, + *tptr); os << ")"; } break; - case UR_QUEUE_INFO_DEVICE: { const ur_device_handle_t *tptr = (const ur_device_handle_t *)ptr; if (sizeof(ur_device_handle_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_device_handle_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_device_handle_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; - printPtr(os, *tptr); + details::printPtr(os, + *tptr); os << ")"; } break; - case UR_QUEUE_INFO_DEVICE_DEFAULT: { const ur_queue_handle_t *tptr = (const ur_queue_handle_t *)ptr; if (sizeof(ur_queue_handle_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_queue_handle_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_queue_handle_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; - printPtr(os, *tptr); + details::printPtr(os, + *tptr); os << ")"; } break; - case UR_QUEUE_INFO_FLAGS: { const ur_queue_flags_t *tptr = (const ur_queue_flags_t *)ptr; if (sizeof(ur_queue_flags_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_queue_flags_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_queue_flags_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; - printFlag(os, *tptr); + details::printFlag(os, + *tptr); os << ")"; } break; - case UR_QUEUE_INFO_REFERENCE_COUNT: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -8902,13 +8049,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_QUEUE_INFO_SIZE: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -8916,13 +8061,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_QUEUE_INFO_EMPTY: { 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 << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -8932,53 +8075,48 @@ inline void printTagged(std::ostream &os, const void *ptr, } break; default: os << "unknown enumerator"; - break; + return UR_RESULT_ERROR_INVALID_ENUMERATION; } + return UR_RESULT_SUCCESS; } +} // namespace details -inline std::ostream &operator<<(std::ostream &os, enum ur_queue_flag_t value) { +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_ENABLE: os << "UR_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_ENABLE"; break; - case UR_QUEUE_FLAG_PROFILING_ENABLE: os << "UR_QUEUE_FLAG_PROFILING_ENABLE"; break; - case UR_QUEUE_FLAG_ON_DEVICE: os << "UR_QUEUE_FLAG_ON_DEVICE"; break; - case UR_QUEUE_FLAG_ON_DEVICE_DEFAULT: os << "UR_QUEUE_FLAG_ON_DEVICE_DEFAULT"; break; - case UR_QUEUE_FLAG_DISCARD_EVENTS: os << "UR_QUEUE_FLAG_DISCARD_EVENTS"; break; - case UR_QUEUE_FLAG_PRIORITY_LOW: os << "UR_QUEUE_FLAG_PRIORITY_LOW"; break; - case UR_QUEUE_FLAG_PRIORITY_HIGH: os << "UR_QUEUE_FLAG_PRIORITY_HIGH"; break; - case UR_QUEUE_FLAG_SUBMISSION_BATCHED: os << "UR_QUEUE_FLAG_SUBMISSION_BATCHED"; break; - case UR_QUEUE_FLAG_SUBMISSION_IMMEDIATE: os << "UR_QUEUE_FLAG_SUBMISSION_IMMEDIATE"; break; - case UR_QUEUE_FLAG_USE_DEFAULT_STREAM: os << "UR_QUEUE_FLAG_USE_DEFAULT_STREAM"; break; - case UR_QUEUE_FLAG_SYNC_WITH_DEFAULT_STREAM: os << "UR_QUEUE_FLAG_SYNC_WITH_DEFAULT_STREAM"; break; @@ -8989,13 +8127,15 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_queue_flag_t value) { return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_queue_flag_t flag template <> -inline void printFlag(std::ostream &os, uint32_t flag) { +inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { uint32_t val = flag; bool first = true; - if ((val & UR_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_ENABLE) == - (uint32_t)UR_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_ENABLE) { + if ((val & UR_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_ENABLE) == (uint32_t)UR_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_ENABLE) { val ^= (uint32_t)UR_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_ENABLE; if (!first) { os << " | "; @@ -9005,8 +8145,7 @@ inline void printFlag(std::ostream &os, uint32_t flag) { os << UR_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_ENABLE; } - if ((val & UR_QUEUE_FLAG_PROFILING_ENABLE) == - (uint32_t)UR_QUEUE_FLAG_PROFILING_ENABLE) { + if ((val & UR_QUEUE_FLAG_PROFILING_ENABLE) == (uint32_t)UR_QUEUE_FLAG_PROFILING_ENABLE) { val ^= (uint32_t)UR_QUEUE_FLAG_PROFILING_ENABLE; if (!first) { os << " | "; @@ -9026,8 +8165,7 @@ inline void printFlag(std::ostream &os, uint32_t flag) { os << UR_QUEUE_FLAG_ON_DEVICE; } - if ((val & UR_QUEUE_FLAG_ON_DEVICE_DEFAULT) == - (uint32_t)UR_QUEUE_FLAG_ON_DEVICE_DEFAULT) { + if ((val & UR_QUEUE_FLAG_ON_DEVICE_DEFAULT) == (uint32_t)UR_QUEUE_FLAG_ON_DEVICE_DEFAULT) { val ^= (uint32_t)UR_QUEUE_FLAG_ON_DEVICE_DEFAULT; if (!first) { os << " | "; @@ -9037,8 +8175,7 @@ inline void printFlag(std::ostream &os, uint32_t flag) { os << UR_QUEUE_FLAG_ON_DEVICE_DEFAULT; } - if ((val & UR_QUEUE_FLAG_DISCARD_EVENTS) == - (uint32_t)UR_QUEUE_FLAG_DISCARD_EVENTS) { + if ((val & UR_QUEUE_FLAG_DISCARD_EVENTS) == (uint32_t)UR_QUEUE_FLAG_DISCARD_EVENTS) { val ^= (uint32_t)UR_QUEUE_FLAG_DISCARD_EVENTS; if (!first) { os << " | "; @@ -9048,8 +8185,7 @@ inline void printFlag(std::ostream &os, uint32_t flag) { os << UR_QUEUE_FLAG_DISCARD_EVENTS; } - if ((val & UR_QUEUE_FLAG_PRIORITY_LOW) == - (uint32_t)UR_QUEUE_FLAG_PRIORITY_LOW) { + if ((val & UR_QUEUE_FLAG_PRIORITY_LOW) == (uint32_t)UR_QUEUE_FLAG_PRIORITY_LOW) { val ^= (uint32_t)UR_QUEUE_FLAG_PRIORITY_LOW; if (!first) { os << " | "; @@ -9059,8 +8195,7 @@ inline void printFlag(std::ostream &os, uint32_t flag) { os << UR_QUEUE_FLAG_PRIORITY_LOW; } - if ((val & UR_QUEUE_FLAG_PRIORITY_HIGH) == - (uint32_t)UR_QUEUE_FLAG_PRIORITY_HIGH) { + if ((val & UR_QUEUE_FLAG_PRIORITY_HIGH) == (uint32_t)UR_QUEUE_FLAG_PRIORITY_HIGH) { val ^= (uint32_t)UR_QUEUE_FLAG_PRIORITY_HIGH; if (!first) { os << " | "; @@ -9070,8 +8205,7 @@ inline void printFlag(std::ostream &os, uint32_t flag) { os << UR_QUEUE_FLAG_PRIORITY_HIGH; } - if ((val & UR_QUEUE_FLAG_SUBMISSION_BATCHED) == - (uint32_t)UR_QUEUE_FLAG_SUBMISSION_BATCHED) { + if ((val & UR_QUEUE_FLAG_SUBMISSION_BATCHED) == (uint32_t)UR_QUEUE_FLAG_SUBMISSION_BATCHED) { val ^= (uint32_t)UR_QUEUE_FLAG_SUBMISSION_BATCHED; if (!first) { os << " | "; @@ -9081,8 +8215,7 @@ inline void printFlag(std::ostream &os, uint32_t flag) { os << UR_QUEUE_FLAG_SUBMISSION_BATCHED; } - if ((val & UR_QUEUE_FLAG_SUBMISSION_IMMEDIATE) == - (uint32_t)UR_QUEUE_FLAG_SUBMISSION_IMMEDIATE) { + if ((val & UR_QUEUE_FLAG_SUBMISSION_IMMEDIATE) == (uint32_t)UR_QUEUE_FLAG_SUBMISSION_IMMEDIATE) { val ^= (uint32_t)UR_QUEUE_FLAG_SUBMISSION_IMMEDIATE; if (!first) { os << " | "; @@ -9092,8 +8225,7 @@ inline void printFlag(std::ostream &os, uint32_t flag) { os << UR_QUEUE_FLAG_SUBMISSION_IMMEDIATE; } - if ((val & UR_QUEUE_FLAG_USE_DEFAULT_STREAM) == - (uint32_t)UR_QUEUE_FLAG_USE_DEFAULT_STREAM) { + if ((val & UR_QUEUE_FLAG_USE_DEFAULT_STREAM) == (uint32_t)UR_QUEUE_FLAG_USE_DEFAULT_STREAM) { val ^= (uint32_t)UR_QUEUE_FLAG_USE_DEFAULT_STREAM; if (!first) { os << " | "; @@ -9103,8 +8235,7 @@ inline void printFlag(std::ostream &os, uint32_t flag) { os << UR_QUEUE_FLAG_USE_DEFAULT_STREAM; } - if ((val & UR_QUEUE_FLAG_SYNC_WITH_DEFAULT_STREAM) == - (uint32_t)UR_QUEUE_FLAG_SYNC_WITH_DEFAULT_STREAM) { + if ((val & UR_QUEUE_FLAG_SYNC_WITH_DEFAULT_STREAM) == (uint32_t)UR_QUEUE_FLAG_SYNC_WITH_DEFAULT_STREAM) { val ^= (uint32_t)UR_QUEUE_FLAG_SYNC_WITH_DEFAULT_STREAM; if (!first) { os << " | "; @@ -9122,9 +8253,14 @@ inline void printFlag(std::ostream &os, uint32_t flag) { } else if (first) { os << "0"; } + return UR_RESULT_SUCCESS; } -inline std::ostream &operator<<(std::ostream &os, - const struct ur_queue_properties_t params) { +} // namespace details +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_queue_properties_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_queue_properties_t params) { os << "(struct ur_queue_properties_t){"; os << ".stype = "; @@ -9134,18 +8270,23 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << ", "; os << ".flags = "; - printFlag(os, (params.flags)); + details::printFlag(os, + (params.flags)); os << "}"; return os; } -inline std::ostream & -operator<<(std::ostream &os, const struct ur_queue_index_properties_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_queue_index_properties_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_queue_index_properties_t params) { os << "(struct ur_queue_index_properties_t){"; os << ".stype = "; @@ -9155,7 +8296,8 @@ operator<<(std::ostream &os, const struct ur_queue_index_properties_t params) { os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << ", "; os << ".computeIndex = "; @@ -9165,8 +8307,11 @@ operator<<(std::ostream &os, const struct ur_queue_index_properties_t params) { os << "}"; return os; } -inline std::ostream &operator<<(std::ostream &os, - const struct ur_queue_native_desc_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_queue_native_desc_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_queue_native_desc_t params) { os << "(struct ur_queue_native_desc_t){"; os << ".stype = "; @@ -9176,18 +8321,23 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << ", "; os << ".pNativeData = "; - printPtr(os, (params.pNativeData)); + details::printPtr(os, + (params.pNativeData)); os << "}"; return os; } -inline std::ostream & -operator<<(std::ostream &os, const struct ur_queue_native_properties_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_queue_native_properties_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_queue_native_properties_t params) { os << "(struct ur_queue_native_properties_t){"; os << ".stype = "; @@ -9197,7 +8347,8 @@ operator<<(std::ostream &os, const struct ur_queue_native_properties_t params) { os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << ", "; os << ".isNativeHandleOwned = "; @@ -9207,117 +8358,93 @@ operator<<(std::ostream &os, const struct ur_queue_native_properties_t params) { os << "}"; return os; } -inline std::ostream &operator<<(std::ostream &os, enum ur_command_t value) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_command_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, ur_command_t value) { switch (value) { - case UR_COMMAND_KERNEL_LAUNCH: os << "UR_COMMAND_KERNEL_LAUNCH"; break; - case UR_COMMAND_EVENTS_WAIT: os << "UR_COMMAND_EVENTS_WAIT"; break; - case UR_COMMAND_EVENTS_WAIT_WITH_BARRIER: os << "UR_COMMAND_EVENTS_WAIT_WITH_BARRIER"; break; - case UR_COMMAND_MEM_BUFFER_READ: os << "UR_COMMAND_MEM_BUFFER_READ"; break; - case UR_COMMAND_MEM_BUFFER_WRITE: os << "UR_COMMAND_MEM_BUFFER_WRITE"; break; - case UR_COMMAND_MEM_BUFFER_READ_RECT: os << "UR_COMMAND_MEM_BUFFER_READ_RECT"; break; - case UR_COMMAND_MEM_BUFFER_WRITE_RECT: os << "UR_COMMAND_MEM_BUFFER_WRITE_RECT"; break; - case UR_COMMAND_MEM_BUFFER_COPY: os << "UR_COMMAND_MEM_BUFFER_COPY"; break; - case UR_COMMAND_MEM_BUFFER_COPY_RECT: os << "UR_COMMAND_MEM_BUFFER_COPY_RECT"; break; - case UR_COMMAND_MEM_BUFFER_FILL: os << "UR_COMMAND_MEM_BUFFER_FILL"; break; - case UR_COMMAND_MEM_IMAGE_READ: os << "UR_COMMAND_MEM_IMAGE_READ"; break; - case UR_COMMAND_MEM_IMAGE_WRITE: os << "UR_COMMAND_MEM_IMAGE_WRITE"; break; - case UR_COMMAND_MEM_IMAGE_COPY: os << "UR_COMMAND_MEM_IMAGE_COPY"; break; - case UR_COMMAND_MEM_BUFFER_MAP: os << "UR_COMMAND_MEM_BUFFER_MAP"; break; - case UR_COMMAND_MEM_UNMAP: os << "UR_COMMAND_MEM_UNMAP"; break; - case UR_COMMAND_USM_FILL: os << "UR_COMMAND_USM_FILL"; break; - case UR_COMMAND_USM_MEMCPY: os << "UR_COMMAND_USM_MEMCPY"; break; - case UR_COMMAND_USM_PREFETCH: os << "UR_COMMAND_USM_PREFETCH"; break; - case UR_COMMAND_USM_ADVISE: os << "UR_COMMAND_USM_ADVISE"; break; - case UR_COMMAND_USM_FILL_2D: os << "UR_COMMAND_USM_FILL_2D"; break; - case UR_COMMAND_USM_MEMCPY_2D: os << "UR_COMMAND_USM_MEMCPY_2D"; break; - case UR_COMMAND_DEVICE_GLOBAL_VARIABLE_WRITE: os << "UR_COMMAND_DEVICE_GLOBAL_VARIABLE_WRITE"; break; - case UR_COMMAND_DEVICE_GLOBAL_VARIABLE_READ: os << "UR_COMMAND_DEVICE_GLOBAL_VARIABLE_READ"; break; - case UR_COMMAND_READ_HOST_PIPE: os << "UR_COMMAND_READ_HOST_PIPE"; break; - case UR_COMMAND_WRITE_HOST_PIPE: os << "UR_COMMAND_WRITE_HOST_PIPE"; break; - case UR_COMMAND_COMMAND_BUFFER_ENQUEUE_EXP: os << "UR_COMMAND_COMMAND_BUFFER_ENQUEUE_EXP"; break; - case UR_COMMAND_INTEROP_SEMAPHORE_WAIT_EXP: os << "UR_COMMAND_INTEROP_SEMAPHORE_WAIT_EXP"; break; - case UR_COMMAND_INTEROP_SEMAPHORE_SIGNAL_EXP: os << "UR_COMMAND_INTEROP_SEMAPHORE_SIGNAL_EXP"; break; @@ -9327,22 +8454,21 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_command_t value) { } return os; } -inline std::ostream &operator<<(std::ostream &os, - enum ur_event_status_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) { switch (value) { - case UR_EVENT_STATUS_COMPLETE: os << "UR_EVENT_STATUS_COMPLETE"; break; - case UR_EVENT_STATUS_RUNNING: os << "UR_EVENT_STATUS_RUNNING"; break; - case UR_EVENT_STATUS_SUBMITTED: os << "UR_EVENT_STATUS_SUBMITTED"; break; - case UR_EVENT_STATUS_QUEUED: os << "UR_EVENT_STATUS_QUEUED"; break; @@ -9352,25 +8478,24 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -inline std::ostream &operator<<(std::ostream &os, enum ur_event_info_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) { switch (value) { - case UR_EVENT_INFO_COMMAND_QUEUE: os << "UR_EVENT_INFO_COMMAND_QUEUE"; break; - case UR_EVENT_INFO_CONTEXT: os << "UR_EVENT_INFO_CONTEXT"; break; - case UR_EVENT_INFO_COMMAND_TYPE: os << "UR_EVENT_INFO_COMMAND_TYPE"; break; - case UR_EVENT_INFO_COMMAND_EXECUTION_STATUS: os << "UR_EVENT_INFO_COMMAND_EXECUTION_STATUS"; break; - case UR_EVENT_INFO_REFERENCE_COUNT: os << "UR_EVENT_INFO_REFERENCE_COUNT"; break; @@ -9380,50 +8505,47 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_event_info_t value) { } return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_event_info_t enum value template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_event_info_t value, size_t size) { +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_event_info_t value, size_t size) { if (ptr == NULL) { - printPtr(os, ptr); - return; + return printPtr(os, ptr); } switch (value) { - case UR_EVENT_INFO_COMMAND_QUEUE: { const ur_queue_handle_t *tptr = (const ur_queue_handle_t *)ptr; if (sizeof(ur_queue_handle_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_queue_handle_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_queue_handle_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; - printPtr(os, *tptr); + details::printPtr(os, + *tptr); os << ")"; } break; - case UR_EVENT_INFO_CONTEXT: { const ur_context_handle_t *tptr = (const ur_context_handle_t *)ptr; if (sizeof(ur_context_handle_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_context_handle_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_context_handle_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; - printPtr(os, *tptr); + details::printPtr(os, + *tptr); os << ")"; } break; - case UR_EVENT_INFO_COMMAND_TYPE: { const ur_command_t *tptr = (const ur_command_t *)ptr; if (sizeof(ur_command_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_command_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_command_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -9431,13 +8553,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_EVENT_INFO_COMMAND_EXECUTION_STATUS: { const ur_event_status_t *tptr = (const ur_event_status_t *)ptr; if (sizeof(ur_event_status_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(ur_event_status_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_event_status_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -9445,13 +8565,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_EVENT_INFO_REFERENCE_COUNT: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -9461,30 +8579,30 @@ inline void printTagged(std::ostream &os, const void *ptr, } break; default: os << "unknown enumerator"; - break; + return UR_RESULT_ERROR_INVALID_ENUMERATION; } + return UR_RESULT_SUCCESS; } +} // namespace details -inline std::ostream &operator<<(std::ostream &os, - enum ur_profiling_info_t value) { +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_PROFILING_INFO_COMMAND_QUEUED: os << "UR_PROFILING_INFO_COMMAND_QUEUED"; break; - case UR_PROFILING_INFO_COMMAND_SUBMIT: os << "UR_PROFILING_INFO_COMMAND_SUBMIT"; break; - case UR_PROFILING_INFO_COMMAND_START: os << "UR_PROFILING_INFO_COMMAND_START"; break; - case UR_PROFILING_INFO_COMMAND_END: os << "UR_PROFILING_INFO_COMMAND_END"; break; - case UR_PROFILING_INFO_COMMAND_COMPLETE: os << "UR_PROFILING_INFO_COMMAND_COMPLETE"; break; @@ -9494,22 +8612,21 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_profiling_info_t enum value template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_profiling_info_t value, size_t size) { +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_profiling_info_t value, size_t size) { if (ptr == NULL) { - printPtr(os, ptr); - return; + return printPtr(os, ptr); } switch (value) { - case UR_PROFILING_INFO_COMMAND_QUEUED: { const uint64_t *tptr = (const uint64_t *)ptr; if (sizeof(uint64_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint64_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint64_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -9517,13 +8634,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_PROFILING_INFO_COMMAND_SUBMIT: { const uint64_t *tptr = (const uint64_t *)ptr; if (sizeof(uint64_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint64_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint64_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -9531,13 +8646,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_PROFILING_INFO_COMMAND_START: { const uint64_t *tptr = (const uint64_t *)ptr; if (sizeof(uint64_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint64_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint64_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -9545,13 +8658,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_PROFILING_INFO_COMMAND_END: { const uint64_t *tptr = (const uint64_t *)ptr; if (sizeof(uint64_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint64_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint64_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -9559,13 +8670,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_PROFILING_INFO_COMMAND_COMPLETE: { const uint64_t *tptr = (const uint64_t *)ptr; if (sizeof(uint64_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint64_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint64_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -9575,12 +8684,17 @@ inline void printTagged(std::ostream &os, const void *ptr, } break; default: os << "unknown enumerator"; - break; + return UR_RESULT_ERROR_INVALID_ENUMERATION; } + return UR_RESULT_SUCCESS; } +} // namespace details -inline std::ostream & -operator<<(std::ostream &os, const struct ur_event_native_properties_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_event_native_properties_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_event_native_properties_t params) { os << "(struct ur_event_native_properties_t){"; os << ".stype = "; @@ -9590,7 +8704,8 @@ operator<<(std::ostream &os, const struct ur_event_native_properties_t params) { os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << ", "; os << ".isNativeHandleOwned = "; @@ -9600,22 +8715,21 @@ operator<<(std::ostream &os, const struct ur_event_native_properties_t params) { os << "}"; return os; } -inline std::ostream &operator<<(std::ostream &os, - enum ur_execution_info_t value) { +/////////////////////////////////////////////////////////////////////////////// +/// @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) { 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; @@ -9625,17 +8739,18 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } -inline std::ostream &operator<<(std::ostream &os, enum ur_map_flag_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) { switch (value) { - case UR_MAP_FLAG_READ: os << "UR_MAP_FLAG_READ"; break; - case UR_MAP_FLAG_WRITE: os << "UR_MAP_FLAG_WRITE"; break; - case UR_MAP_FLAG_WRITE_INVALIDATE_REGION: os << "UR_MAP_FLAG_WRITE_INVALIDATE_REGION"; break; @@ -9646,8 +8761,11 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_map_flag_t value) { return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_map_flag_t flag template <> -inline void printFlag(std::ostream &os, uint32_t flag) { +inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { uint32_t val = flag; bool first = true; @@ -9671,8 +8789,7 @@ inline void printFlag(std::ostream &os, uint32_t flag) { os << UR_MAP_FLAG_WRITE; } - if ((val & UR_MAP_FLAG_WRITE_INVALIDATE_REGION) == - (uint32_t)UR_MAP_FLAG_WRITE_INVALIDATE_REGION) { + if ((val & UR_MAP_FLAG_WRITE_INVALIDATE_REGION) == (uint32_t)UR_MAP_FLAG_WRITE_INVALIDATE_REGION) { val ^= (uint32_t)UR_MAP_FLAG_WRITE_INVALIDATE_REGION; if (!first) { os << " | "; @@ -9690,11 +8807,15 @@ inline void printFlag(std::ostream &os, uint32_t flag) { } else if (first) { os << "0"; } + return UR_RESULT_SUCCESS; } -inline std::ostream &operator<<(std::ostream &os, - enum ur_usm_migration_flag_t value) { +} // namespace details +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_USM_MIGRATION_FLAG_DEFAULT: os << "UR_USM_MIGRATION_FLAG_DEFAULT"; break; @@ -9705,14 +8826,15 @@ inline std::ostream &operator<<(std::ostream &os, return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_usm_migration_flag_t flag template <> -inline void printFlag(std::ostream &os, - uint32_t flag) { +inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { uint32_t val = flag; bool first = true; - if ((val & UR_USM_MIGRATION_FLAG_DEFAULT) == - (uint32_t)UR_USM_MIGRATION_FLAG_DEFAULT) { + if ((val & UR_USM_MIGRATION_FLAG_DEFAULT) == (uint32_t)UR_USM_MIGRATION_FLAG_DEFAULT) { val ^= (uint32_t)UR_USM_MIGRATION_FLAG_DEFAULT; if (!first) { os << " | "; @@ -9730,19 +8852,21 @@ inline void printFlag(std::ostream &os, } else if (first) { os << "0"; } + return UR_RESULT_SUCCESS; } -inline std::ostream &operator<<(std::ostream &os, - enum ur_exp_image_copy_flag_t value) { +} // namespace details +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_EXP_IMAGE_COPY_FLAG_HOST_TO_DEVICE: os << "UR_EXP_IMAGE_COPY_FLAG_HOST_TO_DEVICE"; break; - case UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_HOST: os << "UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_HOST"; break; - case UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_DEVICE: os << "UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_DEVICE"; break; @@ -9753,14 +8877,15 @@ inline std::ostream &operator<<(std::ostream &os, return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_exp_image_copy_flag_t flag template <> -inline void printFlag(std::ostream &os, - uint32_t flag) { +inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { uint32_t val = flag; bool first = true; - if ((val & UR_EXP_IMAGE_COPY_FLAG_HOST_TO_DEVICE) == - (uint32_t)UR_EXP_IMAGE_COPY_FLAG_HOST_TO_DEVICE) { + if ((val & UR_EXP_IMAGE_COPY_FLAG_HOST_TO_DEVICE) == (uint32_t)UR_EXP_IMAGE_COPY_FLAG_HOST_TO_DEVICE) { val ^= (uint32_t)UR_EXP_IMAGE_COPY_FLAG_HOST_TO_DEVICE; if (!first) { os << " | "; @@ -9770,8 +8895,7 @@ inline void printFlag(std::ostream &os, os << UR_EXP_IMAGE_COPY_FLAG_HOST_TO_DEVICE; } - if ((val & UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_HOST) == - (uint32_t)UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_HOST) { + if ((val & UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_HOST) == (uint32_t)UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_HOST) { val ^= (uint32_t)UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_HOST; if (!first) { os << " | "; @@ -9781,8 +8905,7 @@ inline void printFlag(std::ostream &os, os << UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_HOST; } - if ((val & UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_DEVICE) == - (uint32_t)UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_DEVICE) { + if ((val & UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_DEVICE) == (uint32_t)UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_DEVICE) { val ^= (uint32_t)UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_DEVICE; if (!first) { os << " | "; @@ -9800,9 +8923,14 @@ inline void printFlag(std::ostream &os, } else if (first) { os << "0"; } + return UR_RESULT_SUCCESS; } -inline std::ostream &operator<<(std::ostream &os, - const struct ur_exp_file_descriptor_t params) { +} // namespace details +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_exp_file_descriptor_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_file_descriptor_t params) { os << "(struct ur_exp_file_descriptor_t){"; os << ".stype = "; @@ -9812,7 +8940,8 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << ", "; os << ".fd = "; @@ -9822,8 +8951,11 @@ inline std::ostream &operator<<(std::ostream &os, os << "}"; return os; } -inline std::ostream &operator<<(std::ostream &os, - const struct ur_exp_win32_handle_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_exp_win32_handle_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_win32_handle_t params) { os << "(struct ur_exp_win32_handle_t){"; os << ".stype = "; @@ -9833,19 +8965,23 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << ", "; os << ".handle = "; - printPtr(os, (params.handle)); + details::printPtr(os, + (params.handle)); os << "}"; return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_exp_sampler_mip_properties_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_exp_sampler_mip_properties_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_sampler_mip_properties_t params) { os << "(struct ur_exp_sampler_mip_properties_t){"; os << ".stype = "; @@ -9855,7 +8991,8 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << ", "; os << ".minMipmapLevelClamp = "; @@ -9880,8 +9017,11 @@ operator<<(std::ostream &os, 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 = "; @@ -9891,7 +9031,8 @@ operator<<(std::ostream &os, const struct ur_exp_sampler_addr_modes_t params) { os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << ", "; os << ".addrModes = {"; @@ -9907,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 = "; @@ -9918,14 +9062,17 @@ inline std::ostream &operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << "}"; return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_exp_interop_semaphore_desc_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_exp_interop_semaphore_desc_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_interop_semaphore_desc_t params) { os << "(struct ur_exp_interop_semaphore_desc_t){"; os << ".stype = "; @@ -9935,14 +9082,17 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << "}"; return os; } -inline std::ostream & -operator<<(std::ostream &os, - const struct ur_exp_layered_image_properties_t params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_exp_layered_image_properties_t type +/// @returns +/// std::ostream & +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 = "; @@ -9952,7 +9102,8 @@ operator<<(std::ostream &os, os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << ", "; os << ".numLayers = "; @@ -9962,8 +9113,11 @@ operator<<(std::ostream &os, 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 = "; @@ -9973,19 +9127,21 @@ operator<<(std::ostream &os, const struct ur_exp_command_buffer_desc_t params) { os << ", "; os << ".pNext = "; - printStruct(os, (params.pNext)); + details::printStruct(os, + (params.pNext)); os << "}"; return os; } -inline std::ostream &operator<<(std::ostream &os, - enum ur_exp_peer_info_t value) { +/////////////////////////////////////////////////////////////////////////////// +/// @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) { switch (value) { - case UR_EXP_PEER_INFO_UR_PEER_ACCESS_SUPPORTED: os << "UR_EXP_PEER_INFO_UR_PEER_ACCESS_SUPPORTED"; break; - case UR_EXP_PEER_INFO_UR_PEER_ATOMICS_SUPPORTED: os << "UR_EXP_PEER_INFO_UR_PEER_ATOMICS_SUPPORTED"; break; @@ -9995,22 +9151,21 @@ inline std::ostream &operator<<(std::ostream &os, } return os; } +namespace details { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_exp_peer_info_t enum value template <> -inline void printTagged(std::ostream &os, const void *ptr, - ur_exp_peer_info_t value, size_t size) { +inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_exp_peer_info_t value, size_t size) { if (ptr == NULL) { - printPtr(os, ptr); - return; + return printPtr(os, ptr); } switch (value) { - case UR_EXP_PEER_INFO_UR_PEER_ACCESS_SUPPORTED: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -10018,13 +9173,11 @@ inline void printTagged(std::ostream &os, const void *ptr, os << ")"; } break; - case UR_EXP_PEER_INFO_UR_PEER_ATOMICS_SUPPORTED: { const uint32_t *tptr = (const uint32_t *)ptr; if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size - << ", expected: >=" << sizeof(uint32_t) << ")"; - return; + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -10034,88 +9187,64 @@ inline void printTagged(std::ostream &os, const void *ptr, } break; default: os << "unknown enumerator"; - break; - } -} - -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_adapter_get_params_t *params) { - - os << ".NumEntries = "; - - os << *(params->pNumEntries); - - os << ", "; - os << ".phAdapters = {"; - for (size_t i = 0; - *(params->pphAdapters) != NULL && i < *params->pNumEntries; ++i) { - if (i != 0) { - os << ", "; - } - - printPtr(os, (*(params->pphAdapters))[i]); + return UR_RESULT_ERROR_INVALID_ENUMERATION; } - os << "}"; - - os << ", "; - os << ".pNumAdapters = "; - - printPtr(os, *(params->ppNumAdapters)); - - return os; + return UR_RESULT_SUCCESS; } +} // namespace details -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_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 << ".hAdapter = "; + os << ".phLoaderConfig = "; - printPtr(os, *(params->phAdapter)); + details::printPtr(os, + *(params->pphLoaderConfig)); 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_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 << ".hAdapter = "; + os << ".hLoaderConfig = "; - printPtr(os, *(params->phAdapter)); + details::printPtr(os, + *(params->phLoaderConfig)); return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_adapter_get_last_error_params_t *params) { - - os << ".hAdapter = "; - - printPtr(os, *(params->phAdapter)); - - os << ", "; - os << ".ppMessage = "; - - printPtr(os, *(params->pppMessage)); +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ", "; - os << ".pError = "; + os << ".hLoaderConfig = "; - printPtr(os, *(params->ppError)); + details::printPtr(os, + *(params->phLoaderConfig)); 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_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 << ".hAdapter = "; + os << ".hLoaderConfig = "; - printPtr(os, *(params->phAdapter)); + details::printPtr(os, + *(params->phLoaderConfig)); os << ", "; os << ".propName = "; @@ -10129,288 +9258,312 @@ operator<<(std::ostream &os, os << ", "; os << ".pPropValue = "; - printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - printPtr(os, *(params->ppPropSizeRet)); + details::printPtr(os, + *(params->ppPropSizeRet)); 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 = "; - - printPtr(os, *(params->phContext)); +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ", "; - os << ".hDevice = "; + os << ".hLoaderConfig = "; - printPtr(os, *(params->phDevice)); + details::printPtr(os, + *(params->phLoaderConfig)); os << ", "; - os << ".hImage = "; + os << ".pLayerName = "; - printPtr(os, *(params->phImage)); + details::printPtr(os, + *(params->ppLayerName)); 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_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 << ".hContext = "; + os << ".hLoaderConfig = "; - printPtr(os, *(params->phContext)); + details::printPtr(os, + *(params->phLoaderConfig)); os << ", "; - os << ".hDevice = "; + os << ".pfnCodeloc = "; - printPtr(os, *(params->phDevice)); + os << reinterpret_cast( + *(params->ppfnCodeloc)); os << ", "; - os << ".hImage = "; + os << ".pUserData = "; - printPtr(os, *(params->phImage)); + details::printPtr(os, + *(params->ppUserData)); return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_bindless_images_image_allocate_exp_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 << ".hContext = "; + os << ".phAdapters = {"; + for (size_t i = 0; *(params->pphAdapters) != NULL && i < *params->pNumAdapters; ++i) { + if (i != 0) { + os << ", "; + } - printPtr(os, *(params->phContext)); + details::printPtr(os, + (*(params->pphAdapters))[i]); + } + os << "}"; os << ", "; - os << ".hDevice = "; + os << ".NumAdapters = "; - printPtr(os, *(params->phDevice)); + os << *(params->pNumAdapters); os << ", "; - os << ".pImageFormat = "; + os << ".NumEntries = "; - printPtr(os, *(params->ppImageFormat)); + os << *(params->pNumEntries); os << ", "; - os << ".pImageDesc = "; + os << ".phPlatforms = {"; + for (size_t i = 0; *(params->pphPlatforms) != NULL && i < *params->pNumEntries; ++i) { + if (i != 0) { + os << ", "; + } - printPtr(os, *(params->ppImageDesc)); + details::printPtr(os, + (*(params->pphPlatforms))[i]); + } + os << "}"; os << ", "; - os << ".phImageMem = "; + os << ".pNumPlatforms = "; - printPtr(os, *(params->pphImageMem)); + details::printPtr(os, + *(params->ppNumPlatforms)); return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_bindless_images_image_free_exp_params_t - *params) { - - os << ".hContext = "; - - printPtr(os, *(params->phContext)); +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ", "; - os << ".hDevice = "; + os << ".hPlatform = "; - printPtr(os, *(params->phDevice)); + details::printPtr(os, + *(params->phPlatform)); os << ", "; - os << ".hImageMem = "; - - printPtr(os, *(params->phImageMem)); - - return os; -} - -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_bindless_images_unsampled_image_create_exp_params_t *params) { - - os << ".hContext = "; + os << ".propName = "; - printPtr(os, *(params->phContext)); + os << *(params->ppropName); os << ", "; - os << ".hDevice = "; + os << ".propSize = "; - printPtr(os, *(params->phDevice)); + os << *(params->ppropSize); os << ", "; - os << ".hImageMem = "; - - printPtr(os, *(params->phImageMem)); + os << ".pPropValue = "; + details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); os << ", "; - os << ".pImageFormat = "; + os << ".pPropSizeRet = "; - printPtr(os, *(params->ppImageFormat)); + details::printPtr(os, + *(params->ppPropSizeRet)); - os << ", "; - os << ".pImageDesc = "; + return os; +} - printPtr(os, *(params->ppImageDesc)); +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ", "; - os << ".phMem = "; + os << ".hPlatform = "; - printPtr(os, *(params->pphMem)); + details::printPtr(os, + *(params->phPlatform)); os << ", "; - os << ".phImage = "; + os << ".phNativePlatform = "; - printPtr(os, *(params->pphImage)); + details::printPtr(os, + *(params->pphNativePlatform)); return os; } -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_bindless_images_sampled_image_create_exp_params_t *params) { - - os << ".hContext = "; - - printPtr(os, *(params->phContext)); - - os << ", "; - os << ".hDevice = "; - - printPtr(os, *(params->phDevice)); +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ", "; - os << ".hImageMem = "; + os << ".hNativePlatform = "; - printPtr(os, *(params->phImageMem)); + details::printPtr(os, + *(params->phNativePlatform)); os << ", "; - os << ".pImageFormat = "; + os << ".pProperties = "; - printPtr(os, *(params->ppImageFormat)); + details::printPtr(os, + *(params->ppProperties)); os << ", "; - os << ".pImageDesc = "; + os << ".phPlatform = "; - printPtr(os, *(params->ppImageDesc)); + details::printPtr(os, + *(params->pphPlatform)); - os << ", "; - os << ".hSampler = "; + return os; +} - printPtr(os, *(params->phSampler)); +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ", "; - os << ".phMem = "; + os << ".hPlatform = "; - printPtr(os, *(params->pphMem)); + details::printPtr(os, + *(params->phPlatform)); os << ", "; - os << ".phImage = "; + os << ".pVersion = "; - printPtr(os, *(params->pphImage)); + details::printPtr(os, + *(params->ppVersion)); return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_bindless_images_image_copy_exp_params_t - *params) { - - os << ".hQueue = "; - - printPtr(os, *(params->phQueue)); +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ", "; - os << ".pDst = "; + os << ".hPlatform = "; - printPtr(os, *(params->ppDst)); + details::printPtr(os, + *(params->phPlatform)); os << ", "; - os << ".pSrc = "; + os << ".pFrontendOption = "; - printPtr(os, *(params->ppSrc)); + details::printPtr(os, + *(params->ppFrontendOption)); os << ", "; - os << ".pImageFormat = "; + os << ".ppPlatformOption = "; - printPtr(os, *(params->ppImageFormat)); + details::printPtr(os, + *(params->pppPlatformOption)); - os << ", "; - os << ".pImageDesc = "; + return os; +} - printPtr(os, *(params->ppImageDesc)); +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ", "; - os << ".imageCopyFlags = "; + os << ".DeviceCount = "; - printFlag(os, *(params->pimageCopyFlags)); + os << *(params->pDeviceCount); os << ", "; - os << ".srcOffset = "; + os << ".phDevices = {"; + for (size_t i = 0; *(params->pphDevices) != NULL && i < *params->pDeviceCount; ++i) { + if (i != 0) { + os << ", "; + } - os << *(params->psrcOffset); + details::printPtr(os, + (*(params->pphDevices))[i]); + } + os << "}"; os << ", "; - os << ".dstOffset = "; + os << ".pProperties = "; - os << *(params->pdstOffset); + details::printPtr(os, + *(params->ppProperties)); os << ", "; - os << ".copyExtent = "; + os << ".phContext = "; - os << *(params->pcopyExtent); + details::printPtr(os, + *(params->pphContext)); - os << ", "; - os << ".hostExtent = "; + return os; +} - os << *(params->phostExtent); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_context_retain_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_context_retain_params_t *params) { - os << ", "; - os << ".numEventsInWaitList = "; + os << ".hContext = "; - os << *(params->pnumEventsInWaitList); + details::printPtr(os, + *(params->phContext)); - os << ", "; - os << ".phEventWaitList = {"; - for (size_t i = 0; *(params->pphEventWaitList) != NULL && - i < *params->pnumEventsInWaitList; - ++i) { - if (i != 0) { - os << ", "; - } + return os; +} - printPtr(os, (*(params->pphEventWaitList))[i]); - } - os << "}"; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_context_release_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_context_release_params_t *params) { - os << ", "; - os << ".phEvent = "; + os << ".hContext = "; - printPtr(os, *(params->pphEvent)); + details::printPtr(os, + *(params->phContext)); 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_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 << ".hImageMem = "; + os << ".hContext = "; - printPtr(os, *(params->phImageMem)); + details::printPtr(os, + *(params->phContext)); os << ", "; os << ".propName = "; @@ -10418,1445 +9571,2094 @@ inline std::ostream &operator<<( os << *(params->ppropName); os << ", "; - os << ".pPropValue = "; + os << ".propSize = "; + + os << *(params->ppropSize); - printPtr(os, *(params->ppPropValue)); + os << ", "; + os << ".pPropValue = "; + details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - printPtr(os, *(params->ppPropSizeRet)); + details::printPtr(os, + *(params->ppPropSizeRet)); 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_context_get_native_handle_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_context_get_native_handle_params_t *params) { os << ".hContext = "; - printPtr(os, *(params->phContext)); + details::printPtr(os, + *(params->phContext)); os << ", "; - os << ".hDevice = "; + os << ".phNativeContext = "; + + details::printPtr(os, + *(params->pphNativeContext)); + + return os; +} + +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; - printPtr(os, *(params->phDevice)); + details::printPtr(os, + *(params->phNativeContext)); os << ", "; - os << ".hImageMem = "; + os << ".numDevices = "; - printPtr(os, *(params->phImageMem)); + os << *(params->pnumDevices); os << ", "; - os << ".mipmapLevel = "; + os << ".phDevices = {"; + for (size_t i = 0; *(params->pphDevices) != NULL && i < *params->pnumDevices; ++i) { + if (i != 0) { + os << ", "; + } - os << *(params->pmipmapLevel); + details::printPtr(os, + (*(params->pphDevices))[i]); + } + os << "}"; os << ", "; - os << ".phImageMem = "; + os << ".pProperties = "; + + details::printPtr(os, + *(params->ppProperties)); + + os << ", "; + os << ".phContext = "; - printPtr(os, *(params->pphImageMem)); + details::printPtr(os, + *(params->pphContext)); 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_context_set_extended_deleter_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_context_set_extended_deleter_params_t *params) { os << ".hContext = "; - printPtr(os, *(params->phContext)); + details::printPtr(os, + *(params->phContext)); os << ", "; - os << ".hDevice = "; + os << ".pfnDeleter = "; - printPtr(os, *(params->phDevice)); + os << reinterpret_cast( + *(params->ppfnDeleter)); os << ", "; - os << ".hMem = "; + os << ".pUserData = "; - printPtr(os, *(params->phMem)); + details::printPtr(os, + *(params->ppUserData)); return os; } -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_bindless_images_import_opaque_fd_exp_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_event_get_info_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_event_get_info_params_t *params) { - os << ".hContext = "; + os << ".hEvent = "; - printPtr(os, *(params->phContext)); + details::printPtr(os, + *(params->phEvent)); os << ", "; - os << ".hDevice = "; + os << ".propName = "; - printPtr(os, *(params->phDevice)); + os << *(params->ppropName); os << ", "; - os << ".size = "; + os << ".propSize = "; - os << *(params->psize); + os << *(params->ppropSize); os << ", "; - os << ".pInteropMemDesc = "; - - printPtr(os, *(params->ppInteropMemDesc)); + os << ".pPropValue = "; + details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); os << ", "; - os << ".phInteropMem = "; + os << ".pPropSizeRet = "; - printPtr(os, *(params->pphInteropMem)); + details::printPtr(os, + *(params->ppPropSizeRet)); 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_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 << ".hContext = "; + os << ".hEvent = "; - printPtr(os, *(params->phContext)); + details::printPtr(os, + *(params->phEvent)); os << ", "; - os << ".hDevice = "; + os << ".propName = "; - printPtr(os, *(params->phDevice)); + os << *(params->ppropName); os << ", "; - os << ".pImageFormat = "; + os << ".propSize = "; - printPtr(os, *(params->ppImageFormat)); + os << *(params->ppropSize); os << ", "; - os << ".pImageDesc = "; - - printPtr(os, *(params->ppImageDesc)); + os << ".pPropValue = "; + details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); os << ", "; - os << ".hInteropMem = "; - - printPtr(os, *(params->phInteropMem)); - - os << ", "; - os << ".phImageMem = "; + os << ".pPropSizeRet = "; - printPtr(os, *(params->pphImageMem)); + details::printPtr(os, + *(params->ppPropSizeRet)); 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_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 << ".hContext = "; + os << ".numEvents = "; - printPtr(os, *(params->phContext)); + os << *(params->pnumEvents); os << ", "; - os << ".hDevice = "; + os << ".phEventWaitList = {"; + for (size_t i = 0; *(params->pphEventWaitList) != NULL && i < *params->pnumEvents; ++i) { + if (i != 0) { + os << ", "; + } - printPtr(os, *(params->phDevice)); + details::printPtr(os, + (*(params->pphEventWaitList))[i]); + } + os << "}"; - os << ", "; - os << ".hInteropMem = "; + return os; +} + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_event_retain_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_event_retain_params_t *params) { - printPtr(os, *(params->phInteropMem)); + os << ".hEvent = "; + + details::printPtr(os, + *(params->phEvent)); 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) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_event_release_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_event_release_params_t *params) { - os << ".hContext = "; + os << ".hEvent = "; - printPtr(os, *(params->phContext)); + details::printPtr(os, + *(params->phEvent)); - os << ", "; - os << ".hDevice = "; + return os; +} - printPtr(os, *(params->phDevice)); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_event_get_native_handle_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_event_get_native_handle_params_t *params) { - os << ", "; - os << ".pInteropSemaphoreDesc = "; + os << ".hEvent = "; - printPtr(os, *(params->ppInteropSemaphoreDesc)); + details::printPtr(os, + *(params->phEvent)); os << ", "; - os << ".phInteropSemaphore = "; + os << ".phNativeEvent = "; - printPtr(os, *(params->pphInteropSemaphore)); + details::printPtr(os, + *(params->pphNativeEvent)); 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_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 = "; - printPtr(os, *(params->phContext)); + details::printPtr(os, + *(params->phContext)); os << ", "; - os << ".hDevice = "; + os << ".pProperties = "; - printPtr(os, *(params->phDevice)); + details::printPtr(os, + *(params->ppProperties)); os << ", "; - os << ".hInteropSemaphore = "; + os << ".phEvent = "; - printPtr(os, *(params->phInteropSemaphore)); + details::printPtr(os, + *(params->pphEvent)); 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 = "; - - printPtr(os, *(params->phQueue)); +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ", "; - os << ".hSemaphore = "; + os << ".hEvent = "; - printPtr(os, *(params->phSemaphore)); + details::printPtr(os, + *(params->phEvent)); os << ", "; - os << ".numEventsInWaitList = "; + os << ".execStatus = "; - os << *(params->pnumEventsInWaitList); + os << *(params->pexecStatus); os << ", "; - os << ".phEventWaitList = {"; - for (size_t i = 0; *(params->pphEventWaitList) != NULL && - i < *params->pnumEventsInWaitList; - ++i) { - if (i != 0) { - os << ", "; - } + os << ".pfnNotify = "; - printPtr(os, (*(params->pphEventWaitList))[i]); - } - os << "}"; + os << reinterpret_cast( + *(params->ppfnNotify)); os << ", "; - os << ".phEvent = "; + os << ".pUserData = "; - printPtr(os, *(params->pphEvent)); + details::printPtr(os, + *(params->ppUserData)); return os; } -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_bindless_images_signal_external_semaphore_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 << ".hQueue = "; + os << ".hContext = "; - printPtr(os, *(params->phQueue)); + details::printPtr(os, + *(params->phContext)); os << ", "; - os << ".hSemaphore = "; + os << ".pIL = "; - printPtr(os, *(params->phSemaphore)); + details::printPtr(os, + *(params->ppIL)); os << ", "; - os << ".numEventsInWaitList = "; + os << ".length = "; - os << *(params->pnumEventsInWaitList); + os << *(params->plength); os << ", "; - os << ".phEventWaitList = {"; - for (size_t i = 0; *(params->pphEventWaitList) != NULL && - i < *params->pnumEventsInWaitList; - ++i) { - if (i != 0) { - os << ", "; - } + os << ".pProperties = "; - printPtr(os, (*(params->pphEventWaitList))[i]); - } - os << "}"; + details::printPtr(os, + *(params->ppProperties)); os << ", "; - os << ".phEvent = "; + os << ".phProgram = "; - printPtr(os, *(params->pphEvent)); + details::printPtr(os, + *(params->pphProgram)); return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_command_buffer_create_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 = "; - printPtr(os, *(params->phContext)); + details::printPtr(os, + *(params->phContext)); os << ", "; os << ".hDevice = "; - printPtr(os, *(params->phDevice)); + details::printPtr(os, + *(params->phDevice)); os << ", "; - os << ".pCommandBufferDesc = "; + os << ".size = "; - printPtr(os, *(params->ppCommandBufferDesc)); + os << *(params->psize); os << ", "; - os << ".phCommandBuffer = "; + os << ".pBinary = "; - printPtr(os, *(params->pphCommandBuffer)); + details::printPtr(os, + *(params->ppBinary)); - return os; -} + os << ", "; + os << ".pProperties = "; -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_command_buffer_retain_exp_params_t - *params) { + details::printPtr(os, + *(params->ppProperties)); - os << ".hCommandBuffer = "; + os << ", "; + os << ".phProgram = "; - printPtr(os, *(params->phCommandBuffer)); + details::printPtr(os, + *(params->pphProgram)); 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_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 << ".hCommandBuffer = "; + os << ".hContext = "; - printPtr(os, *(params->phCommandBuffer)); + details::printPtr(os, + *(params->phContext)); - return os; -} + os << ", "; + os << ".hProgram = "; -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_command_buffer_finalize_exp_params_t - *params) { + details::printPtr(os, + *(params->phProgram)); - os << ".hCommandBuffer = "; + os << ", "; + os << ".pOptions = "; - printPtr(os, *(params->phCommandBuffer)); + details::printPtr(os, + *(params->ppOptions)); return os; } -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_command_buffer_append_kernel_launch_exp_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ".hCommandBuffer = "; + os << ".hContext = "; - printPtr(os, *(params->phCommandBuffer)); + details::printPtr(os, + *(params->phContext)); os << ", "; - os << ".hKernel = "; + os << ".hProgram = "; - printPtr(os, *(params->phKernel)); + details::printPtr(os, + *(params->phProgram)); os << ", "; - os << ".workDim = "; + os << ".pOptions = "; - os << *(params->pworkDim); + details::printPtr(os, + *(params->ppOptions)); - os << ", "; - os << ".pGlobalWorkOffset = "; + return os; +} - printPtr(os, *(params->ppGlobalWorkOffset)); +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ", "; - os << ".pGlobalWorkSize = "; + os << ".hContext = "; - printPtr(os, *(params->ppGlobalWorkSize)); + details::printPtr(os, + *(params->phContext)); os << ", "; - os << ".pLocalWorkSize = "; + os << ".count = "; - printPtr(os, *(params->ppLocalWorkSize)); + os << *(params->pcount); os << ", "; - os << ".numSyncPointsInWaitList = "; + os << ".phPrograms = {"; + for (size_t i = 0; *(params->pphPrograms) != NULL && i < *params->pcount; ++i) { + if (i != 0) { + os << ", "; + } - os << *(params->pnumSyncPointsInWaitList); + details::printPtr(os, + (*(params->pphPrograms))[i]); + } + os << "}"; os << ", "; - os << ".pSyncPointWaitList = "; + os << ".pOptions = "; - printPtr(os, *(params->ppSyncPointWaitList)); + details::printPtr(os, + *(params->ppOptions)); os << ", "; - os << ".pSyncPoint = "; + os << ".phProgram = "; - printPtr(os, *(params->ppSyncPoint)); + details::printPtr(os, + *(params->pphProgram)); 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_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 << ".hCommandBuffer = "; + os << ".hProgram = "; - printPtr(os, *(params->phCommandBuffer)); + details::printPtr(os, + *(params->phProgram)); - os << ", "; - os << ".pDst = "; + return os; +} - printPtr(os, *(params->ppDst)); +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ", "; - os << ".pSrc = "; + os << ".hProgram = "; - printPtr(os, *(params->ppSrc)); + details::printPtr(os, + *(params->phProgram)); - os << ", "; - os << ".size = "; + return os; +} - os << *(params->psize); +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; + + details::printPtr(os, + *(params->phDevice)); os << ", "; - os << ".numSyncPointsInWaitList = "; + os << ".hProgram = "; - os << *(params->pnumSyncPointsInWaitList); + details::printPtr(os, + *(params->phProgram)); os << ", "; - os << ".pSyncPointWaitList = "; + os << ".pFunctionName = "; - printPtr(os, *(params->ppSyncPointWaitList)); + details::printPtr(os, + *(params->ppFunctionName)); os << ", "; - os << ".pSyncPoint = "; + os << ".ppFunctionPointer = "; - printPtr(os, *(params->ppSyncPoint)); + details::printPtr(os, + *(params->pppFunctionPointer)); return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_command_buffer_append_usm_fill_exp_params_t - *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_program_get_info_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_get_info_params_t *params) { - os << ".hCommandBuffer = "; + os << ".hProgram = "; - printPtr(os, *(params->phCommandBuffer)); + details::printPtr(os, + *(params->phProgram)); os << ", "; - os << ".pMemory = "; + os << ".propName = "; - printPtr(os, *(params->ppMemory)); + os << *(params->ppropName); os << ", "; - os << ".pPattern = "; + os << ".propSize = "; - printPtr(os, *(params->ppPattern)); + os << *(params->ppropSize); os << ", "; - os << ".patternSize = "; - - os << *(params->ppatternSize); + os << ".pPropValue = "; + details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); os << ", "; - os << ".size = "; + os << ".pPropSizeRet = "; - os << *(params->psize); + details::printPtr(os, + *(params->ppPropSizeRet)); - os << ", "; - os << ".numSyncPointsInWaitList = "; + return os; +} - os << *(params->pnumSyncPointsInWaitList); +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ", "; - os << ".pSyncPointWaitList = "; + os << ".hProgram = "; - printPtr(os, *(params->ppSyncPointWaitList)); + details::printPtr(os, + *(params->phProgram)); os << ", "; - os << ".pSyncPoint = "; + os << ".hDevice = "; - printPtr(os, *(params->ppSyncPoint)); + details::printPtr(os, + *(params->phDevice)); - return os; -} + os << ", "; + os << ".propName = "; -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_command_buffer_append_mem_buffer_copy_exp_params_t *params) { + os << *(params->ppropName); - os << ".hCommandBuffer = "; + os << ", "; + os << ".propSize = "; - printPtr(os, *(params->phCommandBuffer)); + os << *(params->ppropSize); os << ", "; - os << ".hSrcMem = "; - - printPtr(os, *(params->phSrcMem)); + os << ".pPropValue = "; + details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); os << ", "; - os << ".hDstMem = "; + os << ".pPropSizeRet = "; - printPtr(os, *(params->phDstMem)); + details::printPtr(os, + *(params->ppPropSizeRet)); - os << ", "; - os << ".srcOffset = "; + return os; +} - os << *(params->psrcOffset); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_program_set_specialization_constants_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_set_specialization_constants_params_t *params) { - os << ", "; - os << ".dstOffset = "; + os << ".hProgram = "; - os << *(params->pdstOffset); + details::printPtr(os, + *(params->phProgram)); os << ", "; - os << ".size = "; + os << ".count = "; - os << *(params->psize); + os << *(params->pcount); os << ", "; - os << ".numSyncPointsInWaitList = "; + os << ".pSpecConstants = {"; + for (size_t i = 0; *(params->ppSpecConstants) != NULL && i < *params->pcount; ++i) { + if (i != 0) { + os << ", "; + } - os << *(params->pnumSyncPointsInWaitList); + os << (*(params->ppSpecConstants))[i]; + } + os << "}"; - os << ", "; - os << ".pSyncPointWaitList = "; + return os; +} + +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; - printPtr(os, *(params->ppSyncPointWaitList)); + details::printPtr(os, + *(params->phProgram)); os << ", "; - os << ".pSyncPoint = "; + os << ".phNativeProgram = "; - printPtr(os, *(params->ppSyncPoint)); + details::printPtr(os, + *(params->pphNativeProgram)); 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_program_create_with_native_handle_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_create_with_native_handle_params_t *params) { - os << ".hCommandBuffer = "; + os << ".hNativeProgram = "; - printPtr(os, *(params->phCommandBuffer)); + details::printPtr(os, + *(params->phNativeProgram)); os << ", "; - os << ".hBuffer = "; + os << ".hContext = "; - printPtr(os, *(params->phBuffer)); + details::printPtr(os, + *(params->phContext)); os << ", "; - os << ".offset = "; + os << ".pProperties = "; - os << *(params->poffset); + details::printPtr(os, + *(params->ppProperties)); os << ", "; - os << ".size = "; + os << ".phProgram = "; - os << *(params->psize); + details::printPtr(os, + *(params->pphProgram)); - os << ", "; - os << ".pSrc = "; + return os; +} - printPtr(os, *(params->ppSrc)); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_kernel_create_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_create_params_t *params) { - os << ", "; - os << ".numSyncPointsInWaitList = "; + os << ".hProgram = "; - os << *(params->pnumSyncPointsInWaitList); + details::printPtr(os, + *(params->phProgram)); os << ", "; - os << ".pSyncPointWaitList = "; + os << ".pKernelName = "; - printPtr(os, *(params->ppSyncPointWaitList)); + details::printPtr(os, + *(params->ppKernelName)); os << ", "; - os << ".pSyncPoint = "; + os << ".phKernel = "; - printPtr(os, *(params->ppSyncPoint)); + details::printPtr(os, + *(params->pphKernel)); 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_get_info_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_get_info_params_t *params) { - os << ".hCommandBuffer = "; + os << ".hKernel = "; - printPtr(os, *(params->phCommandBuffer)); + details::printPtr(os, + *(params->phKernel)); os << ", "; - os << ".hBuffer = "; + os << ".propName = "; - printPtr(os, *(params->phBuffer)); + os << *(params->ppropName); os << ", "; - os << ".offset = "; + os << ".propSize = "; - os << *(params->poffset); + os << *(params->ppropSize); os << ", "; - os << ".size = "; - - os << *(params->psize); + os << ".pPropValue = "; + details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); os << ", "; - os << ".pDst = "; + os << ".pPropSizeRet = "; - printPtr(os, *(params->ppDst)); + details::printPtr(os, + *(params->ppPropSizeRet)); - os << ", "; - os << ".numSyncPointsInWaitList = "; + return os; +} - os << *(params->pnumSyncPointsInWaitList); +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ", "; - os << ".pSyncPointWaitList = "; + os << ".hKernel = "; - printPtr(os, *(params->ppSyncPointWaitList)); + details::printPtr(os, + *(params->phKernel)); os << ", "; - os << ".pSyncPoint = "; + os << ".hDevice = "; - printPtr(os, *(params->ppSyncPoint)); + details::printPtr(os, + *(params->phDevice)); - return os; -} + os << ", "; + os << ".propName = "; -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_command_buffer_append_mem_buffer_copy_rect_exp_params_t *params) { + os << *(params->ppropName); - os << ".hCommandBuffer = "; + os << ", "; + os << ".propSize = "; - printPtr(os, *(params->phCommandBuffer)); + os << *(params->ppropSize); os << ", "; - os << ".hSrcMem = "; - - printPtr(os, *(params->phSrcMem)); + os << ".pPropValue = "; + details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); os << ", "; - os << ".hDstMem = "; + os << ".pPropSizeRet = "; - printPtr(os, *(params->phDstMem)); + details::printPtr(os, + *(params->ppPropSizeRet)); - os << ", "; - os << ".srcOrigin = "; + return os; +} - os << *(params->psrcOrigin); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_kernel_get_sub_group_info_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_get_sub_group_info_params_t *params) { - os << ", "; - os << ".dstOrigin = "; + os << ".hKernel = "; - os << *(params->pdstOrigin); + details::printPtr(os, + *(params->phKernel)); os << ", "; - os << ".region = "; + os << ".hDevice = "; - os << *(params->pregion); + details::printPtr(os, + *(params->phDevice)); os << ", "; - os << ".srcRowPitch = "; + os << ".propName = "; - os << *(params->psrcRowPitch); + os << *(params->ppropName); os << ", "; - os << ".srcSlicePitch = "; + os << ".propSize = "; - os << *(params->psrcSlicePitch); + os << *(params->ppropSize); os << ", "; - os << ".dstRowPitch = "; - - os << *(params->pdstRowPitch); + os << ".pPropValue = "; + details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); os << ", "; - os << ".dstSlicePitch = "; + os << ".pPropSizeRet = "; - os << *(params->pdstSlicePitch); + details::printPtr(os, + *(params->ppPropSizeRet)); - os << ", "; - os << ".numSyncPointsInWaitList = "; + return os; +} - os << *(params->pnumSyncPointsInWaitList); +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ", "; - os << ".pSyncPointWaitList = "; + os << ".hKernel = "; - printPtr(os, *(params->ppSyncPointWaitList)); + details::printPtr(os, + *(params->phKernel)); - os << ", "; - os << ".pSyncPoint = "; + return os; +} + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_kernel_release_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_release_params_t *params) { + + os << ".hKernel = "; - printPtr(os, *(params->ppSyncPoint)); + details::printPtr(os, + *(params->phKernel)); 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_get_native_handle_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_get_native_handle_params_t *params) { - os << ".hCommandBuffer = "; + os << ".hKernel = "; - printPtr(os, *(params->phCommandBuffer)); + details::printPtr(os, + *(params->phKernel)); os << ", "; - os << ".hBuffer = "; + os << ".phNativeKernel = "; - printPtr(os, *(params->phBuffer)); + details::printPtr(os, + *(params->pphNativeKernel)); - os << ", "; - os << ".bufferOffset = "; + return os; +} - os << *(params->pbufferOffset); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_kernel_create_with_native_handle_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_create_with_native_handle_params_t *params) { - os << ", "; - os << ".hostOffset = "; + os << ".hNativeKernel = "; - os << *(params->phostOffset); + details::printPtr(os, + *(params->phNativeKernel)); os << ", "; - os << ".region = "; + os << ".hContext = "; - os << *(params->pregion); + details::printPtr(os, + *(params->phContext)); os << ", "; - os << ".bufferRowPitch = "; + os << ".hProgram = "; - os << *(params->pbufferRowPitch); + details::printPtr(os, + *(params->phProgram)); os << ", "; - os << ".bufferSlicePitch = "; + os << ".pProperties = "; - os << *(params->pbufferSlicePitch); + details::printPtr(os, + *(params->ppProperties)); os << ", "; - os << ".hostRowPitch = "; + os << ".phKernel = "; - os << *(params->phostRowPitch); + details::printPtr(os, + *(params->pphKernel)); - os << ", "; - os << ".hostSlicePitch = "; + return os; +} - os << *(params->phostSlicePitch); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_kernel_set_arg_value_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_set_arg_value_params_t *params) { + + os << ".hKernel = "; + + details::printPtr(os, + *(params->phKernel)); os << ", "; - os << ".pSrc = "; + os << ".argIndex = "; - printPtr(os, *(params->ppSrc)); + os << *(params->pargIndex); os << ", "; - os << ".numSyncPointsInWaitList = "; + os << ".argSize = "; - os << *(params->pnumSyncPointsInWaitList); + os << *(params->pargSize); os << ", "; - os << ".pSyncPointWaitList = "; + os << ".pProperties = "; - printPtr(os, *(params->ppSyncPointWaitList)); + details::printPtr(os, + *(params->ppProperties)); os << ", "; - os << ".pSyncPoint = "; + os << ".pArgValue = "; - printPtr(os, *(params->ppSyncPoint)); + details::printPtr(os, + *(params->ppArgValue)); 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_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 << ".hCommandBuffer = "; + os << ".hKernel = "; - printPtr(os, *(params->phCommandBuffer)); + details::printPtr(os, + *(params->phKernel)); os << ", "; - os << ".hBuffer = "; + os << ".argIndex = "; - printPtr(os, *(params->phBuffer)); + os << *(params->pargIndex); os << ", "; - os << ".bufferOffset = "; + os << ".argSize = "; - os << *(params->pbufferOffset); + os << *(params->pargSize); os << ", "; - os << ".hostOffset = "; + os << ".pProperties = "; - os << *(params->phostOffset); + details::printPtr(os, + *(params->ppProperties)); - os << ", "; - os << ".region = "; + return os; +} - os << *(params->pregion); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_kernel_set_arg_pointer_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_set_arg_pointer_params_t *params) { - os << ", "; - os << ".bufferRowPitch = "; + os << ".hKernel = "; - os << *(params->pbufferRowPitch); + details::printPtr(os, + *(params->phKernel)); os << ", "; - os << ".bufferSlicePitch = "; + os << ".argIndex = "; - os << *(params->pbufferSlicePitch); + os << *(params->pargIndex); os << ", "; - os << ".hostRowPitch = "; + os << ".pProperties = "; - os << *(params->phostRowPitch); + details::printPtr(os, + *(params->ppProperties)); os << ", "; - os << ".hostSlicePitch = "; + os << ".pArgValue = "; - os << *(params->phostSlicePitch); + details::printPtr(os, + *(params->ppArgValue)); - os << ", "; - os << ".pDst = "; + return os; +} - printPtr(os, *(params->ppDst)); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_kernel_set_exec_info_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_set_exec_info_params_t *params) { + + os << ".hKernel = "; + + details::printPtr(os, + *(params->phKernel)); os << ", "; - os << ".numSyncPointsInWaitList = "; + os << ".propName = "; - os << *(params->pnumSyncPointsInWaitList); + os << *(params->ppropName); os << ", "; - os << ".pSyncPointWaitList = "; + os << ".propSize = "; - printPtr(os, *(params->ppSyncPointWaitList)); + os << *(params->ppropSize); os << ", "; - os << ".pSyncPoint = "; + os << ".pProperties = "; - printPtr(os, *(params->ppSyncPoint)); + details::printPtr(os, + *(params->ppProperties)); + + os << ", "; + os << ".pPropValue = "; + details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); return os; } -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_command_buffer_append_mem_buffer_fill_exp_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_kernel_set_arg_sampler_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_set_arg_sampler_params_t *params) { - os << ".hCommandBuffer = "; + os << ".hKernel = "; - printPtr(os, *(params->phCommandBuffer)); + details::printPtr(os, + *(params->phKernel)); os << ", "; - os << ".hBuffer = "; + os << ".argIndex = "; - printPtr(os, *(params->phBuffer)); + os << *(params->pargIndex); os << ", "; - os << ".pPattern = "; + os << ".pProperties = "; - printPtr(os, *(params->ppPattern)); + details::printPtr(os, + *(params->ppProperties)); os << ", "; - os << ".patternSize = "; + os << ".hArgValue = "; - os << *(params->ppatternSize); + details::printPtr(os, + *(params->phArgValue)); - os << ", "; - os << ".offset = "; + return os; +} - os << *(params->poffset); +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ", "; - os << ".size = "; + os << ".hKernel = "; - os << *(params->psize); + details::printPtr(os, + *(params->phKernel)); os << ", "; - os << ".numSyncPointsInWaitList = "; + os << ".argIndex = "; - os << *(params->pnumSyncPointsInWaitList); + os << *(params->pargIndex); os << ", "; - os << ".pSyncPointWaitList = "; + os << ".pProperties = "; - printPtr(os, *(params->ppSyncPointWaitList)); + details::printPtr(os, + *(params->ppProperties)); os << ", "; - os << ".pSyncPoint = "; + os << ".hArgValue = "; - printPtr(os, *(params->ppSyncPoint)); + details::printPtr(os, + *(params->phArgValue)); 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)); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_kernel_set_specialization_constants_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_set_specialization_constants_params_t *params) { - os << ", "; - os << ".pMemory = "; + os << ".hKernel = "; - ur_params::serializePtr(os, *(params->ppMemory)); + details::printPtr(os, + *(params->phKernel)); os << ", "; - os << ".size = "; + os << ".count = "; - os << *(params->psize); + os << *(params->pcount); os << ", "; - os << ".flags = "; + os << ".pSpecConstants = "; - ur_params::serializeFlag(os, *(params->pflags)); + details::printPtr(os, + *(params->ppSpecConstants)); - os << ", "; - os << ".numSyncPointsInWaitList = "; + return os; +} - os << *(params->pnumSyncPointsInWaitList); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_kernel_suggest_max_cooperative_group_count_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_suggest_max_cooperative_group_count_exp_params_t *params) { - os << ", "; - os << ".pSyncPointWaitList = "; + os << ".hKernel = "; - ur_params::serializePtr(os, *(params->ppSyncPointWaitList)); + details::printPtr(os, + *(params->phKernel)); os << ", "; - os << ".pSyncPoint = "; + os << ".pGroupCountRet = "; - ur_params::serializePtr(os, *(params->ppSyncPoint)); + details::printPtr(os, + *(params->ppGroupCountRet)); return os; } -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_command_buffer_append_usm_advise_exp_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_sampler_create_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_sampler_create_params_t *params) { - os << ".hCommandBuffer = "; + os << ".hContext = "; - ur_params::serializePtr(os, *(params->phCommandBuffer)); + details::printPtr(os, + *(params->phContext)); os << ", "; - os << ".pMemory = "; + os << ".pDesc = "; - ur_params::serializePtr(os, *(params->ppMemory)); + details::printPtr(os, + *(params->ppDesc)); os << ", "; - os << ".size = "; + os << ".phSampler = "; - os << *(params->psize); + details::printPtr(os, + *(params->pphSampler)); - os << ", "; - os << ".advice = "; + return os; +} - ur_params::serializeFlag(os, *(params->padvice)); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_sampler_retain_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_sampler_retain_params_t *params) { - os << ", "; - os << ".numSyncPointsInWaitList = "; + os << ".hSampler = "; - os << *(params->pnumSyncPointsInWaitList); + details::printPtr(os, + *(params->phSampler)); - os << ", "; - os << ".pSyncPointWaitList = "; + return os; +} - ur_params::serializePtr(os, *(params->ppSyncPointWaitList)); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_sampler_release_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_sampler_release_params_t *params) { - os << ", "; - os << ".pSyncPoint = "; + os << ".hSampler = "; - ur_params::serializePtr(os, *(params->ppSyncPoint)); + details::printPtr(os, + *(params->phSampler)); 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_sampler_get_info_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_sampler_get_info_params_t *params) { - os << ".hCommandBuffer = "; + os << ".hSampler = "; - printPtr(os, *(params->phCommandBuffer)); + details::printPtr(os, + *(params->phSampler)); os << ", "; - os << ".hQueue = "; + os << ".propName = "; - printPtr(os, *(params->phQueue)); + os << *(params->ppropName); os << ", "; - os << ".numEventsInWaitList = "; + os << ".propSize = "; - os << *(params->pnumEventsInWaitList); + os << *(params->ppropSize); os << ", "; - os << ".phEventWaitList = {"; - for (size_t i = 0; *(params->pphEventWaitList) != NULL && - i < *params->pnumEventsInWaitList; - ++i) { - if (i != 0) { - os << ", "; - } - - printPtr(os, (*(params->pphEventWaitList))[i]); - } - os << "}"; + os << ".pPropValue = "; + details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); os << ", "; - os << ".phEvent = "; + os << ".pPropSizeRet = "; - printPtr(os, *(params->pphEvent)); + details::printPtr(os, + *(params->ppPropSizeRet)); 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_sampler_get_native_handle_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_sampler_get_native_handle_params_t *params) { - os << ".DeviceCount = "; + os << ".hSampler = "; - os << *(params->pDeviceCount); + details::printPtr(os, + *(params->phSampler)); os << ", "; - os << ".phDevices = {"; - for (size_t i = 0; - *(params->pphDevices) != NULL && i < *params->pDeviceCount; ++i) { - if (i != 0) { - os << ", "; - } + os << ".phNativeSampler = "; - printPtr(os, (*(params->pphDevices))[i]); - } - os << "}"; + details::printPtr(os, + *(params->pphNativeSampler)); + + return os; +} + +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; + + details::printPtr(os, + *(params->phNativeSampler)); + + os << ", "; + os << ".hContext = "; + + details::printPtr(os, + *(params->phContext)); os << ", "; os << ".pProperties = "; - printPtr(os, *(params->ppProperties)); + details::printPtr(os, + *(params->ppProperties)); os << ", "; - os << ".phContext = "; + os << ".phSampler = "; - printPtr(os, *(params->pphContext)); + details::printPtr(os, + *(params->pphSampler)); 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_mem_image_create_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_mem_image_create_params_t *params) { os << ".hContext = "; - printPtr(os, *(params->phContext)); + details::printPtr(os, + *(params->phContext)); - return os; -} + os << ", "; + os << ".flags = "; -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_context_release_params_t *params) { + details::printFlag(os, + *(params->pflags)); - os << ".hContext = "; + os << ", "; + os << ".pImageFormat = "; + + details::printPtr(os, + *(params->ppImageFormat)); + + os << ", "; + os << ".pImageDesc = "; + + details::printPtr(os, + *(params->ppImageDesc)); - printPtr(os, *(params->phContext)); + os << ", "; + os << ".pHost = "; + + details::printPtr(os, + *(params->ppHost)); + + os << ", "; + os << ".phMem = "; + + details::printPtr(os, + *(params->pphMem)); return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_context_get_info_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_mem_buffer_create_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_mem_buffer_create_params_t *params) { os << ".hContext = "; - printPtr(os, *(params->phContext)); + details::printPtr(os, + *(params->phContext)); os << ", "; - os << ".propName = "; + os << ".flags = "; - os << *(params->ppropName); + details::printFlag(os, + *(params->pflags)); os << ", "; - os << ".propSize = "; + os << ".size = "; - os << *(params->ppropSize); + os << *(params->psize); os << ", "; - os << ".pPropValue = "; - printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + os << ".pProperties = "; + + details::printPtr(os, + *(params->ppProperties)); os << ", "; - os << ".pPropSizeRet = "; + os << ".phBuffer = "; - printPtr(os, *(params->ppPropSizeRet)); + details::printPtr(os, + *(params->pphBuffer)); 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_mem_retain_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_mem_retain_params_t *params) { - os << ".hContext = "; + os << ".hMem = "; - printPtr(os, *(params->phContext)); + details::printPtr(os, + *(params->phMem)); - os << ", "; - os << ".phNativeContext = "; + return os; +} + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_mem_release_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_mem_release_params_t *params) { + + os << ".hMem = "; - printPtr(os, *(params->pphNativeContext)); + details::printPtr(os, + *(params->phMem)); 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_mem_buffer_partition_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_mem_buffer_partition_params_t *params) { - os << ".hNativeContext = "; + os << ".hBuffer = "; - printPtr(os, *(params->phNativeContext)); + details::printPtr(os, + *(params->phBuffer)); os << ", "; - os << ".numDevices = "; + os << ".flags = "; - os << *(params->pnumDevices); + details::printFlag(os, + *(params->pflags)); os << ", "; - os << ".phDevices = {"; - for (size_t i = 0; - *(params->pphDevices) != NULL && i < *params->pnumDevices; ++i) { - if (i != 0) { - os << ", "; - } + os << ".bufferCreateType = "; - printPtr(os, (*(params->pphDevices))[i]); - } - os << "}"; + os << *(params->pbufferCreateType); os << ", "; - os << ".pProperties = "; + os << ".pRegion = "; - printPtr(os, *(params->ppProperties)); + details::printPtr(os, + *(params->ppRegion)); os << ", "; - os << ".phContext = "; + os << ".phMem = "; - printPtr(os, *(params->pphContext)); + details::printPtr(os, + *(params->pphMem)); return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_context_set_extended_deleter_params_t - *params) { - - os << ".hContext = "; - - printPtr(os, *(params->phContext)); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_mem_get_native_handle_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_mem_get_native_handle_params_t *params) { - os << ", "; - os << ".pfnDeleter = "; + os << ".hMem = "; - os << reinterpret_cast(*(params->ppfnDeleter)); + details::printPtr(os, + *(params->phMem)); os << ", "; - os << ".pUserData = "; + os << ".phNativeMem = "; - printPtr(os, *(params->ppUserData)); + details::printPtr(os, + *(params->pphNativeMem)); 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_mem_buffer_create_with_native_handle_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_mem_buffer_create_with_native_handle_params_t *params) { - os << ".hQueue = "; + os << ".hNativeMem = "; - printPtr(os, *(params->phQueue)); + details::printPtr(os, + *(params->phNativeMem)); os << ", "; - os << ".hKernel = "; + os << ".hContext = "; - printPtr(os, *(params->phKernel)); + details::printPtr(os, + *(params->phContext)); os << ", "; - os << ".workDim = "; + os << ".pProperties = "; - os << *(params->pworkDim); + details::printPtr(os, + *(params->ppProperties)); os << ", "; - os << ".pGlobalWorkOffset = "; + os << ".phMem = "; + + details::printPtr(os, + *(params->pphMem)); + + return os; +} + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_mem_image_create_with_native_handle_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_mem_image_create_with_native_handle_params_t *params) { + + os << ".hNativeMem = "; - printPtr(os, *(params->ppGlobalWorkOffset)); + details::printPtr(os, + *(params->phNativeMem)); os << ", "; - os << ".pGlobalWorkSize = "; + os << ".hContext = "; - printPtr(os, *(params->ppGlobalWorkSize)); + details::printPtr(os, + *(params->phContext)); os << ", "; - os << ".pLocalWorkSize = "; + os << ".pImageFormat = "; - printPtr(os, *(params->ppLocalWorkSize)); + details::printPtr(os, + *(params->ppImageFormat)); os << ", "; - os << ".numEventsInWaitList = "; + os << ".pImageDesc = "; - os << *(params->pnumEventsInWaitList); + details::printPtr(os, + *(params->ppImageDesc)); os << ", "; - os << ".phEventWaitList = {"; - for (size_t i = 0; *(params->pphEventWaitList) != NULL && - i < *params->pnumEventsInWaitList; - ++i) { - if (i != 0) { - os << ", "; - } + os << ".pProperties = "; - printPtr(os, (*(params->pphEventWaitList))[i]); - } - os << "}"; + details::printPtr(os, + *(params->ppProperties)); os << ", "; - os << ".phEvent = "; + os << ".phMem = "; - printPtr(os, *(params->pphEvent)); + details::printPtr(os, + *(params->pphMem)); 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_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 << ".hQueue = "; + os << ".hMemory = "; - printPtr(os, *(params->phQueue)); + details::printPtr(os, + *(params->phMemory)); os << ", "; - os << ".numEventsInWaitList = "; + os << ".propName = "; - os << *(params->pnumEventsInWaitList); + os << *(params->ppropName); os << ", "; - os << ".phEventWaitList = {"; - for (size_t i = 0; *(params->pphEventWaitList) != NULL && - i < *params->pnumEventsInWaitList; - ++i) { - if (i != 0) { - os << ", "; - } + os << ".propSize = "; - printPtr(os, (*(params->pphEventWaitList))[i]); - } - os << "}"; + os << *(params->ppropSize); os << ", "; - os << ".phEvent = "; + os << ".pPropValue = "; + details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); + + os << ", "; + os << ".pPropSizeRet = "; - printPtr(os, *(params->pphEvent)); + details::printPtr(os, + *(params->ppPropSizeRet)); 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_mem_image_get_info_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_mem_image_get_info_params_t *params) { - os << ".hQueue = "; + os << ".hMemory = "; - printPtr(os, *(params->phQueue)); + details::printPtr(os, + *(params->phMemory)); os << ", "; - os << ".numEventsInWaitList = "; + os << ".propName = "; - os << *(params->pnumEventsInWaitList); + os << *(params->ppropName); os << ", "; - os << ".phEventWaitList = {"; - for (size_t i = 0; *(params->pphEventWaitList) != NULL && - i < *params->pnumEventsInWaitList; - ++i) { - if (i != 0) { - os << ", "; - } + os << ".propSize = "; - printPtr(os, (*(params->pphEventWaitList))[i]); - } - os << "}"; + os << *(params->ppropSize); os << ", "; - os << ".phEvent = "; + os << ".pPropValue = "; + details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); + + os << ", "; + os << ".pPropSizeRet = "; - printPtr(os, *(params->pphEvent)); + details::printPtr(os, + *(params->ppPropSizeRet)); 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_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 << ".hQueue = "; + os << ".hContext = "; - printPtr(os, *(params->phQueue)); + details::printPtr(os, + *(params->phContext)); os << ", "; - os << ".hBuffer = "; + os << ".hDevice = "; - printPtr(os, *(params->phBuffer)); + details::printPtr(os, + *(params->phDevice)); os << ", "; - os << ".blockingRead = "; + os << ".size = "; - os << *(params->pblockingRead); + os << *(params->psize); os << ", "; - os << ".offset = "; + os << ".pProperties = "; - os << *(params->poffset); + details::printPtr(os, + *(params->ppProperties)); os << ", "; - os << ".size = "; + os << ".phPhysicalMem = "; - os << *(params->psize); + details::printPtr(os, + *(params->pphPhysicalMem)); - os << ", "; - os << ".pDst = "; + return os; +} - printPtr(os, *(params->ppDst)); +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ", "; - os << ".numEventsInWaitList = "; + os << ".hPhysicalMem = "; - os << *(params->pnumEventsInWaitList); + details::printPtr(os, + *(params->phPhysicalMem)); + + return os; +} + +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; + + details::printPtr(os, + *(params->phPhysicalMem)); + + return os; +} + +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; + + os << *(params->pNumEntries); os << ", "; - os << ".phEventWaitList = {"; - for (size_t i = 0; *(params->pphEventWaitList) != NULL && - i < *params->pnumEventsInWaitList; - ++i) { + os << ".phAdapters = {"; + for (size_t i = 0; *(params->pphAdapters) != NULL && i < *params->pNumEntries; ++i) { if (i != 0) { os << ", "; } - printPtr(os, (*(params->pphEventWaitList))[i]); + details::printPtr(os, + (*(params->pphAdapters))[i]); } os << "}"; os << ", "; - os << ".phEvent = "; + os << ".pNumAdapters = "; - printPtr(os, *(params->pphEvent)); + details::printPtr(os, + *(params->ppNumAdapters)); 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_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 << ".hQueue = "; + os << ".hAdapter = "; - printPtr(os, *(params->phQueue)); + details::printPtr(os, + *(params->phAdapter)); - os << ", "; - os << ".hBuffer = "; + return os; +} - printPtr(os, *(params->phBuffer)); +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ", "; - os << ".blockingWrite = "; + os << ".hAdapter = "; - os << *(params->pblockingWrite); + details::printPtr(os, + *(params->phAdapter)); - os << ", "; - os << ".offset = "; + return os; +} - os << *(params->poffset); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_adapter_get_last_error_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_adapter_get_last_error_params_t *params) { + + os << ".hAdapter = "; + + details::printPtr(os, + *(params->phAdapter)); os << ", "; - os << ".size = "; + os << ".ppMessage = "; - os << *(params->psize); + details::printPtr(os, + *(params->pppMessage)); os << ", "; - os << ".pSrc = "; + os << ".pError = "; + + details::printPtr(os, + *(params->ppError)); + + return os; +} + +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; - printPtr(os, *(params->ppSrc)); + details::printPtr(os, + *(params->phAdapter)); os << ", "; - os << ".numEventsInWaitList = "; + os << ".propName = "; - os << *(params->pnumEventsInWaitList); + os << *(params->ppropName); os << ", "; - os << ".phEventWaitList = {"; - for (size_t i = 0; *(params->pphEventWaitList) != NULL && - i < *params->pnumEventsInWaitList; - ++i) { - if (i != 0) { - os << ", "; - } + os << ".propSize = "; - printPtr(os, (*(params->pphEventWaitList))[i]); - } - os << "}"; + os << *(params->ppropSize); os << ", "; - os << ".phEvent = "; + os << ".pPropValue = "; + details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); + + os << ", "; + os << ".pPropSizeRet = "; - printPtr(os, *(params->pphEvent)); + details::printPtr(os, + *(params->ppPropSizeRet)); 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_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 = "; - printPtr(os, *(params->phQueue)); + details::printPtr(os, + *(params->phQueue)); os << ", "; - os << ".hBuffer = "; + os << ".hKernel = "; - printPtr(os, *(params->phBuffer)); + details::printPtr(os, + *(params->phKernel)); os << ", "; - os << ".blockingRead = "; + os << ".workDim = "; - os << *(params->pblockingRead); + os << *(params->pworkDim); + + os << ", "; + os << ".pGlobalWorkOffset = "; + + details::printPtr(os, + *(params->ppGlobalWorkOffset)); + + os << ", "; + os << ".pGlobalWorkSize = "; + + details::printPtr(os, + *(params->ppGlobalWorkSize)); + + os << ", "; + os << ".pLocalWorkSize = "; + + details::printPtr(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 << ", "; + } + + details::printPtr(os, + (*(params->pphEventWaitList))[i]); + } + os << "}"; + + os << ", "; + os << ".phEvent = "; + + details::printPtr(os, + *(params->pphEvent)); + + return os; +} + +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; + + details::printPtr(os, + *(params->phQueue)); + + 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 << ", "; + } + + details::printPtr(os, + (*(params->pphEventWaitList))[i]); + } + os << "}"; + + os << ", "; + os << ".phEvent = "; + + details::printPtr(os, + *(params->pphEvent)); + + return os; +} + +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; + + details::printPtr(os, + *(params->phQueue)); + + 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 << ", "; + } + + details::printPtr(os, + (*(params->pphEventWaitList))[i]); + } + os << "}"; + + os << ", "; + os << ".phEvent = "; + + details::printPtr(os, + *(params->pphEvent)); + + return os; +} + +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; + + details::printPtr(os, + *(params->phQueue)); + + os << ", "; + os << ".hBuffer = "; + + details::printPtr(os, + *(params->phBuffer)); + + os << ", "; + os << ".blockingRead = "; + + os << *(params->pblockingRead); + + os << ", "; + os << ".offset = "; + + os << *(params->poffset); + + os << ", "; + os << ".size = "; + + os << *(params->psize); + + os << ", "; + os << ".pDst = "; + + details::printPtr(os, + *(params->ppDst)); + + 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 << ", "; + } + + details::printPtr(os, + (*(params->pphEventWaitList))[i]); + } + os << "}"; + + os << ", "; + os << ".phEvent = "; + + details::printPtr(os, + *(params->pphEvent)); + + return os; +} + +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; + + details::printPtr(os, + *(params->phQueue)); + + os << ", "; + os << ".hBuffer = "; + + details::printPtr(os, + *(params->phBuffer)); + + os << ", "; + os << ".blockingWrite = "; + + os << *(params->pblockingWrite); + + os << ", "; + os << ".offset = "; + + os << *(params->poffset); + + os << ", "; + os << ".size = "; + + os << *(params->psize); + + os << ", "; + os << ".pSrc = "; + + details::printPtr(os, + *(params->ppSrc)); + + 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 << ", "; + } + + details::printPtr(os, + (*(params->pphEventWaitList))[i]); + } + os << "}"; + + os << ", "; + os << ".phEvent = "; + + details::printPtr(os, + *(params->pphEvent)); + + return os; +} + +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; + + details::printPtr(os, + *(params->phQueue)); + + os << ", "; + os << ".hBuffer = "; + + details::printPtr(os, + *(params->phBuffer)); + + os << ", "; + os << ".blockingRead = "; + + os << *(params->pblockingRead); os << ", "; os << ".bufferOrigin = "; @@ -11896,7 +11698,8 @@ inline std::ostream &operator<<( os << ", "; os << ".pDst = "; - printPtr(os, *(params->ppDst)); + details::printPtr(os, + *(params->ppDst)); os << ", "; os << ".numEventsInWaitList = "; @@ -11905,38 +11708,41 @@ inline std::ostream &operator<<( os << ", "; os << ".phEventWaitList = {"; - for (size_t i = 0; *(params->pphEventWaitList) != NULL && - i < *params->pnumEventsInWaitList; - ++i) { + for (size_t i = 0; *(params->pphEventWaitList) != NULL && i < *params->pnumEventsInWaitList; ++i) { if (i != 0) { os << ", "; } - printPtr(os, (*(params->pphEventWaitList))[i]); + details::printPtr(os, + (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - printPtr(os, *(params->pphEvent)); + details::printPtr(os, + *(params->pphEvent)); 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 = "; - printPtr(os, *(params->phQueue)); + details::printPtr(os, + *(params->phQueue)); os << ", "; os << ".hBuffer = "; - printPtr(os, *(params->phBuffer)); + details::printPtr(os, + *(params->phBuffer)); os << ", "; os << ".blockingWrite = "; @@ -11981,7 +11787,8 @@ inline std::ostream &operator<<( os << ", "; os << ".pSrc = "; - printPtr(os, *(params->ppSrc)); + details::printPtr(os, + *(params->ppSrc)); os << ", "; os << ".numEventsInWaitList = "; @@ -11990,42 +11797,47 @@ inline std::ostream &operator<<( os << ", "; os << ".phEventWaitList = {"; - for (size_t i = 0; *(params->pphEventWaitList) != NULL && - i < *params->pnumEventsInWaitList; - ++i) { + for (size_t i = 0; *(params->pphEventWaitList) != NULL && i < *params->pnumEventsInWaitList; ++i) { if (i != 0) { os << ", "; } - printPtr(os, (*(params->pphEventWaitList))[i]); + details::printPtr(os, + (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - printPtr(os, *(params->pphEvent)); + details::printPtr(os, + *(params->pphEvent)); 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 = "; - printPtr(os, *(params->phQueue)); + details::printPtr(os, + *(params->phQueue)); os << ", "; os << ".hBufferSrc = "; - printPtr(os, *(params->phBufferSrc)); + details::printPtr(os, + *(params->phBufferSrc)); os << ", "; os << ".hBufferDst = "; - printPtr(os, *(params->phBufferDst)); + details::printPtr(os, + *(params->phBufferDst)); os << ", "; os << ".srcOffset = "; @@ -12049,43 +11861,47 @@ inline std::ostream &operator<<( os << ", "; os << ".phEventWaitList = {"; - for (size_t i = 0; *(params->pphEventWaitList) != NULL && - i < *params->pnumEventsInWaitList; - ++i) { + for (size_t i = 0; *(params->pphEventWaitList) != NULL && i < *params->pnumEventsInWaitList; ++i) { if (i != 0) { os << ", "; } - printPtr(os, (*(params->pphEventWaitList))[i]); + details::printPtr(os, + (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - printPtr(os, *(params->pphEvent)); + details::printPtr(os, + *(params->pphEvent)); 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 = "; - printPtr(os, *(params->phQueue)); + details::printPtr(os, + *(params->phQueue)); os << ", "; os << ".hBufferSrc = "; - printPtr(os, *(params->phBufferSrc)); + details::printPtr(os, + *(params->phBufferSrc)); os << ", "; os << ".hBufferDst = "; - printPtr(os, *(params->phBufferDst)); + details::printPtr(os, + *(params->phBufferDst)); os << ", "; os << ".srcOrigin = "; @@ -12129,42 +11945,47 @@ inline std::ostream &operator<<( os << ", "; os << ".phEventWaitList = {"; - for (size_t i = 0; *(params->pphEventWaitList) != NULL && - i < *params->pnumEventsInWaitList; - ++i) { + for (size_t i = 0; *(params->pphEventWaitList) != NULL && i < *params->pnumEventsInWaitList; ++i) { if (i != 0) { os << ", "; } - printPtr(os, (*(params->pphEventWaitList))[i]); + details::printPtr(os, + (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - printPtr(os, *(params->pphEvent)); + details::printPtr(os, + *(params->pphEvent)); 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 = "; - printPtr(os, *(params->phQueue)); + details::printPtr(os, + *(params->phQueue)); os << ", "; os << ".hBuffer = "; - printPtr(os, *(params->phBuffer)); + details::printPtr(os, + *(params->phBuffer)); os << ", "; os << ".pPattern = "; - printPtr(os, *(params->ppPattern)); + details::printPtr(os, + *(params->ppPattern)); os << ", "; os << ".patternSize = "; @@ -12188,37 +12009,41 @@ inline std::ostream &operator<<( os << ", "; os << ".phEventWaitList = {"; - for (size_t i = 0; *(params->pphEventWaitList) != NULL && - i < *params->pnumEventsInWaitList; - ++i) { + for (size_t i = 0; *(params->pphEventWaitList) != NULL && i < *params->pnumEventsInWaitList; ++i) { if (i != 0) { os << ", "; } - printPtr(os, (*(params->pphEventWaitList))[i]); + details::printPtr(os, + (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - printPtr(os, *(params->pphEvent)); + details::printPtr(os, + *(params->pphEvent)); 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 = "; - printPtr(os, *(params->phQueue)); + details::printPtr(os, + *(params->phQueue)); os << ", "; os << ".hImage = "; - printPtr(os, *(params->phImage)); + details::printPtr(os, + *(params->phImage)); os << ", "; os << ".blockingRead = "; @@ -12248,7 +12073,8 @@ inline std::ostream &operator<<( os << ", "; os << ".pDst = "; - printPtr(os, *(params->ppDst)); + details::printPtr(os, + *(params->ppDst)); os << ", "; os << ".numEventsInWaitList = "; @@ -12257,37 +12083,41 @@ inline std::ostream &operator<<( os << ", "; os << ".phEventWaitList = {"; - for (size_t i = 0; *(params->pphEventWaitList) != NULL && - i < *params->pnumEventsInWaitList; - ++i) { + for (size_t i = 0; *(params->pphEventWaitList) != NULL && i < *params->pnumEventsInWaitList; ++i) { if (i != 0) { os << ", "; } - printPtr(os, (*(params->pphEventWaitList))[i]); + details::printPtr(os, + (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - printPtr(os, *(params->pphEvent)); + details::printPtr(os, + *(params->pphEvent)); 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 = "; - printPtr(os, *(params->phQueue)); + details::printPtr(os, + *(params->phQueue)); os << ", "; os << ".hImage = "; - printPtr(os, *(params->phImage)); + details::printPtr(os, + *(params->phImage)); os << ", "; os << ".blockingWrite = "; @@ -12317,7 +12147,8 @@ inline std::ostream &operator<<( os << ", "; os << ".pSrc = "; - printPtr(os, *(params->ppSrc)); + details::printPtr(os, + *(params->ppSrc)); os << ", "; os << ".numEventsInWaitList = "; @@ -12326,42 +12157,47 @@ inline std::ostream &operator<<( os << ", "; os << ".phEventWaitList = {"; - for (size_t i = 0; *(params->pphEventWaitList) != NULL && - i < *params->pnumEventsInWaitList; - ++i) { + for (size_t i = 0; *(params->pphEventWaitList) != NULL && i < *params->pnumEventsInWaitList; ++i) { if (i != 0) { os << ", "; } - printPtr(os, (*(params->pphEventWaitList))[i]); + details::printPtr(os, + (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - printPtr(os, *(params->pphEvent)); + details::printPtr(os, + *(params->pphEvent)); 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 = "; - printPtr(os, *(params->phQueue)); + details::printPtr(os, + *(params->phQueue)); os << ", "; os << ".hImageSrc = "; - printPtr(os, *(params->phImageSrc)); + details::printPtr(os, + *(params->phImageSrc)); os << ", "; os << ".hImageDst = "; - printPtr(os, *(params->phImageDst)); + details::printPtr(os, + *(params->phImageDst)); os << ", "; os << ".srcOrigin = "; @@ -12385,37 +12221,41 @@ inline std::ostream &operator<<( os << ", "; os << ".phEventWaitList = {"; - for (size_t i = 0; *(params->pphEventWaitList) != NULL && - i < *params->pnumEventsInWaitList; - ++i) { + for (size_t i = 0; *(params->pphEventWaitList) != NULL && i < *params->pnumEventsInWaitList; ++i) { if (i != 0) { os << ", "; } - printPtr(os, (*(params->pphEventWaitList))[i]); + details::printPtr(os, + (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - printPtr(os, *(params->pphEvent)); + details::printPtr(os, + *(params->pphEvent)); 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 = "; - printPtr(os, *(params->phQueue)); + details::printPtr(os, + *(params->phQueue)); os << ", "; os << ".hBuffer = "; - printPtr(os, *(params->phBuffer)); + details::printPtr(os, + *(params->phBuffer)); os << ", "; os << ".blockingMap = "; @@ -12425,7 +12265,8 @@ inline std::ostream &operator<<( os << ", "; os << ".mapFlags = "; - printFlag(os, *(params->pmapFlags)); + details::printFlag(os, + *(params->pmapFlags)); os << ", "; os << ".offset = "; @@ -12444,47 +12285,53 @@ inline std::ostream &operator<<( os << ", "; os << ".phEventWaitList = {"; - for (size_t i = 0; *(params->pphEventWaitList) != NULL && - i < *params->pnumEventsInWaitList; - ++i) { + for (size_t i = 0; *(params->pphEventWaitList) != NULL && i < *params->pnumEventsInWaitList; ++i) { if (i != 0) { os << ", "; } - printPtr(os, (*(params->pphEventWaitList))[i]); + details::printPtr(os, + (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - printPtr(os, *(params->pphEvent)); + details::printPtr(os, + *(params->pphEvent)); os << ", "; os << ".ppRetMap = "; - printPtr(os, *(params->pppRetMap)); + details::printPtr(os, + *(params->pppRetMap)); 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 = "; - printPtr(os, *(params->phQueue)); + details::printPtr(os, + *(params->phQueue)); os << ", "; os << ".hMem = "; - printPtr(os, *(params->phMem)); + details::printPtr(os, + *(params->phMem)); os << ", "; os << ".pMappedPtr = "; - printPtr(os, *(params->ppMappedPtr)); + details::printPtr(os, + *(params->ppMappedPtr)); os << ", "; os << ".numEventsInWaitList = "; @@ -12493,37 +12340,41 @@ inline std::ostream &operator<<( os << ", "; os << ".phEventWaitList = {"; - for (size_t i = 0; *(params->pphEventWaitList) != NULL && - i < *params->pnumEventsInWaitList; - ++i) { + for (size_t i = 0; *(params->pphEventWaitList) != NULL && i < *params->pnumEventsInWaitList; ++i) { if (i != 0) { os << ", "; } - printPtr(os, (*(params->pphEventWaitList))[i]); + details::printPtr(os, + (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - printPtr(os, *(params->pphEvent)); + details::printPtr(os, + *(params->pphEvent)); 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 = "; - printPtr(os, *(params->phQueue)); + details::printPtr(os, + *(params->phQueue)); os << ", "; os << ".ptr = "; - printPtr(os, *(params->pptr)); + details::printPtr(os, + *(params->pptr)); os << ", "; os << ".patternSize = "; @@ -12533,7 +12384,8 @@ operator<<(std::ostream &os, os << ", "; os << ".pPattern = "; - printPtr(os, *(params->ppPattern)); + details::printPtr(os, + *(params->ppPattern)); os << ", "; os << ".size = "; @@ -12547,32 +12399,35 @@ operator<<(std::ostream &os, os << ", "; os << ".phEventWaitList = {"; - for (size_t i = 0; *(params->pphEventWaitList) != NULL && - i < *params->pnumEventsInWaitList; - ++i) { + for (size_t i = 0; *(params->pphEventWaitList) != NULL && i < *params->pnumEventsInWaitList; ++i) { if (i != 0) { os << ", "; } - printPtr(os, (*(params->pphEventWaitList))[i]); + details::printPtr(os, + (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - printPtr(os, *(params->pphEvent)); + details::printPtr(os, + *(params->pphEvent)); 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 = "; - printPtr(os, *(params->phQueue)); + details::printPtr(os, + *(params->phQueue)); os << ", "; os << ".blocking = "; @@ -12582,12 +12437,14 @@ inline std::ostream &operator<<( os << ", "; os << ".pDst = "; - printPtr(os, *(params->ppDst)); + details::printPtr(os, + *(params->ppDst)); os << ", "; os << ".pSrc = "; - printPtr(os, *(params->ppSrc)); + details::printPtr(os, + *(params->ppSrc)); os << ", "; os << ".size = "; @@ -12601,37 +12458,41 @@ inline std::ostream &operator<<( os << ", "; os << ".phEventWaitList = {"; - for (size_t i = 0; *(params->pphEventWaitList) != NULL && - i < *params->pnumEventsInWaitList; - ++i) { + for (size_t i = 0; *(params->pphEventWaitList) != NULL && i < *params->pnumEventsInWaitList; ++i) { if (i != 0) { os << ", "; } - printPtr(os, (*(params->pphEventWaitList))[i]); + details::printPtr(os, + (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - printPtr(os, *(params->pphEvent)); + details::printPtr(os, + *(params->pphEvent)); 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 = "; - printPtr(os, *(params->phQueue)); + details::printPtr(os, + *(params->phQueue)); os << ", "; os << ".pMem = "; - printPtr(os, *(params->ppMem)); + details::printPtr(os, + *(params->ppMem)); os << ", "; os << ".size = "; @@ -12641,7 +12502,8 @@ inline std::ostream &operator<<( os << ", "; os << ".flags = "; - printFlag(os, *(params->pflags)); + details::printFlag(os, + *(params->pflags)); os << ", "; os << ".numEventsInWaitList = "; @@ -12650,37 +12512,41 @@ inline std::ostream &operator<<( os << ", "; os << ".phEventWaitList = {"; - for (size_t i = 0; *(params->pphEventWaitList) != NULL && - i < *params->pnumEventsInWaitList; - ++i) { + for (size_t i = 0; *(params->pphEventWaitList) != NULL && i < *params->pnumEventsInWaitList; ++i) { if (i != 0) { os << ", "; } - printPtr(os, (*(params->pphEventWaitList))[i]); + details::printPtr(os, + (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - printPtr(os, *(params->pphEvent)); + details::printPtr(os, + *(params->pphEvent)); 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 = "; - printPtr(os, *(params->phQueue)); + details::printPtr(os, + *(params->phQueue)); os << ", "; os << ".pMem = "; - printPtr(os, *(params->ppMem)); + details::printPtr(os, + *(params->ppMem)); os << ", "; os << ".size = "; @@ -12690,28 +12556,34 @@ inline std::ostream &operator<<( os << ", "; os << ".advice = "; - printFlag(os, *(params->padvice)); + details::printFlag(os, + *(params->padvice)); os << ", "; os << ".phEvent = "; - printPtr(os, *(params->pphEvent)); + details::printPtr(os, + *(params->pphEvent)); 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 = "; - printPtr(os, *(params->phQueue)); + details::printPtr(os, + *(params->phQueue)); os << ", "; os << ".pMem = "; - printPtr(os, *(params->ppMem)); + details::printPtr(os, + *(params->ppMem)); os << ", "; os << ".pitch = "; @@ -12726,7 +12598,8 @@ inline std::ostream &operator<<( os << ", "; os << ".pPattern = "; - printPtr(os, *(params->ppPattern)); + details::printPtr(os, + *(params->ppPattern)); os << ", "; os << ".width = "; @@ -12745,32 +12618,35 @@ inline std::ostream &operator<<( os << ", "; os << ".phEventWaitList = {"; - for (size_t i = 0; *(params->pphEventWaitList) != NULL && - i < *params->pnumEventsInWaitList; - ++i) { + for (size_t i = 0; *(params->pphEventWaitList) != NULL && i < *params->pnumEventsInWaitList; ++i) { if (i != 0) { os << ", "; } - printPtr(os, (*(params->pphEventWaitList))[i]); + details::printPtr(os, + (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - printPtr(os, *(params->pphEvent)); + details::printPtr(os, + *(params->pphEvent)); 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 = "; - printPtr(os, *(params->phQueue)); + details::printPtr(os, + *(params->phQueue)); os << ", "; os << ".blocking = "; @@ -12780,7 +12656,8 @@ inline std::ostream &operator<<( os << ", "; os << ".pDst = "; - printPtr(os, *(params->ppDst)); + details::printPtr(os, + *(params->ppDst)); os << ", "; os << ".dstPitch = "; @@ -12790,7 +12667,8 @@ inline std::ostream &operator<<( os << ", "; os << ".pSrc = "; - printPtr(os, *(params->ppSrc)); + details::printPtr(os, + *(params->ppSrc)); os << ", "; os << ".srcPitch = "; @@ -12814,42 +12692,47 @@ inline std::ostream &operator<<( os << ", "; os << ".phEventWaitList = {"; - for (size_t i = 0; *(params->pphEventWaitList) != NULL && - i < *params->pnumEventsInWaitList; - ++i) { + for (size_t i = 0; *(params->pphEventWaitList) != NULL && i < *params->pnumEventsInWaitList; ++i) { if (i != 0) { os << ", "; } - printPtr(os, (*(params->pphEventWaitList))[i]); + details::printPtr(os, + (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - printPtr(os, *(params->pphEvent)); + details::printPtr(os, + *(params->pphEvent)); 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 = "; - printPtr(os, *(params->phQueue)); + details::printPtr(os, + *(params->phQueue)); os << ", "; os << ".hProgram = "; - printPtr(os, *(params->phProgram)); + details::printPtr(os, + *(params->phProgram)); os << ", "; os << ".name = "; - printPtr(os, *(params->pname)); + details::printPtr(os, + *(params->pname)); os << ", "; os << ".blockingWrite = "; @@ -12869,7 +12752,8 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".pSrc = "; - printPtr(os, *(params->ppSrc)); + details::printPtr(os, + *(params->ppSrc)); os << ", "; os << ".numEventsInWaitList = "; @@ -12878,42 +12762,47 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".phEventWaitList = {"; - for (size_t i = 0; *(params->pphEventWaitList) != NULL && - i < *params->pnumEventsInWaitList; - ++i) { + for (size_t i = 0; *(params->pphEventWaitList) != NULL && i < *params->pnumEventsInWaitList; ++i) { if (i != 0) { os << ", "; } - printPtr(os, (*(params->pphEventWaitList))[i]); + details::printPtr(os, + (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - printPtr(os, *(params->pphEvent)); + details::printPtr(os, + *(params->pphEvent)); 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 = "; - printPtr(os, *(params->phQueue)); + details::printPtr(os, + *(params->phQueue)); os << ", "; os << ".hProgram = "; - printPtr(os, *(params->phProgram)); + details::printPtr(os, + *(params->phProgram)); os << ", "; os << ".name = "; - printPtr(os, *(params->pname)); + details::printPtr(os, + *(params->pname)); os << ", "; os << ".blockingRead = "; @@ -12933,7 +12822,8 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".pDst = "; - printPtr(os, *(params->ppDst)); + details::printPtr(os, + *(params->ppDst)); os << ", "; os << ".numEventsInWaitList = "; @@ -12942,42 +12832,47 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".phEventWaitList = {"; - for (size_t i = 0; *(params->pphEventWaitList) != NULL && - i < *params->pnumEventsInWaitList; - ++i) { + for (size_t i = 0; *(params->pphEventWaitList) != NULL && i < *params->pnumEventsInWaitList; ++i) { if (i != 0) { os << ", "; } - printPtr(os, (*(params->pphEventWaitList))[i]); + details::printPtr(os, + (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - printPtr(os, *(params->pphEvent)); + details::printPtr(os, + *(params->pphEvent)); 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 = "; - printPtr(os, *(params->phQueue)); + details::printPtr(os, + *(params->phQueue)); os << ", "; os << ".hProgram = "; - printPtr(os, *(params->phProgram)); + details::printPtr(os, + *(params->phProgram)); os << ", "; os << ".pipe_symbol = "; - printPtr(os, *(params->ppipe_symbol)); + details::printPtr(os, + *(params->ppipe_symbol)); os << ", "; os << ".blocking = "; @@ -12987,7 +12882,8 @@ inline std::ostream &operator<<( os << ", "; os << ".pDst = "; - printPtr(os, *(params->ppDst)); + details::printPtr(os, + *(params->ppDst)); os << ", "; os << ".size = "; @@ -13001,42 +12897,47 @@ inline std::ostream &operator<<( os << ", "; os << ".phEventWaitList = {"; - for (size_t i = 0; *(params->pphEventWaitList) != NULL && - i < *params->pnumEventsInWaitList; - ++i) { + for (size_t i = 0; *(params->pphEventWaitList) != NULL && i < *params->pnumEventsInWaitList; ++i) { if (i != 0) { os << ", "; } - printPtr(os, (*(params->pphEventWaitList))[i]); + details::printPtr(os, + (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - printPtr(os, *(params->pphEvent)); + details::printPtr(os, + *(params->pphEvent)); 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 = "; - printPtr(os, *(params->phQueue)); + details::printPtr(os, + *(params->phQueue)); os << ", "; os << ".hProgram = "; - printPtr(os, *(params->phProgram)); + details::printPtr(os, + *(params->phProgram)); os << ", "; os << ".pipe_symbol = "; - printPtr(os, *(params->ppipe_symbol)); + details::printPtr(os, + *(params->ppipe_symbol)); os << ", "; os << ".blocking = "; @@ -13046,7 +12947,8 @@ inline std::ostream &operator<<( os << ", "; os << ".pSrc = "; - printPtr(os, *(params->ppSrc)); + details::printPtr(os, + *(params->ppSrc)); os << ", "; os << ".size = "; @@ -13060,37 +12962,41 @@ inline std::ostream &operator<<( os << ", "; os << ".phEventWaitList = {"; - for (size_t i = 0; *(params->pphEventWaitList) != NULL && - i < *params->pnumEventsInWaitList; - ++i) { + for (size_t i = 0; *(params->pphEventWaitList) != NULL && i < *params->pnumEventsInWaitList; ++i) { if (i != 0) { os << ", "; } - printPtr(os, (*(params->pphEventWaitList))[i]); + details::printPtr(os, + (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - printPtr(os, *(params->pphEvent)); + details::printPtr(os, + *(params->pphEvent)); return os; } -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_enqueue_cooperative_kernel_launch_exp_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 = "; - printPtr(os, *(params->phQueue)); + details::printPtr(os, + *(params->phQueue)); os << ", "; os << ".hKernel = "; - printPtr(os, *(params->phKernel)); + details::printPtr(os, + *(params->phKernel)); os << ", "; os << ".workDim = "; @@ -13100,17 +13006,20 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".pGlobalWorkOffset = "; - printPtr(os, *(params->ppGlobalWorkOffset)); + details::printPtr(os, + *(params->ppGlobalWorkOffset)); os << ", "; os << ".pGlobalWorkSize = "; - printPtr(os, *(params->ppGlobalWorkSize)); + details::printPtr(os, + *(params->ppGlobalWorkSize)); os << ", "; os << ".pLocalWorkSize = "; - printPtr(os, *(params->ppLocalWorkSize)); + details::printPtr(os, + *(params->ppLocalWorkSize)); os << ", "; os << ".numEventsInWaitList = "; @@ -13119,32 +13028,35 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct os << ", "; os << ".phEventWaitList = {"; - for (size_t i = 0; *(params->pphEventWaitList) != NULL && - i < *params->pnumEventsInWaitList; - ++i) { + for (size_t i = 0; *(params->pphEventWaitList) != NULL && i < *params->pnumEventsInWaitList; ++i) { if (i != 0) { os << ", "; } - printPtr(os, (*(params->pphEventWaitList))[i]); + details::printPtr(os, + (*(params->pphEventWaitList))[i]); } os << "}"; os << ", "; os << ".phEvent = "; - printPtr(os, *(params->pphEvent)); + details::printPtr(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_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 << ".hEvent = "; + os << ".hQueue = "; - printPtr(os, *(params->phEvent)); + details::printPtr(os, + *(params->phQueue)); os << ", "; os << ".propName = "; @@ -13158,449 +13070,488 @@ operator<<(std::ostream &os, os << ", "; os << ".pPropValue = "; - printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - printPtr(os, *(params->ppPropSizeRet)); + details::printPtr(os, + *(params->ppPropSizeRet)); return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_event_get_profiling_info_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 << ".hEvent = "; + os << ".hContext = "; - printPtr(os, *(params->phEvent)); + details::printPtr(os, + *(params->phContext)); os << ", "; - os << ".propName = "; + os << ".hDevice = "; - os << *(params->ppropName); + details::printPtr(os, + *(params->phDevice)); os << ", "; - os << ".propSize = "; - - os << *(params->ppropSize); + os << ".pProperties = "; - os << ", "; - os << ".pPropValue = "; - printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + details::printPtr(os, + *(params->ppProperties)); os << ", "; - os << ".pPropSizeRet = "; + os << ".phQueue = "; - printPtr(os, *(params->ppPropSizeRet)); + details::printPtr(os, + *(params->pphQueue)); return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_event_wait_params_t *params) { - - os << ".numEvents = "; - - os << *(params->pnumEvents); +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ", "; - os << ".phEventWaitList = {"; - for (size_t i = 0; - *(params->pphEventWaitList) != NULL && i < *params->pnumEvents; ++i) { - if (i != 0) { - os << ", "; - } + os << ".hQueue = "; - printPtr(os, (*(params->pphEventWaitList))[i]); - } - os << "}"; + details::printPtr(os, + *(params->phQueue)); return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_event_retain_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ".hEvent = "; + os << ".hQueue = "; - printPtr(os, *(params->phEvent)); + details::printPtr(os, + *(params->phQueue)); return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_event_release_params_t *params) { - - os << ".hEvent = "; - - printPtr(os, *(params->phEvent)); +/////////////////////////////////////////////////////////////////////////////// +/// @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) { - return os; -} + os << ".hQueue = "; -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_event_get_native_handle_params_t *params) { + details::printPtr(os, + *(params->phQueue)); - os << ".hEvent = "; + os << ", "; + os << ".pDesc = "; - printPtr(os, *(params->phEvent)); + details::printPtr(os, + *(params->ppDesc)); os << ", "; - os << ".phNativeEvent = "; + os << ".phNativeQueue = "; - printPtr(os, *(params->pphNativeEvent)); + details::printPtr(os, + *(params->pphNativeQueue)); return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_event_create_with_native_handle_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 << ".hNativeEvent = "; + os << ".hNativeQueue = "; - printPtr(os, *(params->phNativeEvent)); + details::printPtr(os, + *(params->phNativeQueue)); os << ", "; os << ".hContext = "; - printPtr(os, *(params->phContext)); + details::printPtr(os, + *(params->phContext)); os << ", "; - os << ".pProperties = "; + os << ".hDevice = "; - printPtr(os, *(params->ppProperties)); + details::printPtr(os, + *(params->phDevice)); os << ", "; - os << ".phEvent = "; + os << ".pProperties = "; - printPtr(os, *(params->pphEvent)); + details::printPtr(os, + *(params->ppProperties)); - return os; -} + os << ", "; + os << ".phQueue = "; -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_event_set_callback_params_t *params) { + details::printPtr(os, + *(params->pphQueue)); - os << ".hEvent = "; + return os; +} - printPtr(os, *(params->phEvent)); +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ", "; - os << ".execStatus = "; + os << ".hQueue = "; - os << *(params->pexecStatus); + details::printPtr(os, + *(params->phQueue)); - os << ", "; - os << ".pfnNotify = "; + return os; +} - os << reinterpret_cast(*(params->ppfnNotify)); +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ", "; - os << ".pUserData = "; + os << ".hQueue = "; - printPtr(os, *(params->ppUserData)); + details::printPtr(os, + *(params->phQueue)); return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_kernel_create_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 << ".hProgram = "; + os << ".hContext = "; - printPtr(os, *(params->phProgram)); + details::printPtr(os, + *(params->phContext)); os << ", "; - os << ".pKernelName = "; + os << ".hDevice = "; - printPtr(os, *(params->ppKernelName)); + details::printPtr(os, + *(params->phDevice)); os << ", "; - os << ".phKernel = "; + os << ".hImage = "; - printPtr(os, *(params->pphKernel)); + details::printPtr(os, + *(params->phImage)); return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_kernel_get_info_params_t *params) { - - os << ".hKernel = "; - - printPtr(os, *(params->phKernel)); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_bindless_images_sampled_image_handle_destroy_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_bindless_images_sampled_image_handle_destroy_exp_params_t *params) { - os << ", "; - os << ".propName = "; + os << ".hContext = "; - os << *(params->ppropName); + details::printPtr(os, + *(params->phContext)); os << ", "; - os << ".propSize = "; - - os << *(params->ppropSize); + os << ".hDevice = "; - os << ", "; - os << ".pPropValue = "; - printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + details::printPtr(os, + *(params->phDevice)); os << ", "; - os << ".pPropSizeRet = "; + os << ".hImage = "; - printPtr(os, *(params->ppPropSizeRet)); + details::printPtr(os, + *(params->phImage)); return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_kernel_get_group_info_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 << ".hKernel = "; + os << ".hContext = "; - printPtr(os, *(params->phKernel)); + details::printPtr(os, + *(params->phContext)); os << ", "; os << ".hDevice = "; - printPtr(os, *(params->phDevice)); + details::printPtr(os, + *(params->phDevice)); os << ", "; - os << ".propName = "; + os << ".pImageFormat = "; - os << *(params->ppropName); + details::printPtr(os, + *(params->ppImageFormat)); os << ", "; - os << ".propSize = "; - - os << *(params->ppropSize); + os << ".pImageDesc = "; - os << ", "; - os << ".pPropValue = "; - printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + details::printPtr(os, + *(params->ppImageDesc)); os << ", "; - os << ".pPropSizeRet = "; + os << ".phImageMem = "; - printPtr(os, *(params->ppPropSizeRet)); + details::printPtr(os, + *(params->pphImageMem)); 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_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 << ".hKernel = "; + os << ".hContext = "; - printPtr(os, *(params->phKernel)); + details::printPtr(os, + *(params->phContext)); os << ", "; os << ".hDevice = "; - printPtr(os, *(params->phDevice)); + details::printPtr(os, + *(params->phDevice)); os << ", "; - os << ".propName = "; + os << ".hImageMem = "; - os << *(params->ppropName); + details::printPtr(os, + *(params->phImageMem)); - os << ", "; - os << ".propSize = "; + return os; +} - os << *(params->ppropSize); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_bindless_images_unsampled_image_create_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_bindless_images_unsampled_image_create_exp_params_t *params) { + + os << ".hContext = "; + + details::printPtr(os, + *(params->phContext)); os << ", "; - os << ".pPropValue = "; - printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + os << ".hDevice = "; + + details::printPtr(os, + *(params->phDevice)); os << ", "; - os << ".pPropSizeRet = "; + os << ".hImageMem = "; - printPtr(os, *(params->ppPropSizeRet)); + details::printPtr(os, + *(params->phImageMem)); - return os; -} + os << ", "; + os << ".pImageFormat = "; -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_kernel_retain_params_t *params) { + details::printPtr(os, + *(params->ppImageFormat)); - os << ".hKernel = "; + os << ", "; + os << ".pImageDesc = "; - printPtr(os, *(params->phKernel)); + details::printPtr(os, + *(params->ppImageDesc)); - return os; -} + os << ", "; + os << ".phMem = "; -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_kernel_release_params_t *params) { + details::printPtr(os, + *(params->pphMem)); - os << ".hKernel = "; + os << ", "; + os << ".phImage = "; - printPtr(os, *(params->phKernel)); + details::printPtr(os, + *(params->pphImage)); 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_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 << ".hKernel = "; + os << ".hContext = "; - printPtr(os, *(params->phKernel)); + details::printPtr(os, + *(params->phContext)); os << ", "; - os << ".phNativeKernel = "; + os << ".hDevice = "; - printPtr(os, *(params->pphNativeKernel)); + details::printPtr(os, + *(params->phDevice)); - return os; -} + os << ", "; + os << ".hImageMem = "; -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_kernel_create_with_native_handle_params_t - *params) { + details::printPtr(os, + *(params->phImageMem)); - os << ".hNativeKernel = "; + os << ", "; + os << ".pImageFormat = "; - printPtr(os, *(params->phNativeKernel)); + details::printPtr(os, + *(params->ppImageFormat)); os << ", "; - os << ".hContext = "; + os << ".pImageDesc = "; - printPtr(os, *(params->phContext)); + details::printPtr(os, + *(params->ppImageDesc)); os << ", "; - os << ".hProgram = "; + os << ".hSampler = "; - printPtr(os, *(params->phProgram)); + details::printPtr(os, + *(params->phSampler)); os << ", "; - os << ".pProperties = "; + os << ".phMem = "; - printPtr(os, *(params->ppProperties)); + details::printPtr(os, + *(params->pphMem)); os << ", "; - os << ".phKernel = "; + os << ".phImage = "; - printPtr(os, *(params->pphKernel)); + details::printPtr(os, + *(params->pphImage)); 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_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 << ".hKernel = "; + os << ".hQueue = "; - printPtr(os, *(params->phKernel)); + details::printPtr(os, + *(params->phQueue)); os << ", "; - os << ".argIndex = "; + os << ".pDst = "; - os << *(params->pargIndex); + details::printPtr(os, + *(params->ppDst)); os << ", "; - os << ".argSize = "; + os << ".pSrc = "; - os << *(params->pargSize); + details::printPtr(os, + *(params->ppSrc)); os << ", "; - os << ".pProperties = "; + os << ".pImageFormat = "; - printPtr(os, *(params->ppProperties)); + details::printPtr(os, + *(params->ppImageFormat)); os << ", "; - os << ".pArgValue = "; - - printPtr(os, *(params->ppArgValue)); - - return os; -} - -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_kernel_set_arg_local_params_t *params) { - - os << ".hKernel = "; + os << ".pImageDesc = "; - printPtr(os, *(params->phKernel)); + details::printPtr(os, + *(params->ppImageDesc)); os << ", "; - os << ".argIndex = "; + os << ".imageCopyFlags = "; - os << *(params->pargIndex); + details::printFlag(os, + *(params->pimageCopyFlags)); os << ", "; - os << ".argSize = "; + os << ".srcOffset = "; - os << *(params->pargSize); + os << *(params->psrcOffset); os << ", "; - os << ".pProperties = "; + os << ".dstOffset = "; - printPtr(os, *(params->ppProperties)); + os << *(params->pdstOffset); - return os; -} + os << ", "; + os << ".copyExtent = "; -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_kernel_set_arg_pointer_params_t *params) { + os << *(params->pcopyExtent); - os << ".hKernel = "; + os << ", "; + os << ".hostExtent = "; - printPtr(os, *(params->phKernel)); + os << *(params->phostExtent); os << ", "; - os << ".argIndex = "; + os << ".numEventsInWaitList = "; - os << *(params->pargIndex); + os << *(params->pnumEventsInWaitList); os << ", "; - os << ".pProperties = "; + os << ".phEventWaitList = {"; + for (size_t i = 0; *(params->pphEventWaitList) != NULL && i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } - printPtr(os, *(params->ppProperties)); + details::printPtr(os, + (*(params->pphEventWaitList))[i]); + } + os << "}"; os << ", "; - os << ".pArgValue = "; + os << ".phEvent = "; - printPtr(os, *(params->ppArgValue)); + details::printPtr(os, + *(params->pphEvent)); 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_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 << ".hKernel = "; + os << ".hImageMem = "; - printPtr(os, *(params->phKernel)); + details::printPtr(os, + *(params->phImageMem)); os << ", "; os << ".propName = "; @@ -13608,473 +13559,493 @@ inline std::ostream &operator<<( os << *(params->ppropName); os << ", "; - os << ".propSize = "; + os << ".pPropValue = "; - os << *(params->ppropSize); + details::printPtr(os, + *(params->ppPropValue)); os << ", "; - os << ".pProperties = "; - - printPtr(os, *(params->ppProperties)); + os << ".pPropSizeRet = "; - os << ", "; - os << ".pPropValue = "; - printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + details::printPtr(os, + *(params->ppPropSizeRet)); return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_kernel_set_arg_sampler_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 << ".hKernel = "; + os << ".hContext = "; - printPtr(os, *(params->phKernel)); + details::printPtr(os, + *(params->phContext)); os << ", "; - os << ".argIndex = "; + os << ".hDevice = "; - os << *(params->pargIndex); + details::printPtr(os, + *(params->phDevice)); os << ", "; - os << ".pProperties = "; + os << ".hImageMem = "; - printPtr(os, *(params->ppProperties)); + details::printPtr(os, + *(params->phImageMem)); os << ", "; - os << ".hArgValue = "; + os << ".mipmapLevel = "; - printPtr(os, *(params->phArgValue)); + os << *(params->pmipmapLevel); - return os; -} + os << ", "; + os << ".phImageMem = "; -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_kernel_set_arg_mem_obj_params_t *params) { + details::printPtr(os, + *(params->pphImageMem)); - os << ".hKernel = "; + return os; +} - printPtr(os, *(params->phKernel)); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_bindless_images_mipmap_free_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_bindless_images_mipmap_free_exp_params_t *params) { - os << ", "; - os << ".argIndex = "; + os << ".hContext = "; - os << *(params->pargIndex); + details::printPtr(os, + *(params->phContext)); os << ", "; - os << ".pProperties = "; + os << ".hDevice = "; - printPtr(os, *(params->ppProperties)); + details::printPtr(os, + *(params->phDevice)); os << ", "; - os << ".hArgValue = "; + os << ".hMem = "; - printPtr(os, *(params->phArgValue)); + details::printPtr(os, + *(params->phMem)); return os; } -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_kernel_set_specialization_constants_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 << ".hKernel = "; + os << ".hContext = "; - printPtr(os, *(params->phKernel)); + details::printPtr(os, + *(params->phContext)); os << ", "; - os << ".count = "; + os << ".hDevice = "; - os << *(params->pcount); + details::printPtr(os, + *(params->phDevice)); os << ", "; - os << ".pSpecConstants = "; - - printPtr(os, *(params->ppSpecConstants)); - - return os; -} + os << ".size = "; -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_kernel_suggest_max_cooperative_group_count_exp_params_t *params) { + os << *(params->psize); - os << ".hKernel = "; + os << ", "; + os << ".pInteropMemDesc = "; - printPtr(os, *(params->phKernel)); + details::printPtr(os, + *(params->ppInteropMemDesc)); os << ", "; - os << ".pGroupCountRet = "; + os << ".phInteropMem = "; - printPtr(os, *(params->ppGroupCountRet)); + details::printPtr(os, + *(params->pphInteropMem)); return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_loader_init_params_t *params) { +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ".device_flags = "; + os << ".hContext = "; - printFlag(os, *(params->pdevice_flags)); + details::printPtr(os, + *(params->phContext)); os << ", "; - os << ".hLoaderConfig = "; + os << ".hDevice = "; - printPtr(os, *(params->phLoaderConfig)); + details::printPtr(os, + *(params->phDevice)); - return os; -} + os << ", "; + os << ".pImageFormat = "; -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_loader_tear_down_params_t *params) { + details::printPtr(os, + *(params->ppImageFormat)); - return os; -} + os << ", "; + os << ".pImageDesc = "; -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_loader_config_create_params_t *params) { + details::printPtr(os, + *(params->ppImageDesc)); - os << ".phLoaderConfig = "; + os << ", "; + os << ".hInteropMem = "; + + details::printPtr(os, + *(params->phInteropMem)); - printPtr(os, *(params->pphLoaderConfig)); + os << ", "; + os << ".phImageMem = "; + + details::printPtr(os, + *(params->pphImageMem)); return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_loader_config_retain_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 << ".hLoaderConfig = "; + os << ".hContext = "; - printPtr(os, *(params->phLoaderConfig)); + details::printPtr(os, + *(params->phContext)); - return os; -} + os << ", "; + os << ".hDevice = "; -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_loader_config_release_params_t *params) { + details::printPtr(os, + *(params->phDevice)); - os << ".hLoaderConfig = "; + os << ", "; + os << ".hInteropMem = "; - printPtr(os, *(params->phLoaderConfig)); + details::printPtr(os, + *(params->phInteropMem)); 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_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 << ".hLoaderConfig = "; + os << ".hContext = "; - printPtr(os, *(params->phLoaderConfig)); + details::printPtr(os, + *(params->phContext)); os << ", "; - os << ".propName = "; + os << ".hDevice = "; - os << *(params->ppropName); + details::printPtr(os, + *(params->phDevice)); os << ", "; - os << ".propSize = "; + os << ".pInteropSemaphoreDesc = "; - os << *(params->ppropSize); + details::printPtr(os, + *(params->ppInteropSemaphoreDesc)); os << ", "; - os << ".pPropValue = "; - printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); - - os << ", "; - os << ".pPropSizeRet = "; - - printPtr(os, *(params->ppPropSizeRet)); - - return os; -} - -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_loader_config_enable_layer_params_t - *params) { - - os << ".hLoaderConfig = "; - - printPtr(os, *(params->phLoaderConfig)); - - os << ", "; - os << ".pLayerName = "; + os << ".phInteropSemaphore = "; - printPtr(os, *(params->ppLayerName)); + details::printPtr(os, + *(params->pphInteropSemaphore)); return os; } -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_loader_config_set_code_location_callback_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 << ".hLoaderConfig = "; + os << ".hContext = "; - ur_params::serializePtr(os, *(params->phLoaderConfig)); + details::printPtr(os, + *(params->phContext)); os << ", "; - os << ".pfnCodeloc = "; + os << ".hDevice = "; - os << reinterpret_cast(*(params->ppfnCodeloc)); + details::printPtr(os, + *(params->phDevice)); os << ", "; - os << ".pUserData = "; + os << ".hInteropSemaphore = "; - ur_params::serializePtr(os, *(params->ppUserData)); + details::printPtr(os, + *(params->phInteropSemaphore)); return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_mem_image_create_params_t *params) { - - os << ".hContext = "; - - printPtr(os, *(params->phContext)); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_bindless_images_wait_external_semaphore_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_bindless_images_wait_external_semaphore_exp_params_t *params) { - os << ", "; - os << ".flags = "; + os << ".hQueue = "; - printFlag(os, *(params->pflags)); + details::printPtr(os, + *(params->phQueue)); os << ", "; - os << ".pImageFormat = "; + os << ".hSemaphore = "; - printPtr(os, *(params->ppImageFormat)); + details::printPtr(os, + *(params->phSemaphore)); os << ", "; - os << ".pImageDesc = "; + os << ".numEventsInWaitList = "; - printPtr(os, *(params->ppImageDesc)); + os << *(params->pnumEventsInWaitList); os << ", "; - os << ".pHost = "; + os << ".phEventWaitList = {"; + for (size_t i = 0; *(params->pphEventWaitList) != NULL && i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } - printPtr(os, *(params->ppHost)); + details::printPtr(os, + (*(params->pphEventWaitList))[i]); + } + os << "}"; os << ", "; - os << ".phMem = "; + os << ".phEvent = "; - printPtr(os, *(params->pphMem)); + details::printPtr(os, + *(params->pphEvent)); 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_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 << ".hContext = "; + os << ".hQueue = "; - printPtr(os, *(params->phContext)); + details::printPtr(os, + *(params->phQueue)); os << ", "; - os << ".flags = "; + os << ".hSemaphore = "; - printFlag(os, *(params->pflags)); + details::printPtr(os, + *(params->phSemaphore)); os << ", "; - os << ".size = "; + os << ".numEventsInWaitList = "; - os << *(params->psize); + os << *(params->pnumEventsInWaitList); os << ", "; - os << ".pProperties = "; + os << ".phEventWaitList = {"; + for (size_t i = 0; *(params->pphEventWaitList) != NULL && i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } - printPtr(os, *(params->ppProperties)); + details::printPtr(os, + (*(params->pphEventWaitList))[i]); + } + os << "}"; os << ", "; - os << ".phBuffer = "; - - printPtr(os, *(params->pphBuffer)); - - return os; -} - -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_mem_retain_params_t *params) { - - os << ".hMem = "; - - printPtr(os, *(params->phMem)); - - return os; -} - -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_mem_release_params_t *params) { - - os << ".hMem = "; + os << ".phEvent = "; - printPtr(os, *(params->phMem)); + details::printPtr(os, + *(params->pphEvent)); return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_mem_buffer_partition_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 << ".hBuffer = "; + os << ".hContext = "; - printPtr(os, *(params->phBuffer)); + details::printPtr(os, + *(params->phContext)); os << ", "; - os << ".flags = "; + os << ".pUSMDesc = "; - printFlag(os, *(params->pflags)); + details::printPtr(os, + *(params->ppUSMDesc)); os << ", "; - os << ".bufferCreateType = "; + os << ".pool = "; - os << *(params->pbufferCreateType); + details::printPtr(os, + *(params->ppool)); os << ", "; - os << ".pRegion = "; + os << ".size = "; - printPtr(os, *(params->ppRegion)); + os << *(params->psize); os << ", "; - os << ".phMem = "; + os << ".ppMem = "; - printPtr(os, *(params->pphMem)); + details::printPtr(os, + *(params->pppMem)); 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_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 << ".hMem = "; + os << ".hContext = "; - printPtr(os, *(params->phMem)); + details::printPtr(os, + *(params->phContext)); os << ", "; - os << ".phNativeMem = "; - - printPtr(os, *(params->pphNativeMem)); - - return os; -} + os << ".hDevice = "; -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_mem_buffer_create_with_native_handle_params_t *params) { + details::printPtr(os, + *(params->phDevice)); - os << ".hNativeMem = "; + os << ", "; + os << ".pUSMDesc = "; - printPtr(os, *(params->phNativeMem)); + details::printPtr(os, + *(params->ppUSMDesc)); os << ", "; - os << ".hContext = "; + os << ".pool = "; - printPtr(os, *(params->phContext)); + details::printPtr(os, + *(params->ppool)); os << ", "; - os << ".pProperties = "; + os << ".size = "; - printPtr(os, *(params->ppProperties)); + os << *(params->psize); os << ", "; - os << ".phMem = "; + os << ".ppMem = "; - printPtr(os, *(params->pphMem)); + details::printPtr(os, + *(params->pppMem)); 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_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 << ".hNativeMem = "; + os << ".hContext = "; - printPtr(os, *(params->phNativeMem)); + details::printPtr(os, + *(params->phContext)); os << ", "; - os << ".hContext = "; + os << ".hDevice = "; - printPtr(os, *(params->phContext)); + details::printPtr(os, + *(params->phDevice)); os << ", "; - os << ".pImageFormat = "; + os << ".pUSMDesc = "; - printPtr(os, *(params->ppImageFormat)); + details::printPtr(os, + *(params->ppUSMDesc)); os << ", "; - os << ".pImageDesc = "; + os << ".pool = "; - printPtr(os, *(params->ppImageDesc)); + details::printPtr(os, + *(params->ppool)); os << ", "; - os << ".pProperties = "; + os << ".size = "; - printPtr(os, *(params->ppProperties)); + os << *(params->psize); os << ", "; - os << ".phMem = "; + os << ".ppMem = "; - printPtr(os, *(params->pphMem)); + details::printPtr(os, + *(params->pppMem)); return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_mem_get_info_params_t *params) { - - os << ".hMemory = "; - - printPtr(os, *(params->phMemory)); - - os << ", "; - os << ".propName = "; - - os << *(params->ppropName); - - os << ", "; - os << ".propSize = "; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_usm_free_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_free_params_t *params) { - os << *(params->ppropSize); + os << ".hContext = "; - os << ", "; - os << ".pPropValue = "; - printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + details::printPtr(os, + *(params->phContext)); os << ", "; - os << ".pPropSizeRet = "; + os << ".pMem = "; - printPtr(os, *(params->ppPropSizeRet)); + details::printPtr(os, + *(params->ppMem)); 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_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 << ".hMemory = "; + os << ".hContext = "; + + details::printPtr(os, + *(params->phContext)); + + os << ", "; + os << ".pMem = "; - printPtr(os, *(params->phMemory)); + details::printPtr(os, + *(params->ppMem)); os << ", "; os << ".propName = "; @@ -14088,122 +14059,81 @@ inline std::ostream &operator<<( os << ", "; os << ".pPropValue = "; - printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - printPtr(os, *(params->ppPropSizeRet)); + details::printPtr(os, + *(params->ppPropSizeRet)); 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_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 = "; - printPtr(os, *(params->phContext)); - - os << ", "; - os << ".hDevice = "; - - printPtr(os, *(params->phDevice)); - - os << ", "; - os << ".size = "; - - os << *(params->psize); + details::printPtr(os, + *(params->phContext)); os << ", "; - os << ".pProperties = "; + os << ".pPoolDesc = "; - printPtr(os, *(params->ppProperties)); + details::printPtr(os, + *(params->ppPoolDesc)); os << ", "; - os << ".phPhysicalMem = "; - - printPtr(os, *(params->pphPhysicalMem)); - - return os; -} - -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_physical_mem_retain_params_t *params) { - - os << ".hPhysicalMem = "; + os << ".ppPool = "; - printPtr(os, *(params->phPhysicalMem)); + details::printPtr(os, + *(params->pppPool)); 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_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 << ".hPhysicalMem = "; + os << ".pPool = "; - printPtr(os, *(params->phPhysicalMem)); + details::printPtr(os, + *(params->ppPool)); return os; } -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) { - if (i != 0) { - os << ", "; - } - - printPtr(os, (*(params->pphAdapters))[i]); - } - os << "}"; - - os << ", "; - os << ".NumAdapters = "; - - os << *(params->pNumAdapters); - - os << ", "; - os << ".NumEntries = "; - - os << *(params->pNumEntries); - - os << ", "; - os << ".phPlatforms = {"; - for (size_t i = 0; - *(params->pphPlatforms) != NULL && i < *params->pNumEntries; ++i) { - if (i != 0) { - os << ", "; - } - - printPtr(os, (*(params->pphPlatforms))[i]); - } - os << "}"; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_usm_pool_release_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_pool_release_params_t *params) { - os << ", "; - os << ".pNumPlatforms = "; + os << ".pPool = "; - printPtr(os, *(params->ppNumPlatforms)); + details::printPtr(os, + *(params->ppPool)); 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_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 << ".hPlatform = "; + os << ".hPool = "; - printPtr(os, *(params->phPlatform)); + details::printPtr(os, + *(params->phPool)); os << ", "; os << ".propName = "; @@ -14217,1067 +14147,1007 @@ inline std::ostream &operator<<( os << ", "; os << ".pPropValue = "; - printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - printPtr(os, *(params->ppPropSizeRet)); + details::printPtr(os, + *(params->ppPropSizeRet)); 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_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 << ".hPlatform = "; + os << ".hContext = "; - printPtr(os, *(params->phPlatform)); + details::printPtr(os, + *(params->phContext)); os << ", "; - os << ".phNativePlatform = "; + os << ".hDevice = "; - printPtr(os, *(params->pphNativePlatform)); + details::printPtr(os, + *(params->phDevice)); - return os; -} + os << ", "; + os << ".pUSMDesc = "; -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_platform_create_with_native_handle_params_t - *params) { + details::printPtr(os, + *(params->ppUSMDesc)); - os << ".hNativePlatform = "; + os << ", "; + os << ".pool = "; - printPtr(os, *(params->phNativePlatform)); + details::printPtr(os, + *(params->ppool)); os << ", "; - os << ".pProperties = "; + os << ".widthInBytes = "; - printPtr(os, *(params->ppProperties)); + os << *(params->pwidthInBytes); os << ", "; - os << ".phPlatform = "; + os << ".height = "; - printPtr(os, *(params->pphPlatform)); + os << *(params->pheight); - return os; -} + os << ", "; + os << ".elementSizeBytes = "; -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_platform_get_api_version_params_t - *params) { + os << *(params->pelementSizeBytes); - os << ".hPlatform = "; + os << ", "; + os << ".ppMem = "; - printPtr(os, *(params->phPlatform)); + details::printPtr(os, + *(params->pppMem)); os << ", "; - os << ".pVersion = "; + os << ".pResultPitch = "; - printPtr(os, *(params->ppVersion)); + details::printPtr(os, + *(params->ppResultPitch)); return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_platform_get_backend_option_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 << ".hPlatform = "; + os << ".hContext = "; - printPtr(os, *(params->phPlatform)); + details::printPtr(os, + *(params->phContext)); os << ", "; - os << ".pFrontendOption = "; + os << ".pMem = "; - printPtr(os, *(params->ppFrontendOption)); + details::printPtr(os, + *(params->ppMem)); os << ", "; - os << ".ppPlatformOption = "; + os << ".size = "; - printPtr(os, *(params->pppPlatformOption)); + os << *(params->psize); 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_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 = "; - printPtr(os, *(params->phContext)); - - os << ", "; - os << ".pIL = "; - - printPtr(os, *(params->ppIL)); + details::printPtr(os, + *(params->phContext)); os << ", "; - os << ".length = "; - - os << *(params->plength); - - os << ", "; - os << ".pProperties = "; - - printPtr(os, *(params->ppProperties)); - - os << ", "; - os << ".phProgram = "; + os << ".pMem = "; - printPtr(os, *(params->pphProgram)); + details::printPtr(os, + *(params->ppMem)); return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_program_create_with_binary_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 = "; - printPtr(os, *(params->phContext)); + details::printPtr(os, + *(params->phContext)); os << ", "; os << ".hDevice = "; - printPtr(os, *(params->phDevice)); + details::printPtr(os, + *(params->phDevice)); os << ", "; - os << ".size = "; + os << ".pCommandBufferDesc = "; - os << *(params->psize); + details::printPtr(os, + *(params->ppCommandBufferDesc)); os << ", "; - os << ".pBinary = "; + os << ".phCommandBuffer = "; - printPtr(os, *(params->ppBinary)); + details::printPtr(os, + *(params->pphCommandBuffer)); - os << ", "; - os << ".pProperties = "; + return os; +} - printPtr(os, *(params->ppProperties)); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_command_buffer_retain_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_command_buffer_retain_exp_params_t *params) { - os << ", "; - os << ".phProgram = "; + os << ".hCommandBuffer = "; - printPtr(os, *(params->pphProgram)); + details::printPtr(os, + *(params->phCommandBuffer)); 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_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 << ".hContext = "; + os << ".hCommandBuffer = "; - printPtr(os, *(params->phContext)); + details::printPtr(os, + *(params->phCommandBuffer)); - os << ", "; - os << ".hProgram = "; + return os; +} - printPtr(os, *(params->phProgram)); +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ", "; - os << ".pOptions = "; + os << ".hCommandBuffer = "; - printPtr(os, *(params->ppOptions)); + details::printPtr(os, + *(params->phCommandBuffer)); 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_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 << ".hContext = "; + os << ".hCommandBuffer = "; - printPtr(os, *(params->phContext)); + details::printPtr(os, + *(params->phCommandBuffer)); os << ", "; - os << ".hProgram = "; + os << ".hKernel = "; - printPtr(os, *(params->phProgram)); + details::printPtr(os, + *(params->phKernel)); os << ", "; - os << ".pOptions = "; + os << ".workDim = "; - printPtr(os, *(params->ppOptions)); + os << *(params->pworkDim); - return os; -} + os << ", "; + os << ".pGlobalWorkOffset = "; -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_program_link_params_t *params) { + details::printPtr(os, + *(params->ppGlobalWorkOffset)); - os << ".hContext = "; + os << ", "; + os << ".pGlobalWorkSize = "; - printPtr(os, *(params->phContext)); + details::printPtr(os, + *(params->ppGlobalWorkSize)); os << ", "; - os << ".count = "; + os << ".pLocalWorkSize = "; - os << *(params->pcount); + details::printPtr(os, + *(params->ppLocalWorkSize)); os << ", "; - os << ".phPrograms = {"; - for (size_t i = 0; *(params->pphPrograms) != NULL && i < *params->pcount; - ++i) { - if (i != 0) { - os << ", "; - } + os << ".numSyncPointsInWaitList = "; - printPtr(os, (*(params->pphPrograms))[i]); - } - os << "}"; + os << *(params->pnumSyncPointsInWaitList); os << ", "; - os << ".pOptions = "; + os << ".pSyncPointWaitList = "; - printPtr(os, *(params->ppOptions)); + details::printPtr(os, + *(params->ppSyncPointWaitList)); os << ", "; - os << ".phProgram = "; + os << ".pSyncPoint = "; - printPtr(os, *(params->pphProgram)); + details::printPtr(os, + *(params->ppSyncPoint)); return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_program_retain_params_t *params) { - - os << ".hProgram = "; - - printPtr(os, *(params->phProgram)); +/////////////////////////////////////////////////////////////////////////////// +/// @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) { - return os; -} + os << ".hCommandBuffer = "; -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_program_release_params_t *params) { + details::printPtr(os, + *(params->phCommandBuffer)); - os << ".hProgram = "; + os << ", "; + os << ".pDst = "; - printPtr(os, *(params->phProgram)); + details::printPtr(os, + *(params->ppDst)); - return os; -} + os << ", "; + os << ".pSrc = "; -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_program_get_function_pointer_params_t - *params) { + details::printPtr(os, + *(params->ppSrc)); - os << ".hDevice = "; + os << ", "; + os << ".size = "; - printPtr(os, *(params->phDevice)); + os << *(params->psize); os << ", "; - os << ".hProgram = "; + os << ".numSyncPointsInWaitList = "; - printPtr(os, *(params->phProgram)); + os << *(params->pnumSyncPointsInWaitList); os << ", "; - os << ".pFunctionName = "; + os << ".pSyncPointWaitList = "; - printPtr(os, *(params->ppFunctionName)); + details::printPtr(os, + *(params->ppSyncPointWaitList)); os << ", "; - os << ".ppFunctionPointer = "; + os << ".pSyncPoint = "; - printPtr(os, *(params->pppFunctionPointer)); + details::printPtr(os, + *(params->ppSyncPoint)); return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_program_get_info_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 << ".hProgram = "; + os << ".hCommandBuffer = "; - printPtr(os, *(params->phProgram)); + details::printPtr(os, + *(params->phCommandBuffer)); os << ", "; - os << ".propName = "; + os << ".pMemory = "; - os << *(params->ppropName); + details::printPtr(os, + *(params->ppMemory)); os << ", "; - os << ".propSize = "; - - os << *(params->ppropSize); + os << ".pPattern = "; - os << ", "; - os << ".pPropValue = "; - printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + details::printPtr(os, + *(params->ppPattern)); os << ", "; - os << ".pPropSizeRet = "; + os << ".patternSize = "; - printPtr(os, *(params->ppPropSizeRet)); + os << *(params->ppatternSize); - return os; -} + os << ", "; + os << ".size = "; -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_program_get_build_info_params_t *params) { + os << *(params->psize); - os << ".hProgram = "; + os << ", "; + os << ".numSyncPointsInWaitList = "; - printPtr(os, *(params->phProgram)); + os << *(params->pnumSyncPointsInWaitList); os << ", "; - os << ".hDevice = "; + os << ".pSyncPointWaitList = "; - printPtr(os, *(params->phDevice)); + details::printPtr(os, + *(params->ppSyncPointWaitList)); os << ", "; - os << ".propName = "; + os << ".pSyncPoint = "; - os << *(params->ppropName); + details::printPtr(os, + *(params->ppSyncPoint)); - os << ", "; - os << ".propSize = "; + return os; +} - os << *(params->ppropSize); +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ", "; - os << ".pPropValue = "; - printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + os << ".hCommandBuffer = "; + + details::printPtr(os, + *(params->phCommandBuffer)); os << ", "; - os << ".pPropSizeRet = "; + os << ".hSrcMem = "; - printPtr(os, *(params->ppPropSizeRet)); + details::printPtr(os, + *(params->phSrcMem)); - return os; -} + os << ", "; + os << ".hDstMem = "; -inline std::ostream & -operator<<(std::ostream &os, [[maybe_unused]] const struct - ur_program_set_specialization_constants_params_t *params) { + details::printPtr(os, + *(params->phDstMem)); - os << ".hProgram = "; + os << ", "; + os << ".srcOffset = "; - printPtr(os, *(params->phProgram)); + os << *(params->psrcOffset); os << ", "; - os << ".count = "; + os << ".dstOffset = "; - os << *(params->pcount); + os << *(params->pdstOffset); os << ", "; - os << ".pSpecConstants = {"; - for (size_t i = 0; - *(params->ppSpecConstants) != NULL && i < *params->pcount; ++i) { - if (i != 0) { - os << ", "; - } + os << ".size = "; - os << (*(params->ppSpecConstants))[i]; - } - os << "}"; + os << *(params->psize); - return os; -} + os << ", "; + os << ".numSyncPointsInWaitList = "; -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_program_get_native_handle_params_t - *params) { + os << *(params->pnumSyncPointsInWaitList); - os << ".hProgram = "; + os << ", "; + os << ".pSyncPointWaitList = "; - printPtr(os, *(params->phProgram)); + details::printPtr(os, + *(params->ppSyncPointWaitList)); os << ", "; - os << ".phNativeProgram = "; + os << ".pSyncPoint = "; - printPtr(os, *(params->pphNativeProgram)); + details::printPtr(os, + *(params->ppSyncPoint)); return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_program_create_with_native_handle_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 << ".hNativeProgram = "; + os << ".hCommandBuffer = "; - printPtr(os, *(params->phNativeProgram)); + details::printPtr(os, + *(params->phCommandBuffer)); os << ", "; - os << ".hContext = "; + os << ".hBuffer = "; - printPtr(os, *(params->phContext)); + details::printPtr(os, + *(params->phBuffer)); os << ", "; - os << ".pProperties = "; + os << ".offset = "; - printPtr(os, *(params->ppProperties)); + os << *(params->poffset); os << ", "; - os << ".phProgram = "; - - printPtr(os, *(params->pphProgram)); - - return os; -} - -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_queue_get_info_params_t *params) { - - os << ".hQueue = "; + os << ".size = "; - printPtr(os, *(params->phQueue)); + os << *(params->psize); os << ", "; - os << ".propName = "; + os << ".pSrc = "; - os << *(params->ppropName); + details::printPtr(os, + *(params->ppSrc)); os << ", "; - os << ".propSize = "; + os << ".numSyncPointsInWaitList = "; - os << *(params->ppropSize); + os << *(params->pnumSyncPointsInWaitList); os << ", "; - os << ".pPropValue = "; - printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + os << ".pSyncPointWaitList = "; + + details::printPtr(os, + *(params->ppSyncPointWaitList)); os << ", "; - os << ".pPropSizeRet = "; + os << ".pSyncPoint = "; - printPtr(os, *(params->ppPropSizeRet)); + details::printPtr(os, + *(params->ppSyncPoint)); return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_queue_create_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 << ".hContext = "; + os << ".hCommandBuffer = "; - printPtr(os, *(params->phContext)); + details::printPtr(os, + *(params->phCommandBuffer)); os << ", "; - os << ".hDevice = "; + os << ".hBuffer = "; - printPtr(os, *(params->phDevice)); + details::printPtr(os, + *(params->phBuffer)); os << ", "; - os << ".pProperties = "; + os << ".offset = "; - printPtr(os, *(params->ppProperties)); + os << *(params->poffset); os << ", "; - os << ".phQueue = "; + os << ".size = "; - printPtr(os, *(params->pphQueue)); + os << *(params->psize); - return os; -} + os << ", "; + os << ".pDst = "; -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_queue_retain_params_t *params) { + details::printPtr(os, + *(params->ppDst)); - os << ".hQueue = "; + os << ", "; + os << ".numSyncPointsInWaitList = "; - printPtr(os, *(params->phQueue)); + os << *(params->pnumSyncPointsInWaitList); - return os; -} + os << ", "; + os << ".pSyncPointWaitList = "; -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_queue_release_params_t *params) { + details::printPtr(os, + *(params->ppSyncPointWaitList)); - os << ".hQueue = "; + os << ", "; + os << ".pSyncPoint = "; - printPtr(os, *(params->phQueue)); + details::printPtr(os, + *(params->ppSyncPoint)); return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_queue_get_native_handle_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 << ".hQueue = "; + os << ".hCommandBuffer = "; - printPtr(os, *(params->phQueue)); + details::printPtr(os, + *(params->phCommandBuffer)); os << ", "; - os << ".pDesc = "; + os << ".hSrcMem = "; - printPtr(os, *(params->ppDesc)); + details::printPtr(os, + *(params->phSrcMem)); os << ", "; - os << ".phNativeQueue = "; + os << ".hDstMem = "; - printPtr(os, *(params->pphNativeQueue)); + details::printPtr(os, + *(params->phDstMem)); - return os; -} + os << ", "; + os << ".srcOrigin = "; -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_queue_create_with_native_handle_params_t - *params) { + os << *(params->psrcOrigin); - os << ".hNativeQueue = "; + os << ", "; + os << ".dstOrigin = "; - printPtr(os, *(params->phNativeQueue)); + os << *(params->pdstOrigin); os << ", "; - os << ".hContext = "; + os << ".region = "; - printPtr(os, *(params->phContext)); + os << *(params->pregion); os << ", "; - os << ".hDevice = "; + os << ".srcRowPitch = "; - printPtr(os, *(params->phDevice)); + os << *(params->psrcRowPitch); os << ", "; - os << ".pProperties = "; + os << ".srcSlicePitch = "; - printPtr(os, *(params->ppProperties)); + os << *(params->psrcSlicePitch); os << ", "; - os << ".phQueue = "; + os << ".dstRowPitch = "; - printPtr(os, *(params->pphQueue)); + os << *(params->pdstRowPitch); - return os; -} + os << ", "; + os << ".dstSlicePitch = "; -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_queue_finish_params_t *params) { + os << *(params->pdstSlicePitch); - os << ".hQueue = "; + os << ", "; + os << ".numSyncPointsInWaitList = "; - printPtr(os, *(params->phQueue)); + os << *(params->pnumSyncPointsInWaitList); - return 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 << ".hQueue = "; + os << ", "; + os << ".pSyncPoint = "; - printPtr(os, *(params->phQueue)); + details::printPtr(os, + *(params->ppSyncPoint)); 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_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 << ".hContext = "; + os << ".hCommandBuffer = "; - printPtr(os, *(params->phContext)); + details::printPtr(os, + *(params->phCommandBuffer)); os << ", "; - os << ".pDesc = "; + os << ".hBuffer = "; - printPtr(os, *(params->ppDesc)); + details::printPtr(os, + *(params->phBuffer)); os << ", "; - os << ".phSampler = "; + os << ".bufferOffset = "; - printPtr(os, *(params->pphSampler)); + os << *(params->pbufferOffset); - return os; -} + os << ", "; + os << ".hostOffset = "; -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_sampler_retain_params_t *params) { + os << *(params->phostOffset); - os << ".hSampler = "; + os << ", "; + os << ".region = "; - printPtr(os, *(params->phSampler)); - - return os; -} - -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_sampler_release_params_t *params) { - - os << ".hSampler = "; - - printPtr(os, *(params->phSampler)); - - return os; -} - -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_sampler_get_info_params_t *params) { - - os << ".hSampler = "; - - printPtr(os, *(params->phSampler)); + os << *(params->pregion); os << ", "; - os << ".propName = "; + os << ".bufferRowPitch = "; - os << *(params->ppropName); + os << *(params->pbufferRowPitch); os << ", "; - os << ".propSize = "; - - os << *(params->ppropSize); + os << ".bufferSlicePitch = "; - os << ", "; - os << ".pPropValue = "; - printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + os << *(params->pbufferSlicePitch); os << ", "; - os << ".pPropSizeRet = "; - - printPtr(os, *(params->ppPropSizeRet)); - - return os; -} - -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_sampler_get_native_handle_params_t - *params) { - - os << ".hSampler = "; + os << ".hostRowPitch = "; - printPtr(os, *(params->phSampler)); + os << *(params->phostRowPitch); os << ", "; - os << ".phNativeSampler = "; - - printPtr(os, *(params->pphNativeSampler)); - - return os; -} + os << ".hostSlicePitch = "; -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_sampler_create_with_native_handle_params_t - *params) { + os << *(params->phostSlicePitch); - os << ".hNativeSampler = "; + os << ", "; + os << ".pSrc = "; - printPtr(os, *(params->phNativeSampler)); + details::printPtr(os, + *(params->ppSrc)); os << ", "; - os << ".hContext = "; + os << ".numSyncPointsInWaitList = "; - printPtr(os, *(params->phContext)); + os << *(params->pnumSyncPointsInWaitList); os << ", "; - os << ".pProperties = "; + os << ".pSyncPointWaitList = "; - printPtr(os, *(params->ppProperties)); + details::printPtr(os, + *(params->ppSyncPointWaitList)); os << ", "; - os << ".phSampler = "; + os << ".pSyncPoint = "; - printPtr(os, *(params->pphSampler)); + details::printPtr(os, + *(params->ppSyncPoint)); return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_usm_host_alloc_params_t *params) { - - os << ".hContext = "; - - printPtr(os, *(params->phContext)); - - os << ", "; - os << ".pUSMDesc = "; - - printPtr(os, *(params->ppUSMDesc)); +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ", "; - os << ".pool = "; + os << ".hCommandBuffer = "; - printPtr(os, *(params->ppool)); + details::printPtr(os, + *(params->phCommandBuffer)); os << ", "; - os << ".size = "; + os << ".hBuffer = "; - os << *(params->psize); + details::printPtr(os, + *(params->phBuffer)); os << ", "; - os << ".ppMem = "; - - printPtr(os, *(params->pppMem)); - - return os; -} - -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_usm_device_alloc_params_t *params) { - - os << ".hContext = "; + os << ".bufferOffset = "; - printPtr(os, *(params->phContext)); + os << *(params->pbufferOffset); os << ", "; - os << ".hDevice = "; + os << ".hostOffset = "; - printPtr(os, *(params->phDevice)); + os << *(params->phostOffset); os << ", "; - os << ".pUSMDesc = "; + os << ".region = "; - printPtr(os, *(params->ppUSMDesc)); + os << *(params->pregion); os << ", "; - os << ".pool = "; + os << ".bufferRowPitch = "; - printPtr(os, *(params->ppool)); + os << *(params->pbufferRowPitch); os << ", "; - os << ".size = "; + os << ".bufferSlicePitch = "; - os << *(params->psize); + os << *(params->pbufferSlicePitch); os << ", "; - os << ".ppMem = "; - - printPtr(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 << ".hostRowPitch = "; - printPtr(os, *(params->phContext)); + os << *(params->phostRowPitch); os << ", "; - os << ".hDevice = "; + os << ".hostSlicePitch = "; - printPtr(os, *(params->phDevice)); + os << *(params->phostSlicePitch); os << ", "; - os << ".pUSMDesc = "; + os << ".pDst = "; - printPtr(os, *(params->ppUSMDesc)); + details::printPtr(os, + *(params->ppDst)); os << ", "; - os << ".pool = "; + os << ".numSyncPointsInWaitList = "; - printPtr(os, *(params->ppool)); + os << *(params->pnumSyncPointsInWaitList); os << ", "; - os << ".size = "; + os << ".pSyncPointWaitList = "; - os << *(params->psize); + details::printPtr(os, + *(params->ppSyncPointWaitList)); os << ", "; - os << ".ppMem = "; + os << ".pSyncPoint = "; - printPtr(os, *(params->pppMem)); + details::printPtr(os, + *(params->ppSyncPoint)); return os; } -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_usm_free_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 << ".hContext = "; + os << ".hCommandBuffer = "; - printPtr(os, *(params->phContext)); + details::printPtr(os, + *(params->phCommandBuffer)); os << ", "; - os << ".pMem = "; - - printPtr(os, *(params->ppMem)); - - return os; -} - -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_usm_get_mem_alloc_info_params_t *params) { - - os << ".hContext = "; + os << ".hBuffer = "; - printPtr(os, *(params->phContext)); + details::printPtr(os, + *(params->phBuffer)); os << ", "; - os << ".pMem = "; + os << ".pPattern = "; - printPtr(os, *(params->ppMem)); + details::printPtr(os, + *(params->ppPattern)); os << ", "; - os << ".propName = "; + os << ".patternSize = "; - os << *(params->ppropName); + os << *(params->ppatternSize); os << ", "; - os << ".propSize = "; - - os << *(params->ppropSize); + os << ".offset = "; - os << ", "; - os << ".pPropValue = "; - printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + os << *(params->poffset); os << ", "; - os << ".pPropSizeRet = "; - - printPtr(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 << ".size = "; - printPtr(os, *(params->phContext)); + os << *(params->psize); os << ", "; - os << ".pPoolDesc = "; + os << ".numSyncPointsInWaitList = "; - printPtr(os, *(params->ppPoolDesc)); + os << *(params->pnumSyncPointsInWaitList); os << ", "; - os << ".ppPool = "; - - printPtr(os, *(params->pppPool)); - - return 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 << ".pPool = "; + os << ", "; + os << ".pSyncPoint = "; - printPtr(os, *(params->ppPool)); + details::printPtr(os, + *(params->ppSyncPoint)); 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 << ".pPool = "; + os << ".hCommandBuffer = "; - printPtr(os, *(params->ppPool)); + details::printPtr(os, + *(params->phCommandBuffer)); - return 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 << ".hPool = "; + os << ", "; + os << ".size = "; - printPtr(os, *(params->phPool)); + os << *(params->psize); os << ", "; - os << ".propName = "; + os << ".flags = "; - os << *(params->ppropName); + details::printFlag(os, + *(params->pflags)); os << ", "; - os << ".propSize = "; + os << ".numSyncPointsInWaitList = "; - os << *(params->ppropSize); + os << *(params->pnumSyncPointsInWaitList); os << ", "; - os << ".pPropValue = "; - printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + os << ".pSyncPointWaitList = "; + + details::printPtr(os, + *(params->ppSyncPointWaitList)); os << ", "; - os << ".pPropSizeRet = "; + os << ".pSyncPoint = "; - printPtr(os, *(params->ppPropSizeRet)); + details::printPtr(os, + *(params->ppSyncPoint)); return os; } -inline std::ostream &operator<<( - std::ostream &os, - [[maybe_unused]] const struct ur_usm_pitched_alloc_exp_params_t *params) { - - os << ".hContext = "; - - printPtr(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) { - printPtr(os, *(params->phDevice)); - - os << ", "; - os << ".pUSMDesc = "; + os << ".hCommandBuffer = "; - printPtr(os, *(params->ppUSMDesc)); + details::printPtr(os, + *(params->phCommandBuffer)); os << ", "; - os << ".pool = "; + os << ".pMemory = "; - printPtr(os, *(params->ppool)); + details::printPtr(os, + *(params->ppMemory)); os << ", "; - os << ".widthInBytes = "; + os << ".size = "; - os << *(params->pwidthInBytes); + os << *(params->psize); os << ", "; - os << ".height = "; + os << ".advice = "; - os << *(params->pheight); + details::printFlag(os, + *(params->padvice)); os << ", "; - os << ".elementSizeBytes = "; + os << ".numSyncPointsInWaitList = "; - os << *(params->pelementSizeBytes); + os << *(params->pnumSyncPointsInWaitList); os << ", "; - os << ".ppMem = "; + os << ".pSyncPointWaitList = "; - printPtr(os, *(params->pppMem)); + details::printPtr(os, + *(params->ppSyncPointWaitList)); os << ", "; - os << ".pResultPitch = "; + os << ".pSyncPoint = "; - printPtr(os, *(params->ppResultPitch)); + details::printPtr(os, + *(params->ppSyncPoint)); 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 << ".hContext = "; + os << ".hCommandBuffer = "; - printPtr(os, *(params->phContext)); + details::printPtr(os, + *(params->phCommandBuffer)); os << ", "; - os << ".pMem = "; + os << ".hQueue = "; - printPtr(os, *(params->ppMem)); + details::printPtr(os, + *(params->phQueue)); os << ", "; - os << ".size = "; - - os << *(params->psize); - - return 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 << ".hContext = "; + os << ", "; + os << ".phEventWaitList = {"; + for (size_t i = 0; *(params->pphEventWaitList) != NULL && i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } - printPtr(os, *(params->phContext)); + details::printPtr(os, + (*(params->pphEventWaitList))[i]); + } + os << "}"; os << ", "; - os << ".pMem = "; + os << ".phEvent = "; - printPtr(os, *(params->ppMem)); + details::printPtr(os, + *(params->pphEvent)); 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 = "; - printPtr(os, *(params->pcommandDevice)); + details::printPtr(os, + *(params->pcommandDevice)); os << ", "; os << ".peerDevice = "; - printPtr(os, *(params->ppeerDevice)); + details::printPtr(os, + *(params->ppeerDevice)); 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 = "; - printPtr(os, *(params->pcommandDevice)); + details::printPtr(os, + *(params->pcommandDevice)); os << ", "; os << ".peerDevice = "; - printPtr(os, *(params->ppeerDevice)); + details::printPtr(os, + *(params->ppeerDevice)); 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 = "; - printPtr(os, *(params->pcommandDevice)); + details::printPtr(os, + *(params->pcommandDevice)); os << ", "; os << ".peerDevice = "; - printPtr(os, *(params->ppeerDevice)); + details::printPtr(os, + *(params->ppeerDevice)); os << ", "; os << ".propName = "; @@ -15291,30 +15161,62 @@ inline std::ostream &operator<<( os << ", "; os << ".pPropValue = "; - printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - printPtr(os, *(params->ppPropSizeRet)); + details::printPtr(os, + *(params->ppPropSizeRet)); 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_loader_init_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_loader_init_params_t *params) { + + os << ".device_flags = "; + + details::printFlag(os, + *(params->pdevice_flags)); + + os << ", "; + os << ".hLoaderConfig = "; + + details::printPtr(os, + *(params->phLoaderConfig)); + + return os; +} + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_loader_tear_down_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_loader_tear_down_params_t *params) { + + return os; +} + +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; - printPtr(os, *(params->phContext)); + details::printPtr(os, + *(params->phContext)); os << ", "; os << ".hDevice = "; - printPtr(os, *(params->phDevice)); + details::printPtr(os, + *(params->phDevice)); os << ", "; os << ".propName = "; @@ -15328,29 +15230,33 @@ inline std::ostream &operator<<( os << ", "; os << ".pPropValue = "; - printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - printPtr(os, *(params->ppPropSizeRet)); + details::printPtr(os, + *(params->ppPropSizeRet)); 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 = "; - printPtr(os, *(params->phContext)); + details::printPtr(os, + *(params->phContext)); os << ", "; os << ".pStart = "; - printPtr(os, *(params->ppStart)); + details::printPtr(os, + *(params->ppStart)); os << ", "; os << ".size = "; @@ -15360,23 +15266,28 @@ inline std::ostream &operator<<( os << ", "; os << ".ppStart = "; - printPtr(os, *(params->pppStart)); + details::printPtr(os, + *(params->pppStart)); 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 = "; - printPtr(os, *(params->phContext)); + details::printPtr(os, + *(params->phContext)); os << ", "; os << ".pStart = "; - printPtr(os, *(params->ppStart)); + details::printPtr(os, + *(params->ppStart)); os << ", "; os << ".size = "; @@ -15386,18 +15297,22 @@ 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 = "; - printPtr(os, *(params->phContext)); + details::printPtr(os, + *(params->phContext)); os << ", "; os << ".pStart = "; - printPtr(os, *(params->ppStart)); + details::printPtr(os, + *(params->ppStart)); os << ", "; os << ".size = "; @@ -15407,7 +15322,8 @@ operator<<(std::ostream &os, os << ", "; os << ".hPhysicalMem = "; - printPtr(os, *(params->phPhysicalMem)); + details::printPtr(os, + *(params->phPhysicalMem)); os << ", "; os << ".offset = "; @@ -15417,23 +15333,28 @@ operator<<(std::ostream &os, os << ", "; os << ".flags = "; - printFlag(os, *(params->pflags)); + details::printFlag(os, + *(params->pflags)); 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 = "; - printPtr(os, *(params->phContext)); + details::printPtr(os, + *(params->phContext)); os << ", "; os << ".pStart = "; - printPtr(os, *(params->ppStart)); + details::printPtr(os, + *(params->ppStart)); os << ", "; os << ".size = "; @@ -15443,18 +15364,22 @@ 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 = "; - printPtr(os, *(params->phContext)); + details::printPtr(os, + *(params->phContext)); os << ", "; os << ".pStart = "; - printPtr(os, *(params->ppStart)); + details::printPtr(os, + *(params->ppStart)); os << ", "; os << ".size = "; @@ -15464,23 +15389,28 @@ inline std::ostream &operator<<( os << ", "; os << ".flags = "; - printFlag(os, *(params->pflags)); + details::printFlag(os, + *(params->pflags)); 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 = "; - printPtr(os, *(params->phContext)); + details::printPtr(os, + *(params->phContext)); os << ", "; os << ".pStart = "; - printPtr(os, *(params->ppStart)); + details::printPtr(os, + *(params->ppStart)); os << ", "; os << ".size = "; @@ -15499,24 +15429,27 @@ inline std::ostream &operator<<( os << ", "; os << ".pPropValue = "; - printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - printPtr(os, *(params->ppPropSizeRet)); + details::printPtr(os, + *(params->ppPropSizeRet)); 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 = "; - printPtr(os, *(params->phPlatform)); + details::printPtr(os, + *(params->phPlatform)); os << ", "; os << ".DeviceType = "; @@ -15530,31 +15463,35 @@ operator<<(std::ostream &os, os << ", "; os << ".phDevices = {"; - for (size_t i = 0; - *(params->pphDevices) != NULL && i < *params->pNumEntries; ++i) { + for (size_t i = 0; *(params->pphDevices) != NULL && i < *params->pNumEntries; ++i) { if (i != 0) { os << ", "; } - printPtr(os, (*(params->pphDevices))[i]); + details::printPtr(os, + (*(params->pphDevices))[i]); } os << "}"; os << ", "; os << ".pNumDevices = "; - printPtr(os, *(params->ppNumDevices)); + details::printPtr(os, + *(params->ppNumDevices)); 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 = "; - printPtr(os, *(params->phDevice)); + details::printPtr(os, + *(params->phDevice)); os << ", "; os << ".propName = "; @@ -15568,51 +15505,61 @@ operator<<(std::ostream &os, os << ", "; os << ".pPropValue = "; - printTagged(os, *(params->ppPropValue), *(params->ppropName), - *(params->ppropSize)); + details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); os << ", "; os << ".pPropSizeRet = "; - printPtr(os, *(params->ppPropSizeRet)); + details::printPtr(os, + *(params->ppPropSizeRet)); 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 = "; - printPtr(os, *(params->phDevice)); + details::printPtr(os, + *(params->phDevice)); 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 = "; - printPtr(os, *(params->phDevice)); + details::printPtr(os, + *(params->phDevice)); 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 = "; - printPtr(os, *(params->phDevice)); + details::printPtr(os, + *(params->phDevice)); os << ", "; os << ".pProperties = "; - printPtr(os, *(params->ppProperties)); + details::printPtr(os, + *(params->ppProperties)); os << ", "; os << ".NumDevices = "; @@ -15621,36 +15568,41 @@ operator<<(std::ostream &os, os << ", "; os << ".phSubDevices = {"; - for (size_t i = 0; - *(params->pphSubDevices) != NULL && i < *params->pNumDevices; ++i) { + for (size_t i = 0; *(params->pphSubDevices) != NULL && i < *params->pNumDevices; ++i) { if (i != 0) { os << ", "; } - printPtr(os, (*(params->pphSubDevices))[i]); + details::printPtr(os, + (*(params->pphSubDevices))[i]); } os << "}"; os << ", "; os << ".pNumDevicesRet = "; - printPtr(os, *(params->ppNumDevicesRet)); + details::printPtr(os, + *(params->ppNumDevicesRet)); 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 = "; - printPtr(os, *(params->phDevice)); + details::printPtr(os, + *(params->phDevice)); os << ", "; os << ".pBinaries = "; - printPtr(os, *(params->ppBinaries)); + details::printPtr(os, + *(params->ppBinaries)); os << ", "; os << ".NumBinaries = "; @@ -15660,78 +15612,95 @@ inline std::ostream &operator<<( os << ", "; os << ".pSelectedBinary = "; - printPtr(os, *(params->ppSelectedBinary)); + details::printPtr(os, + *(params->ppSelectedBinary)); 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 = "; - printPtr(os, *(params->phDevice)); + details::printPtr(os, + *(params->phDevice)); os << ", "; os << ".phNativeDevice = "; - printPtr(os, *(params->pphNativeDevice)); + details::printPtr(os, + *(params->pphNativeDevice)); 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 = "; - printPtr(os, *(params->phNativeDevice)); + details::printPtr(os, + *(params->phNativeDevice)); os << ", "; os << ".hPlatform = "; - printPtr(os, *(params->phPlatform)); + details::printPtr(os, + *(params->phPlatform)); os << ", "; os << ".pProperties = "; - printPtr(os, *(params->ppProperties)); + details::printPtr(os, + *(params->ppProperties)); os << ", "; os << ".phDevice = "; - printPtr(os, *(params->pphDevice)); + details::printPtr(os, + *(params->pphDevice)); 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 = "; - printPtr(os, *(params->phDevice)); + details::printPtr(os, + *(params->phDevice)); os << ", "; os << ".pDeviceTimestamp = "; - printPtr(os, *(params->ppDeviceTimestamp)); + details::printPtr(os, + *(params->ppDeviceTimestamp)); os << ", "; os << ".pHostTimestamp = "; - printPtr(os, *(params->ppHostTimestamp)); + details::printPtr(os, + *(params->ppHostTimestamp)); return os; } -template inline void printPtr(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) { @@ -15749,162 +15718,63 @@ template inline void printPtr(std::ostream &os, const T *ptr) { os << *ptr; os << ")"; } + + return UR_RESULT_SUCCESS; } +} // namespace details +} // namespace print -inline int printFunctionParams(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; - } break; - case UR_FUNCTION_COMMAND_BUFFER_RELEASE_EXP: { - os << (const struct ur_command_buffer_release_exp_params_t *)params; - } break; - case UR_FUNCTION_COMMAND_BUFFER_FINALIZE_EXP: { - os << (const struct ur_command_buffer_finalize_exp_params_t *)params; - } break; - case UR_FUNCTION_COMMAND_BUFFER_APPEND_KERNEL_LAUNCH_EXP: { - os << (const struct ur_command_buffer_append_kernel_launch_exp_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; +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_COMMAND_BUFFER_APPEND_USM_FILL_EXP: { - os << (const struct ur_command_buffer_append_usm_fill_exp_params_t *) - params; + case UR_FUNCTION_LOADER_CONFIG_RETAIN: { + os << (const struct ur_loader_config_retain_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; + case UR_FUNCTION_LOADER_CONFIG_RELEASE: { + os << (const struct ur_loader_config_release_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_GET_INFO: { + os << (const struct ur_loader_config_get_info_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; + 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_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_COMMAND_BUFFER_ENQUEUE_EXP: { - os << (const struct ur_command_buffer_enqueue_exp_params_t *)params; + case UR_FUNCTION_PLATFORM_GET_BACKEND_OPTION: { + os << (const struct ur_platform_get_backend_option_params_t *)params; } break; case UR_FUNCTION_CONTEXT_CREATE: { os << (const struct ur_context_create_params_t *)params; @@ -15922,94 +15792,11 @@ inline int printFunctionParams(std::ostream &os, uint32_t function, os << (const struct ur_context_get_native_handle_params_t *)params; } break; case UR_FUNCTION_CONTEXT_CREATE_WITH_NATIVE_HANDLE: { - os << (const struct ur_context_create_with_native_handle_params_t *) - params; + os << (const struct ur_context_create_with_native_handle_params_t *)params; } break; case UR_FUNCTION_CONTEXT_SET_EXTENDED_DELETER: { os << (const struct ur_context_set_extended_deleter_params_t *)params; } break; - case UR_FUNCTION_ENQUEUE_KERNEL_LAUNCH: { - os << (const struct ur_enqueue_kernel_launch_params_t *)params; - } break; - case UR_FUNCTION_ENQUEUE_EVENTS_WAIT: { - os << (const struct ur_enqueue_events_wait_params_t *)params; - } break; - case UR_FUNCTION_ENQUEUE_EVENTS_WAIT_WITH_BARRIER: { - os << (const struct ur_enqueue_events_wait_with_barrier_params_t *) - params; - } break; - case UR_FUNCTION_ENQUEUE_MEM_BUFFER_READ: { - os << (const struct ur_enqueue_mem_buffer_read_params_t *)params; - } break; - case UR_FUNCTION_ENQUEUE_MEM_BUFFER_WRITE: { - os << (const struct ur_enqueue_mem_buffer_write_params_t *)params; - } break; - case UR_FUNCTION_ENQUEUE_MEM_BUFFER_READ_RECT: { - os << (const struct ur_enqueue_mem_buffer_read_rect_params_t *)params; - } break; - case UR_FUNCTION_ENQUEUE_MEM_BUFFER_WRITE_RECT: { - os << (const struct ur_enqueue_mem_buffer_write_rect_params_t *)params; - } break; - case UR_FUNCTION_ENQUEUE_MEM_BUFFER_COPY: { - os << (const struct ur_enqueue_mem_buffer_copy_params_t *)params; - } break; - case UR_FUNCTION_ENQUEUE_MEM_BUFFER_COPY_RECT: { - os << (const struct ur_enqueue_mem_buffer_copy_rect_params_t *)params; - } break; - case UR_FUNCTION_ENQUEUE_MEM_BUFFER_FILL: { - os << (const struct ur_enqueue_mem_buffer_fill_params_t *)params; - } break; - case UR_FUNCTION_ENQUEUE_MEM_IMAGE_READ: { - os << (const struct ur_enqueue_mem_image_read_params_t *)params; - } break; - case UR_FUNCTION_ENQUEUE_MEM_IMAGE_WRITE: { - os << (const struct ur_enqueue_mem_image_write_params_t *)params; - } break; - case UR_FUNCTION_ENQUEUE_MEM_IMAGE_COPY: { - os << (const struct ur_enqueue_mem_image_copy_params_t *)params; - } break; - case UR_FUNCTION_ENQUEUE_MEM_BUFFER_MAP: { - os << (const struct ur_enqueue_mem_buffer_map_params_t *)params; - } break; - case UR_FUNCTION_ENQUEUE_MEM_UNMAP: { - os << (const struct ur_enqueue_mem_unmap_params_t *)params; - } break; - case UR_FUNCTION_ENQUEUE_USM_FILL: { - os << (const struct ur_enqueue_usm_fill_params_t *)params; - } break; - case UR_FUNCTION_ENQUEUE_USM_MEMCPY: { - os << (const struct ur_enqueue_usm_memcpy_params_t *)params; - } break; - case UR_FUNCTION_ENQUEUE_USM_PREFETCH: { - os << (const struct ur_enqueue_usm_prefetch_params_t *)params; - } break; - case UR_FUNCTION_ENQUEUE_USM_ADVISE: { - os << (const struct ur_enqueue_usm_advise_params_t *)params; - } break; - case UR_FUNCTION_ENQUEUE_USM_FILL_2D: { - os << (const struct ur_enqueue_usm_fill_2d_params_t *)params; - } break; - case UR_FUNCTION_ENQUEUE_USM_MEMCPY_2D: { - os << (const struct ur_enqueue_usm_memcpy_2d_params_t *)params; - } break; - case UR_FUNCTION_ENQUEUE_DEVICE_GLOBAL_VARIABLE_WRITE: { - os << (const struct ur_enqueue_device_global_variable_write_params_t *) - params; - } break; - case UR_FUNCTION_ENQUEUE_DEVICE_GLOBAL_VARIABLE_READ: { - os << (const struct ur_enqueue_device_global_variable_read_params_t *) - params; - } break; - case UR_FUNCTION_ENQUEUE_READ_HOST_PIPE: { - os << (const struct ur_enqueue_read_host_pipe_params_t *)params; - } break; - case UR_FUNCTION_ENQUEUE_WRITE_HOST_PIPE: { - os << (const struct ur_enqueue_write_host_pipe_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; @@ -16029,12 +15816,50 @@ inline int printFunctionParams(std::ostream &os, uint32_t function, os << (const struct ur_event_get_native_handle_params_t *)params; } break; case UR_FUNCTION_EVENT_CREATE_WITH_NATIVE_HANDLE: { - os << (const struct ur_event_create_with_native_handle_params_t *) - params; + os << (const struct ur_event_create_with_native_handle_params_t *)params; } break; case UR_FUNCTION_EVENT_SET_CALLBACK: { os << (const struct ur_event_set_callback_params_t *)params; } break; + case UR_FUNCTION_PROGRAM_CREATE_WITH_IL: { + os << (const struct ur_program_create_with_il_params_t *)params; + } break; + case UR_FUNCTION_PROGRAM_CREATE_WITH_BINARY: { + os << (const struct ur_program_create_with_binary_params_t *)params; + } break; + case UR_FUNCTION_PROGRAM_BUILD: { + os << (const struct ur_program_build_params_t *)params; + } break; + case UR_FUNCTION_PROGRAM_COMPILE: { + os << (const struct ur_program_compile_params_t *)params; + } break; + case UR_FUNCTION_PROGRAM_LINK: { + os << (const struct ur_program_link_params_t *)params; + } break; + case UR_FUNCTION_PROGRAM_RETAIN: { + os << (const struct ur_program_retain_params_t *)params; + } break; + case UR_FUNCTION_PROGRAM_RELEASE: { + os << (const struct ur_program_release_params_t *)params; + } break; + case UR_FUNCTION_PROGRAM_GET_FUNCTION_POINTER: { + os << (const struct ur_program_get_function_pointer_params_t *)params; + } break; + case UR_FUNCTION_PROGRAM_GET_INFO: { + os << (const struct ur_program_get_info_params_t *)params; + } break; + case UR_FUNCTION_PROGRAM_GET_BUILD_INFO: { + os << (const struct ur_program_get_build_info_params_t *)params; + } break; + case UR_FUNCTION_PROGRAM_SET_SPECIALIZATION_CONSTANTS: { + os << (const struct ur_program_set_specialization_constants_params_t *)params; + } break; + case UR_FUNCTION_PROGRAM_GET_NATIVE_HANDLE: { + os << (const struct ur_program_get_native_handle_params_t *)params; + } break; + case UR_FUNCTION_PROGRAM_CREATE_WITH_NATIVE_HANDLE: { + os << (const struct ur_program_create_with_native_handle_params_t *)params; + } break; case UR_FUNCTION_KERNEL_CREATE: { os << (const struct ur_kernel_create_params_t *)params; } break; @@ -16057,8 +15882,7 @@ inline int printFunctionParams(std::ostream &os, uint32_t function, os << (const struct ur_kernel_get_native_handle_params_t *)params; } break; case UR_FUNCTION_KERNEL_CREATE_WITH_NATIVE_HANDLE: { - os << (const struct ur_kernel_create_with_native_handle_params_t *) - params; + os << (const struct ur_kernel_create_with_native_handle_params_t *)params; } break; case UR_FUNCTION_KERNEL_SET_ARG_VALUE: { os << (const struct ur_kernel_set_arg_value_params_t *)params; @@ -16079,38 +15903,28 @@ inline int printFunctionParams(std::ostream &os, uint32_t function, os << (const struct ur_kernel_set_arg_mem_obj_params_t *)params; } break; case UR_FUNCTION_KERNEL_SET_SPECIALIZATION_CONSTANTS: { - os << (const struct ur_kernel_set_specialization_constants_params_t *) - params; + 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; + 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; + case UR_FUNCTION_SAMPLER_CREATE: { + os << (const struct ur_sampler_create_params_t *)params; } break; - case UR_FUNCTION_LOADER_CONFIG_RETAIN: { - os << (const struct ur_loader_config_retain_params_t *)params; + case UR_FUNCTION_SAMPLER_RETAIN: { + os << (const struct ur_sampler_retain_params_t *)params; } break; - case UR_FUNCTION_LOADER_CONFIG_RELEASE: { - os << (const struct ur_loader_config_release_params_t *)params; + case UR_FUNCTION_SAMPLER_RELEASE: { + os << (const struct ur_sampler_release_params_t *)params; } break; - case UR_FUNCTION_LOADER_CONFIG_GET_INFO: { - os << (const struct ur_loader_config_get_info_params_t *)params; + case UR_FUNCTION_SAMPLER_GET_INFO: { + os << (const struct ur_sampler_get_info_params_t *)params; } break; - case UR_FUNCTION_LOADER_CONFIG_ENABLE_LAYER: { - os << (const struct ur_loader_config_enable_layer_params_t *)params; + case UR_FUNCTION_SAMPLER_GET_NATIVE_HANDLE: { + os << (const struct ur_sampler_get_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; + case UR_FUNCTION_SAMPLER_CREATE_WITH_NATIVE_HANDLE: { + os << (const struct ur_sampler_create_with_native_handle_params_t *)params; } break; case UR_FUNCTION_MEM_IMAGE_CREATE: { os << (const struct ur_mem_image_create_params_t *)params; @@ -16131,12 +15945,10 @@ inline int printFunctionParams(std::ostream &os, uint32_t function, os << (const struct ur_mem_get_native_handle_params_t *)params; } break; case UR_FUNCTION_MEM_BUFFER_CREATE_WITH_NATIVE_HANDLE: { - os << (const struct ur_mem_buffer_create_with_native_handle_params_t *) - params; + os << (const struct ur_mem_buffer_create_with_native_handle_params_t *)params; } break; case UR_FUNCTION_MEM_IMAGE_CREATE_WITH_NATIVE_HANDLE: { - os << (const struct ur_mem_image_create_with_native_handle_params_t *) - params; + os << (const struct ur_mem_image_create_with_native_handle_params_t *)params; } break; case UR_FUNCTION_MEM_GET_INFO: { os << (const struct ur_mem_get_info_params_t *)params; @@ -16153,65 +15965,98 @@ inline int printFunctionParams(std::ostream &os, uint32_t function, case UR_FUNCTION_PHYSICAL_MEM_RELEASE: { os << (const struct ur_physical_mem_release_params_t *)params; } break; - case UR_FUNCTION_PLATFORM_GET: { - os << (const struct ur_platform_get_params_t *)params; + case UR_FUNCTION_ADAPTER_GET: { + os << (const struct ur_adapter_get_params_t *)params; } break; - case UR_FUNCTION_PLATFORM_GET_INFO: { - os << (const struct ur_platform_get_info_params_t *)params; + case UR_FUNCTION_ADAPTER_RELEASE: { + os << (const struct ur_adapter_release_params_t *)params; } break; - case UR_FUNCTION_PLATFORM_GET_NATIVE_HANDLE: { - os << (const struct ur_platform_get_native_handle_params_t *)params; + case UR_FUNCTION_ADAPTER_RETAIN: { + os << (const struct ur_adapter_retain_params_t *)params; } break; - case UR_FUNCTION_PLATFORM_CREATE_WITH_NATIVE_HANDLE: { - os << (const struct ur_platform_create_with_native_handle_params_t *) - params; + case UR_FUNCTION_ADAPTER_GET_LAST_ERROR: { + os << (const struct ur_adapter_get_last_error_params_t *)params; } break; - case UR_FUNCTION_PLATFORM_GET_API_VERSION: { - os << (const struct ur_platform_get_api_version_params_t *)params; + case UR_FUNCTION_ADAPTER_GET_INFO: { + os << (const struct ur_adapter_get_info_params_t *)params; } break; - case UR_FUNCTION_PLATFORM_GET_BACKEND_OPTION: { - os << (const struct ur_platform_get_backend_option_params_t *)params; + case UR_FUNCTION_ENQUEUE_KERNEL_LAUNCH: { + os << (const struct ur_enqueue_kernel_launch_params_t *)params; } break; - case UR_FUNCTION_PROGRAM_CREATE_WITH_IL: { - os << (const struct ur_program_create_with_il_params_t *)params; + case UR_FUNCTION_ENQUEUE_EVENTS_WAIT: { + os << (const struct ur_enqueue_events_wait_params_t *)params; } break; - case UR_FUNCTION_PROGRAM_CREATE_WITH_BINARY: { - os << (const struct ur_program_create_with_binary_params_t *)params; + case UR_FUNCTION_ENQUEUE_EVENTS_WAIT_WITH_BARRIER: { + os << (const struct ur_enqueue_events_wait_with_barrier_params_t *)params; } break; - case UR_FUNCTION_PROGRAM_BUILD: { - os << (const struct ur_program_build_params_t *)params; + case UR_FUNCTION_ENQUEUE_MEM_BUFFER_READ: { + os << (const struct ur_enqueue_mem_buffer_read_params_t *)params; } break; - case UR_FUNCTION_PROGRAM_COMPILE: { - os << (const struct ur_program_compile_params_t *)params; + case UR_FUNCTION_ENQUEUE_MEM_BUFFER_WRITE: { + os << (const struct ur_enqueue_mem_buffer_write_params_t *)params; } break; - case UR_FUNCTION_PROGRAM_LINK: { - os << (const struct ur_program_link_params_t *)params; + case UR_FUNCTION_ENQUEUE_MEM_BUFFER_READ_RECT: { + os << (const struct ur_enqueue_mem_buffer_read_rect_params_t *)params; } break; - case UR_FUNCTION_PROGRAM_RETAIN: { - os << (const struct ur_program_retain_params_t *)params; + case UR_FUNCTION_ENQUEUE_MEM_BUFFER_WRITE_RECT: { + os << (const struct ur_enqueue_mem_buffer_write_rect_params_t *)params; } break; - case UR_FUNCTION_PROGRAM_RELEASE: { - os << (const struct ur_program_release_params_t *)params; + case UR_FUNCTION_ENQUEUE_MEM_BUFFER_COPY: { + os << (const struct ur_enqueue_mem_buffer_copy_params_t *)params; } break; - case UR_FUNCTION_PROGRAM_GET_FUNCTION_POINTER: { - os << (const struct ur_program_get_function_pointer_params_t *)params; + case UR_FUNCTION_ENQUEUE_MEM_BUFFER_COPY_RECT: { + os << (const struct ur_enqueue_mem_buffer_copy_rect_params_t *)params; } break; - case UR_FUNCTION_PROGRAM_GET_INFO: { - os << (const struct ur_program_get_info_params_t *)params; + case UR_FUNCTION_ENQUEUE_MEM_BUFFER_FILL: { + os << (const struct ur_enqueue_mem_buffer_fill_params_t *)params; } break; - case UR_FUNCTION_PROGRAM_GET_BUILD_INFO: { - os << (const struct ur_program_get_build_info_params_t *)params; + case UR_FUNCTION_ENQUEUE_MEM_IMAGE_READ: { + os << (const struct ur_enqueue_mem_image_read_params_t *)params; } break; - case UR_FUNCTION_PROGRAM_SET_SPECIALIZATION_CONSTANTS: { - os << (const struct ur_program_set_specialization_constants_params_t *) - params; + case UR_FUNCTION_ENQUEUE_MEM_IMAGE_WRITE: { + os << (const struct ur_enqueue_mem_image_write_params_t *)params; } break; - case UR_FUNCTION_PROGRAM_GET_NATIVE_HANDLE: { - os << (const struct ur_program_get_native_handle_params_t *)params; + case UR_FUNCTION_ENQUEUE_MEM_IMAGE_COPY: { + os << (const struct ur_enqueue_mem_image_copy_params_t *)params; } break; - case UR_FUNCTION_PROGRAM_CREATE_WITH_NATIVE_HANDLE: { - os << (const struct ur_program_create_with_native_handle_params_t *) - params; + case UR_FUNCTION_ENQUEUE_MEM_BUFFER_MAP: { + os << (const struct ur_enqueue_mem_buffer_map_params_t *)params; + } break; + case UR_FUNCTION_ENQUEUE_MEM_UNMAP: { + os << (const struct ur_enqueue_mem_unmap_params_t *)params; + } break; + case UR_FUNCTION_ENQUEUE_USM_FILL: { + os << (const struct ur_enqueue_usm_fill_params_t *)params; + } break; + case UR_FUNCTION_ENQUEUE_USM_MEMCPY: { + os << (const struct ur_enqueue_usm_memcpy_params_t *)params; + } break; + case UR_FUNCTION_ENQUEUE_USM_PREFETCH: { + os << (const struct ur_enqueue_usm_prefetch_params_t *)params; + } break; + case UR_FUNCTION_ENQUEUE_USM_ADVISE: { + os << (const struct ur_enqueue_usm_advise_params_t *)params; + } break; + case UR_FUNCTION_ENQUEUE_USM_FILL_2D: { + os << (const struct ur_enqueue_usm_fill_2d_params_t *)params; + } break; + case UR_FUNCTION_ENQUEUE_USM_MEMCPY_2D: { + os << (const struct ur_enqueue_usm_memcpy_2d_params_t *)params; + } break; + case UR_FUNCTION_ENQUEUE_DEVICE_GLOBAL_VARIABLE_WRITE: { + os << (const struct ur_enqueue_device_global_variable_write_params_t *)params; + } break; + case UR_FUNCTION_ENQUEUE_DEVICE_GLOBAL_VARIABLE_READ: { + os << (const struct ur_enqueue_device_global_variable_read_params_t *)params; + } break; + case UR_FUNCTION_ENQUEUE_READ_HOST_PIPE: { + os << (const struct ur_enqueue_read_host_pipe_params_t *)params; + } break; + case UR_FUNCTION_ENQUEUE_WRITE_HOST_PIPE: { + os << (const struct ur_enqueue_write_host_pipe_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_QUEUE_GET_INFO: { os << (const struct ur_queue_get_info_params_t *)params; @@ -16229,8 +16074,7 @@ inline int printFunctionParams(std::ostream &os, uint32_t function, os << (const struct ur_queue_get_native_handle_params_t *)params; } break; case UR_FUNCTION_QUEUE_CREATE_WITH_NATIVE_HANDLE: { - os << (const struct ur_queue_create_with_native_handle_params_t *) - params; + os << (const struct ur_queue_create_with_native_handle_params_t *)params; } break; case UR_FUNCTION_QUEUE_FINISH: { os << (const struct ur_queue_finish_params_t *)params; @@ -16238,24 +16082,56 @@ inline int printFunctionParams(std::ostream &os, uint32_t function, case UR_FUNCTION_QUEUE_FLUSH: { os << (const struct ur_queue_flush_params_t *)params; } break; - case UR_FUNCTION_SAMPLER_CREATE: { - os << (const struct ur_sampler_create_params_t *)params; + 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_SAMPLER_RETAIN: { - os << (const struct ur_sampler_retain_params_t *)params; + 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_SAMPLER_RELEASE: { - os << (const struct ur_sampler_release_params_t *)params; + case UR_FUNCTION_BINDLESS_IMAGES_IMAGE_ALLOCATE_EXP: { + os << (const struct ur_bindless_images_image_allocate_exp_params_t *)params; } break; - case UR_FUNCTION_SAMPLER_GET_INFO: { - os << (const struct ur_sampler_get_info_params_t *)params; + case UR_FUNCTION_BINDLESS_IMAGES_IMAGE_FREE_EXP: { + os << (const struct ur_bindless_images_image_free_exp_params_t *)params; } break; - case UR_FUNCTION_SAMPLER_GET_NATIVE_HANDLE: { - os << (const struct ur_sampler_get_native_handle_params_t *)params; + 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_SAMPLER_CREATE_WITH_NATIVE_HANDLE: { - os << (const struct ur_sampler_create_with_native_handle_params_t *) - params; + 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_USM_HOST_ALLOC: { os << (const struct ur_usm_host_alloc_params_t *)params; @@ -16293,20 +16169,74 @@ inline int printFunctionParams(std::ostream &os, uint32_t function, case UR_FUNCTION_USM_RELEASE_EXP: { os << (const struct ur_usm_release_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; + } break; + case UR_FUNCTION_COMMAND_BUFFER_RELEASE_EXP: { + os << (const struct ur_command_buffer_release_exp_params_t *)params; + } break; + case UR_FUNCTION_COMMAND_BUFFER_FINALIZE_EXP: { + os << (const struct ur_command_buffer_finalize_exp_params_t *)params; + } break; + case UR_FUNCTION_COMMAND_BUFFER_APPEND_KERNEL_LAUNCH_EXP: { + os << (const struct ur_command_buffer_append_kernel_launch_exp_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; + } 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; + } 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; + } 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; + } 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; + } break; + case UR_FUNCTION_COMMAND_BUFFER_APPEND_USM_PREFETCH_EXP: { + os << (const struct ur_command_buffer_append_usm_prefetch_exp_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; + } break; + case UR_FUNCTION_COMMAND_BUFFER_ENQUEUE_EXP: { + os << (const struct ur_command_buffer_enqueue_exp_params_t *)params; + } break; case UR_FUNCTION_USM_P2P_ENABLE_PEER_ACCESS_EXP: { os << (const struct ur_usm_p2p_enable_peer_access_exp_params_t *)params; } break; case UR_FUNCTION_USM_P2P_DISABLE_PEER_ACCESS_EXP: { - os << (const struct ur_usm_p2p_disable_peer_access_exp_params_t *) - params; + os << (const struct ur_usm_p2p_disable_peer_access_exp_params_t *)params; } break; case UR_FUNCTION_USM_P2P_PEER_ACCESS_GET_INFO_EXP: { - os << (const struct ur_usm_p2p_peer_access_get_info_exp_params_t *) - params; + os << (const struct ur_usm_p2p_peer_access_get_info_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_VIRTUAL_MEM_GRANULARITY_GET_INFO: { - os << (const struct ur_virtual_mem_granularity_get_info_params_t *) - params; + os << (const struct ur_virtual_mem_granularity_get_info_params_t *)params; } break; case UR_FUNCTION_VIRTUAL_MEM_RESERVE: { os << (const struct ur_virtual_mem_reserve_params_t *)params; @@ -16348,17 +16278,17 @@ inline int printFunctionParams(std::ostream &os, uint32_t function, os << (const struct ur_device_get_native_handle_params_t *)params; } break; case UR_FUNCTION_DEVICE_CREATE_WITH_NATIVE_HANDLE: { - os << (const struct ur_device_create_with_native_handle_params_t *) - params; + os << (const struct ur_device_create_with_native_handle_params_t *)params; } break; case UR_FUNCTION_DEVICE_GET_GLOBAL_TIMESTAMPS: { os << (const struct ur_device_get_global_timestamps_params_t *)params; } break; default: - return -1; + return UR_RESULT_ERROR_INVALID_ENUMERATION; } - return 0; + return UR_RESULT_SUCCESS; } -} // namespace ur_print +} // namespace extras +} // namespace ur #endif /* UR_PRINT_HPP */ diff --git a/scripts/Doxyfile b/scripts/Doxyfile index 0134f27418..199fd6afdc 100644 --- a/scripts/Doxyfile +++ b/scripts/Doxyfile @@ -848,7 +848,8 @@ RECURSIVE = YES # Note that relative paths are relative to the directory from which doxygen is # run. -EXCLUDE = README.md +EXCLUDE = README.md \ + ../include/ur_print.hpp # 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 diff --git a/scripts/core/INTRO.rst b/scripts/core/INTRO.rst index d3a862ad87..255fe84e50 100644 --- a/scripts/core/INTRO.rst +++ b/scripts/core/INTRO.rst @@ -145,6 +145,14 @@ and followed by a digit or uppercase letter are reserved for use by the implemen Applications which use Unified Runtime must not provide definitions of these symbols. This allows the Unified Runtime shared library to be updated with additional symbols for new API versions or extensions without causing symbol conflicts with existing applications. +Printing API +------------ +## --validate=off +The header "${x}_print.hpp" contains the "${x}::print" namespace with the output stream operator (<<) overloads for Unified Runtime objects. +There is also the "${x}::extras::printFunctionParams" function for printing function parameters. These parameters have to be provided in a \*params_t struct format suitable for +a given function. +## --validate=on + Tracing --------------------- diff --git a/scripts/generate_code.py b/scripts/generate_code.py index 0d391b1747..1cf6a986e3 100644 --- a/scripts/generate_code.py +++ b/scripts/generate_code.py @@ -97,6 +97,7 @@ def _generate_api_cpp(incpath, srcpath, namespace, tags, version, revision, spec loc = _mako_api_h(incpath, namespace, tags, version, revision, specs, meta) loc += _mako_api_cpp(srcpath, namespace, tags, version, revision, specs, meta) loc += _mako_ddi_h(incpath, namespace, tags, version, revision, specs, meta) + loc += _mako_print_hpp(incpath, namespace, tags, version, revision, specs, meta) return loc @@ -278,7 +279,7 @@ def _mako_tracing_layer_cpp(path, namespace, tags, version, specs, meta): """ generates c/c++ files from the specification documents """ -def _mako_print_hpp(path, namespace, tags, version, specs, meta): +def _mako_print_hpp(path, namespace, tags, version, revision, specs, meta): template = "print.hpp.mako" fin = os.path.join(templates_dir, template) @@ -291,6 +292,7 @@ def _mako_print_hpp(path, namespace, tags, version, specs, meta): fin, fout, name=name, ver=version, + rev=revision, namespace=namespace, tags=tags, specs=specs, @@ -361,6 +363,5 @@ def generate_common(path, section, namespace, tags, version, specs, meta): os.makedirs(layer_dstpath, exist_ok=True) loc = 0 - loc += _mako_print_hpp(layer_dstpath, namespace, tags, version, specs, meta) print("COMMON Generated %s lines of code.\n"%loc) diff --git a/scripts/templates/print.hpp.mako b/scripts/templates/print.hpp.mako index 51d33bf684..b4976eaf6b 100644 --- a/scripts/templates/print.hpp.mako +++ b/scripts/templates/print.hpp.mako @@ -16,6 +16,7 @@ from templates import helper as th * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * * @file ${name}.hpp + * @version v${ver}-r${rev} * */ #ifndef ${X}_PRINT_HPP @@ -25,17 +26,18 @@ from templates import helper as th #include #include +## Mako helper functions ###################################################### <%def name="member(iname, itype, loop)"> %if iname == "pNext": - printStruct(os, ${caller.body()}); + details::printStruct(os, ${caller.body()}); %elif th.type_traits.is_flags(itype): - printFlag<${th.type_traits.get_flag_type(itype)}>(os, ${caller.body()}); + details::printFlag<${th.type_traits.get_flag_type(itype)}>(os, ${caller.body()}); %elif not loop and th.type_traits.is_pointer(itype): - printPtr(os, ${caller.body()}); + details::printPtr(os, ${caller.body()}); %elif loop and th.type_traits.is_pointer_to_pointer(itype): - printPtr(os, ${caller.body()}); + details::printPtr(os, ${caller.body()}); %elif th.type_traits.is_handle(itype): - printPtr(os, ${caller.body()}); + details::printPtr(os, ${caller.body()}); %elif iname and iname.startswith("pfn"): os << reinterpret_cast(${caller.body()}); %else: @@ -83,7 +85,7 @@ def findMemberType(_item): os << "}"; %elif findMemberType(item) is not None and findMemberType(item)['type'] == "union": os << ".${iname} = "; - printUnion(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++){ @@ -97,7 +99,7 @@ def findMemberType(_item): os << "}"; %elif typename is not None: os << ".${iname} = "; - printTagged(os, ${deref}(params${access}${pname}), ${deref}(params${access}${prefix}${typename}), ${deref}(params${access}${prefix}${typename_size})); + details::printTagged(os, ${deref}(params${access}${pname}), ${deref}(params${access}${prefix}${typename}), ${deref}(params${access}${prefix}${typename_size})); %else: os << ".${iname} = "; <%call expr="member(iname, itype, False)"> @@ -106,7 +108,10 @@ def findMemberType(_item): %endif -namespace ${x}_print { +namespace ${x} { +namespace print { +## API functions declarations ################################################# +namespace details { template struct is_handle : std::false_type {}; %for spec in specs: %for obj in spec['objects']: @@ -117,65 +122,70 @@ 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 printPtr(std::ostream &os, const T *ptr); -template inline void printFlag(std::ostream &os, uint32_t flag); -template inline void printTagged(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']: ## ENUM ####################################################################### %if re.match(r"enum", obj['type']): %if obj.get('typed_etors', False) is True: - template <> inline void printTagged(std::ostream &os, const void *ptr, ${th.make_enum_name(n, tags, obj)} value, size_t size); + template <> inline ${x}_result_t printTagged(std::ostream &os, const void *ptr, ${th.make_enum_name(n, tags, obj)} value, size_t size); %elif "structure_type" in obj['name']: - inline void printStruct(std::ostream &os, const void *ptr); + inline ${x}_result_t printStruct(std::ostream &os, const void *ptr); %endif %endif +## UNION ###################################################################### %if re.match(r"union", obj['type']) and obj['name']: <% tag = [_obj for _s in specs for _obj in _s['objects'] if _obj['name'] == obj['tag']][0] %> - inline void printUnion( + inline ${x}_result_t printUnion( std::ostream &os, const ${obj['type']} ${th.make_type_name(n, tags, obj)} params, const ${tag['type']} ${th.make_type_name(n, tags, tag)} tag ); %endif - +## FLAG ####################################################################### %if th.type_traits.is_flags(obj['name']): - template<> inline void printFlag<${th.make_enum_name(n, tags, obj)}>(std::ostream &os, uint32_t flag); + template<> inline ${x}_result_t printFlag<${th.make_enum_name(n, tags, obj)}>(std::ostream &os, uint32_t flag); %endif %endfor # obj in spec['objects'] %endfor +} // namespace details %for spec in specs: %for obj in spec['objects']: -## ENUM ####################################################################### %if re.match(r"enum", obj['type']): - inline std::ostream &operator<<(std::ostream &os, enum ${th.make_enum_name(n, tags, obj)} value); + ${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 +## API functions definitions ################################################## %for spec in specs: %for obj in spec['objects']: ## ENUM ####################################################################### %if re.match(r"enum", obj['type']): + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ${th.make_enum_name(n, tags, obj)} type + /// @returns + /// std::ostream & %if "api_version" in obj['name']: - inline std::ostream &operator<<(std::ostream &os, enum ${th.make_enum_name(n, tags, obj)} value) { + inline std::ostream &operator<<(std::ostream &os, ${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, enum ${th.make_enum_name(n, tags, obj)} value) { + inline std::ostream &operator<<(std::ostream &os, ${th.make_enum_name(n, tags, obj)} value) { switch (value) { %for n, item in enumerate(obj['etors']): <% ename = th.make_etor_name(n, tags, obj['name'], item['name']) - %> - case ${ename}: + %>case ${ename}: os << "${ename}"; break; %endfor @@ -187,11 +197,13 @@ template inline void printTagged(std::ostream &os, const void *ptr, } %endif %if obj.get('typed_etors', False) is True: + namespace details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ${th.make_enum_name(n, tags, obj)} enum value template <> - inline void printTagged(std::ostream &os, const void *ptr, ${th.make_enum_name(n, tags, obj)} value, size_t size) { + inline ${x}_result_t printTagged(std::ostream &os, const void *ptr, ${th.make_enum_name(n, tags, obj)} value, size_t size) { if (ptr == NULL) { - printPtr(os, ptr); - return; + return printPtr(os, ptr); } switch (value) { @@ -199,8 +211,7 @@ template inline void printTagged(std::ostream &os, const void *ptr, <% ename = th.make_etor_name(n, tags, obj['name'], item['name']) vtype = th.etor_get_associated_type(n, tags, item) - %> - case ${ename}: { + %>case ${ename}: { %if th.value_traits.is_array(vtype): <% atype = th.value_traits.get_array_name(vtype) %> %if 'void' in atype: @@ -231,7 +242,7 @@ template inline void printTagged(std::ostream &os, const void *ptr, %endif if (sizeof(${vtype}) > size) { os << "invalid size (is: " << size << ", expected: >=" << sizeof(${vtype}) << ")"; - return; + return ${X}_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; <%call expr="member(tptr, vtype, False)"> @@ -243,15 +254,19 @@ template inline void printTagged(std::ostream &os, const void *ptr, %endfor default: os << "unknown enumerator"; - break; + return ${X}_RESULT_ERROR_INVALID_ENUMERATION; } + return ${X}_RESULT_SUCCESS; } + } // namespace details %elif "structure_type" in obj['name']: - inline void printStruct(std::ostream &os, const void *ptr) { + namespace details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ${th.make_enum_name(n, tags, obj)} struct + inline ${x}_result_t printStruct(std::ostream &os, const void *ptr) { if (ptr == NULL) { - printPtr(os, ptr); - return; + return printPtr(os, ptr); } ## structure type enum value must be first @@ -268,46 +283,57 @@ template inline void printTagged(std::ostream &os, const void *ptr, %endfor default: os << "unknown enumerator"; - break; + return ${X}_RESULT_ERROR_INVALID_ENUMERATION; } + return ${X}_RESULT_SUCCESS; } + } // namespace details %endif -%if th.type_traits.is_flags(obj['name']): + %if th.type_traits.is_flags(obj['name']): -template<> -inline void printFlag<${th.make_enum_name(n, tags, obj)}>(std::ostream &os, uint32_t flag) { - uint32_t val = flag; - bool first = true; - %for n, item in enumerate(obj['etors']): - <% - ename = th.make_etor_name(n, tags, obj['name'], item['name']) - %> - if ((val & ${ename}) == (uint32_t)${ename}) { - ## toggle the bits to avoid printing overlapping values - ## instead of e.g., FLAG_FOO | FLAG_BAR | FLAG_ALL, this will just - ## print FLAG_FOO | FLAG_BAR (or just FLAG_ALL, depending on order). - val ^= (uint32_t)${ename}; + namespace details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ${th.make_enum_name(n, tags, obj)} flag + template<> + inline ${x}_result_t printFlag<${th.make_enum_name(n, tags, obj)}>(std::ostream &os, uint32_t flag) { + uint32_t val = flag; + bool first = true; + %for n, item in enumerate(obj['etors']): + <% + ename = th.make_etor_name(n, tags, obj['name'], item['name']) + %> + if ((val & ${ename}) == (uint32_t)${ename}) { + ## toggle the bits to avoid printing overlapping values + ## instead of e.g., FLAG_FOO | FLAG_BAR | FLAG_ALL, this will just + ## print FLAG_FOO | FLAG_BAR (or just FLAG_ALL, depending on order). + val ^= (uint32_t)${ename}; + if (!first) { + os << " | "; + } else { + first = false; + } + os << ${ename}; + } + %endfor + if (val != 0) { + std::bitset<32> bits(val); if (!first) { os << " | "; - } else { - first = false; } - os << ${ename}; + os << "unknown bit flags " << bits; + } else if (first) { + os << "0"; } - %endfor - if (val != 0) { - std::bitset<32> bits(val); - if (!first) { - os << " | "; - } - os << "unknown bit flags " << bits; - } else if (first) { - os << "0"; + return ${X}_RESULT_SUCCESS; } -} -%endif -## STRUCT/UNION ############################################################### + } // namespace details + %endif +## STRUCT ##################################################################### %elif re.match(r"struct", obj['type']): +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ${th.make_type_name(n, tags, obj)} type +/// @returns +/// std::ostream & inline std::ostream &operator<<(std::ostream &os, const ${obj['type']} ${th.make_type_name(n, tags, obj)} params) { os << "(${obj['type']} ${th.make_type_name(n, tags, obj)}){"; <% @@ -324,9 +350,13 @@ inline std::ostream &operator<<(std::ostream &os, const ${obj['type']} ${th.make os << "}"; return os; } +## UNION ###################################################################### %elif re.match(r"union", obj['type']) and obj['name']: +namespace details { <% tag = findUnionTag(obj) %> -inline void printUnion( + /////////////////////////////////////////////////////////////////////////////// + // @brief Print ${th.make_type_name(n, tags, obj)} union + inline ${x}_result_t printUnion( std::ostream &os, const ${obj['type']} ${th.make_type_name(n, tags, obj)} params, const ${tag['type']} ${th.make_type_name(n, tags, tag)} tag @@ -347,10 +377,12 @@ for item in obj['members']: %endfor default: os << ""; - break; + return ${X}_RESULT_ERROR_INVALID_ENUMERATION; } os << "}"; + return ${X}_RESULT_SUCCESS; } +} // namespace details %endif %endfor # obj in spec['objects'] %endfor @@ -358,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() @@ -375,7 +411,10 @@ inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct %endfor %endfor -template inline void printPtr(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) { @@ -393,10 +432,28 @@ template inline void printPtr(std::ostream &os, const T *ptr) { os << *ptr; os << ")"; } + + return ${X}_RESULT_SUCCESS; } +} // namespace details +} // namespace print + +namespace extras { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print function parameters +/// @returns +/// - ::${X}_RESULT_SUCCESS +/// - ::${X}_RESULT_ERROR_INVALID_ENUMERATION +/// - ::${X}_RESULT_ERROR_INVALID_NULL_POINTER +/// - `NULL == params` +${X}_APIEXPORT inline ${x}_result_t ${X}_APICALL printFunctionParams(std::ostream &os, ur_function_t function, const void *params) { + using namespace print; + + if (!params) { + return ${X}_RESULT_ERROR_INVALID_NULL_POINTER; + } -inline int printFunctionParams(std::ostream &os, uint32_t function, const void *params) { - switch((enum ${x}_function_t)function) { + switch(function) { %for tbl in th.get_pfncbtables(specs, meta, n, tags): %for obj in tbl['functions']: case ${th.make_func_etor(n, tags, obj)}: { @@ -404,10 +461,11 @@ inline int printFunctionParams(std::ostream &os, uint32_t function, const void * } break; %endfor %endfor - default: return -1; + default: return ${X}_RESULT_ERROR_INVALID_ENUMERATION; } - return 0; + return ${X}_RESULT_SUCCESS; } -} // namespace ur_print +} // namespace extras +} // namespace ${x} #endif /* ${X}_PRINT_HPP */ diff --git a/source/common/logger/ur_sinks.hpp b/source/common/logger/ur_sinks.hpp index 4f3a0b9c80..f63d30d809 100644 --- a/source/common/logger/ur_sinks.hpp +++ b/source/common/logger/ur_sinks.hpp @@ -16,7 +16,7 @@ #include "ur_print.hpp" namespace logger { -using namespace ur_print; +using namespace ur::print; class Sink { public: diff --git a/test/loader/loader_lifetime/urLoaderInit.cpp b/test/loader/loader_lifetime/urLoaderInit.cpp index c2361faf6e..693cf273f2 100644 --- a/test/loader/loader_lifetime/urLoaderInit.cpp +++ b/test/loader/loader_lifetime/urLoaderInit.cpp @@ -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_print::printFlag(ss, info.param); + ur::print::details::printFlag(ss, info.param); return GTestSanitizeString(ss.str()); }); diff --git a/test/unit/utils/params.cpp b/test/unit/utils/params.cpp index 41e427ff0d..82a7d946d4 100644 --- a/test/unit/utils/params.cpp +++ b/test/unit/utils/params.cpp @@ -405,7 +405,7 @@ typedef Typesfunction_id, - args->args_data); + ur::extras::printFunctionParams( + args_str, (enum ur_function_t)args->function_id, args->args_data); } if (trace_type == TRACE_FN_BEGIN) {