diff --git a/include/ur_api.h b/include/ur_api.h index 7922b53d6c..aa48597f1c 100644 --- a/include/ur_api.h +++ b/include/ur_api.h @@ -1489,229 +1489,228 @@ urDeviceGetSelected( /////////////////////////////////////////////////////////////////////////////// /// @brief Supported device info typedef enum ur_device_info_t { - UR_DEVICE_INFO_TYPE = 0, ///< [::ur_device_type_t] type of the device - UR_DEVICE_INFO_VENDOR_ID = 1, ///< [uint32_t] vendor Id of the device - UR_DEVICE_INFO_DEVICE_ID = 2, ///< [uint32_t] Id of the device - UR_DEVICE_INFO_MAX_COMPUTE_UNITS = 3, ///< [uint32_t] the number of compute units - UR_DEVICE_INFO_MAX_WORK_ITEM_DIMENSIONS = 4, ///< [uint32_t] max work item dimensions - UR_DEVICE_INFO_MAX_WORK_ITEM_SIZES = 5, ///< [size_t[]] return an array of max work item sizes - UR_DEVICE_INFO_MAX_WORK_GROUP_SIZE = 6, ///< [size_t] max work group size - UR_DEVICE_INFO_SINGLE_FP_CONFIG = 7, ///< [::ur_device_fp_capability_flags_t] single precision floating point - ///< capability - UR_DEVICE_INFO_HALF_FP_CONFIG = 8, ///< [::ur_device_fp_capability_flags_t] half precision floating point - ///< capability - UR_DEVICE_INFO_DOUBLE_FP_CONFIG = 9, ///< [::ur_device_fp_capability_flags_t] double precision floating point - ///< capability - UR_DEVICE_INFO_QUEUE_PROPERTIES = 10, ///< [::ur_queue_flags_t] command queue properties supported by the device - UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_CHAR = 11, ///< [uint32_t] preferred vector width for char - UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_SHORT = 12, ///< [uint32_t] preferred vector width for short - UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_INT = 13, ///< [uint32_t] preferred vector width for int - UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG = 14, ///< [uint32_t] preferred vector width for long - UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_FLOAT = 15, ///< [uint32_t] preferred vector width for float - UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_DOUBLE = 16, ///< [uint32_t] preferred vector width for double - UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_HALF = 17, ///< [uint32_t] preferred vector width for half float - UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_CHAR = 18, ///< [uint32_t] native vector width for char - UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_SHORT = 19, ///< [uint32_t] native vector width for short - UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_INT = 20, ///< [uint32_t] native vector width for int - UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG = 21, ///< [uint32_t] native vector width for long - UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_FLOAT = 22, ///< [uint32_t] native vector width for float - UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_DOUBLE = 23, ///< [uint32_t] native vector width for double - UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_HALF = 24, ///< [uint32_t] native vector width for half float - UR_DEVICE_INFO_MAX_CLOCK_FREQUENCY = 25, ///< [uint32_t] max clock frequency in MHz - UR_DEVICE_INFO_MEMORY_CLOCK_RATE = 26, ///< [uint32_t] memory clock frequency in MHz - UR_DEVICE_INFO_ADDRESS_BITS = 27, ///< [uint32_t] address bits - UR_DEVICE_INFO_MAX_MEM_ALLOC_SIZE = 28, ///< [uint64_t] max memory allocation size - UR_DEVICE_INFO_IMAGE_SUPPORTED = 29, ///< [::ur_bool_t] images are supported - UR_DEVICE_INFO_MAX_READ_IMAGE_ARGS = 30, ///< [uint32_t] max number of image objects arguments of a kernel declared - ///< with the read_only qualifier - UR_DEVICE_INFO_MAX_WRITE_IMAGE_ARGS = 31, ///< [uint32_t] max number of image objects arguments of a kernel declared - ///< with the write_only qualifier - UR_DEVICE_INFO_MAX_READ_WRITE_IMAGE_ARGS = 32, ///< [uint32_t] max number of image objects arguments of a kernel declared - ///< with the read_write qualifier - UR_DEVICE_INFO_IMAGE2D_MAX_WIDTH = 33, ///< [size_t] max width of Image2D object - UR_DEVICE_INFO_IMAGE2D_MAX_HEIGHT = 34, ///< [size_t] max height of Image2D object - UR_DEVICE_INFO_IMAGE3D_MAX_WIDTH = 35, ///< [size_t] max width of Image3D object - UR_DEVICE_INFO_IMAGE3D_MAX_HEIGHT = 36, ///< [size_t] max height of Image3D object - UR_DEVICE_INFO_IMAGE3D_MAX_DEPTH = 37, ///< [size_t] max depth of Image3D object - UR_DEVICE_INFO_IMAGE_MAX_BUFFER_SIZE = 38, ///< [size_t] max image buffer size - UR_DEVICE_INFO_IMAGE_MAX_ARRAY_SIZE = 39, ///< [size_t] max image array size - UR_DEVICE_INFO_MAX_SAMPLERS = 40, ///< [uint32_t] max number of samplers that can be used in a kernel - UR_DEVICE_INFO_MAX_PARAMETER_SIZE = 41, ///< [size_t] max size in bytes of all arguments passed to a kernel - UR_DEVICE_INFO_MEM_BASE_ADDR_ALIGN = 42, ///< [uint32_t] memory base address alignment - UR_DEVICE_INFO_GLOBAL_MEM_CACHE_TYPE = 43, ///< [::ur_device_mem_cache_type_t] global memory cache type - UR_DEVICE_INFO_GLOBAL_MEM_CACHELINE_SIZE = 44, ///< [uint32_t] global memory cache line size in bytes - UR_DEVICE_INFO_GLOBAL_MEM_CACHE_SIZE = 45, ///< [uint64_t] size of global memory cache in bytes - UR_DEVICE_INFO_GLOBAL_MEM_SIZE = 46, ///< [uint64_t] size of global memory in bytes - UR_DEVICE_INFO_GLOBAL_MEM_FREE = 47, ///< [uint64_t] size of global memory which is free in bytes - UR_DEVICE_INFO_MAX_CONSTANT_BUFFER_SIZE = 48, ///< [uint64_t] max constant buffer size in bytes - UR_DEVICE_INFO_MAX_CONSTANT_ARGS = 49, ///< [uint32_t] max number of __const declared arguments in a kernel - UR_DEVICE_INFO_LOCAL_MEM_TYPE = 50, ///< [::ur_device_local_mem_type_t] local memory type - UR_DEVICE_INFO_LOCAL_MEM_SIZE = 51, ///< [uint64_t] local memory size in bytes - UR_DEVICE_INFO_ERROR_CORRECTION_SUPPORT = 52, ///< [::ur_bool_t] support error correction to global and local memory - UR_DEVICE_INFO_HOST_UNIFIED_MEMORY = 53, ///< [::ur_bool_t] unified host device memory - UR_DEVICE_INFO_PROFILING_TIMER_RESOLUTION = 54, ///< [size_t] profiling timer resolution in nanoseconds - UR_DEVICE_INFO_ENDIAN_LITTLE = 55, ///< [::ur_bool_t] little endian byte order - UR_DEVICE_INFO_AVAILABLE = 56, ///< [::ur_bool_t] device is available - UR_DEVICE_INFO_COMPILER_AVAILABLE = 57, ///< [::ur_bool_t] device compiler is available - UR_DEVICE_INFO_LINKER_AVAILABLE = 58, ///< [::ur_bool_t] device linker is available - UR_DEVICE_INFO_EXECUTION_CAPABILITIES = 59, ///< [::ur_device_exec_capability_flags_t] device kernel execution - ///< capability bit-field - UR_DEVICE_INFO_QUEUE_ON_DEVICE_PROPERTIES = 60, ///< [::ur_queue_flags_t] device command queue property bit-field - UR_DEVICE_INFO_QUEUE_ON_HOST_PROPERTIES = 61, ///< [::ur_queue_flags_t] host queue property bit-field - UR_DEVICE_INFO_BUILT_IN_KERNELS = 62, ///< [char[]] a semi-colon separated list of built-in kernels - UR_DEVICE_INFO_PLATFORM = 63, ///< [::ur_platform_handle_t] the platform associated with the device - UR_DEVICE_INFO_REFERENCE_COUNT = 64, ///< [uint32_t] Reference count of the device object. - ///< The reference count returned should be considered immediately stale. - ///< It is unsuitable for general use in applications. This feature is - ///< provided for identifying memory leaks. - UR_DEVICE_INFO_IL_VERSION = 65, ///< [char[]] IL version - UR_DEVICE_INFO_NAME = 66, ///< [char[]] Device name - UR_DEVICE_INFO_VENDOR = 67, ///< [char[]] Device vendor - UR_DEVICE_INFO_DRIVER_VERSION = 68, ///< [char[]] Driver version - UR_DEVICE_INFO_PROFILE = 69, ///< [char[]] Device profile - UR_DEVICE_INFO_VERSION = 70, ///< [char[]] Device version - UR_DEVICE_INFO_BACKEND_RUNTIME_VERSION = 71, ///< [char[]] Version of backend runtime - UR_DEVICE_INFO_EXTENSIONS = 72, ///< [char[]] Return a space separated list of extension names - UR_DEVICE_INFO_PRINTF_BUFFER_SIZE = 73, ///< [size_t] Maximum size in bytes of internal printf buffer - UR_DEVICE_INFO_PREFERRED_INTEROP_USER_SYNC = 74, ///< [::ur_bool_t] prefer user synchronization when sharing object with - ///< other API - UR_DEVICE_INFO_PARENT_DEVICE = 75, ///< [::ur_device_handle_t] return parent device handle - UR_DEVICE_INFO_SUPPORTED_PARTITIONS = 76, ///< [::ur_device_partition_t[]] Returns an array of partition types - ///< supported by the device - UR_DEVICE_INFO_PARTITION_MAX_SUB_DEVICES = 77, ///< [uint32_t] maximum number of sub-devices when the device is - ///< partitioned - UR_DEVICE_INFO_PARTITION_AFFINITY_DOMAIN = 78, ///< [::ur_device_affinity_domain_flags_t] Returns a bit-field of the - ///< supported affinity domains for partitioning. - ///< If the device does not support any affinity domains, then 0 will be returned. - UR_DEVICE_INFO_PARTITION_TYPE = 79, ///< [::ur_device_partition_property_t[]] return an array of - ///< ::ur_device_partition_property_t for properties specified in - ///< ::urDevicePartition - UR_DEVICE_INFO_MAX_NUM_SUB_GROUPS = 80, ///< [uint32_t] max number of sub groups - UR_DEVICE_INFO_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS = 81, ///< [::ur_bool_t] support sub group independent forward progress - UR_DEVICE_INFO_SUB_GROUP_SIZES_INTEL = 82, ///< [uint32_t[]] return an array of supported sub group sizes - UR_DEVICE_INFO_USM_HOST_SUPPORT = 83, ///< [::ur_device_usm_access_capability_flags_t] support USM host memory - ///< access - UR_DEVICE_INFO_USM_DEVICE_SUPPORT = 84, ///< [::ur_device_usm_access_capability_flags_t] support USM device memory - ///< access - UR_DEVICE_INFO_USM_SINGLE_SHARED_SUPPORT = 85, ///< [::ur_device_usm_access_capability_flags_t] support USM single device - ///< shared memory access - UR_DEVICE_INFO_USM_CROSS_SHARED_SUPPORT = 86, ///< [::ur_device_usm_access_capability_flags_t] support USM cross device - ///< shared memory access - UR_DEVICE_INFO_USM_SYSTEM_SHARED_SUPPORT = 87, ///< [::ur_device_usm_access_capability_flags_t] support USM system wide - ///< shared memory access - UR_DEVICE_INFO_UUID = 88, ///< [uint8_t[]] return device UUID - UR_DEVICE_INFO_PCI_ADDRESS = 89, ///< [char[]] return device PCI address - UR_DEVICE_INFO_GPU_EU_COUNT = 90, ///< [uint32_t] return Intel GPU EU count - UR_DEVICE_INFO_GPU_EU_SIMD_WIDTH = 91, ///< [uint32_t] return Intel GPU EU SIMD width - UR_DEVICE_INFO_GPU_EU_SLICES = 92, ///< [uint32_t] return Intel GPU number of slices - UR_DEVICE_INFO_GPU_EU_COUNT_PER_SUBSLICE = 93, ///< [uint32_t] return Intel GPU EU count per subslice - UR_DEVICE_INFO_GPU_SUBSLICES_PER_SLICE = 94, ///< [uint32_t] return Intel GPU number of subslices per slice - UR_DEVICE_INFO_GPU_HW_THREADS_PER_EU = 95, ///< [uint32_t] return Intel GPU number of threads per EU - UR_DEVICE_INFO_MAX_MEMORY_BANDWIDTH = 96, ///< [uint32_t] return max memory bandwidth in Mb/s - UR_DEVICE_INFO_IMAGE_SRGB = 97, ///< [::ur_bool_t] device supports sRGB images - UR_DEVICE_INFO_BUILD_ON_SUBDEVICE = 98, ///< [::ur_bool_t] Return true if sub-device should do its own program - ///< build - UR_DEVICE_INFO_ATOMIC_64 = 99, ///< [::ur_bool_t] support 64 bit atomics - UR_DEVICE_INFO_ATOMIC_MEMORY_ORDER_CAPABILITIES = 100, ///< [::ur_memory_order_capability_flags_t] return a bit-field of atomic - ///< memory order capabilities - UR_DEVICE_INFO_ATOMIC_MEMORY_SCOPE_CAPABILITIES = 101, ///< [::ur_memory_scope_capability_flags_t] return a bit-field of atomic - ///< memory scope capabilities - UR_DEVICE_INFO_ATOMIC_FENCE_ORDER_CAPABILITIES = 102, ///< [::ur_memory_order_capability_flags_t] return a bit-field of atomic - ///< memory fence order capabilities - UR_DEVICE_INFO_ATOMIC_FENCE_SCOPE_CAPABILITIES = 103, ///< [::ur_memory_scope_capability_flags_t] return a bit-field of atomic - ///< memory fence scope capabilities - UR_DEVICE_INFO_BFLOAT16 = 104, ///< [::ur_bool_t] support for bfloat16 - UR_DEVICE_INFO_MAX_COMPUTE_QUEUE_INDICES = 105, ///< [uint32_t] Returns 1 if the device doesn't have a notion of a - ///< queue index. Otherwise, returns the number of queue indices that are - ///< available for this device. - UR_DEVICE_INFO_KERNEL_SET_SPECIALIZATION_CONSTANTS = 106, ///< [::ur_bool_t] support the ::urKernelSetSpecializationConstants entry - ///< point - UR_DEVICE_INFO_MEMORY_BUS_WIDTH = 107, ///< [uint32_t] return the width in bits of the memory bus interface of the - ///< device. - UR_DEVICE_INFO_MAX_WORK_GROUPS_3D = 108, ///< [size_t[3]] return max 3D work groups - UR_DEVICE_INFO_ASYNC_BARRIER = 109, ///< [::ur_bool_t] return true if Async Barrier is supported - UR_DEVICE_INFO_MEM_CHANNEL_SUPPORT = 110, ///< [::ur_bool_t] return true if specifying memory channels is supported - UR_DEVICE_INFO_HOST_PIPE_READ_WRITE_SUPPORTED = 111, ///< [::ur_bool_t] Return true if the device supports enqueueing commands - ///< to read and write pipes from the host. - UR_DEVICE_INFO_MAX_REGISTERS_PER_WORK_GROUP = 112, ///< [uint32_t] The maximum number of registers available per block. - UR_DEVICE_INFO_IP_VERSION = 113, ///< [uint32_t] The device IP version. The meaning of the device IP version - ///< is implementation-defined, but newer devices should have a higher - ///< version than older devices. - UR_DEVICE_INFO_VIRTUAL_MEMORY_SUPPORT = 114, ///< [::ur_bool_t] return true if the device supports virtual memory. - UR_DEVICE_INFO_ESIMD_SUPPORT = 115, ///< [::ur_bool_t] return true if the device supports ESIMD. - UR_DEVICE_INFO_COMPONENT_DEVICES = 116, ///< [::ur_device_handle_t[]] The set of component devices contained by - ///< this composite device. - UR_DEVICE_INFO_COMPOSITE_DEVICE = 117, ///< [::ur_device_handle_t] The composite device containing this component - ///< device. - UR_DEVICE_INFO_GLOBAL_VARIABLE_SUPPORT = 118, ///< [::ur_bool_t] return true if the device supports the - ///< `EnqueueDeviceGlobalVariableWrite` and - ///< `EnqueueDeviceGlobalVariableRead` entry points. - UR_DEVICE_INFO_USM_POOL_SUPPORT = 119, ///< [::ur_bool_t] return true if the device supports USM pooling. Pertains - ///< to the `USMPool` entry points and usage of the `pool` parameter of the - ///< USM alloc entry points. - UR_DEVICE_INFO_COMMAND_BUFFER_SUPPORT_EXP = 0x1000, ///< [::ur_bool_t] Returns true if the device supports the use of - ///< command-buffers. - UR_DEVICE_INFO_COMMAND_BUFFER_UPDATE_CAPABILITIES_EXP = 0x1001, ///< [::ur_device_command_buffer_update_capability_flags_t] Command-buffer - ///< update capabilities of the device - UR_DEVICE_INFO_COMMAND_BUFFER_EVENT_SUPPORT_EXP = 0x1002, ///< [::ur_bool_t] Returns true if the device supports using event objects - ///< for command synchronization outside of a command-buffer. - UR_DEVICE_INFO_CLUSTER_LAUNCH_EXP = 0x1111, ///< [::ur_bool_t] return true if enqueue Cluster Launch is supported - UR_DEVICE_INFO_BINDLESS_IMAGES_SUPPORT_EXP = 0x2000, ///< [::ur_bool_t] returns true if the device supports the creation of - ///< bindless images - UR_DEVICE_INFO_BINDLESS_IMAGES_SHARED_USM_SUPPORT_EXP = 0x2001, ///< [::ur_bool_t] returns true if the device supports the creation of - ///< bindless images backed by shared USM - UR_DEVICE_INFO_BINDLESS_IMAGES_1D_USM_SUPPORT_EXP = 0x2002, ///< [::ur_bool_t] returns true if the device supports the creation of 1D - ///< bindless images backed by USM - UR_DEVICE_INFO_BINDLESS_IMAGES_2D_USM_SUPPORT_EXP = 0x2003, ///< [::ur_bool_t] returns true if the device supports the creation of 2D - ///< bindless images backed by USM - UR_DEVICE_INFO_IMAGE_PITCH_ALIGN_EXP = 0x2004, ///< [uint32_t] returns the required alignment of the pitch between two - ///< rows of an image in bytes - UR_DEVICE_INFO_MAX_IMAGE_LINEAR_WIDTH_EXP = 0x2005, ///< [size_t] returns the maximum linear width allowed for images allocated - ///< using USM - UR_DEVICE_INFO_MAX_IMAGE_LINEAR_HEIGHT_EXP = 0x2006, ///< [size_t] returns the maximum linear height allowed for images - ///< allocated using USM - UR_DEVICE_INFO_MAX_IMAGE_LINEAR_PITCH_EXP = 0x2007, ///< [size_t] returns the maximum linear pitch allowed for images allocated - ///< using USM - UR_DEVICE_INFO_MIPMAP_SUPPORT_EXP = 0x2008, ///< [::ur_bool_t] returns true if the device supports allocating mipmap - ///< resources - UR_DEVICE_INFO_MIPMAP_ANISOTROPY_SUPPORT_EXP = 0x2009, ///< [::ur_bool_t] returns true if the device supports sampling mipmap - ///< images with anisotropic filtering - UR_DEVICE_INFO_MIPMAP_MAX_ANISOTROPY_EXP = 0x200A, ///< [uint32_t] returns the maximum anisotropic ratio supported by the - ///< device - UR_DEVICE_INFO_MIPMAP_LEVEL_REFERENCE_SUPPORT_EXP = 0x200B, ///< [::ur_bool_t] returns true if the device supports using images created - ///< from individual mipmap levels - UR_DEVICE_INFO_EXTERNAL_MEMORY_IMPORT_SUPPORT_EXP = 0x200C, ///< [::ur_bool_t] returns true if the device supports importing external - ///< memory resources - UR_DEVICE_INFO_EXTERNAL_SEMAPHORE_IMPORT_SUPPORT_EXP = 0x200E, ///< [::ur_bool_t] returns true if the device supports importing external - ///< semaphore resources - UR_DEVICE_INFO_CUBEMAP_SUPPORT_EXP = 0x2010, ///< [::ur_bool_t] returns true if the device supports allocating and - ///< accessing cubemap resources - UR_DEVICE_INFO_CUBEMAP_SEAMLESS_FILTERING_SUPPORT_EXP = 0x2011, ///< [::ur_bool_t] returns true if the device supports sampling cubemapped - ///< images across face boundaries - UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_USM_EXP = 0x2012, ///< [::ur_bool_t] returns true if the device is capable of fetching USM - ///< backed 1D sampled image data. - UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_EXP = 0x2013, ///< [::ur_bool_t] returns true if the device is capable of fetching - ///< non-USM backed 1D sampled image data. - UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_USM_EXP = 0x2014, ///< [::ur_bool_t] returns true if the device is capable of fetching USM - ///< backed 2D sampled image data. - UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_EXP = 0x2015, ///< [::ur_bool_t] returns true if the device is capable of fetching - ///< non-USM backed 2D sampled image data. - UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_3D_EXP = 0x2017, ///< [::ur_bool_t] returns true if the device is capable of fetching - ///< non-USM backed 3D sampled image data. - UR_DEVICE_INFO_TIMESTAMP_RECORDING_SUPPORT_EXP = 0x2018, ///< [::ur_bool_t] returns true if the device supports timestamp recording - UR_DEVICE_INFO_IMAGE_ARRAY_SUPPORT_EXP = 0x2019, ///< [::ur_bool_t] returns true if the device supports allocating and - ///< accessing image array resources. - UR_DEVICE_INFO_BINDLESS_UNIQUE_ADDRESSING_PER_DIM_EXP = 0x201A, ///< [::ur_bool_t] returns true if the device supports unique addressing - ///< per dimension. - UR_DEVICE_INFO_BINDLESS_SAMPLE_1D_USM_EXP = 0x201B, ///< [::ur_bool_t] returns true if the device is capable of sampling USM - ///< backed 1D sampled image data. - UR_DEVICE_INFO_BINDLESS_SAMPLE_2D_USM_EXP = 0x201C, ///< [::ur_bool_t] returns true if the device is capable of sampling USM - ///< backed 2D sampled image data. - UR_DEVICE_INFO_ENQUEUE_NATIVE_COMMAND_SUPPORT_EXP = 0x2020, ///< [::ur_bool_t] returns true if the device supports enqueueing of native - ///< work - UR_DEVICE_INFO_LOW_POWER_EVENTS_EXP = 0x2021, ///< [::ur_bool_t] returns true if the device supports low-power events. - UR_DEVICE_INFO_2D_BLOCK_ARRAY_CAPABILITIES_EXP = 0x2022, ///< [::ur_exp_device_2d_block_array_capability_flags_t] return a bit-field - ///< of Intel GPU 2D block array capabilities + UR_DEVICE_INFO_TYPE = 0, ///< [::ur_device_type_t] type of the device + UR_DEVICE_INFO_VENDOR_ID = 1, ///< [uint32_t] vendor Id of the device + UR_DEVICE_INFO_DEVICE_ID = 2, ///< [uint32_t] Id of the device + UR_DEVICE_INFO_MAX_COMPUTE_UNITS = 3, ///< [uint32_t] the number of compute units + UR_DEVICE_INFO_MAX_WORK_ITEM_DIMENSIONS = 4, ///< [uint32_t] max work item dimensions + UR_DEVICE_INFO_MAX_WORK_ITEM_SIZES = 5, ///< [size_t[]] return an array of max work item sizes + UR_DEVICE_INFO_MAX_WORK_GROUP_SIZE = 6, ///< [size_t] max work group size + UR_DEVICE_INFO_SINGLE_FP_CONFIG = 7, ///< [::ur_device_fp_capability_flags_t] single precision floating point + ///< capability + UR_DEVICE_INFO_HALF_FP_CONFIG = 8, ///< [::ur_device_fp_capability_flags_t] half precision floating point + ///< capability + UR_DEVICE_INFO_DOUBLE_FP_CONFIG = 9, ///< [::ur_device_fp_capability_flags_t] double precision floating point + ///< capability + UR_DEVICE_INFO_QUEUE_PROPERTIES = 10, ///< [::ur_queue_flags_t] command queue properties supported by the device + UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_CHAR = 11, ///< [uint32_t] preferred vector width for char + UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_SHORT = 12, ///< [uint32_t] preferred vector width for short + UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_INT = 13, ///< [uint32_t] preferred vector width for int + UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG = 14, ///< [uint32_t] preferred vector width for long + UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_FLOAT = 15, ///< [uint32_t] preferred vector width for float + UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_DOUBLE = 16, ///< [uint32_t] preferred vector width for double + UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_HALF = 17, ///< [uint32_t] preferred vector width for half float + UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_CHAR = 18, ///< [uint32_t] native vector width for char + UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_SHORT = 19, ///< [uint32_t] native vector width for short + UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_INT = 20, ///< [uint32_t] native vector width for int + UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG = 21, ///< [uint32_t] native vector width for long + UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_FLOAT = 22, ///< [uint32_t] native vector width for float + UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_DOUBLE = 23, ///< [uint32_t] native vector width for double + UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_HALF = 24, ///< [uint32_t] native vector width for half float + UR_DEVICE_INFO_MAX_CLOCK_FREQUENCY = 25, ///< [uint32_t] max clock frequency in MHz + UR_DEVICE_INFO_MEMORY_CLOCK_RATE = 26, ///< [uint32_t] memory clock frequency in MHz + UR_DEVICE_INFO_ADDRESS_BITS = 27, ///< [uint32_t] address bits + UR_DEVICE_INFO_MAX_MEM_ALLOC_SIZE = 28, ///< [uint64_t] max memory allocation size + UR_DEVICE_INFO_IMAGE_SUPPORT = 29, ///< [::ur_bool_t] images are supported + UR_DEVICE_INFO_MAX_READ_IMAGE_ARGS = 30, ///< [uint32_t] max number of image objects arguments of a kernel declared + ///< with the read_only qualifier + UR_DEVICE_INFO_MAX_WRITE_IMAGE_ARGS = 31, ///< [uint32_t] max number of image objects arguments of a kernel declared + ///< with the write_only qualifier + UR_DEVICE_INFO_MAX_READ_WRITE_IMAGE_ARGS = 32, ///< [uint32_t] max number of image objects arguments of a kernel declared + ///< with the read_write qualifier + UR_DEVICE_INFO_IMAGE2D_MAX_WIDTH = 33, ///< [size_t] max width of Image2D object + UR_DEVICE_INFO_IMAGE2D_MAX_HEIGHT = 34, ///< [size_t] max height of Image2D object + UR_DEVICE_INFO_IMAGE3D_MAX_WIDTH = 35, ///< [size_t] max width of Image3D object + UR_DEVICE_INFO_IMAGE3D_MAX_HEIGHT = 36, ///< [size_t] max height of Image3D object + UR_DEVICE_INFO_IMAGE3D_MAX_DEPTH = 37, ///< [size_t] max depth of Image3D object + UR_DEVICE_INFO_IMAGE_MAX_BUFFER_SIZE = 38, ///< [size_t] max image buffer size + UR_DEVICE_INFO_IMAGE_MAX_ARRAY_SIZE = 39, ///< [size_t] max image array size + UR_DEVICE_INFO_MAX_SAMPLERS = 40, ///< [uint32_t] max number of samplers that can be used in a kernel + UR_DEVICE_INFO_MAX_PARAMETER_SIZE = 41, ///< [size_t] max size in bytes of all arguments passed to a kernel + UR_DEVICE_INFO_MEM_BASE_ADDR_ALIGN = 42, ///< [uint32_t] memory base address alignment + UR_DEVICE_INFO_GLOBAL_MEM_CACHE_TYPE = 43, ///< [::ur_device_mem_cache_type_t] global memory cache type + UR_DEVICE_INFO_GLOBAL_MEM_CACHELINE_SIZE = 44, ///< [uint32_t] global memory cache line size in bytes + UR_DEVICE_INFO_GLOBAL_MEM_CACHE_SIZE = 45, ///< [uint64_t] size of global memory cache in bytes + UR_DEVICE_INFO_GLOBAL_MEM_SIZE = 46, ///< [uint64_t] size of global memory in bytes + UR_DEVICE_INFO_GLOBAL_MEM_FREE = 47, ///< [uint64_t] size of global memory which is free in bytes + UR_DEVICE_INFO_MAX_CONSTANT_BUFFER_SIZE = 48, ///< [uint64_t] max constant buffer size in bytes + UR_DEVICE_INFO_MAX_CONSTANT_ARGS = 49, ///< [uint32_t] max number of __const declared arguments in a kernel + UR_DEVICE_INFO_LOCAL_MEM_TYPE = 50, ///< [::ur_device_local_mem_type_t] local memory type + UR_DEVICE_INFO_LOCAL_MEM_SIZE = 51, ///< [uint64_t] local memory size in bytes + UR_DEVICE_INFO_ERROR_CORRECTION_SUPPORT = 52, ///< [::ur_bool_t] support error correction to global and local memory + UR_DEVICE_INFO_HOST_UNIFIED_MEMORY = 53, ///< [::ur_bool_t] unified host device memory + UR_DEVICE_INFO_PROFILING_TIMER_RESOLUTION = 54, ///< [size_t] profiling timer resolution in nanoseconds + UR_DEVICE_INFO_ENDIAN_LITTLE = 55, ///< [::ur_bool_t] little endian byte order + UR_DEVICE_INFO_AVAILABLE = 56, ///< [::ur_bool_t] device is available + UR_DEVICE_INFO_COMPILER_AVAILABLE = 57, ///< [::ur_bool_t] device compiler is available + UR_DEVICE_INFO_LINKER_AVAILABLE = 58, ///< [::ur_bool_t] device linker is available + UR_DEVICE_INFO_EXECUTION_CAPABILITIES = 59, ///< [::ur_device_exec_capability_flags_t] device kernel execution + ///< capability bit-field + UR_DEVICE_INFO_QUEUE_ON_DEVICE_PROPERTIES = 60, ///< [::ur_queue_flags_t] device command queue property bit-field + UR_DEVICE_INFO_QUEUE_ON_HOST_PROPERTIES = 61, ///< [::ur_queue_flags_t] host queue property bit-field + UR_DEVICE_INFO_BUILT_IN_KERNELS = 62, ///< [char[]] a semi-colon separated list of built-in kernels + UR_DEVICE_INFO_PLATFORM = 63, ///< [::ur_platform_handle_t] the platform associated with the device + UR_DEVICE_INFO_REFERENCE_COUNT = 64, ///< [uint32_t] Reference count of the device object. + ///< The reference count returned should be considered immediately stale. + ///< It is unsuitable for general use in applications. This feature is + ///< provided for identifying memory leaks. + UR_DEVICE_INFO_IL_VERSION = 65, ///< [char[]] IL version + UR_DEVICE_INFO_NAME = 66, ///< [char[]] Device name + UR_DEVICE_INFO_VENDOR = 67, ///< [char[]] Device vendor + UR_DEVICE_INFO_DRIVER_VERSION = 68, ///< [char[]] Driver version + UR_DEVICE_INFO_PROFILE = 69, ///< [char[]] Device profile + UR_DEVICE_INFO_VERSION = 70, ///< [char[]] Device version + UR_DEVICE_INFO_BACKEND_RUNTIME_VERSION = 71, ///< [char[]] Version of backend runtime + UR_DEVICE_INFO_EXTENSIONS = 72, ///< [char[]] Return a space separated list of extension names + UR_DEVICE_INFO_PRINTF_BUFFER_SIZE = 73, ///< [size_t] Maximum size in bytes of internal printf buffer + UR_DEVICE_INFO_PREFERRED_INTEROP_USER_SYNC = 74, ///< [::ur_bool_t] prefer user synchronization when sharing object with + ///< other API + UR_DEVICE_INFO_PARENT_DEVICE = 75, ///< [::ur_device_handle_t] return parent device handle + UR_DEVICE_INFO_SUPPORTED_PARTITIONS = 76, ///< [::ur_device_partition_t[]] Returns an array of partition types + ///< supported by the device + UR_DEVICE_INFO_PARTITION_MAX_SUB_DEVICES = 77, ///< [uint32_t] maximum number of sub-devices when the device is + ///< partitioned + UR_DEVICE_INFO_PARTITION_AFFINITY_DOMAIN = 78, ///< [::ur_device_affinity_domain_flags_t] Returns a bit-field of the + ///< supported affinity domains for partitioning. + ///< If the device does not support any affinity domains, then 0 will be returned. + UR_DEVICE_INFO_PARTITION_TYPE = 79, ///< [::ur_device_partition_property_t[]] returns an array of properties + ///< specified in ::urDevicePartition + UR_DEVICE_INFO_MAX_NUM_SUB_GROUPS = 80, ///< [uint32_t] max number of sub groups + UR_DEVICE_INFO_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS = 81, ///< [::ur_bool_t] support sub group independent forward progress + UR_DEVICE_INFO_SUB_GROUP_SIZES_INTEL = 82, ///< [uint32_t[]] return an array of supported sub group sizes + UR_DEVICE_INFO_USM_HOST_SUPPORT = 83, ///< [::ur_device_usm_access_capability_flags_t] support USM host memory + ///< access + UR_DEVICE_INFO_USM_DEVICE_SUPPORT = 84, ///< [::ur_device_usm_access_capability_flags_t] support USM device memory + ///< access + UR_DEVICE_INFO_USM_SINGLE_SHARED_SUPPORT = 85, ///< [::ur_device_usm_access_capability_flags_t] support USM single device + ///< shared memory access + UR_DEVICE_INFO_USM_CROSS_SHARED_SUPPORT = 86, ///< [::ur_device_usm_access_capability_flags_t] support USM cross device + ///< shared memory access + UR_DEVICE_INFO_USM_SYSTEM_SHARED_SUPPORT = 87, ///< [::ur_device_usm_access_capability_flags_t] support USM system wide + ///< shared memory access + UR_DEVICE_INFO_UUID = 88, ///< [uint8_t[]] return device UUID + UR_DEVICE_INFO_PCI_ADDRESS = 89, ///< [char[]] return device PCI address + UR_DEVICE_INFO_GPU_EU_COUNT = 90, ///< [uint32_t] return Intel GPU EU count + UR_DEVICE_INFO_GPU_EU_SIMD_WIDTH = 91, ///< [uint32_t] return Intel GPU EU SIMD width + UR_DEVICE_INFO_GPU_EU_SLICES = 92, ///< [uint32_t] return Intel GPU number of slices + UR_DEVICE_INFO_GPU_EU_COUNT_PER_SUBSLICE = 93, ///< [uint32_t] return Intel GPU EU count per subslice + UR_DEVICE_INFO_GPU_SUBSLICES_PER_SLICE = 94, ///< [uint32_t] return Intel GPU number of subslices per slice + UR_DEVICE_INFO_GPU_HW_THREADS_PER_EU = 95, ///< [uint32_t] return Intel GPU number of threads per EU + UR_DEVICE_INFO_MAX_MEMORY_BANDWIDTH = 96, ///< [uint32_t] return max memory bandwidth in Mb/s + UR_DEVICE_INFO_IMAGE_SRGB = 97, ///< [::ur_bool_t] device supports sRGB images + UR_DEVICE_INFO_BUILD_ON_SUBDEVICE = 98, ///< [::ur_bool_t] Return true if sub-device should do its own program + ///< build + UR_DEVICE_INFO_ATOMIC_64 = 99, ///< [::ur_bool_t] support 64 bit atomics + UR_DEVICE_INFO_ATOMIC_MEMORY_ORDER_CAPABILITIES = 100, ///< [::ur_memory_order_capability_flags_t] return a bit-field of atomic + ///< memory order capabilities + UR_DEVICE_INFO_ATOMIC_MEMORY_SCOPE_CAPABILITIES = 101, ///< [::ur_memory_scope_capability_flags_t] return a bit-field of atomic + ///< memory scope capabilities + UR_DEVICE_INFO_ATOMIC_FENCE_ORDER_CAPABILITIES = 102, ///< [::ur_memory_order_capability_flags_t] return a bit-field of atomic + ///< memory fence order capabilities + UR_DEVICE_INFO_ATOMIC_FENCE_SCOPE_CAPABILITIES = 103, ///< [::ur_memory_scope_capability_flags_t] return a bit-field of atomic + ///< memory fence scope capabilities + UR_DEVICE_INFO_BFLOAT16 = 104, ///< [::ur_bool_t] support for bfloat16 + UR_DEVICE_INFO_MAX_COMPUTE_QUEUE_INDICES = 105, ///< [uint32_t] Returns 1 if the device doesn't have a notion of a + ///< queue index. Otherwise, returns the number of queue indices that are + ///< available for this device. + UR_DEVICE_INFO_KERNEL_SET_SPECIALIZATION_CONSTANTS = 106, ///< [::ur_bool_t] support the ::urKernelSetSpecializationConstants entry + ///< point + UR_DEVICE_INFO_MEMORY_BUS_WIDTH = 107, ///< [uint32_t] return the width in bits of the memory bus interface of the + ///< device. + UR_DEVICE_INFO_MAX_WORK_GROUPS_3D = 108, ///< [size_t[3]] return max 3D work groups + UR_DEVICE_INFO_ASYNC_BARRIER = 109, ///< [::ur_bool_t] return true if Async Barrier is supported + UR_DEVICE_INFO_MEM_CHANNEL_SUPPORT = 110, ///< [::ur_bool_t] return true if specifying memory channels is supported + UR_DEVICE_INFO_HOST_PIPE_READ_WRITE_SUPPORT = 111, ///< [::ur_bool_t] Return true if the device supports enqueueing commands + ///< to read and write pipes from the host. + UR_DEVICE_INFO_MAX_REGISTERS_PER_WORK_GROUP = 112, ///< [uint32_t] The maximum number of registers available per block. + UR_DEVICE_INFO_IP_VERSION = 113, ///< [uint32_t] The device IP version. The meaning of the device IP version + ///< is implementation-defined, but newer devices should have a higher + ///< version than older devices. + UR_DEVICE_INFO_VIRTUAL_MEMORY_SUPPORT = 114, ///< [::ur_bool_t] return true if the device supports virtual memory. + UR_DEVICE_INFO_ESIMD_SUPPORT = 115, ///< [::ur_bool_t] return true if the device supports ESIMD. + UR_DEVICE_INFO_COMPONENT_DEVICES = 116, ///< [::ur_device_handle_t[]] The set of component devices contained by + ///< this composite device. + UR_DEVICE_INFO_COMPOSITE_DEVICE = 117, ///< [::ur_device_handle_t] The composite device containing this component + ///< device. + UR_DEVICE_INFO_GLOBAL_VARIABLE_SUPPORT = 118, ///< [::ur_bool_t] return true if the device supports the + ///< `EnqueueDeviceGlobalVariableWrite` and + ///< `EnqueueDeviceGlobalVariableRead` entry points. + UR_DEVICE_INFO_USM_POOL_SUPPORT = 119, ///< [::ur_bool_t] return true if the device supports USM pooling. Pertains + ///< to the `USMPool` entry points and usage of the `pool` parameter of the + ///< USM alloc entry points. + UR_DEVICE_INFO_COMMAND_BUFFER_SUPPORT_EXP = 0x1000, ///< [::ur_bool_t] Returns true if the device supports the use of + ///< command-buffers. + UR_DEVICE_INFO_COMMAND_BUFFER_UPDATE_CAPABILITIES_EXP = 0x1001, ///< [::ur_device_command_buffer_update_capability_flags_t] Command-buffer + ///< update capabilities of the device + UR_DEVICE_INFO_COMMAND_BUFFER_EVENT_SUPPORT_EXP = 0x1002, ///< [::ur_bool_t] Returns true if the device supports using event objects + ///< for command synchronization outside of a command-buffer. + UR_DEVICE_INFO_CLUSTER_LAUNCH_SUPPORT_EXP = 0x1111, ///< [::ur_bool_t] return true if enqueue Cluster Launch is supported + UR_DEVICE_INFO_BINDLESS_IMAGES_SUPPORT_EXP = 0x2000, ///< [::ur_bool_t] returns true if the device supports the creation of + ///< bindless images + UR_DEVICE_INFO_BINDLESS_IMAGES_SHARED_USM_SUPPORT_EXP = 0x2001, ///< [::ur_bool_t] returns true if the device supports the creation of + ///< bindless images backed by shared USM + UR_DEVICE_INFO_BINDLESS_IMAGES_1D_USM_SUPPORT_EXP = 0x2002, ///< [::ur_bool_t] returns true if the device supports the creation of 1D + ///< bindless images backed by USM + UR_DEVICE_INFO_BINDLESS_IMAGES_2D_USM_SUPPORT_EXP = 0x2003, ///< [::ur_bool_t] returns true if the device supports the creation of 2D + ///< bindless images backed by USM + UR_DEVICE_INFO_IMAGE_PITCH_ALIGN_EXP = 0x2004, ///< [uint32_t] returns the required alignment of the pitch between two + ///< rows of an image in bytes + UR_DEVICE_INFO_MAX_IMAGE_LINEAR_WIDTH_EXP = 0x2005, ///< [size_t] returns the maximum linear width allowed for images allocated + ///< using USM + UR_DEVICE_INFO_MAX_IMAGE_LINEAR_HEIGHT_EXP = 0x2006, ///< [size_t] returns the maximum linear height allowed for images + ///< allocated using USM + UR_DEVICE_INFO_MAX_IMAGE_LINEAR_PITCH_EXP = 0x2007, ///< [size_t] returns the maximum linear pitch allowed for images allocated + ///< using USM + UR_DEVICE_INFO_MIPMAP_SUPPORT_EXP = 0x2008, ///< [::ur_bool_t] returns true if the device supports allocating mipmap + ///< resources + UR_DEVICE_INFO_MIPMAP_ANISOTROPY_SUPPORT_EXP = 0x2009, ///< [::ur_bool_t] returns true if the device supports sampling mipmap + ///< images with anisotropic filtering + UR_DEVICE_INFO_MIPMAP_MAX_ANISOTROPY_EXP = 0x200A, ///< [uint32_t] returns the maximum anisotropic ratio supported by the + ///< device + UR_DEVICE_INFO_MIPMAP_LEVEL_REFERENCE_SUPPORT_EXP = 0x200B, ///< [::ur_bool_t] returns true if the device supports using images created + ///< from individual mipmap levels + UR_DEVICE_INFO_EXTERNAL_MEMORY_IMPORT_SUPPORT_EXP = 0x200C, ///< [::ur_bool_t] returns true if the device supports importing external + ///< memory resources + UR_DEVICE_INFO_EXTERNAL_SEMAPHORE_IMPORT_SUPPORT_EXP = 0x200E, ///< [::ur_bool_t] returns true if the device supports importing external + ///< semaphore resources + UR_DEVICE_INFO_CUBEMAP_SUPPORT_EXP = 0x2010, ///< [::ur_bool_t] returns true if the device supports allocating and + ///< accessing cubemap resources + UR_DEVICE_INFO_CUBEMAP_SEAMLESS_FILTERING_SUPPORT_EXP = 0x2011, ///< [::ur_bool_t] returns true if the device supports sampling cubemapped + ///< images across face boundaries + UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_USM_SUPPORT_EXP = 0x2012, ///< [::ur_bool_t] returns true if the device supports fetching USM backed + ///< 1D sampled image data. + UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_SUPPORT_EXP = 0x2013, ///< [::ur_bool_t] returns true if the device supports fetching non-USM + ///< backed 1D sampled image data. + UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_USM_SUPPORT_EXP = 0x2014, ///< [::ur_bool_t] returns true if the device supports fetching USM backed + ///< 2D sampled image data. + UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_SUPPORT_EXP = 0x2015, ///< [::ur_bool_t] returns true if the device supports fetching non-USM + ///< backed 2D sampled image data. + UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_3D_SUPPORT_EXP = 0x2017, ///< [::ur_bool_t] returns true if the device supports fetching non-USM + ///< backed 3D sampled image data. + UR_DEVICE_INFO_TIMESTAMP_RECORDING_SUPPORT_EXP = 0x2018, ///< [::ur_bool_t] returns true if the device supports timestamp recording + UR_DEVICE_INFO_IMAGE_ARRAY_SUPPORT_EXP = 0x2019, ///< [::ur_bool_t] returns true if the device supports allocating and + ///< accessing image array resources. + UR_DEVICE_INFO_BINDLESS_UNIQUE_ADDRESSING_PER_DIM_SUPPORT_EXP = 0x201A, ///< [::ur_bool_t] returns true if the device supports unique addressing + ///< per dimension. + UR_DEVICE_INFO_BINDLESS_SAMPLE_1D_USM_SUPPORT_EXP = 0x201B, ///< [::ur_bool_t] returns true if the device supports sampling USM backed + ///< 1D sampled image data. + UR_DEVICE_INFO_BINDLESS_SAMPLE_2D_USM_SUPPORT_EXP = 0x201C, ///< [::ur_bool_t] returns true if the device supports sampling USM backed + ///< 2D sampled image data. + UR_DEVICE_INFO_ENQUEUE_NATIVE_COMMAND_SUPPORT_EXP = 0x2020, ///< [::ur_bool_t] returns true if the device supports enqueueing of native + ///< work + UR_DEVICE_INFO_LOW_POWER_EVENTS_SUPPORT_EXP = 0x2021, ///< [::ur_bool_t] returns true if the device supports low-power events. + UR_DEVICE_INFO_2D_BLOCK_ARRAY_CAPABILITIES_EXP = 0x2022, ///< [::ur_exp_device_2d_block_array_capability_flags_t] return a bit-field + ///< of Intel GPU 2D block array capabilities /// @cond UR_DEVICE_INFO_FORCE_UINT32 = 0x7fffffff /// @endcond @@ -9885,10 +9884,10 @@ urUSMReleaseExp( /////////////////////////////////////////////////////////////////////////////// /// @brief Supported peer info typedef enum ur_exp_peer_info_t { - UR_EXP_PEER_INFO_UR_PEER_ACCESS_SUPPORTED = 0, ///< [int] 1 if P2P access is supported otherwise P2P access is not - ///< supported. - UR_EXP_PEER_INFO_UR_PEER_ATOMICS_SUPPORTED = 1, ///< [int] 1 if atomic operations are supported over the P2P link, - ///< otherwise such operations are not supported. + UR_EXP_PEER_INFO_UR_PEER_ACCESS_SUPPORT = 0, ///< [int] 1 if P2P access is supported otherwise P2P access is not + ///< supported. + UR_EXP_PEER_INFO_UR_PEER_ATOMICS_SUPPORT = 1, ///< [int] 1 if atomic operations are supported over the P2P link, + ///< otherwise such operations are not supported. /// @cond UR_EXP_PEER_INFO_FORCE_UINT32 = 0x7fffffff /// @endcond @@ -9998,7 +9997,7 @@ urUsmP2PDisablePeerAccessExp( /// + `NULL == commandDevice` /// + `NULL == peerDevice` /// - ::UR_RESULT_ERROR_INVALID_ENUMERATION -/// + `::UR_EXP_PEER_INFO_UR_PEER_ATOMICS_SUPPORTED < propName` +/// + `::UR_EXP_PEER_INFO_UR_PEER_ATOMICS_SUPPORT < propName` /// - ::UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// + If `propName` is not supported by the adapter. /// - ::UR_RESULT_ERROR_INVALID_SIZE diff --git a/include/ur_ddi.h b/include/ur_ddi.h index ce7dd137a9..f7f227498f 100644 --- a/include/ur_ddi.h +++ b/include/ur_ddi.h @@ -22,59 +22,66 @@ extern "C" { #endif /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urPlatformGet -typedef ur_result_t(UR_APICALL *ur_pfnPlatformGet_t)( - ur_adapter_handle_t *, +/// @brief Function-pointer for urPlatformGet +typedef ur_result_t (UR_APICALL *ur_pfnPlatformGet_t)( + ur_adapter_handle_t*, uint32_t, uint32_t, - ur_platform_handle_t *, - uint32_t *); + ur_platform_handle_t*, + uint32_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urPlatformGetInfo -typedef ur_result_t(UR_APICALL *ur_pfnPlatformGetInfo_t)( +/// @brief Function-pointer for urPlatformGetInfo +typedef ur_result_t (UR_APICALL *ur_pfnPlatformGetInfo_t)( ur_platform_handle_t, ur_platform_info_t, size_t, - void *, - size_t *); + void*, + size_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urPlatformGetNativeHandle -typedef ur_result_t(UR_APICALL *ur_pfnPlatformGetNativeHandle_t)( +/// @brief Function-pointer for urPlatformGetNativeHandle +typedef ur_result_t (UR_APICALL *ur_pfnPlatformGetNativeHandle_t)( ur_platform_handle_t, - ur_native_handle_t *); + ur_native_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urPlatformCreateWithNativeHandle -typedef ur_result_t(UR_APICALL *ur_pfnPlatformCreateWithNativeHandle_t)( +/// @brief Function-pointer for urPlatformCreateWithNativeHandle +typedef ur_result_t (UR_APICALL *ur_pfnPlatformCreateWithNativeHandle_t)( ur_native_handle_t, ur_adapter_handle_t, - const ur_platform_native_properties_t *, - ur_platform_handle_t *); + const ur_platform_native_properties_t*, + ur_platform_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urPlatformGetApiVersion -typedef ur_result_t(UR_APICALL *ur_pfnPlatformGetApiVersion_t)( +/// @brief Function-pointer for urPlatformGetApiVersion +typedef ur_result_t (UR_APICALL *ur_pfnPlatformGetApiVersion_t)( ur_platform_handle_t, - ur_api_version_t *); + ur_api_version_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urPlatformGetBackendOption -typedef ur_result_t(UR_APICALL *ur_pfnPlatformGetBackendOption_t)( +/// @brief Function-pointer for urPlatformGetBackendOption +typedef ur_result_t (UR_APICALL *ur_pfnPlatformGetBackendOption_t)( ur_platform_handle_t, - const char *, - const char **); + const char*, + const char** + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Table of Platform functions pointers -typedef struct ur_platform_dditable_t { - ur_pfnPlatformGet_t pfnGet; - ur_pfnPlatformGetInfo_t pfnGetInfo; - ur_pfnPlatformGetNativeHandle_t pfnGetNativeHandle; - ur_pfnPlatformCreateWithNativeHandle_t pfnCreateWithNativeHandle; - ur_pfnPlatformGetApiVersion_t pfnGetApiVersion; - ur_pfnPlatformGetBackendOption_t pfnGetBackendOption; +typedef struct ur_platform_dditable_t +{ + ur_pfnPlatformGet_t pfnGet; + ur_pfnPlatformGetInfo_t pfnGetInfo; + ur_pfnPlatformGetNativeHandle_t pfnGetNativeHandle; + ur_pfnPlatformCreateWithNativeHandle_t pfnCreateWithNativeHandle; + ur_pfnPlatformGetApiVersion_t pfnGetApiVersion; + ur_pfnPlatformGetBackendOption_t pfnGetBackendOption; } ur_platform_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -88,76 +95,85 @@ typedef struct ur_platform_dditable_t { /// - ::UR_RESULT_ERROR_UNSUPPORTED_VERSION UR_DLLEXPORT ur_result_t UR_APICALL urGetPlatformProcAddrTable( - ur_api_version_t version, ///< [in] API version requested - ur_platform_dditable_t *pDdiTable ///< [in,out] pointer to table of DDI function pointers -); + ur_api_version_t version, ///< [in] API version requested + ur_platform_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Function-pointer for urGetPlatformProcAddrTable -typedef ur_result_t(UR_APICALL *ur_pfnGetPlatformProcAddrTable_t)( +typedef ur_result_t (UR_APICALL *ur_pfnGetPlatformProcAddrTable_t)( ur_api_version_t, - ur_platform_dditable_t *); + ur_platform_dditable_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urContextCreate -typedef ur_result_t(UR_APICALL *ur_pfnContextCreate_t)( +/// @brief Function-pointer for urContextCreate +typedef ur_result_t (UR_APICALL *ur_pfnContextCreate_t)( uint32_t, - const ur_device_handle_t *, - const ur_context_properties_t *, - ur_context_handle_t *); + const ur_device_handle_t*, + const ur_context_properties_t*, + ur_context_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urContextRetain -typedef ur_result_t(UR_APICALL *ur_pfnContextRetain_t)( - ur_context_handle_t); +/// @brief Function-pointer for urContextRetain +typedef ur_result_t (UR_APICALL *ur_pfnContextRetain_t)( + ur_context_handle_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urContextRelease -typedef ur_result_t(UR_APICALL *ur_pfnContextRelease_t)( - ur_context_handle_t); +/// @brief Function-pointer for urContextRelease +typedef ur_result_t (UR_APICALL *ur_pfnContextRelease_t)( + ur_context_handle_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urContextGetInfo -typedef ur_result_t(UR_APICALL *ur_pfnContextGetInfo_t)( +/// @brief Function-pointer for urContextGetInfo +typedef ur_result_t (UR_APICALL *ur_pfnContextGetInfo_t)( ur_context_handle_t, ur_context_info_t, size_t, - void *, - size_t *); + void*, + size_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urContextGetNativeHandle -typedef ur_result_t(UR_APICALL *ur_pfnContextGetNativeHandle_t)( +/// @brief Function-pointer for urContextGetNativeHandle +typedef ur_result_t (UR_APICALL *ur_pfnContextGetNativeHandle_t)( ur_context_handle_t, - ur_native_handle_t *); + ur_native_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urContextCreateWithNativeHandle -typedef ur_result_t(UR_APICALL *ur_pfnContextCreateWithNativeHandle_t)( +/// @brief Function-pointer for urContextCreateWithNativeHandle +typedef ur_result_t (UR_APICALL *ur_pfnContextCreateWithNativeHandle_t)( ur_native_handle_t, ur_adapter_handle_t, uint32_t, - const ur_device_handle_t *, - const ur_context_native_properties_t *, - ur_context_handle_t *); + const ur_device_handle_t*, + const ur_context_native_properties_t*, + ur_context_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urContextSetExtendedDeleter -typedef ur_result_t(UR_APICALL *ur_pfnContextSetExtendedDeleter_t)( +/// @brief Function-pointer for urContextSetExtendedDeleter +typedef ur_result_t (UR_APICALL *ur_pfnContextSetExtendedDeleter_t)( ur_context_handle_t, ur_context_extended_deleter_t, - void *); + void* + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Table of Context functions pointers -typedef struct ur_context_dditable_t { - ur_pfnContextCreate_t pfnCreate; - ur_pfnContextRetain_t pfnRetain; - ur_pfnContextRelease_t pfnRelease; - ur_pfnContextGetInfo_t pfnGetInfo; - ur_pfnContextGetNativeHandle_t pfnGetNativeHandle; - ur_pfnContextCreateWithNativeHandle_t pfnCreateWithNativeHandle; - ur_pfnContextSetExtendedDeleter_t pfnSetExtendedDeleter; +typedef struct ur_context_dditable_t +{ + ur_pfnContextCreate_t pfnCreate; + ur_pfnContextRetain_t pfnRetain; + ur_pfnContextRelease_t pfnRelease; + ur_pfnContextGetInfo_t pfnGetInfo; + ur_pfnContextGetNativeHandle_t pfnGetNativeHandle; + ur_pfnContextCreateWithNativeHandle_t pfnCreateWithNativeHandle; + ur_pfnContextSetExtendedDeleter_t pfnSetExtendedDeleter; } ur_context_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -171,83 +187,93 @@ typedef struct ur_context_dditable_t { /// - ::UR_RESULT_ERROR_UNSUPPORTED_VERSION UR_DLLEXPORT ur_result_t UR_APICALL urGetContextProcAddrTable( - ur_api_version_t version, ///< [in] API version requested - ur_context_dditable_t *pDdiTable ///< [in,out] pointer to table of DDI function pointers -); + ur_api_version_t version, ///< [in] API version requested + ur_context_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Function-pointer for urGetContextProcAddrTable -typedef ur_result_t(UR_APICALL *ur_pfnGetContextProcAddrTable_t)( +typedef ur_result_t (UR_APICALL *ur_pfnGetContextProcAddrTable_t)( ur_api_version_t, - ur_context_dditable_t *); + ur_context_dditable_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urEventGetInfo -typedef ur_result_t(UR_APICALL *ur_pfnEventGetInfo_t)( +/// @brief Function-pointer for urEventGetInfo +typedef ur_result_t (UR_APICALL *ur_pfnEventGetInfo_t)( ur_event_handle_t, ur_event_info_t, size_t, - void *, - size_t *); + void*, + size_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urEventGetProfilingInfo -typedef ur_result_t(UR_APICALL *ur_pfnEventGetProfilingInfo_t)( +/// @brief Function-pointer for urEventGetProfilingInfo +typedef ur_result_t (UR_APICALL *ur_pfnEventGetProfilingInfo_t)( ur_event_handle_t, ur_profiling_info_t, size_t, - void *, - size_t *); + void*, + size_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urEventWait -typedef ur_result_t(UR_APICALL *ur_pfnEventWait_t)( +/// @brief Function-pointer for urEventWait +typedef ur_result_t (UR_APICALL *ur_pfnEventWait_t)( uint32_t, - const ur_event_handle_t *); + const ur_event_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urEventRetain -typedef ur_result_t(UR_APICALL *ur_pfnEventRetain_t)( - ur_event_handle_t); +/// @brief Function-pointer for urEventRetain +typedef ur_result_t (UR_APICALL *ur_pfnEventRetain_t)( + ur_event_handle_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urEventRelease -typedef ur_result_t(UR_APICALL *ur_pfnEventRelease_t)( - ur_event_handle_t); +/// @brief Function-pointer for urEventRelease +typedef ur_result_t (UR_APICALL *ur_pfnEventRelease_t)( + ur_event_handle_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urEventGetNativeHandle -typedef ur_result_t(UR_APICALL *ur_pfnEventGetNativeHandle_t)( +/// @brief Function-pointer for urEventGetNativeHandle +typedef ur_result_t (UR_APICALL *ur_pfnEventGetNativeHandle_t)( ur_event_handle_t, - ur_native_handle_t *); + ur_native_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urEventCreateWithNativeHandle -typedef ur_result_t(UR_APICALL *ur_pfnEventCreateWithNativeHandle_t)( +/// @brief Function-pointer for urEventCreateWithNativeHandle +typedef ur_result_t (UR_APICALL *ur_pfnEventCreateWithNativeHandle_t)( ur_native_handle_t, ur_context_handle_t, - const ur_event_native_properties_t *, - ur_event_handle_t *); + const ur_event_native_properties_t*, + ur_event_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urEventSetCallback -typedef ur_result_t(UR_APICALL *ur_pfnEventSetCallback_t)( +/// @brief Function-pointer for urEventSetCallback +typedef ur_result_t (UR_APICALL *ur_pfnEventSetCallback_t)( ur_event_handle_t, ur_execution_info_t, ur_event_callback_t, - void *); + void* + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Table of Event functions pointers -typedef struct ur_event_dditable_t { - ur_pfnEventGetInfo_t pfnGetInfo; - ur_pfnEventGetProfilingInfo_t pfnGetProfilingInfo; - ur_pfnEventWait_t pfnWait; - ur_pfnEventRetain_t pfnRetain; - ur_pfnEventRelease_t pfnRelease; - ur_pfnEventGetNativeHandle_t pfnGetNativeHandle; - ur_pfnEventCreateWithNativeHandle_t pfnCreateWithNativeHandle; - ur_pfnEventSetCallback_t pfnSetCallback; +typedef struct ur_event_dditable_t +{ + ur_pfnEventGetInfo_t pfnGetInfo; + ur_pfnEventGetProfilingInfo_t pfnGetProfilingInfo; + ur_pfnEventWait_t pfnWait; + ur_pfnEventRetain_t pfnRetain; + ur_pfnEventRelease_t pfnRelease; + ur_pfnEventGetNativeHandle_t pfnGetNativeHandle; + ur_pfnEventCreateWithNativeHandle_t pfnCreateWithNativeHandle; + ur_pfnEventSetCallback_t pfnSetCallback; } ur_event_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -261,143 +287,159 @@ typedef struct ur_event_dditable_t { /// - ::UR_RESULT_ERROR_UNSUPPORTED_VERSION UR_DLLEXPORT ur_result_t UR_APICALL urGetEventProcAddrTable( - ur_api_version_t version, ///< [in] API version requested - ur_event_dditable_t *pDdiTable ///< [in,out] pointer to table of DDI function pointers -); + ur_api_version_t version, ///< [in] API version requested + ur_event_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Function-pointer for urGetEventProcAddrTable -typedef ur_result_t(UR_APICALL *ur_pfnGetEventProcAddrTable_t)( +typedef ur_result_t (UR_APICALL *ur_pfnGetEventProcAddrTable_t)( ur_api_version_t, - ur_event_dditable_t *); + ur_event_dditable_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urProgramCreateWithIL -typedef ur_result_t(UR_APICALL *ur_pfnProgramCreateWithIL_t)( +/// @brief Function-pointer for urProgramCreateWithIL +typedef ur_result_t (UR_APICALL *ur_pfnProgramCreateWithIL_t)( ur_context_handle_t, - const void *, + const void*, size_t, - const ur_program_properties_t *, - ur_program_handle_t *); + const ur_program_properties_t*, + ur_program_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urProgramCreateWithBinary -typedef ur_result_t(UR_APICALL *ur_pfnProgramCreateWithBinary_t)( +/// @brief Function-pointer for urProgramCreateWithBinary +typedef ur_result_t (UR_APICALL *ur_pfnProgramCreateWithBinary_t)( ur_context_handle_t, uint32_t, - ur_device_handle_t *, - size_t *, - const uint8_t **, - const ur_program_properties_t *, - ur_program_handle_t *); + ur_device_handle_t*, + size_t*, + const uint8_t**, + const ur_program_properties_t*, + ur_program_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urProgramBuild -typedef ur_result_t(UR_APICALL *ur_pfnProgramBuild_t)( +/// @brief Function-pointer for urProgramBuild +typedef ur_result_t (UR_APICALL *ur_pfnProgramBuild_t)( ur_context_handle_t, ur_program_handle_t, - const char *); + const char* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urProgramCompile -typedef ur_result_t(UR_APICALL *ur_pfnProgramCompile_t)( +/// @brief Function-pointer for urProgramCompile +typedef ur_result_t (UR_APICALL *ur_pfnProgramCompile_t)( ur_context_handle_t, ur_program_handle_t, - const char *); + const char* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urProgramLink -typedef ur_result_t(UR_APICALL *ur_pfnProgramLink_t)( +/// @brief Function-pointer for urProgramLink +typedef ur_result_t (UR_APICALL *ur_pfnProgramLink_t)( ur_context_handle_t, uint32_t, - const ur_program_handle_t *, - const char *, - ur_program_handle_t *); + const ur_program_handle_t*, + const char*, + ur_program_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urProgramRetain -typedef ur_result_t(UR_APICALL *ur_pfnProgramRetain_t)( - ur_program_handle_t); +/// @brief Function-pointer for urProgramRetain +typedef ur_result_t (UR_APICALL *ur_pfnProgramRetain_t)( + ur_program_handle_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urProgramRelease -typedef ur_result_t(UR_APICALL *ur_pfnProgramRelease_t)( - ur_program_handle_t); +/// @brief Function-pointer for urProgramRelease +typedef ur_result_t (UR_APICALL *ur_pfnProgramRelease_t)( + ur_program_handle_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urProgramGetFunctionPointer -typedef ur_result_t(UR_APICALL *ur_pfnProgramGetFunctionPointer_t)( +/// @brief Function-pointer for urProgramGetFunctionPointer +typedef ur_result_t (UR_APICALL *ur_pfnProgramGetFunctionPointer_t)( ur_device_handle_t, ur_program_handle_t, - const char *, - void **); + const char*, + void** + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urProgramGetGlobalVariablePointer -typedef ur_result_t(UR_APICALL *ur_pfnProgramGetGlobalVariablePointer_t)( +/// @brief Function-pointer for urProgramGetGlobalVariablePointer +typedef ur_result_t (UR_APICALL *ur_pfnProgramGetGlobalVariablePointer_t)( ur_device_handle_t, ur_program_handle_t, - const char *, - size_t *, - void **); + const char*, + size_t*, + void** + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urProgramGetInfo -typedef ur_result_t(UR_APICALL *ur_pfnProgramGetInfo_t)( +/// @brief Function-pointer for urProgramGetInfo +typedef ur_result_t (UR_APICALL *ur_pfnProgramGetInfo_t)( ur_program_handle_t, ur_program_info_t, size_t, - void *, - size_t *); + void*, + size_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urProgramGetBuildInfo -typedef ur_result_t(UR_APICALL *ur_pfnProgramGetBuildInfo_t)( +/// @brief Function-pointer for urProgramGetBuildInfo +typedef ur_result_t (UR_APICALL *ur_pfnProgramGetBuildInfo_t)( ur_program_handle_t, ur_device_handle_t, ur_program_build_info_t, size_t, - void *, - size_t *); + void*, + size_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urProgramSetSpecializationConstants -typedef ur_result_t(UR_APICALL *ur_pfnProgramSetSpecializationConstants_t)( +/// @brief Function-pointer for urProgramSetSpecializationConstants +typedef ur_result_t (UR_APICALL *ur_pfnProgramSetSpecializationConstants_t)( ur_program_handle_t, uint32_t, - const ur_specialization_constant_info_t *); + const ur_specialization_constant_info_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urProgramGetNativeHandle -typedef ur_result_t(UR_APICALL *ur_pfnProgramGetNativeHandle_t)( +/// @brief Function-pointer for urProgramGetNativeHandle +typedef ur_result_t (UR_APICALL *ur_pfnProgramGetNativeHandle_t)( ur_program_handle_t, - ur_native_handle_t *); + ur_native_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urProgramCreateWithNativeHandle -typedef ur_result_t(UR_APICALL *ur_pfnProgramCreateWithNativeHandle_t)( +/// @brief Function-pointer for urProgramCreateWithNativeHandle +typedef ur_result_t (UR_APICALL *ur_pfnProgramCreateWithNativeHandle_t)( ur_native_handle_t, ur_context_handle_t, - const ur_program_native_properties_t *, - ur_program_handle_t *); + const ur_program_native_properties_t*, + ur_program_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Table of Program functions pointers -typedef struct ur_program_dditable_t { - ur_pfnProgramCreateWithIL_t pfnCreateWithIL; - ur_pfnProgramCreateWithBinary_t pfnCreateWithBinary; - ur_pfnProgramBuild_t pfnBuild; - ur_pfnProgramCompile_t pfnCompile; - ur_pfnProgramLink_t pfnLink; - ur_pfnProgramRetain_t pfnRetain; - ur_pfnProgramRelease_t pfnRelease; - ur_pfnProgramGetFunctionPointer_t pfnGetFunctionPointer; - ur_pfnProgramGetGlobalVariablePointer_t pfnGetGlobalVariablePointer; - ur_pfnProgramGetInfo_t pfnGetInfo; - ur_pfnProgramGetBuildInfo_t pfnGetBuildInfo; - ur_pfnProgramSetSpecializationConstants_t pfnSetSpecializationConstants; - ur_pfnProgramGetNativeHandle_t pfnGetNativeHandle; - ur_pfnProgramCreateWithNativeHandle_t pfnCreateWithNativeHandle; +typedef struct ur_program_dditable_t +{ + ur_pfnProgramCreateWithIL_t pfnCreateWithIL; + ur_pfnProgramCreateWithBinary_t pfnCreateWithBinary; + ur_pfnProgramBuild_t pfnBuild; + ur_pfnProgramCompile_t pfnCompile; + ur_pfnProgramLink_t pfnLink; + ur_pfnProgramRetain_t pfnRetain; + ur_pfnProgramRelease_t pfnRelease; + ur_pfnProgramGetFunctionPointer_t pfnGetFunctionPointer; + ur_pfnProgramGetGlobalVariablePointer_t pfnGetGlobalVariablePointer; + ur_pfnProgramGetInfo_t pfnGetInfo; + ur_pfnProgramGetBuildInfo_t pfnGetBuildInfo; + ur_pfnProgramSetSpecializationConstants_t pfnSetSpecializationConstants; + ur_pfnProgramGetNativeHandle_t pfnGetNativeHandle; + ur_pfnProgramCreateWithNativeHandle_t pfnCreateWithNativeHandle; } ur_program_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -411,49 +453,54 @@ typedef struct ur_program_dditable_t { /// - ::UR_RESULT_ERROR_UNSUPPORTED_VERSION UR_DLLEXPORT ur_result_t UR_APICALL urGetProgramProcAddrTable( - ur_api_version_t version, ///< [in] API version requested - ur_program_dditable_t *pDdiTable ///< [in,out] pointer to table of DDI function pointers -); + ur_api_version_t version, ///< [in] API version requested + ur_program_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Function-pointer for urGetProgramProcAddrTable -typedef ur_result_t(UR_APICALL *ur_pfnGetProgramProcAddrTable_t)( +typedef ur_result_t (UR_APICALL *ur_pfnGetProgramProcAddrTable_t)( ur_api_version_t, - ur_program_dditable_t *); + ur_program_dditable_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urProgramBuildExp -typedef ur_result_t(UR_APICALL *ur_pfnProgramBuildExp_t)( +/// @brief Function-pointer for urProgramBuildExp +typedef ur_result_t (UR_APICALL *ur_pfnProgramBuildExp_t)( ur_program_handle_t, uint32_t, - ur_device_handle_t *, - const char *); + ur_device_handle_t*, + const char* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urProgramCompileExp -typedef ur_result_t(UR_APICALL *ur_pfnProgramCompileExp_t)( +/// @brief Function-pointer for urProgramCompileExp +typedef ur_result_t (UR_APICALL *ur_pfnProgramCompileExp_t)( ur_program_handle_t, uint32_t, - ur_device_handle_t *, - const char *); + ur_device_handle_t*, + const char* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urProgramLinkExp -typedef ur_result_t(UR_APICALL *ur_pfnProgramLinkExp_t)( +/// @brief Function-pointer for urProgramLinkExp +typedef ur_result_t (UR_APICALL *ur_pfnProgramLinkExp_t)( ur_context_handle_t, uint32_t, - ur_device_handle_t *, + ur_device_handle_t*, uint32_t, - const ur_program_handle_t *, - const char *, - ur_program_handle_t *); + const ur_program_handle_t*, + const char*, + ur_program_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Table of ProgramExp functions pointers -typedef struct ur_program_exp_dditable_t { - ur_pfnProgramBuildExp_t pfnBuildExp; - ur_pfnProgramCompileExp_t pfnCompileExp; - ur_pfnProgramLinkExp_t pfnLinkExp; +typedef struct ur_program_exp_dditable_t +{ + ur_pfnProgramBuildExp_t pfnBuildExp; + ur_pfnProgramCompileExp_t pfnCompileExp; + ur_pfnProgramLinkExp_t pfnLinkExp; } ur_program_exp_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -467,163 +514,181 @@ typedef struct ur_program_exp_dditable_t { /// - ::UR_RESULT_ERROR_UNSUPPORTED_VERSION UR_DLLEXPORT ur_result_t UR_APICALL urGetProgramExpProcAddrTable( - ur_api_version_t version, ///< [in] API version requested - ur_program_exp_dditable_t *pDdiTable ///< [in,out] pointer to table of DDI function pointers -); + ur_api_version_t version, ///< [in] API version requested + ur_program_exp_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Function-pointer for urGetProgramExpProcAddrTable -typedef ur_result_t(UR_APICALL *ur_pfnGetProgramExpProcAddrTable_t)( +typedef ur_result_t (UR_APICALL *ur_pfnGetProgramExpProcAddrTable_t)( ur_api_version_t, - ur_program_exp_dditable_t *); + ur_program_exp_dditable_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urKernelCreate -typedef ur_result_t(UR_APICALL *ur_pfnKernelCreate_t)( +/// @brief Function-pointer for urKernelCreate +typedef ur_result_t (UR_APICALL *ur_pfnKernelCreate_t)( ur_program_handle_t, - const char *, - ur_kernel_handle_t *); + const char*, + ur_kernel_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urKernelGetInfo -typedef ur_result_t(UR_APICALL *ur_pfnKernelGetInfo_t)( +/// @brief Function-pointer for urKernelGetInfo +typedef ur_result_t (UR_APICALL *ur_pfnKernelGetInfo_t)( ur_kernel_handle_t, ur_kernel_info_t, size_t, - void *, - size_t *); + void*, + size_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urKernelGetGroupInfo -typedef ur_result_t(UR_APICALL *ur_pfnKernelGetGroupInfo_t)( +/// @brief Function-pointer for urKernelGetGroupInfo +typedef ur_result_t (UR_APICALL *ur_pfnKernelGetGroupInfo_t)( ur_kernel_handle_t, ur_device_handle_t, ur_kernel_group_info_t, size_t, - void *, - size_t *); + void*, + size_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urKernelGetSubGroupInfo -typedef ur_result_t(UR_APICALL *ur_pfnKernelGetSubGroupInfo_t)( +/// @brief Function-pointer for urKernelGetSubGroupInfo +typedef ur_result_t (UR_APICALL *ur_pfnKernelGetSubGroupInfo_t)( ur_kernel_handle_t, ur_device_handle_t, ur_kernel_sub_group_info_t, size_t, - void *, - size_t *); + void*, + size_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urKernelRetain -typedef ur_result_t(UR_APICALL *ur_pfnKernelRetain_t)( - ur_kernel_handle_t); +/// @brief Function-pointer for urKernelRetain +typedef ur_result_t (UR_APICALL *ur_pfnKernelRetain_t)( + ur_kernel_handle_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urKernelRelease -typedef ur_result_t(UR_APICALL *ur_pfnKernelRelease_t)( - ur_kernel_handle_t); +/// @brief Function-pointer for urKernelRelease +typedef ur_result_t (UR_APICALL *ur_pfnKernelRelease_t)( + ur_kernel_handle_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urKernelGetNativeHandle -typedef ur_result_t(UR_APICALL *ur_pfnKernelGetNativeHandle_t)( +/// @brief Function-pointer for urKernelGetNativeHandle +typedef ur_result_t (UR_APICALL *ur_pfnKernelGetNativeHandle_t)( ur_kernel_handle_t, - ur_native_handle_t *); + ur_native_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urKernelCreateWithNativeHandle -typedef ur_result_t(UR_APICALL *ur_pfnKernelCreateWithNativeHandle_t)( +/// @brief Function-pointer for urKernelCreateWithNativeHandle +typedef ur_result_t (UR_APICALL *ur_pfnKernelCreateWithNativeHandle_t)( ur_native_handle_t, ur_context_handle_t, ur_program_handle_t, - const ur_kernel_native_properties_t *, - ur_kernel_handle_t *); + const ur_kernel_native_properties_t*, + ur_kernel_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urKernelGetSuggestedLocalWorkSize -typedef ur_result_t(UR_APICALL *ur_pfnKernelGetSuggestedLocalWorkSize_t)( +/// @brief Function-pointer for urKernelGetSuggestedLocalWorkSize +typedef ur_result_t (UR_APICALL *ur_pfnKernelGetSuggestedLocalWorkSize_t)( ur_kernel_handle_t, ur_queue_handle_t, uint32_t, - const size_t *, - const size_t *, - size_t *); + const size_t*, + const size_t*, + size_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urKernelSetArgValue -typedef ur_result_t(UR_APICALL *ur_pfnKernelSetArgValue_t)( +/// @brief Function-pointer for urKernelSetArgValue +typedef ur_result_t (UR_APICALL *ur_pfnKernelSetArgValue_t)( ur_kernel_handle_t, uint32_t, size_t, - const ur_kernel_arg_value_properties_t *, - const void *); + const ur_kernel_arg_value_properties_t*, + const void* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urKernelSetArgLocal -typedef ur_result_t(UR_APICALL *ur_pfnKernelSetArgLocal_t)( +/// @brief Function-pointer for urKernelSetArgLocal +typedef ur_result_t (UR_APICALL *ur_pfnKernelSetArgLocal_t)( ur_kernel_handle_t, uint32_t, size_t, - const ur_kernel_arg_local_properties_t *); + const ur_kernel_arg_local_properties_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urKernelSetArgPointer -typedef ur_result_t(UR_APICALL *ur_pfnKernelSetArgPointer_t)( +/// @brief Function-pointer for urKernelSetArgPointer +typedef ur_result_t (UR_APICALL *ur_pfnKernelSetArgPointer_t)( ur_kernel_handle_t, uint32_t, - const ur_kernel_arg_pointer_properties_t *, - const void *); + const ur_kernel_arg_pointer_properties_t*, + const void* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urKernelSetExecInfo -typedef ur_result_t(UR_APICALL *ur_pfnKernelSetExecInfo_t)( +/// @brief Function-pointer for urKernelSetExecInfo +typedef ur_result_t (UR_APICALL *ur_pfnKernelSetExecInfo_t)( ur_kernel_handle_t, ur_kernel_exec_info_t, size_t, - const ur_kernel_exec_info_properties_t *, - const void *); + const ur_kernel_exec_info_properties_t*, + const void* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urKernelSetArgSampler -typedef ur_result_t(UR_APICALL *ur_pfnKernelSetArgSampler_t)( +/// @brief Function-pointer for urKernelSetArgSampler +typedef ur_result_t (UR_APICALL *ur_pfnKernelSetArgSampler_t)( ur_kernel_handle_t, uint32_t, - const ur_kernel_arg_sampler_properties_t *, - ur_sampler_handle_t); + const ur_kernel_arg_sampler_properties_t*, + ur_sampler_handle_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urKernelSetArgMemObj -typedef ur_result_t(UR_APICALL *ur_pfnKernelSetArgMemObj_t)( +/// @brief Function-pointer for urKernelSetArgMemObj +typedef ur_result_t (UR_APICALL *ur_pfnKernelSetArgMemObj_t)( ur_kernel_handle_t, uint32_t, - const ur_kernel_arg_mem_obj_properties_t *, - ur_mem_handle_t); + const ur_kernel_arg_mem_obj_properties_t*, + ur_mem_handle_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urKernelSetSpecializationConstants -typedef ur_result_t(UR_APICALL *ur_pfnKernelSetSpecializationConstants_t)( +/// @brief Function-pointer for urKernelSetSpecializationConstants +typedef ur_result_t (UR_APICALL *ur_pfnKernelSetSpecializationConstants_t)( ur_kernel_handle_t, uint32_t, - const ur_specialization_constant_info_t *); + const ur_specialization_constant_info_t* + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Table of Kernel functions pointers -typedef struct ur_kernel_dditable_t { - ur_pfnKernelCreate_t pfnCreate; - ur_pfnKernelGetInfo_t pfnGetInfo; - ur_pfnKernelGetGroupInfo_t pfnGetGroupInfo; - ur_pfnKernelGetSubGroupInfo_t pfnGetSubGroupInfo; - ur_pfnKernelRetain_t pfnRetain; - ur_pfnKernelRelease_t pfnRelease; - ur_pfnKernelGetNativeHandle_t pfnGetNativeHandle; - ur_pfnKernelCreateWithNativeHandle_t pfnCreateWithNativeHandle; - ur_pfnKernelGetSuggestedLocalWorkSize_t pfnGetSuggestedLocalWorkSize; - ur_pfnKernelSetArgValue_t pfnSetArgValue; - ur_pfnKernelSetArgLocal_t pfnSetArgLocal; - ur_pfnKernelSetArgPointer_t pfnSetArgPointer; - ur_pfnKernelSetExecInfo_t pfnSetExecInfo; - ur_pfnKernelSetArgSampler_t pfnSetArgSampler; - ur_pfnKernelSetArgMemObj_t pfnSetArgMemObj; - ur_pfnKernelSetSpecializationConstants_t pfnSetSpecializationConstants; +typedef struct ur_kernel_dditable_t +{ + ur_pfnKernelCreate_t pfnCreate; + ur_pfnKernelGetInfo_t pfnGetInfo; + ur_pfnKernelGetGroupInfo_t pfnGetGroupInfo; + ur_pfnKernelGetSubGroupInfo_t pfnGetSubGroupInfo; + ur_pfnKernelRetain_t pfnRetain; + ur_pfnKernelRelease_t pfnRelease; + ur_pfnKernelGetNativeHandle_t pfnGetNativeHandle; + ur_pfnKernelCreateWithNativeHandle_t pfnCreateWithNativeHandle; + ur_pfnKernelGetSuggestedLocalWorkSize_t pfnGetSuggestedLocalWorkSize; + ur_pfnKernelSetArgValue_t pfnSetArgValue; + ur_pfnKernelSetArgLocal_t pfnSetArgLocal; + ur_pfnKernelSetArgPointer_t pfnSetArgPointer; + ur_pfnKernelSetExecInfo_t pfnSetExecInfo; + ur_pfnKernelSetArgSampler_t pfnSetArgSampler; + ur_pfnKernelSetArgMemObj_t pfnSetArgMemObj; + ur_pfnKernelSetSpecializationConstants_t pfnSetSpecializationConstants; } ur_kernel_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -637,29 +702,32 @@ typedef struct ur_kernel_dditable_t { /// - ::UR_RESULT_ERROR_UNSUPPORTED_VERSION UR_DLLEXPORT ur_result_t UR_APICALL urGetKernelProcAddrTable( - ur_api_version_t version, ///< [in] API version requested - ur_kernel_dditable_t *pDdiTable ///< [in,out] pointer to table of DDI function pointers -); + ur_api_version_t version, ///< [in] API version requested + ur_kernel_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Function-pointer for urGetKernelProcAddrTable -typedef ur_result_t(UR_APICALL *ur_pfnGetKernelProcAddrTable_t)( +typedef ur_result_t (UR_APICALL *ur_pfnGetKernelProcAddrTable_t)( ur_api_version_t, - ur_kernel_dditable_t *); + ur_kernel_dditable_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urKernelSuggestMaxCooperativeGroupCountExp -typedef ur_result_t(UR_APICALL *ur_pfnKernelSuggestMaxCooperativeGroupCountExp_t)( +/// @brief Function-pointer for urKernelSuggestMaxCooperativeGroupCountExp +typedef ur_result_t (UR_APICALL *ur_pfnKernelSuggestMaxCooperativeGroupCountExp_t)( ur_kernel_handle_t, uint32_t, - const size_t *, + const size_t*, size_t, - uint32_t *); + uint32_t* + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Table of KernelExp functions pointers -typedef struct ur_kernel_exp_dditable_t { - ur_pfnKernelSuggestMaxCooperativeGroupCountExp_t pfnSuggestMaxCooperativeGroupCountExp; +typedef struct ur_kernel_exp_dditable_t +{ + ur_pfnKernelSuggestMaxCooperativeGroupCountExp_t pfnSuggestMaxCooperativeGroupCountExp; } ur_kernel_exp_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -673,80 +741,90 @@ typedef struct ur_kernel_exp_dditable_t { /// - ::UR_RESULT_ERROR_UNSUPPORTED_VERSION UR_DLLEXPORT ur_result_t UR_APICALL urGetKernelExpProcAddrTable( - ur_api_version_t version, ///< [in] API version requested - ur_kernel_exp_dditable_t *pDdiTable ///< [in,out] pointer to table of DDI function pointers -); + ur_api_version_t version, ///< [in] API version requested + ur_kernel_exp_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Function-pointer for urGetKernelExpProcAddrTable -typedef ur_result_t(UR_APICALL *ur_pfnGetKernelExpProcAddrTable_t)( +typedef ur_result_t (UR_APICALL *ur_pfnGetKernelExpProcAddrTable_t)( ur_api_version_t, - ur_kernel_exp_dditable_t *); + ur_kernel_exp_dditable_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urQueueGetInfo -typedef ur_result_t(UR_APICALL *ur_pfnQueueGetInfo_t)( +/// @brief Function-pointer for urQueueGetInfo +typedef ur_result_t (UR_APICALL *ur_pfnQueueGetInfo_t)( ur_queue_handle_t, ur_queue_info_t, size_t, - void *, - size_t *); + void*, + size_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urQueueCreate -typedef ur_result_t(UR_APICALL *ur_pfnQueueCreate_t)( +/// @brief Function-pointer for urQueueCreate +typedef ur_result_t (UR_APICALL *ur_pfnQueueCreate_t)( ur_context_handle_t, ur_device_handle_t, - const ur_queue_properties_t *, - ur_queue_handle_t *); + const ur_queue_properties_t*, + ur_queue_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urQueueRetain -typedef ur_result_t(UR_APICALL *ur_pfnQueueRetain_t)( - ur_queue_handle_t); +/// @brief Function-pointer for urQueueRetain +typedef ur_result_t (UR_APICALL *ur_pfnQueueRetain_t)( + ur_queue_handle_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urQueueRelease -typedef ur_result_t(UR_APICALL *ur_pfnQueueRelease_t)( - ur_queue_handle_t); +/// @brief Function-pointer for urQueueRelease +typedef ur_result_t (UR_APICALL *ur_pfnQueueRelease_t)( + ur_queue_handle_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urQueueGetNativeHandle -typedef ur_result_t(UR_APICALL *ur_pfnQueueGetNativeHandle_t)( +/// @brief Function-pointer for urQueueGetNativeHandle +typedef ur_result_t (UR_APICALL *ur_pfnQueueGetNativeHandle_t)( ur_queue_handle_t, - ur_queue_native_desc_t *, - ur_native_handle_t *); + ur_queue_native_desc_t*, + ur_native_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urQueueCreateWithNativeHandle -typedef ur_result_t(UR_APICALL *ur_pfnQueueCreateWithNativeHandle_t)( +/// @brief Function-pointer for urQueueCreateWithNativeHandle +typedef ur_result_t (UR_APICALL *ur_pfnQueueCreateWithNativeHandle_t)( ur_native_handle_t, ur_context_handle_t, ur_device_handle_t, - const ur_queue_native_properties_t *, - ur_queue_handle_t *); + const ur_queue_native_properties_t*, + ur_queue_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urQueueFinish -typedef ur_result_t(UR_APICALL *ur_pfnQueueFinish_t)( - ur_queue_handle_t); +/// @brief Function-pointer for urQueueFinish +typedef ur_result_t (UR_APICALL *ur_pfnQueueFinish_t)( + ur_queue_handle_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urQueueFlush -typedef ur_result_t(UR_APICALL *ur_pfnQueueFlush_t)( - ur_queue_handle_t); +/// @brief Function-pointer for urQueueFlush +typedef ur_result_t (UR_APICALL *ur_pfnQueueFlush_t)( + ur_queue_handle_t + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Table of Queue functions pointers -typedef struct ur_queue_dditable_t { - ur_pfnQueueGetInfo_t pfnGetInfo; - ur_pfnQueueCreate_t pfnCreate; - ur_pfnQueueRetain_t pfnRetain; - ur_pfnQueueRelease_t pfnRelease; - ur_pfnQueueGetNativeHandle_t pfnGetNativeHandle; - ur_pfnQueueCreateWithNativeHandle_t pfnCreateWithNativeHandle; - ur_pfnQueueFinish_t pfnFinish; - ur_pfnQueueFlush_t pfnFlush; +typedef struct ur_queue_dditable_t +{ + ur_pfnQueueGetInfo_t pfnGetInfo; + ur_pfnQueueCreate_t pfnCreate; + ur_pfnQueueRetain_t pfnRetain; + ur_pfnQueueRelease_t pfnRelease; + ur_pfnQueueGetNativeHandle_t pfnGetNativeHandle; + ur_pfnQueueCreateWithNativeHandle_t pfnCreateWithNativeHandle; + ur_pfnQueueFinish_t pfnFinish; + ur_pfnQueueFlush_t pfnFlush; } ur_queue_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -760,65 +838,73 @@ typedef struct ur_queue_dditable_t { /// - ::UR_RESULT_ERROR_UNSUPPORTED_VERSION UR_DLLEXPORT ur_result_t UR_APICALL urGetQueueProcAddrTable( - ur_api_version_t version, ///< [in] API version requested - ur_queue_dditable_t *pDdiTable ///< [in,out] pointer to table of DDI function pointers -); + ur_api_version_t version, ///< [in] API version requested + ur_queue_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Function-pointer for urGetQueueProcAddrTable -typedef ur_result_t(UR_APICALL *ur_pfnGetQueueProcAddrTable_t)( +typedef ur_result_t (UR_APICALL *ur_pfnGetQueueProcAddrTable_t)( ur_api_version_t, - ur_queue_dditable_t *); + ur_queue_dditable_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urSamplerCreate -typedef ur_result_t(UR_APICALL *ur_pfnSamplerCreate_t)( +/// @brief Function-pointer for urSamplerCreate +typedef ur_result_t (UR_APICALL *ur_pfnSamplerCreate_t)( ur_context_handle_t, - const ur_sampler_desc_t *, - ur_sampler_handle_t *); + const ur_sampler_desc_t*, + ur_sampler_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urSamplerRetain -typedef ur_result_t(UR_APICALL *ur_pfnSamplerRetain_t)( - ur_sampler_handle_t); +/// @brief Function-pointer for urSamplerRetain +typedef ur_result_t (UR_APICALL *ur_pfnSamplerRetain_t)( + ur_sampler_handle_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urSamplerRelease -typedef ur_result_t(UR_APICALL *ur_pfnSamplerRelease_t)( - ur_sampler_handle_t); +/// @brief Function-pointer for urSamplerRelease +typedef ur_result_t (UR_APICALL *ur_pfnSamplerRelease_t)( + ur_sampler_handle_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urSamplerGetInfo -typedef ur_result_t(UR_APICALL *ur_pfnSamplerGetInfo_t)( +/// @brief Function-pointer for urSamplerGetInfo +typedef ur_result_t (UR_APICALL *ur_pfnSamplerGetInfo_t)( ur_sampler_handle_t, ur_sampler_info_t, size_t, - void *, - size_t *); + void*, + size_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urSamplerGetNativeHandle -typedef ur_result_t(UR_APICALL *ur_pfnSamplerGetNativeHandle_t)( +/// @brief Function-pointer for urSamplerGetNativeHandle +typedef ur_result_t (UR_APICALL *ur_pfnSamplerGetNativeHandle_t)( ur_sampler_handle_t, - ur_native_handle_t *); + ur_native_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urSamplerCreateWithNativeHandle -typedef ur_result_t(UR_APICALL *ur_pfnSamplerCreateWithNativeHandle_t)( +/// @brief Function-pointer for urSamplerCreateWithNativeHandle +typedef ur_result_t (UR_APICALL *ur_pfnSamplerCreateWithNativeHandle_t)( ur_native_handle_t, ur_context_handle_t, - const ur_sampler_native_properties_t *, - ur_sampler_handle_t *); + const ur_sampler_native_properties_t*, + ur_sampler_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Table of Sampler functions pointers -typedef struct ur_sampler_dditable_t { - ur_pfnSamplerCreate_t pfnCreate; - ur_pfnSamplerRetain_t pfnRetain; - ur_pfnSamplerRelease_t pfnRelease; - ur_pfnSamplerGetInfo_t pfnGetInfo; - ur_pfnSamplerGetNativeHandle_t pfnGetNativeHandle; - ur_pfnSamplerCreateWithNativeHandle_t pfnCreateWithNativeHandle; +typedef struct ur_sampler_dditable_t +{ + ur_pfnSamplerCreate_t pfnCreate; + ur_pfnSamplerRetain_t pfnRetain; + ur_pfnSamplerRelease_t pfnRelease; + ur_pfnSamplerGetInfo_t pfnGetInfo; + ur_pfnSamplerGetNativeHandle_t pfnGetNativeHandle; + ur_pfnSamplerCreateWithNativeHandle_t pfnCreateWithNativeHandle; } ur_sampler_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -832,110 +918,122 @@ typedef struct ur_sampler_dditable_t { /// - ::UR_RESULT_ERROR_UNSUPPORTED_VERSION UR_DLLEXPORT ur_result_t UR_APICALL urGetSamplerProcAddrTable( - ur_api_version_t version, ///< [in] API version requested - ur_sampler_dditable_t *pDdiTable ///< [in,out] pointer to table of DDI function pointers -); + ur_api_version_t version, ///< [in] API version requested + ur_sampler_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Function-pointer for urGetSamplerProcAddrTable -typedef ur_result_t(UR_APICALL *ur_pfnGetSamplerProcAddrTable_t)( +typedef ur_result_t (UR_APICALL *ur_pfnGetSamplerProcAddrTable_t)( ur_api_version_t, - ur_sampler_dditable_t *); + ur_sampler_dditable_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urMemImageCreate -typedef ur_result_t(UR_APICALL *ur_pfnMemImageCreate_t)( +/// @brief Function-pointer for urMemImageCreate +typedef ur_result_t (UR_APICALL *ur_pfnMemImageCreate_t)( ur_context_handle_t, ur_mem_flags_t, - const ur_image_format_t *, - const ur_image_desc_t *, - void *, - ur_mem_handle_t *); + const ur_image_format_t*, + const ur_image_desc_t*, + void*, + ur_mem_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urMemBufferCreate -typedef ur_result_t(UR_APICALL *ur_pfnMemBufferCreate_t)( +/// @brief Function-pointer for urMemBufferCreate +typedef ur_result_t (UR_APICALL *ur_pfnMemBufferCreate_t)( ur_context_handle_t, ur_mem_flags_t, size_t, - const ur_buffer_properties_t *, - ur_mem_handle_t *); + const ur_buffer_properties_t*, + ur_mem_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urMemRetain -typedef ur_result_t(UR_APICALL *ur_pfnMemRetain_t)( - ur_mem_handle_t); +/// @brief Function-pointer for urMemRetain +typedef ur_result_t (UR_APICALL *ur_pfnMemRetain_t)( + ur_mem_handle_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urMemRelease -typedef ur_result_t(UR_APICALL *ur_pfnMemRelease_t)( - ur_mem_handle_t); +/// @brief Function-pointer for urMemRelease +typedef ur_result_t (UR_APICALL *ur_pfnMemRelease_t)( + ur_mem_handle_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urMemBufferPartition -typedef ur_result_t(UR_APICALL *ur_pfnMemBufferPartition_t)( +/// @brief Function-pointer for urMemBufferPartition +typedef ur_result_t (UR_APICALL *ur_pfnMemBufferPartition_t)( ur_mem_handle_t, ur_mem_flags_t, ur_buffer_create_type_t, - const ur_buffer_region_t *, - ur_mem_handle_t *); + const ur_buffer_region_t*, + ur_mem_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urMemGetNativeHandle -typedef ur_result_t(UR_APICALL *ur_pfnMemGetNativeHandle_t)( +/// @brief Function-pointer for urMemGetNativeHandle +typedef ur_result_t (UR_APICALL *ur_pfnMemGetNativeHandle_t)( ur_mem_handle_t, ur_device_handle_t, - ur_native_handle_t *); + ur_native_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urMemBufferCreateWithNativeHandle -typedef ur_result_t(UR_APICALL *ur_pfnMemBufferCreateWithNativeHandle_t)( +/// @brief Function-pointer for urMemBufferCreateWithNativeHandle +typedef ur_result_t (UR_APICALL *ur_pfnMemBufferCreateWithNativeHandle_t)( ur_native_handle_t, ur_context_handle_t, - const ur_mem_native_properties_t *, - ur_mem_handle_t *); + const ur_mem_native_properties_t*, + ur_mem_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urMemImageCreateWithNativeHandle -typedef ur_result_t(UR_APICALL *ur_pfnMemImageCreateWithNativeHandle_t)( +/// @brief Function-pointer for urMemImageCreateWithNativeHandle +typedef ur_result_t (UR_APICALL *ur_pfnMemImageCreateWithNativeHandle_t)( ur_native_handle_t, ur_context_handle_t, - const ur_image_format_t *, - const ur_image_desc_t *, - const ur_mem_native_properties_t *, - ur_mem_handle_t *); + const ur_image_format_t*, + const ur_image_desc_t*, + const ur_mem_native_properties_t*, + ur_mem_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urMemGetInfo -typedef ur_result_t(UR_APICALL *ur_pfnMemGetInfo_t)( +/// @brief Function-pointer for urMemGetInfo +typedef ur_result_t (UR_APICALL *ur_pfnMemGetInfo_t)( ur_mem_handle_t, ur_mem_info_t, size_t, - void *, - size_t *); + void*, + size_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urMemImageGetInfo -typedef ur_result_t(UR_APICALL *ur_pfnMemImageGetInfo_t)( +/// @brief Function-pointer for urMemImageGetInfo +typedef ur_result_t (UR_APICALL *ur_pfnMemImageGetInfo_t)( ur_mem_handle_t, ur_image_info_t, size_t, - void *, - size_t *); + void*, + size_t* + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Table of Mem functions pointers -typedef struct ur_mem_dditable_t { - ur_pfnMemImageCreate_t pfnImageCreate; - ur_pfnMemBufferCreate_t pfnBufferCreate; - ur_pfnMemRetain_t pfnRetain; - ur_pfnMemRelease_t pfnRelease; - ur_pfnMemBufferPartition_t pfnBufferPartition; - ur_pfnMemGetNativeHandle_t pfnGetNativeHandle; - ur_pfnMemBufferCreateWithNativeHandle_t pfnBufferCreateWithNativeHandle; - ur_pfnMemImageCreateWithNativeHandle_t pfnImageCreateWithNativeHandle; - ur_pfnMemGetInfo_t pfnGetInfo; - ur_pfnMemImageGetInfo_t pfnImageGetInfo; +typedef struct ur_mem_dditable_t +{ + ur_pfnMemImageCreate_t pfnImageCreate; + ur_pfnMemBufferCreate_t pfnBufferCreate; + ur_pfnMemRetain_t pfnRetain; + ur_pfnMemRelease_t pfnRelease; + ur_pfnMemBufferPartition_t pfnBufferPartition; + ur_pfnMemGetNativeHandle_t pfnGetNativeHandle; + ur_pfnMemBufferCreateWithNativeHandle_t pfnBufferCreateWithNativeHandle; + ur_pfnMemImageCreateWithNativeHandle_t pfnImageCreateWithNativeHandle; + ur_pfnMemGetInfo_t pfnGetInfo; + ur_pfnMemImageGetInfo_t pfnImageGetInfo; } ur_mem_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -949,41 +1047,46 @@ typedef struct ur_mem_dditable_t { /// - ::UR_RESULT_ERROR_UNSUPPORTED_VERSION UR_DLLEXPORT ur_result_t UR_APICALL urGetMemProcAddrTable( - ur_api_version_t version, ///< [in] API version requested - ur_mem_dditable_t *pDdiTable ///< [in,out] pointer to table of DDI function pointers -); + ur_api_version_t version, ///< [in] API version requested + ur_mem_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Function-pointer for urGetMemProcAddrTable -typedef ur_result_t(UR_APICALL *ur_pfnGetMemProcAddrTable_t)( +typedef ur_result_t (UR_APICALL *ur_pfnGetMemProcAddrTable_t)( ur_api_version_t, - ur_mem_dditable_t *); + ur_mem_dditable_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urPhysicalMemCreate -typedef ur_result_t(UR_APICALL *ur_pfnPhysicalMemCreate_t)( +/// @brief Function-pointer for urPhysicalMemCreate +typedef ur_result_t (UR_APICALL *ur_pfnPhysicalMemCreate_t)( ur_context_handle_t, ur_device_handle_t, size_t, - const ur_physical_mem_properties_t *, - ur_physical_mem_handle_t *); + const ur_physical_mem_properties_t*, + ur_physical_mem_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urPhysicalMemRetain -typedef ur_result_t(UR_APICALL *ur_pfnPhysicalMemRetain_t)( - ur_physical_mem_handle_t); +/// @brief Function-pointer for urPhysicalMemRetain +typedef ur_result_t (UR_APICALL *ur_pfnPhysicalMemRetain_t)( + ur_physical_mem_handle_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urPhysicalMemRelease -typedef ur_result_t(UR_APICALL *ur_pfnPhysicalMemRelease_t)( - ur_physical_mem_handle_t); +/// @brief Function-pointer for urPhysicalMemRelease +typedef ur_result_t (UR_APICALL *ur_pfnPhysicalMemRelease_t)( + ur_physical_mem_handle_t + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Table of PhysicalMem functions pointers -typedef struct ur_physical_mem_dditable_t { - ur_pfnPhysicalMemCreate_t pfnCreate; - ur_pfnPhysicalMemRetain_t pfnRetain; - ur_pfnPhysicalMemRelease_t pfnRelease; +typedef struct ur_physical_mem_dditable_t +{ + ur_pfnPhysicalMemCreate_t pfnCreate; + ur_pfnPhysicalMemRetain_t pfnRetain; + ur_pfnPhysicalMemRelease_t pfnRelease; } ur_physical_mem_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -997,57 +1100,64 @@ typedef struct ur_physical_mem_dditable_t { /// - ::UR_RESULT_ERROR_UNSUPPORTED_VERSION UR_DLLEXPORT ur_result_t UR_APICALL urGetPhysicalMemProcAddrTable( - ur_api_version_t version, ///< [in] API version requested - ur_physical_mem_dditable_t *pDdiTable ///< [in,out] pointer to table of DDI function pointers -); + ur_api_version_t version, ///< [in] API version requested + ur_physical_mem_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Function-pointer for urGetPhysicalMemProcAddrTable -typedef ur_result_t(UR_APICALL *ur_pfnGetPhysicalMemProcAddrTable_t)( +typedef ur_result_t (UR_APICALL *ur_pfnGetPhysicalMemProcAddrTable_t)( ur_api_version_t, - ur_physical_mem_dditable_t *); + ur_physical_mem_dditable_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urAdapterGet -typedef ur_result_t(UR_APICALL *ur_pfnAdapterGet_t)( +/// @brief Function-pointer for urAdapterGet +typedef ur_result_t (UR_APICALL *ur_pfnAdapterGet_t)( uint32_t, - ur_adapter_handle_t *, - uint32_t *); + ur_adapter_handle_t*, + uint32_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urAdapterRelease -typedef ur_result_t(UR_APICALL *ur_pfnAdapterRelease_t)( - ur_adapter_handle_t); +/// @brief Function-pointer for urAdapterRelease +typedef ur_result_t (UR_APICALL *ur_pfnAdapterRelease_t)( + ur_adapter_handle_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urAdapterRetain -typedef ur_result_t(UR_APICALL *ur_pfnAdapterRetain_t)( - ur_adapter_handle_t); +/// @brief Function-pointer for urAdapterRetain +typedef ur_result_t (UR_APICALL *ur_pfnAdapterRetain_t)( + ur_adapter_handle_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urAdapterGetLastError -typedef ur_result_t(UR_APICALL *ur_pfnAdapterGetLastError_t)( +/// @brief Function-pointer for urAdapterGetLastError +typedef ur_result_t (UR_APICALL *ur_pfnAdapterGetLastError_t)( ur_adapter_handle_t, - const char **, - int32_t *); + const char**, + int32_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urAdapterGetInfo -typedef ur_result_t(UR_APICALL *ur_pfnAdapterGetInfo_t)( +/// @brief Function-pointer for urAdapterGetInfo +typedef ur_result_t (UR_APICALL *ur_pfnAdapterGetInfo_t)( ur_adapter_handle_t, ur_adapter_info_t, size_t, - void *, - size_t *); + void*, + size_t* + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Table of Global functions pointers -typedef struct ur_global_dditable_t { - ur_pfnAdapterGet_t pfnAdapterGet; - ur_pfnAdapterRelease_t pfnAdapterRelease; - ur_pfnAdapterRetain_t pfnAdapterRetain; - ur_pfnAdapterGetLastError_t pfnAdapterGetLastError; - ur_pfnAdapterGetInfo_t pfnAdapterGetInfo; +typedef struct ur_global_dditable_t +{ + ur_pfnAdapterGet_t pfnAdapterGet; + ur_pfnAdapterRelease_t pfnAdapterRelease; + ur_pfnAdapterRetain_t pfnAdapterRetain; + ur_pfnAdapterGetLastError_t pfnAdapterGetLastError; + ur_pfnAdapterGetInfo_t pfnAdapterGetInfo; } ur_global_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -1061,74 +1171,80 @@ typedef struct ur_global_dditable_t { /// - ::UR_RESULT_ERROR_UNSUPPORTED_VERSION UR_DLLEXPORT ur_result_t UR_APICALL urGetGlobalProcAddrTable( - ur_api_version_t version, ///< [in] API version requested - ur_global_dditable_t *pDdiTable ///< [in,out] pointer to table of DDI function pointers -); + ur_api_version_t version, ///< [in] API version requested + ur_global_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Function-pointer for urGetGlobalProcAddrTable -typedef ur_result_t(UR_APICALL *ur_pfnGetGlobalProcAddrTable_t)( +typedef ur_result_t (UR_APICALL *ur_pfnGetGlobalProcAddrTable_t)( ur_api_version_t, - ur_global_dditable_t *); + ur_global_dditable_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urEnqueueKernelLaunch -typedef ur_result_t(UR_APICALL *ur_pfnEnqueueKernelLaunch_t)( +/// @brief Function-pointer for urEnqueueKernelLaunch +typedef ur_result_t (UR_APICALL *ur_pfnEnqueueKernelLaunch_t)( ur_queue_handle_t, ur_kernel_handle_t, uint32_t, - const size_t *, - const size_t *, - const size_t *, + const size_t*, + const size_t*, + const size_t*, uint32_t, - const ur_event_handle_t *, - ur_event_handle_t *); + const ur_event_handle_t*, + ur_event_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urEnqueueEventsWait -typedef ur_result_t(UR_APICALL *ur_pfnEnqueueEventsWait_t)( +/// @brief Function-pointer for urEnqueueEventsWait +typedef ur_result_t (UR_APICALL *ur_pfnEnqueueEventsWait_t)( ur_queue_handle_t, uint32_t, - const ur_event_handle_t *, - ur_event_handle_t *); + const ur_event_handle_t*, + ur_event_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urEnqueueEventsWaitWithBarrier -typedef ur_result_t(UR_APICALL *ur_pfnEnqueueEventsWaitWithBarrier_t)( +/// @brief Function-pointer for urEnqueueEventsWaitWithBarrier +typedef ur_result_t (UR_APICALL *ur_pfnEnqueueEventsWaitWithBarrier_t)( ur_queue_handle_t, uint32_t, - const ur_event_handle_t *, - ur_event_handle_t *); + const ur_event_handle_t*, + ur_event_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urEnqueueMemBufferRead -typedef ur_result_t(UR_APICALL *ur_pfnEnqueueMemBufferRead_t)( +/// @brief Function-pointer for urEnqueueMemBufferRead +typedef ur_result_t (UR_APICALL *ur_pfnEnqueueMemBufferRead_t)( ur_queue_handle_t, ur_mem_handle_t, bool, size_t, size_t, - void *, + void*, uint32_t, - const ur_event_handle_t *, - ur_event_handle_t *); + const ur_event_handle_t*, + ur_event_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urEnqueueMemBufferWrite -typedef ur_result_t(UR_APICALL *ur_pfnEnqueueMemBufferWrite_t)( +/// @brief Function-pointer for urEnqueueMemBufferWrite +typedef ur_result_t (UR_APICALL *ur_pfnEnqueueMemBufferWrite_t)( ur_queue_handle_t, ur_mem_handle_t, bool, size_t, size_t, - const void *, + const void*, uint32_t, - const ur_event_handle_t *, - ur_event_handle_t *); + const ur_event_handle_t*, + ur_event_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urEnqueueMemBufferReadRect -typedef ur_result_t(UR_APICALL *ur_pfnEnqueueMemBufferReadRect_t)( +/// @brief Function-pointer for urEnqueueMemBufferReadRect +typedef ur_result_t (UR_APICALL *ur_pfnEnqueueMemBufferReadRect_t)( ur_queue_handle_t, ur_mem_handle_t, bool, @@ -1139,14 +1255,15 @@ typedef ur_result_t(UR_APICALL *ur_pfnEnqueueMemBufferReadRect_t)( size_t, size_t, size_t, - void *, + void*, uint32_t, - const ur_event_handle_t *, - ur_event_handle_t *); + const ur_event_handle_t*, + ur_event_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urEnqueueMemBufferWriteRect -typedef ur_result_t(UR_APICALL *ur_pfnEnqueueMemBufferWriteRect_t)( +/// @brief Function-pointer for urEnqueueMemBufferWriteRect +typedef ur_result_t (UR_APICALL *ur_pfnEnqueueMemBufferWriteRect_t)( ur_queue_handle_t, ur_mem_handle_t, bool, @@ -1157,14 +1274,15 @@ typedef ur_result_t(UR_APICALL *ur_pfnEnqueueMemBufferWriteRect_t)( size_t, size_t, size_t, - void *, + void*, uint32_t, - const ur_event_handle_t *, - ur_event_handle_t *); + const ur_event_handle_t*, + ur_event_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urEnqueueMemBufferCopy -typedef ur_result_t(UR_APICALL *ur_pfnEnqueueMemBufferCopy_t)( +/// @brief Function-pointer for urEnqueueMemBufferCopy +typedef ur_result_t (UR_APICALL *ur_pfnEnqueueMemBufferCopy_t)( ur_queue_handle_t, ur_mem_handle_t, ur_mem_handle_t, @@ -1172,12 +1290,13 @@ typedef ur_result_t(UR_APICALL *ur_pfnEnqueueMemBufferCopy_t)( size_t, size_t, uint32_t, - const ur_event_handle_t *, - ur_event_handle_t *); + const ur_event_handle_t*, + ur_event_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urEnqueueMemBufferCopyRect -typedef ur_result_t(UR_APICALL *ur_pfnEnqueueMemBufferCopyRect_t)( +/// @brief Function-pointer for urEnqueueMemBufferCopyRect +typedef ur_result_t (UR_APICALL *ur_pfnEnqueueMemBufferCopyRect_t)( ur_queue_handle_t, ur_mem_handle_t, ur_mem_handle_t, @@ -1189,25 +1308,27 @@ typedef ur_result_t(UR_APICALL *ur_pfnEnqueueMemBufferCopyRect_t)( size_t, size_t, uint32_t, - const ur_event_handle_t *, - ur_event_handle_t *); + const ur_event_handle_t*, + ur_event_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urEnqueueMemBufferFill -typedef ur_result_t(UR_APICALL *ur_pfnEnqueueMemBufferFill_t)( +/// @brief Function-pointer for urEnqueueMemBufferFill +typedef ur_result_t (UR_APICALL *ur_pfnEnqueueMemBufferFill_t)( ur_queue_handle_t, ur_mem_handle_t, - const void *, + const void*, size_t, size_t, size_t, uint32_t, - const ur_event_handle_t *, - ur_event_handle_t *); + const ur_event_handle_t*, + ur_event_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urEnqueueMemImageRead -typedef ur_result_t(UR_APICALL *ur_pfnEnqueueMemImageRead_t)( +/// @brief Function-pointer for urEnqueueMemImageRead +typedef ur_result_t (UR_APICALL *ur_pfnEnqueueMemImageRead_t)( ur_queue_handle_t, ur_mem_handle_t, bool, @@ -1215,14 +1336,15 @@ typedef ur_result_t(UR_APICALL *ur_pfnEnqueueMemImageRead_t)( ur_rect_region_t, size_t, size_t, - void *, + void*, uint32_t, - const ur_event_handle_t *, - ur_event_handle_t *); + const ur_event_handle_t*, + ur_event_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urEnqueueMemImageWrite -typedef ur_result_t(UR_APICALL *ur_pfnEnqueueMemImageWrite_t)( +/// @brief Function-pointer for urEnqueueMemImageWrite +typedef ur_result_t (UR_APICALL *ur_pfnEnqueueMemImageWrite_t)( ur_queue_handle_t, ur_mem_handle_t, bool, @@ -1230,14 +1352,15 @@ typedef ur_result_t(UR_APICALL *ur_pfnEnqueueMemImageWrite_t)( ur_rect_region_t, size_t, size_t, - void *, + void*, uint32_t, - const ur_event_handle_t *, - ur_event_handle_t *); + const ur_event_handle_t*, + ur_event_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urEnqueueMemImageCopy -typedef ur_result_t(UR_APICALL *ur_pfnEnqueueMemImageCopy_t)( +/// @brief Function-pointer for urEnqueueMemImageCopy +typedef ur_result_t (UR_APICALL *ur_pfnEnqueueMemImageCopy_t)( ur_queue_handle_t, ur_mem_handle_t, ur_mem_handle_t, @@ -1245,12 +1368,13 @@ typedef ur_result_t(UR_APICALL *ur_pfnEnqueueMemImageCopy_t)( ur_rect_offset_t, ur_rect_region_t, uint32_t, - const ur_event_handle_t *, - ur_event_handle_t *); + const ur_event_handle_t*, + ur_event_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urEnqueueMemBufferMap -typedef ur_result_t(UR_APICALL *ur_pfnEnqueueMemBufferMap_t)( +/// @brief Function-pointer for urEnqueueMemBufferMap +typedef ur_result_t (UR_APICALL *ur_pfnEnqueueMemBufferMap_t)( ur_queue_handle_t, ur_mem_handle_t, bool, @@ -1258,185 +1382,199 @@ typedef ur_result_t(UR_APICALL *ur_pfnEnqueueMemBufferMap_t)( size_t, size_t, uint32_t, - const ur_event_handle_t *, - ur_event_handle_t *, - void **); + const ur_event_handle_t*, + ur_event_handle_t*, + void** + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urEnqueueMemUnmap -typedef ur_result_t(UR_APICALL *ur_pfnEnqueueMemUnmap_t)( +/// @brief Function-pointer for urEnqueueMemUnmap +typedef ur_result_t (UR_APICALL *ur_pfnEnqueueMemUnmap_t)( ur_queue_handle_t, ur_mem_handle_t, - void *, + void*, uint32_t, - const ur_event_handle_t *, - ur_event_handle_t *); + const ur_event_handle_t*, + ur_event_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urEnqueueUSMFill -typedef ur_result_t(UR_APICALL *ur_pfnEnqueueUSMFill_t)( +/// @brief Function-pointer for urEnqueueUSMFill +typedef ur_result_t (UR_APICALL *ur_pfnEnqueueUSMFill_t)( ur_queue_handle_t, - void *, + void*, size_t, - const void *, + const void*, size_t, uint32_t, - const ur_event_handle_t *, - ur_event_handle_t *); + const ur_event_handle_t*, + ur_event_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urEnqueueUSMMemcpy -typedef ur_result_t(UR_APICALL *ur_pfnEnqueueUSMMemcpy_t)( +/// @brief Function-pointer for urEnqueueUSMMemcpy +typedef ur_result_t (UR_APICALL *ur_pfnEnqueueUSMMemcpy_t)( ur_queue_handle_t, bool, - void *, - const void *, + void*, + const void*, size_t, uint32_t, - const ur_event_handle_t *, - ur_event_handle_t *); + const ur_event_handle_t*, + ur_event_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urEnqueueUSMPrefetch -typedef ur_result_t(UR_APICALL *ur_pfnEnqueueUSMPrefetch_t)( +/// @brief Function-pointer for urEnqueueUSMPrefetch +typedef ur_result_t (UR_APICALL *ur_pfnEnqueueUSMPrefetch_t)( ur_queue_handle_t, - const void *, + const void*, size_t, ur_usm_migration_flags_t, uint32_t, - const ur_event_handle_t *, - ur_event_handle_t *); + const ur_event_handle_t*, + ur_event_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urEnqueueUSMAdvise -typedef ur_result_t(UR_APICALL *ur_pfnEnqueueUSMAdvise_t)( +/// @brief Function-pointer for urEnqueueUSMAdvise +typedef ur_result_t (UR_APICALL *ur_pfnEnqueueUSMAdvise_t)( ur_queue_handle_t, - const void *, + const void*, size_t, ur_usm_advice_flags_t, - ur_event_handle_t *); + ur_event_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urEnqueueUSMFill2D -typedef ur_result_t(UR_APICALL *ur_pfnEnqueueUSMFill2D_t)( +/// @brief Function-pointer for urEnqueueUSMFill2D +typedef ur_result_t (UR_APICALL *ur_pfnEnqueueUSMFill2D_t)( ur_queue_handle_t, - void *, + void*, size_t, size_t, - const void *, + const void*, size_t, size_t, uint32_t, - const ur_event_handle_t *, - ur_event_handle_t *); + const ur_event_handle_t*, + ur_event_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urEnqueueUSMMemcpy2D -typedef ur_result_t(UR_APICALL *ur_pfnEnqueueUSMMemcpy2D_t)( +/// @brief Function-pointer for urEnqueueUSMMemcpy2D +typedef ur_result_t (UR_APICALL *ur_pfnEnqueueUSMMemcpy2D_t)( ur_queue_handle_t, bool, - void *, + void*, size_t, - const void *, + const void*, size_t, size_t, size_t, uint32_t, - const ur_event_handle_t *, - ur_event_handle_t *); + const ur_event_handle_t*, + ur_event_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urEnqueueDeviceGlobalVariableWrite -typedef ur_result_t(UR_APICALL *ur_pfnEnqueueDeviceGlobalVariableWrite_t)( +/// @brief Function-pointer for urEnqueueDeviceGlobalVariableWrite +typedef ur_result_t (UR_APICALL *ur_pfnEnqueueDeviceGlobalVariableWrite_t)( ur_queue_handle_t, ur_program_handle_t, - const char *, + const char*, bool, size_t, size_t, - const void *, + const void*, uint32_t, - const ur_event_handle_t *, - ur_event_handle_t *); + const ur_event_handle_t*, + ur_event_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urEnqueueDeviceGlobalVariableRead -typedef ur_result_t(UR_APICALL *ur_pfnEnqueueDeviceGlobalVariableRead_t)( +/// @brief Function-pointer for urEnqueueDeviceGlobalVariableRead +typedef ur_result_t (UR_APICALL *ur_pfnEnqueueDeviceGlobalVariableRead_t)( ur_queue_handle_t, ur_program_handle_t, - const char *, + const char*, bool, size_t, size_t, - void *, + void*, uint32_t, - const ur_event_handle_t *, - ur_event_handle_t *); + const ur_event_handle_t*, + ur_event_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urEnqueueReadHostPipe -typedef ur_result_t(UR_APICALL *ur_pfnEnqueueReadHostPipe_t)( +/// @brief Function-pointer for urEnqueueReadHostPipe +typedef ur_result_t (UR_APICALL *ur_pfnEnqueueReadHostPipe_t)( ur_queue_handle_t, ur_program_handle_t, - const char *, + const char*, bool, - void *, + void*, size_t, uint32_t, - const ur_event_handle_t *, - ur_event_handle_t *); + const ur_event_handle_t*, + ur_event_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urEnqueueWriteHostPipe -typedef ur_result_t(UR_APICALL *ur_pfnEnqueueWriteHostPipe_t)( +/// @brief Function-pointer for urEnqueueWriteHostPipe +typedef ur_result_t (UR_APICALL *ur_pfnEnqueueWriteHostPipe_t)( ur_queue_handle_t, ur_program_handle_t, - const char *, + const char*, bool, - void *, + void*, size_t, uint32_t, - const ur_event_handle_t *, - ur_event_handle_t *); + const ur_event_handle_t*, + ur_event_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urEnqueueEventsWaitWithBarrierExt -typedef ur_result_t(UR_APICALL *ur_pfnEnqueueEventsWaitWithBarrierExt_t)( +/// @brief Function-pointer for urEnqueueEventsWaitWithBarrierExt +typedef ur_result_t (UR_APICALL *ur_pfnEnqueueEventsWaitWithBarrierExt_t)( ur_queue_handle_t, - const ur_exp_enqueue_ext_properties_t *, + const ur_exp_enqueue_ext_properties_t*, uint32_t, - const ur_event_handle_t *, - ur_event_handle_t *); + const ur_event_handle_t*, + ur_event_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Table of Enqueue functions pointers -typedef struct ur_enqueue_dditable_t { - ur_pfnEnqueueKernelLaunch_t pfnKernelLaunch; - ur_pfnEnqueueEventsWait_t pfnEventsWait; - ur_pfnEnqueueEventsWaitWithBarrier_t pfnEventsWaitWithBarrier; - ur_pfnEnqueueMemBufferRead_t pfnMemBufferRead; - ur_pfnEnqueueMemBufferWrite_t pfnMemBufferWrite; - ur_pfnEnqueueMemBufferReadRect_t pfnMemBufferReadRect; - ur_pfnEnqueueMemBufferWriteRect_t pfnMemBufferWriteRect; - ur_pfnEnqueueMemBufferCopy_t pfnMemBufferCopy; - ur_pfnEnqueueMemBufferCopyRect_t pfnMemBufferCopyRect; - ur_pfnEnqueueMemBufferFill_t pfnMemBufferFill; - ur_pfnEnqueueMemImageRead_t pfnMemImageRead; - ur_pfnEnqueueMemImageWrite_t pfnMemImageWrite; - ur_pfnEnqueueMemImageCopy_t pfnMemImageCopy; - ur_pfnEnqueueMemBufferMap_t pfnMemBufferMap; - ur_pfnEnqueueMemUnmap_t pfnMemUnmap; - ur_pfnEnqueueUSMFill_t pfnUSMFill; - ur_pfnEnqueueUSMMemcpy_t pfnUSMMemcpy; - ur_pfnEnqueueUSMPrefetch_t pfnUSMPrefetch; - ur_pfnEnqueueUSMAdvise_t pfnUSMAdvise; - ur_pfnEnqueueUSMFill2D_t pfnUSMFill2D; - ur_pfnEnqueueUSMMemcpy2D_t pfnUSMMemcpy2D; - ur_pfnEnqueueDeviceGlobalVariableWrite_t pfnDeviceGlobalVariableWrite; - ur_pfnEnqueueDeviceGlobalVariableRead_t pfnDeviceGlobalVariableRead; - ur_pfnEnqueueReadHostPipe_t pfnReadHostPipe; - ur_pfnEnqueueWriteHostPipe_t pfnWriteHostPipe; - ur_pfnEnqueueEventsWaitWithBarrierExt_t pfnEventsWaitWithBarrierExt; +typedef struct ur_enqueue_dditable_t +{ + ur_pfnEnqueueKernelLaunch_t pfnKernelLaunch; + ur_pfnEnqueueEventsWait_t pfnEventsWait; + ur_pfnEnqueueEventsWaitWithBarrier_t pfnEventsWaitWithBarrier; + ur_pfnEnqueueMemBufferRead_t pfnMemBufferRead; + ur_pfnEnqueueMemBufferWrite_t pfnMemBufferWrite; + ur_pfnEnqueueMemBufferReadRect_t pfnMemBufferReadRect; + ur_pfnEnqueueMemBufferWriteRect_t pfnMemBufferWriteRect; + ur_pfnEnqueueMemBufferCopy_t pfnMemBufferCopy; + ur_pfnEnqueueMemBufferCopyRect_t pfnMemBufferCopyRect; + ur_pfnEnqueueMemBufferFill_t pfnMemBufferFill; + ur_pfnEnqueueMemImageRead_t pfnMemImageRead; + ur_pfnEnqueueMemImageWrite_t pfnMemImageWrite; + ur_pfnEnqueueMemImageCopy_t pfnMemImageCopy; + ur_pfnEnqueueMemBufferMap_t pfnMemBufferMap; + ur_pfnEnqueueMemUnmap_t pfnMemUnmap; + ur_pfnEnqueueUSMFill_t pfnUSMFill; + ur_pfnEnqueueUSMMemcpy_t pfnUSMMemcpy; + ur_pfnEnqueueUSMPrefetch_t pfnUSMPrefetch; + ur_pfnEnqueueUSMAdvise_t pfnUSMAdvise; + ur_pfnEnqueueUSMFill2D_t pfnUSMFill2D; + ur_pfnEnqueueUSMMemcpy2D_t pfnUSMMemcpy2D; + ur_pfnEnqueueDeviceGlobalVariableWrite_t pfnDeviceGlobalVariableWrite; + ur_pfnEnqueueDeviceGlobalVariableRead_t pfnDeviceGlobalVariableRead; + ur_pfnEnqueueReadHostPipe_t pfnReadHostPipe; + ur_pfnEnqueueWriteHostPipe_t pfnWriteHostPipe; + ur_pfnEnqueueEventsWaitWithBarrierExt_t pfnEventsWaitWithBarrierExt; } ur_enqueue_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -1450,73 +1588,79 @@ typedef struct ur_enqueue_dditable_t { /// - ::UR_RESULT_ERROR_UNSUPPORTED_VERSION UR_DLLEXPORT ur_result_t UR_APICALL urGetEnqueueProcAddrTable( - ur_api_version_t version, ///< [in] API version requested - ur_enqueue_dditable_t *pDdiTable ///< [in,out] pointer to table of DDI function pointers -); + ur_api_version_t version, ///< [in] API version requested + ur_enqueue_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Function-pointer for urGetEnqueueProcAddrTable -typedef ur_result_t(UR_APICALL *ur_pfnGetEnqueueProcAddrTable_t)( +typedef ur_result_t (UR_APICALL *ur_pfnGetEnqueueProcAddrTable_t)( ur_api_version_t, - ur_enqueue_dditable_t *); + ur_enqueue_dditable_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urEnqueueKernelLaunchCustomExp -typedef ur_result_t(UR_APICALL *ur_pfnEnqueueKernelLaunchCustomExp_t)( +/// @brief Function-pointer for urEnqueueKernelLaunchCustomExp +typedef ur_result_t (UR_APICALL *ur_pfnEnqueueKernelLaunchCustomExp_t)( ur_queue_handle_t, ur_kernel_handle_t, uint32_t, - const size_t *, - const size_t *, - const size_t *, + const size_t*, + const size_t*, + const size_t*, uint32_t, - const ur_exp_launch_property_t *, + const ur_exp_launch_property_t*, uint32_t, - const ur_event_handle_t *, - ur_event_handle_t *); + const ur_event_handle_t*, + ur_event_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urEnqueueCooperativeKernelLaunchExp -typedef ur_result_t(UR_APICALL *ur_pfnEnqueueCooperativeKernelLaunchExp_t)( +/// @brief Function-pointer for urEnqueueCooperativeKernelLaunchExp +typedef ur_result_t (UR_APICALL *ur_pfnEnqueueCooperativeKernelLaunchExp_t)( ur_queue_handle_t, ur_kernel_handle_t, uint32_t, - const size_t *, - const size_t *, - const size_t *, + const size_t*, + const size_t*, + const size_t*, uint32_t, - const ur_event_handle_t *, - ur_event_handle_t *); + const ur_event_handle_t*, + ur_event_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urEnqueueTimestampRecordingExp -typedef ur_result_t(UR_APICALL *ur_pfnEnqueueTimestampRecordingExp_t)( +/// @brief Function-pointer for urEnqueueTimestampRecordingExp +typedef ur_result_t (UR_APICALL *ur_pfnEnqueueTimestampRecordingExp_t)( ur_queue_handle_t, bool, uint32_t, - const ur_event_handle_t *, - ur_event_handle_t *); + const ur_event_handle_t*, + ur_event_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urEnqueueNativeCommandExp -typedef ur_result_t(UR_APICALL *ur_pfnEnqueueNativeCommandExp_t)( +/// @brief Function-pointer for urEnqueueNativeCommandExp +typedef ur_result_t (UR_APICALL *ur_pfnEnqueueNativeCommandExp_t)( ur_queue_handle_t, ur_exp_enqueue_native_command_function_t, - void *, + void*, uint32_t, - const ur_mem_handle_t *, - const ur_exp_enqueue_native_command_properties_t *, + const ur_mem_handle_t*, + const ur_exp_enqueue_native_command_properties_t*, uint32_t, - const ur_event_handle_t *, - ur_event_handle_t *); + const ur_event_handle_t*, + ur_event_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Table of EnqueueExp functions pointers -typedef struct ur_enqueue_exp_dditable_t { - ur_pfnEnqueueKernelLaunchCustomExp_t pfnKernelLaunchCustomExp; - ur_pfnEnqueueCooperativeKernelLaunchExp_t pfnCooperativeKernelLaunchExp; - ur_pfnEnqueueTimestampRecordingExp_t pfnTimestampRecordingExp; - ur_pfnEnqueueNativeCommandExp_t pfnNativeCommandExp; +typedef struct ur_enqueue_exp_dditable_t +{ + ur_pfnEnqueueKernelLaunchCustomExp_t pfnKernelLaunchCustomExp; + ur_pfnEnqueueCooperativeKernelLaunchExp_t pfnCooperativeKernelLaunchExp; + ur_pfnEnqueueTimestampRecordingExp_t pfnTimestampRecordingExp; + ur_pfnEnqueueNativeCommandExp_t pfnNativeCommandExp; } ur_enqueue_exp_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -1530,204 +1674,224 @@ typedef struct ur_enqueue_exp_dditable_t { /// - ::UR_RESULT_ERROR_UNSUPPORTED_VERSION UR_DLLEXPORT ur_result_t UR_APICALL urGetEnqueueExpProcAddrTable( - ur_api_version_t version, ///< [in] API version requested - ur_enqueue_exp_dditable_t *pDdiTable ///< [in,out] pointer to table of DDI function pointers -); + ur_api_version_t version, ///< [in] API version requested + ur_enqueue_exp_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Function-pointer for urGetEnqueueExpProcAddrTable -typedef ur_result_t(UR_APICALL *ur_pfnGetEnqueueExpProcAddrTable_t)( +typedef ur_result_t (UR_APICALL *ur_pfnGetEnqueueExpProcAddrTable_t)( ur_api_version_t, - ur_enqueue_exp_dditable_t *); + ur_enqueue_exp_dditable_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urBindlessImagesUnsampledImageHandleDestroyExp -typedef ur_result_t(UR_APICALL *ur_pfnBindlessImagesUnsampledImageHandleDestroyExp_t)( +/// @brief Function-pointer for urBindlessImagesUnsampledImageHandleDestroyExp +typedef ur_result_t (UR_APICALL *ur_pfnBindlessImagesUnsampledImageHandleDestroyExp_t)( ur_context_handle_t, ur_device_handle_t, - ur_exp_image_native_handle_t); + ur_exp_image_native_handle_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urBindlessImagesSampledImageHandleDestroyExp -typedef ur_result_t(UR_APICALL *ur_pfnBindlessImagesSampledImageHandleDestroyExp_t)( +/// @brief Function-pointer for urBindlessImagesSampledImageHandleDestroyExp +typedef ur_result_t (UR_APICALL *ur_pfnBindlessImagesSampledImageHandleDestroyExp_t)( ur_context_handle_t, ur_device_handle_t, - ur_exp_image_native_handle_t); + ur_exp_image_native_handle_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urBindlessImagesImageAllocateExp -typedef ur_result_t(UR_APICALL *ur_pfnBindlessImagesImageAllocateExp_t)( +/// @brief Function-pointer for urBindlessImagesImageAllocateExp +typedef ur_result_t (UR_APICALL *ur_pfnBindlessImagesImageAllocateExp_t)( ur_context_handle_t, ur_device_handle_t, - const ur_image_format_t *, - const ur_image_desc_t *, - ur_exp_image_mem_native_handle_t *); + const ur_image_format_t*, + const ur_image_desc_t*, + ur_exp_image_mem_native_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urBindlessImagesImageFreeExp -typedef ur_result_t(UR_APICALL *ur_pfnBindlessImagesImageFreeExp_t)( +/// @brief Function-pointer for urBindlessImagesImageFreeExp +typedef ur_result_t (UR_APICALL *ur_pfnBindlessImagesImageFreeExp_t)( ur_context_handle_t, ur_device_handle_t, - ur_exp_image_mem_native_handle_t); + ur_exp_image_mem_native_handle_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urBindlessImagesUnsampledImageCreateExp -typedef ur_result_t(UR_APICALL *ur_pfnBindlessImagesUnsampledImageCreateExp_t)( +/// @brief Function-pointer for urBindlessImagesUnsampledImageCreateExp +typedef ur_result_t (UR_APICALL *ur_pfnBindlessImagesUnsampledImageCreateExp_t)( ur_context_handle_t, ur_device_handle_t, ur_exp_image_mem_native_handle_t, - const ur_image_format_t *, - const ur_image_desc_t *, - ur_exp_image_native_handle_t *); + const ur_image_format_t*, + const ur_image_desc_t*, + ur_exp_image_native_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urBindlessImagesSampledImageCreateExp -typedef ur_result_t(UR_APICALL *ur_pfnBindlessImagesSampledImageCreateExp_t)( +/// @brief Function-pointer for urBindlessImagesSampledImageCreateExp +typedef ur_result_t (UR_APICALL *ur_pfnBindlessImagesSampledImageCreateExp_t)( ur_context_handle_t, ur_device_handle_t, ur_exp_image_mem_native_handle_t, - const ur_image_format_t *, - const ur_image_desc_t *, + const ur_image_format_t*, + const ur_image_desc_t*, ur_sampler_handle_t, - ur_exp_image_native_handle_t *); + ur_exp_image_native_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urBindlessImagesImageCopyExp -typedef ur_result_t(UR_APICALL *ur_pfnBindlessImagesImageCopyExp_t)( +/// @brief Function-pointer for urBindlessImagesImageCopyExp +typedef ur_result_t (UR_APICALL *ur_pfnBindlessImagesImageCopyExp_t)( ur_queue_handle_t, - const void *, - void *, - const ur_image_desc_t *, - const ur_image_desc_t *, - const ur_image_format_t *, - const ur_image_format_t *, - ur_exp_image_copy_region_t *, + const void*, + void*, + const ur_image_desc_t*, + const ur_image_desc_t*, + const ur_image_format_t*, + const ur_image_format_t*, + ur_exp_image_copy_region_t*, ur_exp_image_copy_flags_t, uint32_t, - const ur_event_handle_t *, - ur_event_handle_t *); + const ur_event_handle_t*, + ur_event_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urBindlessImagesImageGetInfoExp -typedef ur_result_t(UR_APICALL *ur_pfnBindlessImagesImageGetInfoExp_t)( +/// @brief Function-pointer for urBindlessImagesImageGetInfoExp +typedef ur_result_t (UR_APICALL *ur_pfnBindlessImagesImageGetInfoExp_t)( ur_context_handle_t, ur_exp_image_mem_native_handle_t, ur_image_info_t, - void *, - size_t *); + void*, + size_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urBindlessImagesMipmapGetLevelExp -typedef ur_result_t(UR_APICALL *ur_pfnBindlessImagesMipmapGetLevelExp_t)( +/// @brief Function-pointer for urBindlessImagesMipmapGetLevelExp +typedef ur_result_t (UR_APICALL *ur_pfnBindlessImagesMipmapGetLevelExp_t)( ur_context_handle_t, ur_device_handle_t, ur_exp_image_mem_native_handle_t, uint32_t, - ur_exp_image_mem_native_handle_t *); + ur_exp_image_mem_native_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urBindlessImagesMipmapFreeExp -typedef ur_result_t(UR_APICALL *ur_pfnBindlessImagesMipmapFreeExp_t)( +/// @brief Function-pointer for urBindlessImagesMipmapFreeExp +typedef ur_result_t (UR_APICALL *ur_pfnBindlessImagesMipmapFreeExp_t)( ur_context_handle_t, ur_device_handle_t, - ur_exp_image_mem_native_handle_t); + ur_exp_image_mem_native_handle_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urBindlessImagesImportExternalMemoryExp -typedef ur_result_t(UR_APICALL *ur_pfnBindlessImagesImportExternalMemoryExp_t)( +/// @brief Function-pointer for urBindlessImagesImportExternalMemoryExp +typedef ur_result_t (UR_APICALL *ur_pfnBindlessImagesImportExternalMemoryExp_t)( ur_context_handle_t, ur_device_handle_t, size_t, ur_exp_external_mem_type_t, - ur_exp_external_mem_desc_t *, - ur_exp_external_mem_handle_t *); + ur_exp_external_mem_desc_t*, + ur_exp_external_mem_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urBindlessImagesMapExternalArrayExp -typedef ur_result_t(UR_APICALL *ur_pfnBindlessImagesMapExternalArrayExp_t)( +/// @brief Function-pointer for urBindlessImagesMapExternalArrayExp +typedef ur_result_t (UR_APICALL *ur_pfnBindlessImagesMapExternalArrayExp_t)( ur_context_handle_t, ur_device_handle_t, - const ur_image_format_t *, - const ur_image_desc_t *, + const ur_image_format_t*, + const ur_image_desc_t*, ur_exp_external_mem_handle_t, - ur_exp_image_mem_native_handle_t *); + ur_exp_image_mem_native_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urBindlessImagesMapExternalLinearMemoryExp -typedef ur_result_t(UR_APICALL *ur_pfnBindlessImagesMapExternalLinearMemoryExp_t)( +/// @brief Function-pointer for urBindlessImagesMapExternalLinearMemoryExp +typedef ur_result_t (UR_APICALL *ur_pfnBindlessImagesMapExternalLinearMemoryExp_t)( ur_context_handle_t, ur_device_handle_t, uint64_t, uint64_t, ur_exp_external_mem_handle_t, - void **); + void** + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urBindlessImagesReleaseExternalMemoryExp -typedef ur_result_t(UR_APICALL *ur_pfnBindlessImagesReleaseExternalMemoryExp_t)( +/// @brief Function-pointer for urBindlessImagesReleaseExternalMemoryExp +typedef ur_result_t (UR_APICALL *ur_pfnBindlessImagesReleaseExternalMemoryExp_t)( ur_context_handle_t, ur_device_handle_t, - ur_exp_external_mem_handle_t); + ur_exp_external_mem_handle_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urBindlessImagesImportExternalSemaphoreExp -typedef ur_result_t(UR_APICALL *ur_pfnBindlessImagesImportExternalSemaphoreExp_t)( +/// @brief Function-pointer for urBindlessImagesImportExternalSemaphoreExp +typedef ur_result_t (UR_APICALL *ur_pfnBindlessImagesImportExternalSemaphoreExp_t)( ur_context_handle_t, ur_device_handle_t, ur_exp_external_semaphore_type_t, - ur_exp_external_semaphore_desc_t *, - ur_exp_external_semaphore_handle_t *); + ur_exp_external_semaphore_desc_t*, + ur_exp_external_semaphore_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urBindlessImagesReleaseExternalSemaphoreExp -typedef ur_result_t(UR_APICALL *ur_pfnBindlessImagesReleaseExternalSemaphoreExp_t)( +/// @brief Function-pointer for urBindlessImagesReleaseExternalSemaphoreExp +typedef ur_result_t (UR_APICALL *ur_pfnBindlessImagesReleaseExternalSemaphoreExp_t)( ur_context_handle_t, ur_device_handle_t, - ur_exp_external_semaphore_handle_t); + ur_exp_external_semaphore_handle_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urBindlessImagesWaitExternalSemaphoreExp -typedef ur_result_t(UR_APICALL *ur_pfnBindlessImagesWaitExternalSemaphoreExp_t)( +/// @brief Function-pointer for urBindlessImagesWaitExternalSemaphoreExp +typedef ur_result_t (UR_APICALL *ur_pfnBindlessImagesWaitExternalSemaphoreExp_t)( ur_queue_handle_t, ur_exp_external_semaphore_handle_t, bool, uint64_t, uint32_t, - const ur_event_handle_t *, - ur_event_handle_t *); + const ur_event_handle_t*, + ur_event_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urBindlessImagesSignalExternalSemaphoreExp -typedef ur_result_t(UR_APICALL *ur_pfnBindlessImagesSignalExternalSemaphoreExp_t)( +/// @brief Function-pointer for urBindlessImagesSignalExternalSemaphoreExp +typedef ur_result_t (UR_APICALL *ur_pfnBindlessImagesSignalExternalSemaphoreExp_t)( ur_queue_handle_t, ur_exp_external_semaphore_handle_t, bool, uint64_t, uint32_t, - const ur_event_handle_t *, - ur_event_handle_t *); + const ur_event_handle_t*, + ur_event_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Table of BindlessImagesExp functions pointers -typedef struct ur_bindless_images_exp_dditable_t { - ur_pfnBindlessImagesUnsampledImageHandleDestroyExp_t pfnUnsampledImageHandleDestroyExp; - ur_pfnBindlessImagesSampledImageHandleDestroyExp_t pfnSampledImageHandleDestroyExp; - ur_pfnBindlessImagesImageAllocateExp_t pfnImageAllocateExp; - ur_pfnBindlessImagesImageFreeExp_t pfnImageFreeExp; - ur_pfnBindlessImagesUnsampledImageCreateExp_t pfnUnsampledImageCreateExp; - ur_pfnBindlessImagesSampledImageCreateExp_t pfnSampledImageCreateExp; - ur_pfnBindlessImagesImageCopyExp_t pfnImageCopyExp; - ur_pfnBindlessImagesImageGetInfoExp_t pfnImageGetInfoExp; - ur_pfnBindlessImagesMipmapGetLevelExp_t pfnMipmapGetLevelExp; - ur_pfnBindlessImagesMipmapFreeExp_t pfnMipmapFreeExp; - ur_pfnBindlessImagesImportExternalMemoryExp_t pfnImportExternalMemoryExp; - ur_pfnBindlessImagesMapExternalArrayExp_t pfnMapExternalArrayExp; - ur_pfnBindlessImagesMapExternalLinearMemoryExp_t pfnMapExternalLinearMemoryExp; - ur_pfnBindlessImagesReleaseExternalMemoryExp_t pfnReleaseExternalMemoryExp; - ur_pfnBindlessImagesImportExternalSemaphoreExp_t pfnImportExternalSemaphoreExp; - ur_pfnBindlessImagesReleaseExternalSemaphoreExp_t pfnReleaseExternalSemaphoreExp; - ur_pfnBindlessImagesWaitExternalSemaphoreExp_t pfnWaitExternalSemaphoreExp; - ur_pfnBindlessImagesSignalExternalSemaphoreExp_t pfnSignalExternalSemaphoreExp; +typedef struct ur_bindless_images_exp_dditable_t +{ + ur_pfnBindlessImagesUnsampledImageHandleDestroyExp_t pfnUnsampledImageHandleDestroyExp; + ur_pfnBindlessImagesSampledImageHandleDestroyExp_t pfnSampledImageHandleDestroyExp; + ur_pfnBindlessImagesImageAllocateExp_t pfnImageAllocateExp; + ur_pfnBindlessImagesImageFreeExp_t pfnImageFreeExp; + ur_pfnBindlessImagesUnsampledImageCreateExp_t pfnUnsampledImageCreateExp; + ur_pfnBindlessImagesSampledImageCreateExp_t pfnSampledImageCreateExp; + ur_pfnBindlessImagesImageCopyExp_t pfnImageCopyExp; + ur_pfnBindlessImagesImageGetInfoExp_t pfnImageGetInfoExp; + ur_pfnBindlessImagesMipmapGetLevelExp_t pfnMipmapGetLevelExp; + ur_pfnBindlessImagesMipmapFreeExp_t pfnMipmapFreeExp; + ur_pfnBindlessImagesImportExternalMemoryExp_t pfnImportExternalMemoryExp; + ur_pfnBindlessImagesMapExternalArrayExp_t pfnMapExternalArrayExp; + ur_pfnBindlessImagesMapExternalLinearMemoryExp_t pfnMapExternalLinearMemoryExp; + ur_pfnBindlessImagesReleaseExternalMemoryExp_t pfnReleaseExternalMemoryExp; + ur_pfnBindlessImagesImportExternalSemaphoreExp_t pfnImportExternalSemaphoreExp; + ur_pfnBindlessImagesReleaseExternalSemaphoreExp_t pfnReleaseExternalSemaphoreExp; + ur_pfnBindlessImagesWaitExternalSemaphoreExp_t pfnWaitExternalSemaphoreExp; + ur_pfnBindlessImagesSignalExternalSemaphoreExp_t pfnSignalExternalSemaphoreExp; } ur_bindless_images_exp_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -1741,99 +1905,110 @@ typedef struct ur_bindless_images_exp_dditable_t { /// - ::UR_RESULT_ERROR_UNSUPPORTED_VERSION UR_DLLEXPORT ur_result_t UR_APICALL urGetBindlessImagesExpProcAddrTable( - ur_api_version_t version, ///< [in] API version requested - ur_bindless_images_exp_dditable_t *pDdiTable ///< [in,out] pointer to table of DDI function pointers -); + ur_api_version_t version, ///< [in] API version requested + ur_bindless_images_exp_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Function-pointer for urGetBindlessImagesExpProcAddrTable -typedef ur_result_t(UR_APICALL *ur_pfnGetBindlessImagesExpProcAddrTable_t)( +typedef ur_result_t (UR_APICALL *ur_pfnGetBindlessImagesExpProcAddrTable_t)( ur_api_version_t, - ur_bindless_images_exp_dditable_t *); + ur_bindless_images_exp_dditable_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urUSMHostAlloc -typedef ur_result_t(UR_APICALL *ur_pfnUSMHostAlloc_t)( +/// @brief Function-pointer for urUSMHostAlloc +typedef ur_result_t (UR_APICALL *ur_pfnUSMHostAlloc_t)( ur_context_handle_t, - const ur_usm_desc_t *, + const ur_usm_desc_t*, ur_usm_pool_handle_t, size_t, - void **); + void** + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urUSMDeviceAlloc -typedef ur_result_t(UR_APICALL *ur_pfnUSMDeviceAlloc_t)( +/// @brief Function-pointer for urUSMDeviceAlloc +typedef ur_result_t (UR_APICALL *ur_pfnUSMDeviceAlloc_t)( ur_context_handle_t, ur_device_handle_t, - const ur_usm_desc_t *, + const ur_usm_desc_t*, ur_usm_pool_handle_t, size_t, - void **); + void** + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urUSMSharedAlloc -typedef ur_result_t(UR_APICALL *ur_pfnUSMSharedAlloc_t)( +/// @brief Function-pointer for urUSMSharedAlloc +typedef ur_result_t (UR_APICALL *ur_pfnUSMSharedAlloc_t)( ur_context_handle_t, ur_device_handle_t, - const ur_usm_desc_t *, + const ur_usm_desc_t*, ur_usm_pool_handle_t, size_t, - void **); + void** + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urUSMFree -typedef ur_result_t(UR_APICALL *ur_pfnUSMFree_t)( +/// @brief Function-pointer for urUSMFree +typedef ur_result_t (UR_APICALL *ur_pfnUSMFree_t)( ur_context_handle_t, - void *); + void* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urUSMGetMemAllocInfo -typedef ur_result_t(UR_APICALL *ur_pfnUSMGetMemAllocInfo_t)( +/// @brief Function-pointer for urUSMGetMemAllocInfo +typedef ur_result_t (UR_APICALL *ur_pfnUSMGetMemAllocInfo_t)( ur_context_handle_t, - const void *, + const void*, ur_usm_alloc_info_t, size_t, - void *, - size_t *); + void*, + size_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urUSMPoolCreate -typedef ur_result_t(UR_APICALL *ur_pfnUSMPoolCreate_t)( +/// @brief Function-pointer for urUSMPoolCreate +typedef ur_result_t (UR_APICALL *ur_pfnUSMPoolCreate_t)( ur_context_handle_t, - ur_usm_pool_desc_t *, - ur_usm_pool_handle_t *); + ur_usm_pool_desc_t*, + ur_usm_pool_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urUSMPoolRetain -typedef ur_result_t(UR_APICALL *ur_pfnUSMPoolRetain_t)( - ur_usm_pool_handle_t); +/// @brief Function-pointer for urUSMPoolRetain +typedef ur_result_t (UR_APICALL *ur_pfnUSMPoolRetain_t)( + ur_usm_pool_handle_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urUSMPoolRelease -typedef ur_result_t(UR_APICALL *ur_pfnUSMPoolRelease_t)( - ur_usm_pool_handle_t); +/// @brief Function-pointer for urUSMPoolRelease +typedef ur_result_t (UR_APICALL *ur_pfnUSMPoolRelease_t)( + ur_usm_pool_handle_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urUSMPoolGetInfo -typedef ur_result_t(UR_APICALL *ur_pfnUSMPoolGetInfo_t)( +/// @brief Function-pointer for urUSMPoolGetInfo +typedef ur_result_t (UR_APICALL *ur_pfnUSMPoolGetInfo_t)( ur_usm_pool_handle_t, ur_usm_pool_info_t, size_t, - void *, - size_t *); + void*, + size_t* + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Table of USM functions pointers -typedef struct ur_usm_dditable_t { - ur_pfnUSMHostAlloc_t pfnHostAlloc; - ur_pfnUSMDeviceAlloc_t pfnDeviceAlloc; - ur_pfnUSMSharedAlloc_t pfnSharedAlloc; - ur_pfnUSMFree_t pfnFree; - ur_pfnUSMGetMemAllocInfo_t pfnGetMemAllocInfo; - ur_pfnUSMPoolCreate_t pfnPoolCreate; - ur_pfnUSMPoolRetain_t pfnPoolRetain; - ur_pfnUSMPoolRelease_t pfnPoolRelease; - ur_pfnUSMPoolGetInfo_t pfnPoolGetInfo; +typedef struct ur_usm_dditable_t +{ + ur_pfnUSMHostAlloc_t pfnHostAlloc; + ur_pfnUSMDeviceAlloc_t pfnDeviceAlloc; + ur_pfnUSMSharedAlloc_t pfnSharedAlloc; + ur_pfnUSMFree_t pfnFree; + ur_pfnUSMGetMemAllocInfo_t pfnGetMemAllocInfo; + ur_pfnUSMPoolCreate_t pfnPoolCreate; + ur_pfnUSMPoolRetain_t pfnPoolRetain; + ur_pfnUSMPoolRelease_t pfnPoolRelease; + ur_pfnUSMPoolGetInfo_t pfnPoolGetInfo; } ur_usm_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -1847,48 +2022,53 @@ typedef struct ur_usm_dditable_t { /// - ::UR_RESULT_ERROR_UNSUPPORTED_VERSION UR_DLLEXPORT ur_result_t UR_APICALL urGetUSMProcAddrTable( - ur_api_version_t version, ///< [in] API version requested - ur_usm_dditable_t *pDdiTable ///< [in,out] pointer to table of DDI function pointers -); + ur_api_version_t version, ///< [in] API version requested + ur_usm_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Function-pointer for urGetUSMProcAddrTable -typedef ur_result_t(UR_APICALL *ur_pfnGetUSMProcAddrTable_t)( +typedef ur_result_t (UR_APICALL *ur_pfnGetUSMProcAddrTable_t)( ur_api_version_t, - ur_usm_dditable_t *); + ur_usm_dditable_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urUSMPitchedAllocExp -typedef ur_result_t(UR_APICALL *ur_pfnUSMPitchedAllocExp_t)( +/// @brief Function-pointer for urUSMPitchedAllocExp +typedef ur_result_t (UR_APICALL *ur_pfnUSMPitchedAllocExp_t)( ur_context_handle_t, ur_device_handle_t, - const ur_usm_desc_t *, + const ur_usm_desc_t*, ur_usm_pool_handle_t, size_t, size_t, size_t, - void **, - size_t *); + void**, + size_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urUSMImportExp -typedef ur_result_t(UR_APICALL *ur_pfnUSMImportExp_t)( +/// @brief Function-pointer for urUSMImportExp +typedef ur_result_t (UR_APICALL *ur_pfnUSMImportExp_t)( ur_context_handle_t, - void *, - size_t); + void*, + size_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urUSMReleaseExp -typedef ur_result_t(UR_APICALL *ur_pfnUSMReleaseExp_t)( +/// @brief Function-pointer for urUSMReleaseExp +typedef ur_result_t (UR_APICALL *ur_pfnUSMReleaseExp_t)( ur_context_handle_t, - void *); + void* + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Table of USMExp functions pointers -typedef struct ur_usm_exp_dditable_t { - ur_pfnUSMPitchedAllocExp_t pfnPitchedAllocExp; - ur_pfnUSMImportExp_t pfnImportExp; - ur_pfnUSMReleaseExp_t pfnReleaseExp; +typedef struct ur_usm_exp_dditable_t +{ + ur_pfnUSMPitchedAllocExp_t pfnPitchedAllocExp; + ur_pfnUSMImportExp_t pfnImportExp; + ur_pfnUSMReleaseExp_t pfnReleaseExp; } ur_usm_exp_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -1902,92 +2082,100 @@ typedef struct ur_usm_exp_dditable_t { /// - ::UR_RESULT_ERROR_UNSUPPORTED_VERSION UR_DLLEXPORT ur_result_t UR_APICALL urGetUSMExpProcAddrTable( - ur_api_version_t version, ///< [in] API version requested - ur_usm_exp_dditable_t *pDdiTable ///< [in,out] pointer to table of DDI function pointers -); + ur_api_version_t version, ///< [in] API version requested + ur_usm_exp_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Function-pointer for urGetUSMExpProcAddrTable -typedef ur_result_t(UR_APICALL *ur_pfnGetUSMExpProcAddrTable_t)( +typedef ur_result_t (UR_APICALL *ur_pfnGetUSMExpProcAddrTable_t)( ur_api_version_t, - ur_usm_exp_dditable_t *); + ur_usm_exp_dditable_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urCommandBufferCreateExp -typedef ur_result_t(UR_APICALL *ur_pfnCommandBufferCreateExp_t)( +/// @brief Function-pointer for urCommandBufferCreateExp +typedef ur_result_t (UR_APICALL *ur_pfnCommandBufferCreateExp_t)( ur_context_handle_t, ur_device_handle_t, - const ur_exp_command_buffer_desc_t *, - ur_exp_command_buffer_handle_t *); + const ur_exp_command_buffer_desc_t*, + ur_exp_command_buffer_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urCommandBufferRetainExp -typedef ur_result_t(UR_APICALL *ur_pfnCommandBufferRetainExp_t)( - ur_exp_command_buffer_handle_t); +/// @brief Function-pointer for urCommandBufferRetainExp +typedef ur_result_t (UR_APICALL *ur_pfnCommandBufferRetainExp_t)( + ur_exp_command_buffer_handle_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urCommandBufferReleaseExp -typedef ur_result_t(UR_APICALL *ur_pfnCommandBufferReleaseExp_t)( - ur_exp_command_buffer_handle_t); +/// @brief Function-pointer for urCommandBufferReleaseExp +typedef ur_result_t (UR_APICALL *ur_pfnCommandBufferReleaseExp_t)( + ur_exp_command_buffer_handle_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urCommandBufferFinalizeExp -typedef ur_result_t(UR_APICALL *ur_pfnCommandBufferFinalizeExp_t)( - ur_exp_command_buffer_handle_t); +/// @brief Function-pointer for urCommandBufferFinalizeExp +typedef ur_result_t (UR_APICALL *ur_pfnCommandBufferFinalizeExp_t)( + ur_exp_command_buffer_handle_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urCommandBufferAppendKernelLaunchExp -typedef ur_result_t(UR_APICALL *ur_pfnCommandBufferAppendKernelLaunchExp_t)( +/// @brief Function-pointer for urCommandBufferAppendKernelLaunchExp +typedef ur_result_t (UR_APICALL *ur_pfnCommandBufferAppendKernelLaunchExp_t)( ur_exp_command_buffer_handle_t, ur_kernel_handle_t, uint32_t, - const size_t *, - const size_t *, - const size_t *, + const size_t*, + const size_t*, + const size_t*, uint32_t, - ur_kernel_handle_t *, + ur_kernel_handle_t*, uint32_t, - const ur_exp_command_buffer_sync_point_t *, + const ur_exp_command_buffer_sync_point_t*, uint32_t, - const ur_event_handle_t *, - ur_exp_command_buffer_sync_point_t *, - ur_event_handle_t *, - ur_exp_command_buffer_command_handle_t *); + const ur_event_handle_t*, + ur_exp_command_buffer_sync_point_t*, + ur_event_handle_t*, + ur_exp_command_buffer_command_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urCommandBufferAppendUSMMemcpyExp -typedef ur_result_t(UR_APICALL *ur_pfnCommandBufferAppendUSMMemcpyExp_t)( +/// @brief Function-pointer for urCommandBufferAppendUSMMemcpyExp +typedef ur_result_t (UR_APICALL *ur_pfnCommandBufferAppendUSMMemcpyExp_t)( ur_exp_command_buffer_handle_t, - void *, - const void *, + void*, + const void*, size_t, uint32_t, - const ur_exp_command_buffer_sync_point_t *, + const ur_exp_command_buffer_sync_point_t*, uint32_t, - const ur_event_handle_t *, - ur_exp_command_buffer_sync_point_t *, - ur_event_handle_t *, - ur_exp_command_buffer_command_handle_t *); + const ur_event_handle_t*, + ur_exp_command_buffer_sync_point_t*, + ur_event_handle_t*, + ur_exp_command_buffer_command_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urCommandBufferAppendUSMFillExp -typedef ur_result_t(UR_APICALL *ur_pfnCommandBufferAppendUSMFillExp_t)( +/// @brief Function-pointer for urCommandBufferAppendUSMFillExp +typedef ur_result_t (UR_APICALL *ur_pfnCommandBufferAppendUSMFillExp_t)( ur_exp_command_buffer_handle_t, - void *, - const void *, + void*, + const void*, size_t, size_t, uint32_t, - const ur_exp_command_buffer_sync_point_t *, + const ur_exp_command_buffer_sync_point_t*, uint32_t, - const ur_event_handle_t *, - ur_exp_command_buffer_sync_point_t *, - ur_event_handle_t *, - ur_exp_command_buffer_command_handle_t *); + const ur_event_handle_t*, + ur_exp_command_buffer_sync_point_t*, + ur_event_handle_t*, + ur_exp_command_buffer_command_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urCommandBufferAppendMemBufferCopyExp -typedef ur_result_t(UR_APICALL *ur_pfnCommandBufferAppendMemBufferCopyExp_t)( +/// @brief Function-pointer for urCommandBufferAppendMemBufferCopyExp +typedef ur_result_t (UR_APICALL *ur_pfnCommandBufferAppendMemBufferCopyExp_t)( ur_exp_command_buffer_handle_t, ur_mem_handle_t, ur_mem_handle_t, @@ -1995,48 +2183,51 @@ typedef ur_result_t(UR_APICALL *ur_pfnCommandBufferAppendMemBufferCopyExp_t)( size_t, size_t, uint32_t, - const ur_exp_command_buffer_sync_point_t *, + const ur_exp_command_buffer_sync_point_t*, uint32_t, - const ur_event_handle_t *, - ur_exp_command_buffer_sync_point_t *, - ur_event_handle_t *, - ur_exp_command_buffer_command_handle_t *); + const ur_event_handle_t*, + ur_exp_command_buffer_sync_point_t*, + ur_event_handle_t*, + ur_exp_command_buffer_command_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urCommandBufferAppendMemBufferWriteExp -typedef ur_result_t(UR_APICALL *ur_pfnCommandBufferAppendMemBufferWriteExp_t)( +/// @brief Function-pointer for urCommandBufferAppendMemBufferWriteExp +typedef ur_result_t (UR_APICALL *ur_pfnCommandBufferAppendMemBufferWriteExp_t)( ur_exp_command_buffer_handle_t, ur_mem_handle_t, size_t, size_t, - const void *, + const void*, uint32_t, - const ur_exp_command_buffer_sync_point_t *, + const ur_exp_command_buffer_sync_point_t*, uint32_t, - const ur_event_handle_t *, - ur_exp_command_buffer_sync_point_t *, - ur_event_handle_t *, - ur_exp_command_buffer_command_handle_t *); + const ur_event_handle_t*, + ur_exp_command_buffer_sync_point_t*, + ur_event_handle_t*, + ur_exp_command_buffer_command_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urCommandBufferAppendMemBufferReadExp -typedef ur_result_t(UR_APICALL *ur_pfnCommandBufferAppendMemBufferReadExp_t)( +/// @brief Function-pointer for urCommandBufferAppendMemBufferReadExp +typedef ur_result_t (UR_APICALL *ur_pfnCommandBufferAppendMemBufferReadExp_t)( ur_exp_command_buffer_handle_t, ur_mem_handle_t, size_t, size_t, - void *, + void*, uint32_t, - const ur_exp_command_buffer_sync_point_t *, + const ur_exp_command_buffer_sync_point_t*, uint32_t, - const ur_event_handle_t *, - ur_exp_command_buffer_sync_point_t *, - ur_event_handle_t *, - ur_exp_command_buffer_command_handle_t *); + const ur_event_handle_t*, + ur_exp_command_buffer_sync_point_t*, + ur_event_handle_t*, + ur_exp_command_buffer_command_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urCommandBufferAppendMemBufferCopyRectExp -typedef ur_result_t(UR_APICALL *ur_pfnCommandBufferAppendMemBufferCopyRectExp_t)( +/// @brief Function-pointer for urCommandBufferAppendMemBufferCopyRectExp +typedef ur_result_t (UR_APICALL *ur_pfnCommandBufferAppendMemBufferCopyRectExp_t)( ur_exp_command_buffer_handle_t, ur_mem_handle_t, ur_mem_handle_t, @@ -2048,16 +2239,17 @@ typedef ur_result_t(UR_APICALL *ur_pfnCommandBufferAppendMemBufferCopyRectExp_t) size_t, size_t, uint32_t, - const ur_exp_command_buffer_sync_point_t *, + const ur_exp_command_buffer_sync_point_t*, uint32_t, - const ur_event_handle_t *, - ur_exp_command_buffer_sync_point_t *, - ur_event_handle_t *, - ur_exp_command_buffer_command_handle_t *); + const ur_event_handle_t*, + ur_exp_command_buffer_sync_point_t*, + ur_event_handle_t*, + ur_exp_command_buffer_command_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urCommandBufferAppendMemBufferWriteRectExp -typedef ur_result_t(UR_APICALL *ur_pfnCommandBufferAppendMemBufferWriteRectExp_t)( +/// @brief Function-pointer for urCommandBufferAppendMemBufferWriteRectExp +typedef ur_result_t (UR_APICALL *ur_pfnCommandBufferAppendMemBufferWriteRectExp_t)( ur_exp_command_buffer_handle_t, ur_mem_handle_t, ur_rect_offset_t, @@ -2067,18 +2259,19 @@ typedef ur_result_t(UR_APICALL *ur_pfnCommandBufferAppendMemBufferWriteRectExp_t size_t, size_t, size_t, - void *, + void*, uint32_t, - const ur_exp_command_buffer_sync_point_t *, + const ur_exp_command_buffer_sync_point_t*, uint32_t, - const ur_event_handle_t *, - ur_exp_command_buffer_sync_point_t *, - ur_event_handle_t *, - ur_exp_command_buffer_command_handle_t *); + const ur_event_handle_t*, + ur_exp_command_buffer_sync_point_t*, + ur_event_handle_t*, + ur_exp_command_buffer_command_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urCommandBufferAppendMemBufferReadRectExp -typedef ur_result_t(UR_APICALL *ur_pfnCommandBufferAppendMemBufferReadRectExp_t)( +/// @brief Function-pointer for urCommandBufferAppendMemBufferReadRectExp +typedef ur_result_t (UR_APICALL *ur_pfnCommandBufferAppendMemBufferReadRectExp_t)( ur_exp_command_buffer_handle_t, ur_mem_handle_t, ur_rect_offset_t, @@ -2088,145 +2281,158 @@ typedef ur_result_t(UR_APICALL *ur_pfnCommandBufferAppendMemBufferReadRectExp_t) size_t, size_t, size_t, - void *, + void*, uint32_t, - const ur_exp_command_buffer_sync_point_t *, + const ur_exp_command_buffer_sync_point_t*, uint32_t, - const ur_event_handle_t *, - ur_exp_command_buffer_sync_point_t *, - ur_event_handle_t *, - ur_exp_command_buffer_command_handle_t *); + const ur_event_handle_t*, + ur_exp_command_buffer_sync_point_t*, + ur_event_handle_t*, + ur_exp_command_buffer_command_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urCommandBufferAppendMemBufferFillExp -typedef ur_result_t(UR_APICALL *ur_pfnCommandBufferAppendMemBufferFillExp_t)( +/// @brief Function-pointer for urCommandBufferAppendMemBufferFillExp +typedef ur_result_t (UR_APICALL *ur_pfnCommandBufferAppendMemBufferFillExp_t)( ur_exp_command_buffer_handle_t, ur_mem_handle_t, - const void *, + const void*, size_t, size_t, size_t, uint32_t, - const ur_exp_command_buffer_sync_point_t *, + const ur_exp_command_buffer_sync_point_t*, uint32_t, - const ur_event_handle_t *, - ur_exp_command_buffer_sync_point_t *, - ur_event_handle_t *, - ur_exp_command_buffer_command_handle_t *); + const ur_event_handle_t*, + ur_exp_command_buffer_sync_point_t*, + ur_event_handle_t*, + ur_exp_command_buffer_command_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urCommandBufferAppendUSMPrefetchExp -typedef ur_result_t(UR_APICALL *ur_pfnCommandBufferAppendUSMPrefetchExp_t)( +/// @brief Function-pointer for urCommandBufferAppendUSMPrefetchExp +typedef ur_result_t (UR_APICALL *ur_pfnCommandBufferAppendUSMPrefetchExp_t)( ur_exp_command_buffer_handle_t, - const void *, + const void*, size_t, ur_usm_migration_flags_t, uint32_t, - const ur_exp_command_buffer_sync_point_t *, + const ur_exp_command_buffer_sync_point_t*, uint32_t, - const ur_event_handle_t *, - ur_exp_command_buffer_sync_point_t *, - ur_event_handle_t *, - ur_exp_command_buffer_command_handle_t *); + const ur_event_handle_t*, + ur_exp_command_buffer_sync_point_t*, + ur_event_handle_t*, + ur_exp_command_buffer_command_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urCommandBufferAppendUSMAdviseExp -typedef ur_result_t(UR_APICALL *ur_pfnCommandBufferAppendUSMAdviseExp_t)( +/// @brief Function-pointer for urCommandBufferAppendUSMAdviseExp +typedef ur_result_t (UR_APICALL *ur_pfnCommandBufferAppendUSMAdviseExp_t)( ur_exp_command_buffer_handle_t, - const void *, + const void*, size_t, ur_usm_advice_flags_t, uint32_t, - const ur_exp_command_buffer_sync_point_t *, + const ur_exp_command_buffer_sync_point_t*, uint32_t, - const ur_event_handle_t *, - ur_exp_command_buffer_sync_point_t *, - ur_event_handle_t *, - ur_exp_command_buffer_command_handle_t *); + const ur_event_handle_t*, + ur_exp_command_buffer_sync_point_t*, + ur_event_handle_t*, + ur_exp_command_buffer_command_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urCommandBufferEnqueueExp -typedef ur_result_t(UR_APICALL *ur_pfnCommandBufferEnqueueExp_t)( +/// @brief Function-pointer for urCommandBufferEnqueueExp +typedef ur_result_t (UR_APICALL *ur_pfnCommandBufferEnqueueExp_t)( ur_exp_command_buffer_handle_t, ur_queue_handle_t, uint32_t, - const ur_event_handle_t *, - ur_event_handle_t *); + const ur_event_handle_t*, + ur_event_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urCommandBufferRetainCommandExp -typedef ur_result_t(UR_APICALL *ur_pfnCommandBufferRetainCommandExp_t)( - ur_exp_command_buffer_command_handle_t); +/// @brief Function-pointer for urCommandBufferRetainCommandExp +typedef ur_result_t (UR_APICALL *ur_pfnCommandBufferRetainCommandExp_t)( + ur_exp_command_buffer_command_handle_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urCommandBufferReleaseCommandExp -typedef ur_result_t(UR_APICALL *ur_pfnCommandBufferReleaseCommandExp_t)( - ur_exp_command_buffer_command_handle_t); +/// @brief Function-pointer for urCommandBufferReleaseCommandExp +typedef ur_result_t (UR_APICALL *ur_pfnCommandBufferReleaseCommandExp_t)( + ur_exp_command_buffer_command_handle_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urCommandBufferUpdateKernelLaunchExp -typedef ur_result_t(UR_APICALL *ur_pfnCommandBufferUpdateKernelLaunchExp_t)( +/// @brief Function-pointer for urCommandBufferUpdateKernelLaunchExp +typedef ur_result_t (UR_APICALL *ur_pfnCommandBufferUpdateKernelLaunchExp_t)( ur_exp_command_buffer_command_handle_t, - const ur_exp_command_buffer_update_kernel_launch_desc_t *); + const ur_exp_command_buffer_update_kernel_launch_desc_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urCommandBufferUpdateSignalEventExp -typedef ur_result_t(UR_APICALL *ur_pfnCommandBufferUpdateSignalEventExp_t)( +/// @brief Function-pointer for urCommandBufferUpdateSignalEventExp +typedef ur_result_t (UR_APICALL *ur_pfnCommandBufferUpdateSignalEventExp_t)( ur_exp_command_buffer_command_handle_t, - ur_event_handle_t *); + ur_event_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urCommandBufferUpdateWaitEventsExp -typedef ur_result_t(UR_APICALL *ur_pfnCommandBufferUpdateWaitEventsExp_t)( +/// @brief Function-pointer for urCommandBufferUpdateWaitEventsExp +typedef ur_result_t (UR_APICALL *ur_pfnCommandBufferUpdateWaitEventsExp_t)( ur_exp_command_buffer_command_handle_t, uint32_t, - const ur_event_handle_t *); + const ur_event_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urCommandBufferGetInfoExp -typedef ur_result_t(UR_APICALL *ur_pfnCommandBufferGetInfoExp_t)( +/// @brief Function-pointer for urCommandBufferGetInfoExp +typedef ur_result_t (UR_APICALL *ur_pfnCommandBufferGetInfoExp_t)( ur_exp_command_buffer_handle_t, ur_exp_command_buffer_info_t, size_t, - void *, - size_t *); + void*, + size_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urCommandBufferCommandGetInfoExp -typedef ur_result_t(UR_APICALL *ur_pfnCommandBufferCommandGetInfoExp_t)( +/// @brief Function-pointer for urCommandBufferCommandGetInfoExp +typedef ur_result_t (UR_APICALL *ur_pfnCommandBufferCommandGetInfoExp_t)( ur_exp_command_buffer_command_handle_t, ur_exp_command_buffer_command_info_t, size_t, - void *, - size_t *); + void*, + size_t* + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Table of CommandBufferExp functions pointers -typedef struct ur_command_buffer_exp_dditable_t { - ur_pfnCommandBufferCreateExp_t pfnCreateExp; - ur_pfnCommandBufferRetainExp_t pfnRetainExp; - ur_pfnCommandBufferReleaseExp_t pfnReleaseExp; - ur_pfnCommandBufferFinalizeExp_t pfnFinalizeExp; - ur_pfnCommandBufferAppendKernelLaunchExp_t pfnAppendKernelLaunchExp; - ur_pfnCommandBufferAppendUSMMemcpyExp_t pfnAppendUSMMemcpyExp; - ur_pfnCommandBufferAppendUSMFillExp_t pfnAppendUSMFillExp; - ur_pfnCommandBufferAppendMemBufferCopyExp_t pfnAppendMemBufferCopyExp; - ur_pfnCommandBufferAppendMemBufferWriteExp_t pfnAppendMemBufferWriteExp; - ur_pfnCommandBufferAppendMemBufferReadExp_t pfnAppendMemBufferReadExp; - ur_pfnCommandBufferAppendMemBufferCopyRectExp_t pfnAppendMemBufferCopyRectExp; - ur_pfnCommandBufferAppendMemBufferWriteRectExp_t pfnAppendMemBufferWriteRectExp; - ur_pfnCommandBufferAppendMemBufferReadRectExp_t pfnAppendMemBufferReadRectExp; - ur_pfnCommandBufferAppendMemBufferFillExp_t pfnAppendMemBufferFillExp; - ur_pfnCommandBufferAppendUSMPrefetchExp_t pfnAppendUSMPrefetchExp; - ur_pfnCommandBufferAppendUSMAdviseExp_t pfnAppendUSMAdviseExp; - ur_pfnCommandBufferEnqueueExp_t pfnEnqueueExp; - ur_pfnCommandBufferRetainCommandExp_t pfnRetainCommandExp; - ur_pfnCommandBufferReleaseCommandExp_t pfnReleaseCommandExp; - ur_pfnCommandBufferUpdateKernelLaunchExp_t pfnUpdateKernelLaunchExp; - ur_pfnCommandBufferUpdateSignalEventExp_t pfnUpdateSignalEventExp; - ur_pfnCommandBufferUpdateWaitEventsExp_t pfnUpdateWaitEventsExp; - ur_pfnCommandBufferGetInfoExp_t pfnGetInfoExp; - ur_pfnCommandBufferCommandGetInfoExp_t pfnCommandGetInfoExp; +typedef struct ur_command_buffer_exp_dditable_t +{ + ur_pfnCommandBufferCreateExp_t pfnCreateExp; + ur_pfnCommandBufferRetainExp_t pfnRetainExp; + ur_pfnCommandBufferReleaseExp_t pfnReleaseExp; + ur_pfnCommandBufferFinalizeExp_t pfnFinalizeExp; + ur_pfnCommandBufferAppendKernelLaunchExp_t pfnAppendKernelLaunchExp; + ur_pfnCommandBufferAppendUSMMemcpyExp_t pfnAppendUSMMemcpyExp; + ur_pfnCommandBufferAppendUSMFillExp_t pfnAppendUSMFillExp; + ur_pfnCommandBufferAppendMemBufferCopyExp_t pfnAppendMemBufferCopyExp; + ur_pfnCommandBufferAppendMemBufferWriteExp_t pfnAppendMemBufferWriteExp; + ur_pfnCommandBufferAppendMemBufferReadExp_t pfnAppendMemBufferReadExp; + ur_pfnCommandBufferAppendMemBufferCopyRectExp_t pfnAppendMemBufferCopyRectExp; + ur_pfnCommandBufferAppendMemBufferWriteRectExp_t pfnAppendMemBufferWriteRectExp; + ur_pfnCommandBufferAppendMemBufferReadRectExp_t pfnAppendMemBufferReadRectExp; + ur_pfnCommandBufferAppendMemBufferFillExp_t pfnAppendMemBufferFillExp; + ur_pfnCommandBufferAppendUSMPrefetchExp_t pfnAppendUSMPrefetchExp; + ur_pfnCommandBufferAppendUSMAdviseExp_t pfnAppendUSMAdviseExp; + ur_pfnCommandBufferEnqueueExp_t pfnEnqueueExp; + ur_pfnCommandBufferRetainCommandExp_t pfnRetainCommandExp; + ur_pfnCommandBufferReleaseCommandExp_t pfnReleaseCommandExp; + ur_pfnCommandBufferUpdateKernelLaunchExp_t pfnUpdateKernelLaunchExp; + ur_pfnCommandBufferUpdateSignalEventExp_t pfnUpdateSignalEventExp; + ur_pfnCommandBufferUpdateWaitEventsExp_t pfnUpdateWaitEventsExp; + ur_pfnCommandBufferGetInfoExp_t pfnGetInfoExp; + ur_pfnCommandBufferCommandGetInfoExp_t pfnCommandGetInfoExp; } ur_command_buffer_exp_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -2240,58 +2446,62 @@ typedef struct ur_command_buffer_exp_dditable_t { /// - ::UR_RESULT_ERROR_UNSUPPORTED_VERSION UR_DLLEXPORT ur_result_t UR_APICALL urGetCommandBufferExpProcAddrTable( - ur_api_version_t version, ///< [in] API version requested - ur_command_buffer_exp_dditable_t *pDdiTable ///< [in,out] pointer to table of DDI function pointers -); + ur_api_version_t version, ///< [in] API version requested + ur_command_buffer_exp_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Function-pointer for urGetCommandBufferExpProcAddrTable -typedef ur_result_t(UR_APICALL *ur_pfnGetCommandBufferExpProcAddrTable_t)( +typedef ur_result_t (UR_APICALL *ur_pfnGetCommandBufferExpProcAddrTable_t)( ur_api_version_t, - ur_command_buffer_exp_dditable_t *); + ur_command_buffer_exp_dditable_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urTensorMapEncodeIm2ColExp -typedef ur_result_t(UR_APICALL *ur_pfnTensorMapEncodeIm2ColExp_t)( +/// @brief Function-pointer for urTensorMapEncodeIm2ColExp +typedef ur_result_t (UR_APICALL *ur_pfnTensorMapEncodeIm2ColExp_t)( ur_device_handle_t, ur_exp_tensor_map_data_type_flags_t, uint32_t, - void *, - const uint64_t *, - const uint64_t *, - const int *, - const int *, + void*, + const uint64_t*, + const uint64_t*, + const int*, + const int*, uint32_t, uint32_t, - const uint32_t *, + const uint32_t*, ur_exp_tensor_map_interleave_flags_t, ur_exp_tensor_map_swizzle_flags_t, ur_exp_tensor_map_l2_promotion_flags_t, ur_exp_tensor_map_oob_fill_flags_t, - ur_exp_tensor_map_handle_t *); + ur_exp_tensor_map_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urTensorMapEncodeTiledExp -typedef ur_result_t(UR_APICALL *ur_pfnTensorMapEncodeTiledExp_t)( +/// @brief Function-pointer for urTensorMapEncodeTiledExp +typedef ur_result_t (UR_APICALL *ur_pfnTensorMapEncodeTiledExp_t)( ur_device_handle_t, ur_exp_tensor_map_data_type_flags_t, uint32_t, - void *, - const uint64_t *, - const uint64_t *, - const uint32_t *, - const uint32_t *, + void*, + const uint64_t*, + const uint64_t*, + const uint32_t*, + const uint32_t*, ur_exp_tensor_map_interleave_flags_t, ur_exp_tensor_map_swizzle_flags_t, ur_exp_tensor_map_l2_promotion_flags_t, ur_exp_tensor_map_oob_fill_flags_t, - ur_exp_tensor_map_handle_t *); + ur_exp_tensor_map_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Table of TensorMapExp functions pointers -typedef struct ur_tensor_map_exp_dditable_t { - ur_pfnTensorMapEncodeIm2ColExp_t pfnEncodeIm2ColExp; - ur_pfnTensorMapEncodeTiledExp_t pfnEncodeTiledExp; +typedef struct ur_tensor_map_exp_dditable_t +{ + ur_pfnTensorMapEncodeIm2ColExp_t pfnEncodeIm2ColExp; + ur_pfnTensorMapEncodeTiledExp_t pfnEncodeTiledExp; } ur_tensor_map_exp_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -2305,44 +2515,49 @@ typedef struct ur_tensor_map_exp_dditable_t { /// - ::UR_RESULT_ERROR_UNSUPPORTED_VERSION UR_DLLEXPORT ur_result_t UR_APICALL urGetTensorMapExpProcAddrTable( - ur_api_version_t version, ///< [in] API version requested - ur_tensor_map_exp_dditable_t *pDdiTable ///< [in,out] pointer to table of DDI function pointers -); + ur_api_version_t version, ///< [in] API version requested + ur_tensor_map_exp_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Function-pointer for urGetTensorMapExpProcAddrTable -typedef ur_result_t(UR_APICALL *ur_pfnGetTensorMapExpProcAddrTable_t)( +typedef ur_result_t (UR_APICALL *ur_pfnGetTensorMapExpProcAddrTable_t)( ur_api_version_t, - ur_tensor_map_exp_dditable_t *); + ur_tensor_map_exp_dditable_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urUsmP2PEnablePeerAccessExp -typedef ur_result_t(UR_APICALL *ur_pfnUsmP2PEnablePeerAccessExp_t)( +/// @brief Function-pointer for urUsmP2PEnablePeerAccessExp +typedef ur_result_t (UR_APICALL *ur_pfnUsmP2PEnablePeerAccessExp_t)( ur_device_handle_t, - ur_device_handle_t); + ur_device_handle_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urUsmP2PDisablePeerAccessExp -typedef ur_result_t(UR_APICALL *ur_pfnUsmP2PDisablePeerAccessExp_t)( +/// @brief Function-pointer for urUsmP2PDisablePeerAccessExp +typedef ur_result_t (UR_APICALL *ur_pfnUsmP2PDisablePeerAccessExp_t)( ur_device_handle_t, - ur_device_handle_t); + ur_device_handle_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urUsmP2PPeerAccessGetInfoExp -typedef ur_result_t(UR_APICALL *ur_pfnUsmP2PPeerAccessGetInfoExp_t)( +/// @brief Function-pointer for urUsmP2PPeerAccessGetInfoExp +typedef ur_result_t (UR_APICALL *ur_pfnUsmP2PPeerAccessGetInfoExp_t)( ur_device_handle_t, ur_device_handle_t, ur_exp_peer_info_t, size_t, - void *, - size_t *); + void*, + size_t* + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Table of UsmP2PExp functions pointers -typedef struct ur_usm_p2p_exp_dditable_t { - ur_pfnUsmP2PEnablePeerAccessExp_t pfnEnablePeerAccessExp; - ur_pfnUsmP2PDisablePeerAccessExp_t pfnDisablePeerAccessExp; - ur_pfnUsmP2PPeerAccessGetInfoExp_t pfnPeerAccessGetInfoExp; +typedef struct ur_usm_p2p_exp_dditable_t +{ + ur_pfnUsmP2PEnablePeerAccessExp_t pfnEnablePeerAccessExp; + ur_pfnUsmP2PDisablePeerAccessExp_t pfnDisablePeerAccessExp; + ur_pfnUsmP2PPeerAccessGetInfoExp_t pfnPeerAccessGetInfoExp; } ur_usm_p2p_exp_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -2356,87 +2571,96 @@ typedef struct ur_usm_p2p_exp_dditable_t { /// - ::UR_RESULT_ERROR_UNSUPPORTED_VERSION UR_DLLEXPORT ur_result_t UR_APICALL urGetUsmP2PExpProcAddrTable( - ur_api_version_t version, ///< [in] API version requested - ur_usm_p2p_exp_dditable_t *pDdiTable ///< [in,out] pointer to table of DDI function pointers -); + ur_api_version_t version, ///< [in] API version requested + ur_usm_p2p_exp_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Function-pointer for urGetUsmP2PExpProcAddrTable -typedef ur_result_t(UR_APICALL *ur_pfnGetUsmP2PExpProcAddrTable_t)( +typedef ur_result_t (UR_APICALL *ur_pfnGetUsmP2PExpProcAddrTable_t)( ur_api_version_t, - ur_usm_p2p_exp_dditable_t *); + ur_usm_p2p_exp_dditable_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urVirtualMemGranularityGetInfo -typedef ur_result_t(UR_APICALL *ur_pfnVirtualMemGranularityGetInfo_t)( +/// @brief Function-pointer for urVirtualMemGranularityGetInfo +typedef ur_result_t (UR_APICALL *ur_pfnVirtualMemGranularityGetInfo_t)( ur_context_handle_t, ur_device_handle_t, ur_virtual_mem_granularity_info_t, size_t, - void *, - size_t *); + void*, + size_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urVirtualMemReserve -typedef ur_result_t(UR_APICALL *ur_pfnVirtualMemReserve_t)( +/// @brief Function-pointer for urVirtualMemReserve +typedef ur_result_t (UR_APICALL *ur_pfnVirtualMemReserve_t)( ur_context_handle_t, - const void *, + const void*, size_t, - void **); + void** + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urVirtualMemFree -typedef ur_result_t(UR_APICALL *ur_pfnVirtualMemFree_t)( +/// @brief Function-pointer for urVirtualMemFree +typedef ur_result_t (UR_APICALL *ur_pfnVirtualMemFree_t)( ur_context_handle_t, - const void *, - size_t); + const void*, + size_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urVirtualMemMap -typedef ur_result_t(UR_APICALL *ur_pfnVirtualMemMap_t)( +/// @brief Function-pointer for urVirtualMemMap +typedef ur_result_t (UR_APICALL *ur_pfnVirtualMemMap_t)( ur_context_handle_t, - const void *, + const void*, size_t, ur_physical_mem_handle_t, size_t, - ur_virtual_mem_access_flags_t); + ur_virtual_mem_access_flags_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urVirtualMemUnmap -typedef ur_result_t(UR_APICALL *ur_pfnVirtualMemUnmap_t)( +/// @brief Function-pointer for urVirtualMemUnmap +typedef ur_result_t (UR_APICALL *ur_pfnVirtualMemUnmap_t)( ur_context_handle_t, - const void *, - size_t); + const void*, + size_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urVirtualMemSetAccess -typedef ur_result_t(UR_APICALL *ur_pfnVirtualMemSetAccess_t)( +/// @brief Function-pointer for urVirtualMemSetAccess +typedef ur_result_t (UR_APICALL *ur_pfnVirtualMemSetAccess_t)( ur_context_handle_t, - const void *, + const void*, size_t, - ur_virtual_mem_access_flags_t); + ur_virtual_mem_access_flags_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urVirtualMemGetInfo -typedef ur_result_t(UR_APICALL *ur_pfnVirtualMemGetInfo_t)( +/// @brief Function-pointer for urVirtualMemGetInfo +typedef ur_result_t (UR_APICALL *ur_pfnVirtualMemGetInfo_t)( ur_context_handle_t, - const void *, + const void*, size_t, ur_virtual_mem_info_t, size_t, - void *, - size_t *); + void*, + size_t* + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Table of VirtualMem functions pointers -typedef struct ur_virtual_mem_dditable_t { - ur_pfnVirtualMemGranularityGetInfo_t pfnGranularityGetInfo; - ur_pfnVirtualMemReserve_t pfnReserve; - ur_pfnVirtualMemFree_t pfnFree; - ur_pfnVirtualMemMap_t pfnMap; - ur_pfnVirtualMemUnmap_t pfnUnmap; - ur_pfnVirtualMemSetAccess_t pfnSetAccess; - ur_pfnVirtualMemGetInfo_t pfnGetInfo; +typedef struct ur_virtual_mem_dditable_t +{ + ur_pfnVirtualMemGranularityGetInfo_t pfnGranularityGetInfo; + ur_pfnVirtualMemReserve_t pfnReserve; + ur_pfnVirtualMemFree_t pfnFree; + ur_pfnVirtualMemMap_t pfnMap; + ur_pfnVirtualMemUnmap_t pfnUnmap; + ur_pfnVirtualMemSetAccess_t pfnSetAccess; + ur_pfnVirtualMemGetInfo_t pfnGetInfo; } ur_virtual_mem_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -2450,94 +2674,105 @@ typedef struct ur_virtual_mem_dditable_t { /// - ::UR_RESULT_ERROR_UNSUPPORTED_VERSION UR_DLLEXPORT ur_result_t UR_APICALL urGetVirtualMemProcAddrTable( - ur_api_version_t version, ///< [in] API version requested - ur_virtual_mem_dditable_t *pDdiTable ///< [in,out] pointer to table of DDI function pointers -); + ur_api_version_t version, ///< [in] API version requested + ur_virtual_mem_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Function-pointer for urGetVirtualMemProcAddrTable -typedef ur_result_t(UR_APICALL *ur_pfnGetVirtualMemProcAddrTable_t)( +typedef ur_result_t (UR_APICALL *ur_pfnGetVirtualMemProcAddrTable_t)( ur_api_version_t, - ur_virtual_mem_dditable_t *); + ur_virtual_mem_dditable_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urDeviceGet -typedef ur_result_t(UR_APICALL *ur_pfnDeviceGet_t)( +/// @brief Function-pointer for urDeviceGet +typedef ur_result_t (UR_APICALL *ur_pfnDeviceGet_t)( ur_platform_handle_t, ur_device_type_t, uint32_t, - ur_device_handle_t *, - uint32_t *); + ur_device_handle_t*, + uint32_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urDeviceGetInfo -typedef ur_result_t(UR_APICALL *ur_pfnDeviceGetInfo_t)( +/// @brief Function-pointer for urDeviceGetInfo +typedef ur_result_t (UR_APICALL *ur_pfnDeviceGetInfo_t)( ur_device_handle_t, ur_device_info_t, size_t, - void *, - size_t *); + void*, + size_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urDeviceRetain -typedef ur_result_t(UR_APICALL *ur_pfnDeviceRetain_t)( - ur_device_handle_t); +/// @brief Function-pointer for urDeviceRetain +typedef ur_result_t (UR_APICALL *ur_pfnDeviceRetain_t)( + ur_device_handle_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urDeviceRelease -typedef ur_result_t(UR_APICALL *ur_pfnDeviceRelease_t)( - ur_device_handle_t); +/// @brief Function-pointer for urDeviceRelease +typedef ur_result_t (UR_APICALL *ur_pfnDeviceRelease_t)( + ur_device_handle_t + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urDevicePartition -typedef ur_result_t(UR_APICALL *ur_pfnDevicePartition_t)( +/// @brief Function-pointer for urDevicePartition +typedef ur_result_t (UR_APICALL *ur_pfnDevicePartition_t)( ur_device_handle_t, - const ur_device_partition_properties_t *, + const ur_device_partition_properties_t*, uint32_t, - ur_device_handle_t *, - uint32_t *); + ur_device_handle_t*, + uint32_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urDeviceSelectBinary -typedef ur_result_t(UR_APICALL *ur_pfnDeviceSelectBinary_t)( +/// @brief Function-pointer for urDeviceSelectBinary +typedef ur_result_t (UR_APICALL *ur_pfnDeviceSelectBinary_t)( ur_device_handle_t, - const ur_device_binary_t *, + const ur_device_binary_t*, uint32_t, - uint32_t *); + uint32_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urDeviceGetNativeHandle -typedef ur_result_t(UR_APICALL *ur_pfnDeviceGetNativeHandle_t)( +/// @brief Function-pointer for urDeviceGetNativeHandle +typedef ur_result_t (UR_APICALL *ur_pfnDeviceGetNativeHandle_t)( ur_device_handle_t, - ur_native_handle_t *); + ur_native_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urDeviceCreateWithNativeHandle -typedef ur_result_t(UR_APICALL *ur_pfnDeviceCreateWithNativeHandle_t)( +/// @brief Function-pointer for urDeviceCreateWithNativeHandle +typedef ur_result_t (UR_APICALL *ur_pfnDeviceCreateWithNativeHandle_t)( ur_native_handle_t, ur_adapter_handle_t, - const ur_device_native_properties_t *, - ur_device_handle_t *); + const ur_device_native_properties_t*, + ur_device_handle_t* + ); /////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urDeviceGetGlobalTimestamps -typedef ur_result_t(UR_APICALL *ur_pfnDeviceGetGlobalTimestamps_t)( +/// @brief Function-pointer for urDeviceGetGlobalTimestamps +typedef ur_result_t (UR_APICALL *ur_pfnDeviceGetGlobalTimestamps_t)( ur_device_handle_t, - uint64_t *, - uint64_t *); + uint64_t*, + uint64_t* + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Table of Device functions pointers -typedef struct ur_device_dditable_t { - ur_pfnDeviceGet_t pfnGet; - ur_pfnDeviceGetInfo_t pfnGetInfo; - ur_pfnDeviceRetain_t pfnRetain; - ur_pfnDeviceRelease_t pfnRelease; - ur_pfnDevicePartition_t pfnPartition; - ur_pfnDeviceSelectBinary_t pfnSelectBinary; - ur_pfnDeviceGetNativeHandle_t pfnGetNativeHandle; - ur_pfnDeviceCreateWithNativeHandle_t pfnCreateWithNativeHandle; - ur_pfnDeviceGetGlobalTimestamps_t pfnGetGlobalTimestamps; +typedef struct ur_device_dditable_t +{ + ur_pfnDeviceGet_t pfnGet; + ur_pfnDeviceGetInfo_t pfnGetInfo; + ur_pfnDeviceRetain_t pfnRetain; + ur_pfnDeviceRelease_t pfnRelease; + ur_pfnDevicePartition_t pfnPartition; + ur_pfnDeviceSelectBinary_t pfnSelectBinary; + ur_pfnDeviceGetNativeHandle_t pfnGetNativeHandle; + ur_pfnDeviceCreateWithNativeHandle_t pfnCreateWithNativeHandle; + ur_pfnDeviceGetGlobalTimestamps_t pfnGetGlobalTimestamps; } ur_device_dditable_t; /////////////////////////////////////////////////////////////////////////////// @@ -2551,41 +2786,43 @@ typedef struct ur_device_dditable_t { /// - ::UR_RESULT_ERROR_UNSUPPORTED_VERSION UR_DLLEXPORT ur_result_t UR_APICALL urGetDeviceProcAddrTable( - ur_api_version_t version, ///< [in] API version requested - ur_device_dditable_t *pDdiTable ///< [in,out] pointer to table of DDI function pointers -); + ur_api_version_t version, ///< [in] API version requested + ur_device_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Function-pointer for urGetDeviceProcAddrTable -typedef ur_result_t(UR_APICALL *ur_pfnGetDeviceProcAddrTable_t)( +typedef ur_result_t (UR_APICALL *ur_pfnGetDeviceProcAddrTable_t)( ur_api_version_t, - ur_device_dditable_t *); + ur_device_dditable_t* + ); /////////////////////////////////////////////////////////////////////////////// /// @brief Container for all DDI tables -typedef struct ur_dditable_t { - ur_platform_dditable_t Platform; - ur_context_dditable_t Context; - ur_event_dditable_t Event; - ur_program_dditable_t Program; - ur_program_exp_dditable_t ProgramExp; - ur_kernel_dditable_t Kernel; - ur_kernel_exp_dditable_t KernelExp; - ur_queue_dditable_t Queue; - ur_sampler_dditable_t Sampler; - ur_mem_dditable_t Mem; - ur_physical_mem_dditable_t PhysicalMem; - ur_global_dditable_t Global; - ur_enqueue_dditable_t Enqueue; - ur_enqueue_exp_dditable_t EnqueueExp; - ur_bindless_images_exp_dditable_t BindlessImagesExp; - ur_usm_dditable_t USM; - ur_usm_exp_dditable_t USMExp; - ur_command_buffer_exp_dditable_t CommandBufferExp; - ur_tensor_map_exp_dditable_t TensorMapExp; - ur_usm_p2p_exp_dditable_t UsmP2PExp; - ur_virtual_mem_dditable_t VirtualMem; - ur_device_dditable_t Device; +typedef struct ur_dditable_t +{ + ur_platform_dditable_t Platform; + ur_context_dditable_t Context; + ur_event_dditable_t Event; + ur_program_dditable_t Program; + ur_program_exp_dditable_t ProgramExp; + ur_kernel_dditable_t Kernel; + ur_kernel_exp_dditable_t KernelExp; + ur_queue_dditable_t Queue; + ur_sampler_dditable_t Sampler; + ur_mem_dditable_t Mem; + ur_physical_mem_dditable_t PhysicalMem; + ur_global_dditable_t Global; + ur_enqueue_dditable_t Enqueue; + ur_enqueue_exp_dditable_t EnqueueExp; + ur_bindless_images_exp_dditable_t BindlessImagesExp; + ur_usm_dditable_t USM; + ur_usm_exp_dditable_t USMExp; + ur_command_buffer_exp_dditable_t CommandBufferExp; + ur_tensor_map_exp_dditable_t TensorMapExp; + ur_usm_p2p_exp_dditable_t UsmP2PExp; + ur_virtual_mem_dditable_t VirtualMem; + ur_device_dditable_t Device; } ur_dditable_t; #if defined(__cplusplus) diff --git a/include/ur_print.h b/include/ur_print.h index 3782ffb5ce..725e68b443 100644 --- a/include/ur_print.h +++ b/include/ur_print.h @@ -18,13 +18,14 @@ extern "C" { #endif + /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_function_t enum /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintFunction(enum ur_function_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintFunction(enum ur_function_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_structure_type_t enum @@ -32,7 +33,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintFunction(enum ur_function_t value, ch /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintStructureType(enum ur_structure_type_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintStructureType(enum ur_structure_type_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_result_t enum @@ -40,7 +41,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintStructureType(enum ur_structure_type_ /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintResult(enum ur_result_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintResult(enum ur_result_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_base_properties_t struct @@ -48,7 +49,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintResult(enum ur_result_t value, char * /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintBaseProperties(const struct ur_base_properties_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintBaseProperties(const struct ur_base_properties_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_base_desc_t struct @@ -56,7 +57,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintBaseProperties(const struct ur_base_p /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintBaseDesc(const struct ur_base_desc_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintBaseDesc(const struct ur_base_desc_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_rect_offset_t struct @@ -64,7 +65,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintBaseDesc(const struct ur_base_desc_t /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintRectOffset(const struct ur_rect_offset_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintRectOffset(const struct ur_rect_offset_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_rect_region_t struct @@ -72,7 +73,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintRectOffset(const struct ur_rect_offse /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintRectRegion(const struct ur_rect_region_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintRectRegion(const struct ur_rect_region_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_device_init_flag_t enum @@ -80,7 +81,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintRectRegion(const struct ur_rect_regio /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceInitFlags(enum ur_device_init_flag_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceInitFlags(enum ur_device_init_flag_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_loader_config_info_t enum @@ -88,7 +89,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceInitFlags(enum ur_device_init_f /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintLoaderConfigInfo(enum ur_loader_config_info_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintLoaderConfigInfo(enum ur_loader_config_info_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_code_location_t struct @@ -96,7 +97,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintLoaderConfigInfo(enum ur_loader_confi /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintCodeLocation(const struct ur_code_location_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintCodeLocation(const struct ur_code_location_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_adapter_info_t enum @@ -104,7 +105,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintCodeLocation(const struct ur_code_loc /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintAdapterInfo(enum ur_adapter_info_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintAdapterInfo(enum ur_adapter_info_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_adapter_backend_t enum @@ -112,7 +113,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintAdapterInfo(enum ur_adapter_info_t va /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintAdapterBackend(enum ur_adapter_backend_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintAdapterBackend(enum ur_adapter_backend_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_platform_info_t enum @@ -120,7 +121,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintAdapterBackend(enum ur_adapter_backen /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintPlatformInfo(enum ur_platform_info_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintPlatformInfo(enum ur_platform_info_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_api_version_t enum @@ -128,7 +129,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintPlatformInfo(enum ur_platform_info_t /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintApiVersion(enum ur_api_version_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintApiVersion(enum ur_api_version_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_platform_native_properties_t struct @@ -136,7 +137,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintApiVersion(enum ur_api_version_t valu /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintPlatformNativeProperties(const struct ur_platform_native_properties_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintPlatformNativeProperties(const struct ur_platform_native_properties_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_platform_backend_t enum @@ -144,7 +145,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintPlatformNativeProperties(const struct /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintPlatformBackend(enum ur_platform_backend_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintPlatformBackend(enum ur_platform_backend_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_device_binary_t struct @@ -152,7 +153,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintPlatformBackend(enum ur_platform_back /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceBinary(const struct ur_device_binary_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceBinary(const struct ur_device_binary_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_device_type_t enum @@ -160,7 +161,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceBinary(const struct ur_device_b /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceType(enum ur_device_type_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceType(enum ur_device_type_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_device_info_t enum @@ -168,7 +169,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceType(enum ur_device_type_t valu /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceInfo(enum ur_device_info_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceInfo(enum ur_device_info_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_device_affinity_domain_flag_t enum @@ -176,7 +177,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceInfo(enum ur_device_info_t valu /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceAffinityDomainFlags(enum ur_device_affinity_domain_flag_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceAffinityDomainFlags(enum ur_device_affinity_domain_flag_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_device_partition_t enum @@ -184,7 +185,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceAffinityDomainFlags(enum ur_dev /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintDevicePartition(enum ur_device_partition_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintDevicePartition(enum ur_device_partition_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_device_partition_property_t struct @@ -192,7 +193,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintDevicePartition(enum ur_device_partit /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintDevicePartitionProperty(const struct ur_device_partition_property_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintDevicePartitionProperty(const struct ur_device_partition_property_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_device_partition_properties_t struct @@ -200,7 +201,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintDevicePartitionProperty(const struct /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintDevicePartitionProperties(const struct ur_device_partition_properties_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintDevicePartitionProperties(const struct ur_device_partition_properties_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_device_fp_capability_flag_t enum @@ -208,7 +209,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintDevicePartitionProperties(const struc /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceFpCapabilityFlags(enum ur_device_fp_capability_flag_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceFpCapabilityFlags(enum ur_device_fp_capability_flag_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_device_mem_cache_type_t enum @@ -216,7 +217,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceFpCapabilityFlags(enum ur_devic /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceMemCacheType(enum ur_device_mem_cache_type_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceMemCacheType(enum ur_device_mem_cache_type_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_device_local_mem_type_t enum @@ -224,7 +225,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceMemCacheType(enum ur_device_mem /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceLocalMemType(enum ur_device_local_mem_type_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceLocalMemType(enum ur_device_local_mem_type_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_device_exec_capability_flag_t enum @@ -232,7 +233,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceLocalMemType(enum ur_device_loc /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceExecCapabilityFlags(enum ur_device_exec_capability_flag_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceExecCapabilityFlags(enum ur_device_exec_capability_flag_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_device_native_properties_t struct @@ -240,7 +241,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceExecCapabilityFlags(enum ur_dev /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceNativeProperties(const struct ur_device_native_properties_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceNativeProperties(const struct ur_device_native_properties_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_memory_order_capability_flag_t enum @@ -248,7 +249,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceNativeProperties(const struct u /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintMemoryOrderCapabilityFlags(enum ur_memory_order_capability_flag_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintMemoryOrderCapabilityFlags(enum ur_memory_order_capability_flag_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_memory_scope_capability_flag_t enum @@ -256,7 +257,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintMemoryOrderCapabilityFlags(enum ur_me /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintMemoryScopeCapabilityFlags(enum ur_memory_scope_capability_flag_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintMemoryScopeCapabilityFlags(enum ur_memory_scope_capability_flag_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_device_usm_access_capability_flag_t enum @@ -264,7 +265,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintMemoryScopeCapabilityFlags(enum ur_me /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceUsmAccessCapabilityFlags(enum ur_device_usm_access_capability_flag_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceUsmAccessCapabilityFlags(enum ur_device_usm_access_capability_flag_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_context_flag_t enum @@ -272,7 +273,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceUsmAccessCapabilityFlags(enum u /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintContextFlags(enum ur_context_flag_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintContextFlags(enum ur_context_flag_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_context_properties_t struct @@ -280,7 +281,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintContextFlags(enum ur_context_flag_t v /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintContextProperties(const struct ur_context_properties_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintContextProperties(const struct ur_context_properties_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_context_info_t enum @@ -288,7 +289,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintContextProperties(const struct ur_con /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintContextInfo(enum ur_context_info_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintContextInfo(enum ur_context_info_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_context_native_properties_t struct @@ -296,7 +297,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintContextInfo(enum ur_context_info_t va /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintContextNativeProperties(const struct ur_context_native_properties_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintContextNativeProperties(const struct ur_context_native_properties_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_mem_flag_t enum @@ -304,7 +305,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintContextNativeProperties(const struct /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintMemFlags(enum ur_mem_flag_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintMemFlags(enum ur_mem_flag_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_mem_type_t enum @@ -312,7 +313,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintMemFlags(enum ur_mem_flag_t value, ch /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintMemType(enum ur_mem_type_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintMemType(enum ur_mem_type_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_mem_info_t enum @@ -320,7 +321,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintMemType(enum ur_mem_type_t value, cha /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintMemInfo(enum ur_mem_info_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintMemInfo(enum ur_mem_info_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_image_channel_order_t enum @@ -328,7 +329,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintMemInfo(enum ur_mem_info_t value, cha /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintImageChannelOrder(enum ur_image_channel_order_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintImageChannelOrder(enum ur_image_channel_order_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_image_channel_type_t enum @@ -336,7 +337,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintImageChannelOrder(enum ur_image_chann /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintImageChannelType(enum ur_image_channel_type_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintImageChannelType(enum ur_image_channel_type_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_image_info_t enum @@ -344,7 +345,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintImageChannelType(enum ur_image_channe /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintImageInfo(enum ur_image_info_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintImageInfo(enum ur_image_info_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_image_format_t struct @@ -352,7 +353,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintImageInfo(enum ur_image_info_t value, /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintImageFormat(const struct ur_image_format_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintImageFormat(const struct ur_image_format_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_image_desc_t struct @@ -360,7 +361,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintImageFormat(const struct ur_image_for /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintImageDesc(const struct ur_image_desc_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintImageDesc(const struct ur_image_desc_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_buffer_properties_t struct @@ -368,7 +369,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintImageDesc(const struct ur_image_desc_ /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintBufferProperties(const struct ur_buffer_properties_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintBufferProperties(const struct ur_buffer_properties_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_buffer_channel_properties_t struct @@ -376,7 +377,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintBufferProperties(const struct ur_buff /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintBufferChannelProperties(const struct ur_buffer_channel_properties_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintBufferChannelProperties(const struct ur_buffer_channel_properties_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_buffer_alloc_location_properties_t struct @@ -384,7 +385,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintBufferChannelProperties(const struct /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintBufferAllocLocationProperties(const struct ur_buffer_alloc_location_properties_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintBufferAllocLocationProperties(const struct ur_buffer_alloc_location_properties_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_buffer_region_t struct @@ -392,7 +393,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintBufferAllocLocationProperties(const s /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintBufferRegion(const struct ur_buffer_region_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintBufferRegion(const struct ur_buffer_region_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_buffer_create_type_t enum @@ -400,7 +401,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintBufferRegion(const struct ur_buffer_r /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintBufferCreateType(enum ur_buffer_create_type_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintBufferCreateType(enum ur_buffer_create_type_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_mem_native_properties_t struct @@ -408,7 +409,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintBufferCreateType(enum ur_buffer_creat /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintMemNativeProperties(const struct ur_mem_native_properties_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintMemNativeProperties(const struct ur_mem_native_properties_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_sampler_filter_mode_t enum @@ -416,7 +417,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintMemNativeProperties(const struct ur_m /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintSamplerFilterMode(enum ur_sampler_filter_mode_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintSamplerFilterMode(enum ur_sampler_filter_mode_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_sampler_addressing_mode_t enum @@ -424,7 +425,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintSamplerFilterMode(enum ur_sampler_fil /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintSamplerAddressingMode(enum ur_sampler_addressing_mode_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintSamplerAddressingMode(enum ur_sampler_addressing_mode_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_sampler_info_t enum @@ -432,7 +433,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintSamplerAddressingMode(enum ur_sampler /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintSamplerInfo(enum ur_sampler_info_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintSamplerInfo(enum ur_sampler_info_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_sampler_desc_t struct @@ -440,7 +441,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintSamplerInfo(enum ur_sampler_info_t va /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintSamplerDesc(const struct ur_sampler_desc_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintSamplerDesc(const struct ur_sampler_desc_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_sampler_native_properties_t struct @@ -448,7 +449,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintSamplerDesc(const struct ur_sampler_d /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintSamplerNativeProperties(const struct ur_sampler_native_properties_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintSamplerNativeProperties(const struct ur_sampler_native_properties_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_usm_host_mem_flag_t enum @@ -456,7 +457,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintSamplerNativeProperties(const struct /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmHostMemFlags(enum ur_usm_host_mem_flag_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmHostMemFlags(enum ur_usm_host_mem_flag_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_usm_device_mem_flag_t enum @@ -464,7 +465,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmHostMemFlags(enum ur_usm_host_mem_ /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmDeviceMemFlags(enum ur_usm_device_mem_flag_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmDeviceMemFlags(enum ur_usm_device_mem_flag_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_usm_pool_flag_t enum @@ -472,7 +473,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmDeviceMemFlags(enum ur_usm_device_ /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmPoolFlags(enum ur_usm_pool_flag_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmPoolFlags(enum ur_usm_pool_flag_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_usm_type_t enum @@ -480,7 +481,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmPoolFlags(enum ur_usm_pool_flag_t /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmType(enum ur_usm_type_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmType(enum ur_usm_type_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_usm_alloc_info_t enum @@ -488,7 +489,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmType(enum ur_usm_type_t value, cha /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmAllocInfo(enum ur_usm_alloc_info_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmAllocInfo(enum ur_usm_alloc_info_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_usm_advice_flag_t enum @@ -496,7 +497,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmAllocInfo(enum ur_usm_alloc_info_t /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmAdviceFlags(enum ur_usm_advice_flag_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmAdviceFlags(enum ur_usm_advice_flag_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_usm_desc_t struct @@ -504,7 +505,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmAdviceFlags(enum ur_usm_advice_fla /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmDesc(const struct ur_usm_desc_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmDesc(const struct ur_usm_desc_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_usm_host_desc_t struct @@ -512,7 +513,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmDesc(const struct ur_usm_desc_t pa /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmHostDesc(const struct ur_usm_host_desc_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmHostDesc(const struct ur_usm_host_desc_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_usm_device_desc_t struct @@ -520,7 +521,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmHostDesc(const struct ur_usm_host_ /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmDeviceDesc(const struct ur_usm_device_desc_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmDeviceDesc(const struct ur_usm_device_desc_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_usm_alloc_location_desc_t struct @@ -528,7 +529,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmDeviceDesc(const struct ur_usm_dev /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmAllocLocationDesc(const struct ur_usm_alloc_location_desc_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmAllocLocationDesc(const struct ur_usm_alloc_location_desc_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_usm_pool_desc_t struct @@ -536,7 +537,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmAllocLocationDesc(const struct ur_ /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmPoolDesc(const struct ur_usm_pool_desc_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmPoolDesc(const struct ur_usm_pool_desc_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_usm_pool_limits_desc_t struct @@ -544,7 +545,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmPoolDesc(const struct ur_usm_pool_ /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmPoolLimitsDesc(const struct ur_usm_pool_limits_desc_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmPoolLimitsDesc(const struct ur_usm_pool_limits_desc_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_usm_pool_info_t enum @@ -552,7 +553,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmPoolLimitsDesc(const struct ur_usm /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmPoolInfo(enum ur_usm_pool_info_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmPoolInfo(enum ur_usm_pool_info_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_virtual_mem_granularity_info_t enum @@ -560,7 +561,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmPoolInfo(enum ur_usm_pool_info_t v /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintVirtualMemGranularityInfo(enum ur_virtual_mem_granularity_info_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintVirtualMemGranularityInfo(enum ur_virtual_mem_granularity_info_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_virtual_mem_access_flag_t enum @@ -568,7 +569,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintVirtualMemGranularityInfo(enum ur_vir /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintVirtualMemAccessFlags(enum ur_virtual_mem_access_flag_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintVirtualMemAccessFlags(enum ur_virtual_mem_access_flag_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_virtual_mem_info_t enum @@ -576,7 +577,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintVirtualMemAccessFlags(enum ur_virtual /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintVirtualMemInfo(enum ur_virtual_mem_info_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintVirtualMemInfo(enum ur_virtual_mem_info_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_physical_mem_flag_t enum @@ -584,7 +585,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintVirtualMemInfo(enum ur_virtual_mem_in /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintPhysicalMemFlags(enum ur_physical_mem_flag_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintPhysicalMemFlags(enum ur_physical_mem_flag_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_physical_mem_properties_t struct @@ -592,7 +593,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintPhysicalMemFlags(enum ur_physical_mem /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintPhysicalMemProperties(const struct ur_physical_mem_properties_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintPhysicalMemProperties(const struct ur_physical_mem_properties_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_program_metadata_type_t enum @@ -600,7 +601,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintPhysicalMemProperties(const struct ur /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramMetadataType(enum ur_program_metadata_type_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramMetadataType(enum ur_program_metadata_type_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_program_metadata_t struct @@ -608,7 +609,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramMetadataType(enum ur_program_m /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramMetadata(const struct ur_program_metadata_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramMetadata(const struct ur_program_metadata_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_program_properties_t struct @@ -616,7 +617,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramMetadata(const struct ur_progr /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramProperties(const struct ur_program_properties_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramProperties(const struct ur_program_properties_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_program_info_t enum @@ -624,7 +625,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramProperties(const struct ur_pro /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramInfo(enum ur_program_info_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramInfo(enum ur_program_info_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_program_build_status_t enum @@ -632,7 +633,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramInfo(enum ur_program_info_t va /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramBuildStatus(enum ur_program_build_status_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramBuildStatus(enum ur_program_build_status_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_program_binary_type_t enum @@ -640,7 +641,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramBuildStatus(enum ur_program_bu /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramBinaryType(enum ur_program_binary_type_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramBinaryType(enum ur_program_binary_type_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_program_build_info_t enum @@ -648,7 +649,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramBinaryType(enum ur_program_bin /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramBuildInfo(enum ur_program_build_info_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramBuildInfo(enum ur_program_build_info_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_specialization_constant_info_t struct @@ -656,7 +657,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramBuildInfo(enum ur_program_buil /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintSpecializationConstantInfo(const struct ur_specialization_constant_info_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintSpecializationConstantInfo(const struct ur_specialization_constant_info_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_program_native_properties_t struct @@ -664,7 +665,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintSpecializationConstantInfo(const stru /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramNativeProperties(const struct ur_program_native_properties_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramNativeProperties(const struct ur_program_native_properties_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_kernel_arg_value_properties_t struct @@ -672,7 +673,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramNativeProperties(const struct /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelArgValueProperties(const struct ur_kernel_arg_value_properties_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelArgValueProperties(const struct ur_kernel_arg_value_properties_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_kernel_arg_local_properties_t struct @@ -680,7 +681,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelArgValueProperties(const struct /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelArgLocalProperties(const struct ur_kernel_arg_local_properties_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelArgLocalProperties(const struct ur_kernel_arg_local_properties_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_kernel_info_t enum @@ -688,7 +689,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelArgLocalProperties(const struct /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelInfo(enum ur_kernel_info_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelInfo(enum ur_kernel_info_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_kernel_group_info_t enum @@ -696,7 +697,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelInfo(enum ur_kernel_info_t valu /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelGroupInfo(enum ur_kernel_group_info_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelGroupInfo(enum ur_kernel_group_info_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_kernel_sub_group_info_t enum @@ -704,7 +705,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelGroupInfo(enum ur_kernel_group_ /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelSubGroupInfo(enum ur_kernel_sub_group_info_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelSubGroupInfo(enum ur_kernel_sub_group_info_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_kernel_cache_config_t enum @@ -712,7 +713,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelSubGroupInfo(enum ur_kernel_sub /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelCacheConfig(enum ur_kernel_cache_config_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelCacheConfig(enum ur_kernel_cache_config_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_kernel_exec_info_t enum @@ -720,7 +721,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelCacheConfig(enum ur_kernel_cach /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelExecInfo(enum ur_kernel_exec_info_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelExecInfo(enum ur_kernel_exec_info_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_kernel_arg_pointer_properties_t struct @@ -728,7 +729,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelExecInfo(enum ur_kernel_exec_in /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelArgPointerProperties(const struct ur_kernel_arg_pointer_properties_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelArgPointerProperties(const struct ur_kernel_arg_pointer_properties_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_kernel_exec_info_properties_t struct @@ -736,7 +737,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelArgPointerProperties(const stru /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelExecInfoProperties(const struct ur_kernel_exec_info_properties_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelExecInfoProperties(const struct ur_kernel_exec_info_properties_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_kernel_arg_sampler_properties_t struct @@ -744,7 +745,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelExecInfoProperties(const struct /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelArgSamplerProperties(const struct ur_kernel_arg_sampler_properties_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelArgSamplerProperties(const struct ur_kernel_arg_sampler_properties_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_kernel_arg_mem_obj_properties_t struct @@ -752,7 +753,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelArgSamplerProperties(const stru /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelArgMemObjProperties(const struct ur_kernel_arg_mem_obj_properties_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelArgMemObjProperties(const struct ur_kernel_arg_mem_obj_properties_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_kernel_native_properties_t struct @@ -760,7 +761,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelArgMemObjProperties(const struc /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelNativeProperties(const struct ur_kernel_native_properties_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelNativeProperties(const struct ur_kernel_native_properties_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_queue_info_t enum @@ -768,7 +769,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelNativeProperties(const struct u /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueInfo(enum ur_queue_info_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueInfo(enum ur_queue_info_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_queue_flag_t enum @@ -776,7 +777,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueInfo(enum ur_queue_info_t value, /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueFlags(enum ur_queue_flag_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueFlags(enum ur_queue_flag_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_queue_properties_t struct @@ -784,7 +785,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueFlags(enum ur_queue_flag_t value /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueProperties(const struct ur_queue_properties_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueProperties(const struct ur_queue_properties_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_queue_index_properties_t struct @@ -792,7 +793,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueProperties(const struct ur_queue /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueIndexProperties(const struct ur_queue_index_properties_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueIndexProperties(const struct ur_queue_index_properties_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_queue_native_desc_t struct @@ -800,7 +801,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueIndexProperties(const struct ur_ /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueNativeDesc(const struct ur_queue_native_desc_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueNativeDesc(const struct ur_queue_native_desc_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_queue_native_properties_t struct @@ -808,7 +809,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueNativeDesc(const struct ur_queue /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueNativeProperties(const struct ur_queue_native_properties_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueNativeProperties(const struct ur_queue_native_properties_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_command_t enum @@ -816,7 +817,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueNativeProperties(const struct ur /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintCommand(enum ur_command_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintCommand(enum ur_command_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_event_status_t enum @@ -824,7 +825,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintCommand(enum ur_command_t value, char /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEventStatus(enum ur_event_status_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEventStatus(enum ur_event_status_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_event_info_t enum @@ -832,7 +833,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEventStatus(enum ur_event_status_t va /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEventInfo(enum ur_event_info_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEventInfo(enum ur_event_info_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_profiling_info_t enum @@ -840,7 +841,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEventInfo(enum ur_event_info_t value, /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintProfilingInfo(enum ur_profiling_info_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintProfilingInfo(enum ur_profiling_info_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_event_native_properties_t struct @@ -848,7 +849,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintProfilingInfo(enum ur_profiling_info_ /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEventNativeProperties(const struct ur_event_native_properties_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEventNativeProperties(const struct ur_event_native_properties_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_execution_info_t enum @@ -856,7 +857,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEventNativeProperties(const struct ur /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintExecutionInfo(enum ur_execution_info_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintExecutionInfo(enum ur_execution_info_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_map_flag_t enum @@ -864,7 +865,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintExecutionInfo(enum ur_execution_info_ /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintMapFlags(enum ur_map_flag_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintMapFlags(enum ur_map_flag_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_usm_migration_flag_t enum @@ -872,7 +873,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintMapFlags(enum ur_map_flag_t value, ch /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmMigrationFlags(enum ur_usm_migration_flag_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmMigrationFlags(enum ur_usm_migration_flag_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_exp_device_2d_block_array_capability_flag_t enum @@ -880,7 +881,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmMigrationFlags(enum ur_usm_migrati /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintExpDevice_2dBlockArrayCapabilityFlags(enum ur_exp_device_2d_block_array_capability_flag_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintExpDevice_2dBlockArrayCapabilityFlags(enum ur_exp_device_2d_block_array_capability_flag_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_exp_image_copy_flag_t enum @@ -888,7 +889,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintExpDevice_2dBlockArrayCapabilityFlags /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintExpImageCopyFlags(enum ur_exp_image_copy_flag_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintExpImageCopyFlags(enum ur_exp_image_copy_flag_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_exp_sampler_cubemap_filter_mode_t enum @@ -896,7 +897,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintExpImageCopyFlags(enum ur_exp_image_c /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintExpSamplerCubemapFilterMode(enum ur_exp_sampler_cubemap_filter_mode_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintExpSamplerCubemapFilterMode(enum ur_exp_sampler_cubemap_filter_mode_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_exp_external_mem_type_t enum @@ -904,7 +905,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintExpSamplerCubemapFilterMode(enum ur_e /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintExpExternalMemType(enum ur_exp_external_mem_type_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintExpExternalMemType(enum ur_exp_external_mem_type_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_exp_external_semaphore_type_t enum @@ -912,7 +913,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintExpExternalMemType(enum ur_exp_extern /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintExpExternalSemaphoreType(enum ur_exp_external_semaphore_type_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintExpExternalSemaphoreType(enum ur_exp_external_semaphore_type_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_exp_file_descriptor_t struct @@ -920,7 +921,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintExpExternalSemaphoreType(enum ur_exp_ /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintExpFileDescriptor(const struct ur_exp_file_descriptor_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintExpFileDescriptor(const struct ur_exp_file_descriptor_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_exp_win32_handle_t struct @@ -928,7 +929,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintExpFileDescriptor(const struct ur_exp /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintExpWin32Handle(const struct ur_exp_win32_handle_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintExpWin32Handle(const struct ur_exp_win32_handle_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_exp_sampler_mip_properties_t struct @@ -936,7 +937,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintExpWin32Handle(const struct ur_exp_wi /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintExpSamplerMipProperties(const struct ur_exp_sampler_mip_properties_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintExpSamplerMipProperties(const struct ur_exp_sampler_mip_properties_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_exp_sampler_addr_modes_t struct @@ -944,7 +945,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintExpSamplerMipProperties(const struct /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintExpSamplerAddrModes(const struct ur_exp_sampler_addr_modes_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintExpSamplerAddrModes(const struct ur_exp_sampler_addr_modes_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_exp_sampler_cubemap_properties_t struct @@ -952,7 +953,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintExpSamplerAddrModes(const struct ur_e /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintExpSamplerCubemapProperties(const struct ur_exp_sampler_cubemap_properties_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintExpSamplerCubemapProperties(const struct ur_exp_sampler_cubemap_properties_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_exp_external_mem_desc_t struct @@ -960,7 +961,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintExpSamplerCubemapProperties(const str /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintExpExternalMemDesc(const struct ur_exp_external_mem_desc_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintExpExternalMemDesc(const struct ur_exp_external_mem_desc_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_exp_external_semaphore_desc_t struct @@ -968,7 +969,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintExpExternalMemDesc(const struct ur_ex /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintExpExternalSemaphoreDesc(const struct ur_exp_external_semaphore_desc_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintExpExternalSemaphoreDesc(const struct ur_exp_external_semaphore_desc_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_exp_image_copy_region_t struct @@ -976,7 +977,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintExpExternalSemaphoreDesc(const struct /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintExpImageCopyRegion(const struct ur_exp_image_copy_region_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintExpImageCopyRegion(const struct ur_exp_image_copy_region_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_device_command_buffer_update_capability_flag_t enum @@ -984,7 +985,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintExpImageCopyRegion(const struct ur_ex /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceCommandBufferUpdateCapabilityFlags(enum ur_device_command_buffer_update_capability_flag_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceCommandBufferUpdateCapabilityFlags(enum ur_device_command_buffer_update_capability_flag_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_exp_command_buffer_info_t enum @@ -992,7 +993,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceCommandBufferUpdateCapabilityFl /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintExpCommandBufferInfo(enum ur_exp_command_buffer_info_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintExpCommandBufferInfo(enum ur_exp_command_buffer_info_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_exp_command_buffer_command_info_t enum @@ -1000,7 +1001,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintExpCommandBufferInfo(enum ur_exp_comm /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintExpCommandBufferCommandInfo(enum ur_exp_command_buffer_command_info_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintExpCommandBufferCommandInfo(enum ur_exp_command_buffer_command_info_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_exp_command_buffer_desc_t struct @@ -1008,7 +1009,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintExpCommandBufferCommandInfo(enum ur_e /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintExpCommandBufferDesc(const struct ur_exp_command_buffer_desc_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintExpCommandBufferDesc(const struct ur_exp_command_buffer_desc_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_exp_command_buffer_update_memobj_arg_desc_t struct @@ -1016,7 +1017,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintExpCommandBufferDesc(const struct ur_ /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintExpCommandBufferUpdateMemobjArgDesc(const struct ur_exp_command_buffer_update_memobj_arg_desc_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintExpCommandBufferUpdateMemobjArgDesc(const struct ur_exp_command_buffer_update_memobj_arg_desc_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_exp_command_buffer_update_pointer_arg_desc_t struct @@ -1024,7 +1025,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintExpCommandBufferUpdateMemobjArgDesc(c /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintExpCommandBufferUpdatePointerArgDesc(const struct ur_exp_command_buffer_update_pointer_arg_desc_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintExpCommandBufferUpdatePointerArgDesc(const struct ur_exp_command_buffer_update_pointer_arg_desc_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_exp_command_buffer_update_value_arg_desc_t struct @@ -1032,7 +1033,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintExpCommandBufferUpdatePointerArgDesc( /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintExpCommandBufferUpdateValueArgDesc(const struct ur_exp_command_buffer_update_value_arg_desc_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintExpCommandBufferUpdateValueArgDesc(const struct ur_exp_command_buffer_update_value_arg_desc_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_exp_command_buffer_update_kernel_launch_desc_t struct @@ -1040,7 +1041,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintExpCommandBufferUpdateValueArgDesc(co /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintExpCommandBufferUpdateKernelLaunchDesc(const struct ur_exp_command_buffer_update_kernel_launch_desc_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintExpCommandBufferUpdateKernelLaunchDesc(const struct ur_exp_command_buffer_update_kernel_launch_desc_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_exp_launch_property_id_t enum @@ -1048,7 +1049,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintExpCommandBufferUpdateKernelLaunchDes /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintExpLaunchPropertyId(enum ur_exp_launch_property_id_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintExpLaunchPropertyId(enum ur_exp_launch_property_id_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_exp_launch_property_t struct @@ -1056,7 +1057,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintExpLaunchPropertyId(enum ur_exp_launc /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintExpLaunchProperty(const struct ur_exp_launch_property_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintExpLaunchProperty(const struct ur_exp_launch_property_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_exp_peer_info_t enum @@ -1064,7 +1065,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintExpLaunchProperty(const struct ur_exp /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintExpPeerInfo(enum ur_exp_peer_info_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintExpPeerInfo(enum ur_exp_peer_info_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_exp_enqueue_ext_flag_t enum @@ -1072,7 +1073,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintExpPeerInfo(enum ur_exp_peer_info_t v /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintExpEnqueueExtFlags(enum ur_exp_enqueue_ext_flag_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintExpEnqueueExtFlags(enum ur_exp_enqueue_ext_flag_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_exp_enqueue_ext_properties_t struct @@ -1080,7 +1081,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintExpEnqueueExtFlags(enum ur_exp_enqueu /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintExpEnqueueExtProperties(const struct ur_exp_enqueue_ext_properties_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintExpEnqueueExtProperties(const struct ur_exp_enqueue_ext_properties_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_exp_enqueue_native_command_flag_t enum @@ -1088,7 +1089,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintExpEnqueueExtProperties(const struct /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintExpEnqueueNativeCommandFlags(enum ur_exp_enqueue_native_command_flag_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintExpEnqueueNativeCommandFlags(enum ur_exp_enqueue_native_command_flag_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_exp_enqueue_native_command_properties_t struct @@ -1096,7 +1097,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintExpEnqueueNativeCommandFlags(enum ur_ /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintExpEnqueueNativeCommandProperties(const struct ur_exp_enqueue_native_command_properties_t params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintExpEnqueueNativeCommandProperties(const struct ur_exp_enqueue_native_command_properties_t params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_exp_tensor_map_data_type_flag_t enum @@ -1104,7 +1105,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintExpEnqueueNativeCommandProperties(con /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintExpTensorMapDataTypeFlags(enum ur_exp_tensor_map_data_type_flag_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintExpTensorMapDataTypeFlags(enum ur_exp_tensor_map_data_type_flag_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_exp_tensor_map_interleave_flag_t enum @@ -1112,7 +1113,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintExpTensorMapDataTypeFlags(enum ur_exp /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintExpTensorMapInterleaveFlags(enum ur_exp_tensor_map_interleave_flag_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintExpTensorMapInterleaveFlags(enum ur_exp_tensor_map_interleave_flag_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_exp_tensor_map_l2_promotion_flag_t enum @@ -1120,7 +1121,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintExpTensorMapInterleaveFlags(enum ur_e /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintExpTensorMapL2PromotionFlags(enum ur_exp_tensor_map_l2_promotion_flag_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintExpTensorMapL2PromotionFlags(enum ur_exp_tensor_map_l2_promotion_flag_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_exp_tensor_map_swizzle_flag_t enum @@ -1128,7 +1129,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintExpTensorMapL2PromotionFlags(enum ur_ /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintExpTensorMapSwizzleFlags(enum ur_exp_tensor_map_swizzle_flag_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintExpTensorMapSwizzleFlags(enum ur_exp_tensor_map_swizzle_flag_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_exp_tensor_map_oob_fill_flag_t enum @@ -1136,7 +1137,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintExpTensorMapSwizzleFlags(enum ur_exp_ /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintExpTensorMapOobFillFlags(enum ur_exp_tensor_map_oob_fill_flag_t value, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintExpTensorMapOobFillFlags(enum ur_exp_tensor_map_oob_fill_flag_t value, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_loader_config_create_params_t struct @@ -1144,7 +1145,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintExpTensorMapOobFillFlags(enum ur_exp_ /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintLoaderConfigCreateParams(const struct ur_loader_config_create_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintLoaderConfigCreateParams(const struct ur_loader_config_create_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_loader_config_retain_params_t struct @@ -1152,7 +1153,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintLoaderConfigCreateParams(const struct /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintLoaderConfigRetainParams(const struct ur_loader_config_retain_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintLoaderConfigRetainParams(const struct ur_loader_config_retain_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_loader_config_release_params_t struct @@ -1160,7 +1161,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintLoaderConfigRetainParams(const struct /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintLoaderConfigReleaseParams(const struct ur_loader_config_release_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintLoaderConfigReleaseParams(const struct ur_loader_config_release_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_loader_config_get_info_params_t struct @@ -1168,7 +1169,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintLoaderConfigReleaseParams(const struc /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintLoaderConfigGetInfoParams(const struct ur_loader_config_get_info_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintLoaderConfigGetInfoParams(const struct ur_loader_config_get_info_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_loader_config_enable_layer_params_t struct @@ -1176,7 +1177,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintLoaderConfigGetInfoParams(const struc /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintLoaderConfigEnableLayerParams(const struct ur_loader_config_enable_layer_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintLoaderConfigEnableLayerParams(const struct ur_loader_config_enable_layer_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_loader_config_set_code_location_callback_params_t struct @@ -1184,7 +1185,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintLoaderConfigEnableLayerParams(const s /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintLoaderConfigSetCodeLocationCallbackParams(const struct ur_loader_config_set_code_location_callback_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintLoaderConfigSetCodeLocationCallbackParams(const struct ur_loader_config_set_code_location_callback_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_loader_config_set_mocking_enabled_params_t struct @@ -1192,7 +1193,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintLoaderConfigSetCodeLocationCallbackPa /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintLoaderConfigSetMockingEnabledParams(const struct ur_loader_config_set_mocking_enabled_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintLoaderConfigSetMockingEnabledParams(const struct ur_loader_config_set_mocking_enabled_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_platform_get_params_t struct @@ -1200,7 +1201,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintLoaderConfigSetMockingEnabledParams(c /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintPlatformGetParams(const struct ur_platform_get_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintPlatformGetParams(const struct ur_platform_get_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_platform_get_info_params_t struct @@ -1208,7 +1209,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintPlatformGetParams(const struct ur_pla /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintPlatformGetInfoParams(const struct ur_platform_get_info_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintPlatformGetInfoParams(const struct ur_platform_get_info_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_platform_get_native_handle_params_t struct @@ -1216,7 +1217,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintPlatformGetInfoParams(const struct ur /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintPlatformGetNativeHandleParams(const struct ur_platform_get_native_handle_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintPlatformGetNativeHandleParams(const struct ur_platform_get_native_handle_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_platform_create_with_native_handle_params_t struct @@ -1224,7 +1225,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintPlatformGetNativeHandleParams(const s /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintPlatformCreateWithNativeHandleParams(const struct ur_platform_create_with_native_handle_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintPlatformCreateWithNativeHandleParams(const struct ur_platform_create_with_native_handle_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_platform_get_api_version_params_t struct @@ -1232,7 +1233,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintPlatformCreateWithNativeHandleParams( /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintPlatformGetApiVersionParams(const struct ur_platform_get_api_version_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintPlatformGetApiVersionParams(const struct ur_platform_get_api_version_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_platform_get_backend_option_params_t struct @@ -1240,7 +1241,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintPlatformGetApiVersionParams(const str /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintPlatformGetBackendOptionParams(const struct ur_platform_get_backend_option_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintPlatformGetBackendOptionParams(const struct ur_platform_get_backend_option_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_context_create_params_t struct @@ -1248,7 +1249,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintPlatformGetBackendOptionParams(const /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintContextCreateParams(const struct ur_context_create_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintContextCreateParams(const struct ur_context_create_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_context_retain_params_t struct @@ -1256,7 +1257,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintContextCreateParams(const struct ur_c /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintContextRetainParams(const struct ur_context_retain_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintContextRetainParams(const struct ur_context_retain_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_context_release_params_t struct @@ -1264,7 +1265,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintContextRetainParams(const struct ur_c /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintContextReleaseParams(const struct ur_context_release_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintContextReleaseParams(const struct ur_context_release_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_context_get_info_params_t struct @@ -1272,7 +1273,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintContextReleaseParams(const struct ur_ /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintContextGetInfoParams(const struct ur_context_get_info_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintContextGetInfoParams(const struct ur_context_get_info_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_context_get_native_handle_params_t struct @@ -1280,7 +1281,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintContextGetInfoParams(const struct ur_ /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintContextGetNativeHandleParams(const struct ur_context_get_native_handle_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintContextGetNativeHandleParams(const struct ur_context_get_native_handle_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_context_create_with_native_handle_params_t struct @@ -1288,7 +1289,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintContextGetNativeHandleParams(const st /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintContextCreateWithNativeHandleParams(const struct ur_context_create_with_native_handle_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintContextCreateWithNativeHandleParams(const struct ur_context_create_with_native_handle_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_context_set_extended_deleter_params_t struct @@ -1296,7 +1297,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintContextCreateWithNativeHandleParams(c /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintContextSetExtendedDeleterParams(const struct ur_context_set_extended_deleter_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintContextSetExtendedDeleterParams(const struct ur_context_set_extended_deleter_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_event_get_info_params_t struct @@ -1304,7 +1305,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintContextSetExtendedDeleterParams(const /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEventGetInfoParams(const struct ur_event_get_info_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEventGetInfoParams(const struct ur_event_get_info_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_event_get_profiling_info_params_t struct @@ -1312,7 +1313,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEventGetInfoParams(const struct ur_ev /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEventGetProfilingInfoParams(const struct ur_event_get_profiling_info_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEventGetProfilingInfoParams(const struct ur_event_get_profiling_info_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_event_wait_params_t struct @@ -1320,7 +1321,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEventGetProfilingInfoParams(const str /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEventWaitParams(const struct ur_event_wait_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEventWaitParams(const struct ur_event_wait_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_event_retain_params_t struct @@ -1328,7 +1329,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEventWaitParams(const struct ur_event /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEventRetainParams(const struct ur_event_retain_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEventRetainParams(const struct ur_event_retain_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_event_release_params_t struct @@ -1336,7 +1337,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEventRetainParams(const struct ur_eve /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEventReleaseParams(const struct ur_event_release_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEventReleaseParams(const struct ur_event_release_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_event_get_native_handle_params_t struct @@ -1344,7 +1345,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEventReleaseParams(const struct ur_ev /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEventGetNativeHandleParams(const struct ur_event_get_native_handle_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEventGetNativeHandleParams(const struct ur_event_get_native_handle_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_event_create_with_native_handle_params_t struct @@ -1352,7 +1353,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEventGetNativeHandleParams(const stru /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEventCreateWithNativeHandleParams(const struct ur_event_create_with_native_handle_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEventCreateWithNativeHandleParams(const struct ur_event_create_with_native_handle_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_event_set_callback_params_t struct @@ -1360,7 +1361,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEventCreateWithNativeHandleParams(con /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEventSetCallbackParams(const struct ur_event_set_callback_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEventSetCallbackParams(const struct ur_event_set_callback_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_program_create_with_il_params_t struct @@ -1368,7 +1369,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEventSetCallbackParams(const struct u /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramCreateWithIlParams(const struct ur_program_create_with_il_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramCreateWithIlParams(const struct ur_program_create_with_il_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_program_create_with_binary_params_t struct @@ -1376,7 +1377,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramCreateWithIlParams(const struc /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramCreateWithBinaryParams(const struct ur_program_create_with_binary_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramCreateWithBinaryParams(const struct ur_program_create_with_binary_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_program_build_params_t struct @@ -1384,7 +1385,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramCreateWithBinaryParams(const s /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramBuildParams(const struct ur_program_build_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramBuildParams(const struct ur_program_build_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_program_build_exp_params_t struct @@ -1392,7 +1393,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramBuildParams(const struct ur_pr /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramBuildExpParams(const struct ur_program_build_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramBuildExpParams(const struct ur_program_build_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_program_compile_params_t struct @@ -1400,7 +1401,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramBuildExpParams(const struct ur /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramCompileParams(const struct ur_program_compile_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramCompileParams(const struct ur_program_compile_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_program_compile_exp_params_t struct @@ -1408,7 +1409,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramCompileParams(const struct ur_ /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramCompileExpParams(const struct ur_program_compile_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramCompileExpParams(const struct ur_program_compile_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_program_link_params_t struct @@ -1416,7 +1417,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramCompileExpParams(const struct /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramLinkParams(const struct ur_program_link_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramLinkParams(const struct ur_program_link_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_program_link_exp_params_t struct @@ -1424,7 +1425,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramLinkParams(const struct ur_pro /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramLinkExpParams(const struct ur_program_link_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramLinkExpParams(const struct ur_program_link_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_program_retain_params_t struct @@ -1432,7 +1433,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramLinkExpParams(const struct ur_ /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramRetainParams(const struct ur_program_retain_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramRetainParams(const struct ur_program_retain_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_program_release_params_t struct @@ -1440,7 +1441,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramRetainParams(const struct ur_p /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramReleaseParams(const struct ur_program_release_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramReleaseParams(const struct ur_program_release_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_program_get_function_pointer_params_t struct @@ -1448,7 +1449,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramReleaseParams(const struct ur_ /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramGetFunctionPointerParams(const struct ur_program_get_function_pointer_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramGetFunctionPointerParams(const struct ur_program_get_function_pointer_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_program_get_global_variable_pointer_params_t struct @@ -1456,7 +1457,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramGetFunctionPointerParams(const /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramGetGlobalVariablePointerParams(const struct ur_program_get_global_variable_pointer_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramGetGlobalVariablePointerParams(const struct ur_program_get_global_variable_pointer_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_program_get_info_params_t struct @@ -1464,7 +1465,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramGetGlobalVariablePointerParams /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramGetInfoParams(const struct ur_program_get_info_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramGetInfoParams(const struct ur_program_get_info_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_program_get_build_info_params_t struct @@ -1472,7 +1473,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramGetInfoParams(const struct ur_ /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramGetBuildInfoParams(const struct ur_program_get_build_info_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramGetBuildInfoParams(const struct ur_program_get_build_info_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_program_set_specialization_constants_params_t struct @@ -1480,7 +1481,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramGetBuildInfoParams(const struc /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramSetSpecializationConstantsParams(const struct ur_program_set_specialization_constants_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramSetSpecializationConstantsParams(const struct ur_program_set_specialization_constants_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_program_get_native_handle_params_t struct @@ -1488,7 +1489,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramSetSpecializationConstantsPara /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramGetNativeHandleParams(const struct ur_program_get_native_handle_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramGetNativeHandleParams(const struct ur_program_get_native_handle_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_program_create_with_native_handle_params_t struct @@ -1496,7 +1497,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramGetNativeHandleParams(const st /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramCreateWithNativeHandleParams(const struct ur_program_create_with_native_handle_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramCreateWithNativeHandleParams(const struct ur_program_create_with_native_handle_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_kernel_create_params_t struct @@ -1504,7 +1505,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintProgramCreateWithNativeHandleParams(c /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelCreateParams(const struct ur_kernel_create_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelCreateParams(const struct ur_kernel_create_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_kernel_get_info_params_t struct @@ -1512,7 +1513,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelCreateParams(const struct ur_ke /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelGetInfoParams(const struct ur_kernel_get_info_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelGetInfoParams(const struct ur_kernel_get_info_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_kernel_get_group_info_params_t struct @@ -1520,7 +1521,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelGetInfoParams(const struct ur_k /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelGetGroupInfoParams(const struct ur_kernel_get_group_info_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelGetGroupInfoParams(const struct ur_kernel_get_group_info_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_kernel_get_sub_group_info_params_t struct @@ -1528,7 +1529,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelGetGroupInfoParams(const struct /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelGetSubGroupInfoParams(const struct ur_kernel_get_sub_group_info_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelGetSubGroupInfoParams(const struct ur_kernel_get_sub_group_info_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_kernel_retain_params_t struct @@ -1536,7 +1537,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelGetSubGroupInfoParams(const str /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelRetainParams(const struct ur_kernel_retain_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelRetainParams(const struct ur_kernel_retain_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_kernel_release_params_t struct @@ -1544,7 +1545,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelRetainParams(const struct ur_ke /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelReleaseParams(const struct ur_kernel_release_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelReleaseParams(const struct ur_kernel_release_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_kernel_get_native_handle_params_t struct @@ -1552,7 +1553,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelReleaseParams(const struct ur_k /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelGetNativeHandleParams(const struct ur_kernel_get_native_handle_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelGetNativeHandleParams(const struct ur_kernel_get_native_handle_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_kernel_create_with_native_handle_params_t struct @@ -1560,7 +1561,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelGetNativeHandleParams(const str /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelCreateWithNativeHandleParams(const struct ur_kernel_create_with_native_handle_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelCreateWithNativeHandleParams(const struct ur_kernel_create_with_native_handle_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_kernel_get_suggested_local_work_size_params_t struct @@ -1568,7 +1569,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelCreateWithNativeHandleParams(co /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelGetSuggestedLocalWorkSizeParams(const struct ur_kernel_get_suggested_local_work_size_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelGetSuggestedLocalWorkSizeParams(const struct ur_kernel_get_suggested_local_work_size_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_kernel_set_arg_value_params_t struct @@ -1576,7 +1577,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelGetSuggestedLocalWorkSizeParams /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelSetArgValueParams(const struct ur_kernel_set_arg_value_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelSetArgValueParams(const struct ur_kernel_set_arg_value_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_kernel_set_arg_local_params_t struct @@ -1584,7 +1585,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelSetArgValueParams(const struct /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelSetArgLocalParams(const struct ur_kernel_set_arg_local_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelSetArgLocalParams(const struct ur_kernel_set_arg_local_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_kernel_set_arg_pointer_params_t struct @@ -1592,7 +1593,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelSetArgLocalParams(const struct /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelSetArgPointerParams(const struct ur_kernel_set_arg_pointer_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelSetArgPointerParams(const struct ur_kernel_set_arg_pointer_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_kernel_set_exec_info_params_t struct @@ -1600,7 +1601,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelSetArgPointerParams(const struc /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelSetExecInfoParams(const struct ur_kernel_set_exec_info_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelSetExecInfoParams(const struct ur_kernel_set_exec_info_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_kernel_set_arg_sampler_params_t struct @@ -1608,7 +1609,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelSetExecInfoParams(const struct /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelSetArgSamplerParams(const struct ur_kernel_set_arg_sampler_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelSetArgSamplerParams(const struct ur_kernel_set_arg_sampler_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_kernel_set_arg_mem_obj_params_t struct @@ -1616,7 +1617,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelSetArgSamplerParams(const struc /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelSetArgMemObjParams(const struct ur_kernel_set_arg_mem_obj_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelSetArgMemObjParams(const struct ur_kernel_set_arg_mem_obj_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_kernel_set_specialization_constants_params_t struct @@ -1624,7 +1625,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelSetArgMemObjParams(const struct /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelSetSpecializationConstantsParams(const struct ur_kernel_set_specialization_constants_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelSetSpecializationConstantsParams(const struct ur_kernel_set_specialization_constants_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_kernel_suggest_max_cooperative_group_count_exp_params_t struct @@ -1632,7 +1633,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelSetSpecializationConstantsParam /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelSuggestMaxCooperativeGroupCountExpParams(const struct ur_kernel_suggest_max_cooperative_group_count_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelSuggestMaxCooperativeGroupCountExpParams(const struct ur_kernel_suggest_max_cooperative_group_count_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_queue_get_info_params_t struct @@ -1640,7 +1641,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintKernelSuggestMaxCooperativeGroupCount /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueGetInfoParams(const struct ur_queue_get_info_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueGetInfoParams(const struct ur_queue_get_info_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_queue_create_params_t struct @@ -1648,7 +1649,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueGetInfoParams(const struct ur_qu /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueCreateParams(const struct ur_queue_create_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueCreateParams(const struct ur_queue_create_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_queue_retain_params_t struct @@ -1656,7 +1657,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueCreateParams(const struct ur_que /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueRetainParams(const struct ur_queue_retain_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueRetainParams(const struct ur_queue_retain_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_queue_release_params_t struct @@ -1664,7 +1665,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueRetainParams(const struct ur_que /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueReleaseParams(const struct ur_queue_release_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueReleaseParams(const struct ur_queue_release_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_queue_get_native_handle_params_t struct @@ -1672,7 +1673,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueReleaseParams(const struct ur_qu /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueGetNativeHandleParams(const struct ur_queue_get_native_handle_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueGetNativeHandleParams(const struct ur_queue_get_native_handle_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_queue_create_with_native_handle_params_t struct @@ -1680,7 +1681,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueGetNativeHandleParams(const stru /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueCreateWithNativeHandleParams(const struct ur_queue_create_with_native_handle_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueCreateWithNativeHandleParams(const struct ur_queue_create_with_native_handle_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_queue_finish_params_t struct @@ -1688,7 +1689,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueCreateWithNativeHandleParams(con /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueFinishParams(const struct ur_queue_finish_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueFinishParams(const struct ur_queue_finish_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_queue_flush_params_t struct @@ -1696,7 +1697,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueFinishParams(const struct ur_que /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueFlushParams(const struct ur_queue_flush_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueFlushParams(const struct ur_queue_flush_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_sampler_create_params_t struct @@ -1704,7 +1705,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintQueueFlushParams(const struct ur_queu /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintSamplerCreateParams(const struct ur_sampler_create_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintSamplerCreateParams(const struct ur_sampler_create_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_sampler_retain_params_t struct @@ -1712,7 +1713,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintSamplerCreateParams(const struct ur_s /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintSamplerRetainParams(const struct ur_sampler_retain_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintSamplerRetainParams(const struct ur_sampler_retain_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_sampler_release_params_t struct @@ -1720,7 +1721,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintSamplerRetainParams(const struct ur_s /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintSamplerReleaseParams(const struct ur_sampler_release_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintSamplerReleaseParams(const struct ur_sampler_release_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_sampler_get_info_params_t struct @@ -1728,7 +1729,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintSamplerReleaseParams(const struct ur_ /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintSamplerGetInfoParams(const struct ur_sampler_get_info_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintSamplerGetInfoParams(const struct ur_sampler_get_info_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_sampler_get_native_handle_params_t struct @@ -1736,7 +1737,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintSamplerGetInfoParams(const struct ur_ /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintSamplerGetNativeHandleParams(const struct ur_sampler_get_native_handle_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintSamplerGetNativeHandleParams(const struct ur_sampler_get_native_handle_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_sampler_create_with_native_handle_params_t struct @@ -1744,7 +1745,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintSamplerGetNativeHandleParams(const st /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintSamplerCreateWithNativeHandleParams(const struct ur_sampler_create_with_native_handle_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintSamplerCreateWithNativeHandleParams(const struct ur_sampler_create_with_native_handle_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_mem_image_create_params_t struct @@ -1752,7 +1753,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintSamplerCreateWithNativeHandleParams(c /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintMemImageCreateParams(const struct ur_mem_image_create_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintMemImageCreateParams(const struct ur_mem_image_create_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_mem_buffer_create_params_t struct @@ -1760,7 +1761,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintMemImageCreateParams(const struct ur_ /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintMemBufferCreateParams(const struct ur_mem_buffer_create_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintMemBufferCreateParams(const struct ur_mem_buffer_create_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_mem_retain_params_t struct @@ -1768,7 +1769,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintMemBufferCreateParams(const struct ur /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintMemRetainParams(const struct ur_mem_retain_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintMemRetainParams(const struct ur_mem_retain_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_mem_release_params_t struct @@ -1776,7 +1777,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintMemRetainParams(const struct ur_mem_r /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintMemReleaseParams(const struct ur_mem_release_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintMemReleaseParams(const struct ur_mem_release_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_mem_buffer_partition_params_t struct @@ -1784,7 +1785,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintMemReleaseParams(const struct ur_mem_ /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintMemBufferPartitionParams(const struct ur_mem_buffer_partition_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintMemBufferPartitionParams(const struct ur_mem_buffer_partition_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_mem_get_native_handle_params_t struct @@ -1792,7 +1793,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintMemBufferPartitionParams(const struct /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintMemGetNativeHandleParams(const struct ur_mem_get_native_handle_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintMemGetNativeHandleParams(const struct ur_mem_get_native_handle_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_mem_buffer_create_with_native_handle_params_t struct @@ -1800,7 +1801,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintMemGetNativeHandleParams(const struct /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintMemBufferCreateWithNativeHandleParams(const struct ur_mem_buffer_create_with_native_handle_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintMemBufferCreateWithNativeHandleParams(const struct ur_mem_buffer_create_with_native_handle_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_mem_image_create_with_native_handle_params_t struct @@ -1808,7 +1809,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintMemBufferCreateWithNativeHandleParams /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintMemImageCreateWithNativeHandleParams(const struct ur_mem_image_create_with_native_handle_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintMemImageCreateWithNativeHandleParams(const struct ur_mem_image_create_with_native_handle_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_mem_get_info_params_t struct @@ -1816,7 +1817,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintMemImageCreateWithNativeHandleParams( /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintMemGetInfoParams(const struct ur_mem_get_info_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintMemGetInfoParams(const struct ur_mem_get_info_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_mem_image_get_info_params_t struct @@ -1824,7 +1825,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintMemGetInfoParams(const struct ur_mem_ /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintMemImageGetInfoParams(const struct ur_mem_image_get_info_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintMemImageGetInfoParams(const struct ur_mem_image_get_info_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_physical_mem_create_params_t struct @@ -1832,7 +1833,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintMemImageGetInfoParams(const struct ur /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintPhysicalMemCreateParams(const struct ur_physical_mem_create_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintPhysicalMemCreateParams(const struct ur_physical_mem_create_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_physical_mem_retain_params_t struct @@ -1840,7 +1841,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintPhysicalMemCreateParams(const struct /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintPhysicalMemRetainParams(const struct ur_physical_mem_retain_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintPhysicalMemRetainParams(const struct ur_physical_mem_retain_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_physical_mem_release_params_t struct @@ -1848,7 +1849,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintPhysicalMemRetainParams(const struct /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintPhysicalMemReleaseParams(const struct ur_physical_mem_release_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintPhysicalMemReleaseParams(const struct ur_physical_mem_release_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_adapter_get_params_t struct @@ -1856,7 +1857,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintPhysicalMemReleaseParams(const struct /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintAdapterGetParams(const struct ur_adapter_get_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintAdapterGetParams(const struct ur_adapter_get_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_adapter_release_params_t struct @@ -1864,7 +1865,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintAdapterGetParams(const struct ur_adap /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintAdapterReleaseParams(const struct ur_adapter_release_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintAdapterReleaseParams(const struct ur_adapter_release_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_adapter_retain_params_t struct @@ -1872,7 +1873,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintAdapterReleaseParams(const struct ur_ /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintAdapterRetainParams(const struct ur_adapter_retain_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintAdapterRetainParams(const struct ur_adapter_retain_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_adapter_get_last_error_params_t struct @@ -1880,7 +1881,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintAdapterRetainParams(const struct ur_a /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintAdapterGetLastErrorParams(const struct ur_adapter_get_last_error_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintAdapterGetLastErrorParams(const struct ur_adapter_get_last_error_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_adapter_get_info_params_t struct @@ -1888,7 +1889,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintAdapterGetLastErrorParams(const struc /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintAdapterGetInfoParams(const struct ur_adapter_get_info_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintAdapterGetInfoParams(const struct ur_adapter_get_info_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_enqueue_kernel_launch_params_t struct @@ -1896,7 +1897,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintAdapterGetInfoParams(const struct ur_ /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueKernelLaunchParams(const struct ur_enqueue_kernel_launch_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueKernelLaunchParams(const struct ur_enqueue_kernel_launch_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_enqueue_events_wait_params_t struct @@ -1904,7 +1905,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueKernelLaunchParams(const struc /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueEventsWaitParams(const struct ur_enqueue_events_wait_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueEventsWaitParams(const struct ur_enqueue_events_wait_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_enqueue_events_wait_with_barrier_params_t struct @@ -1912,7 +1913,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueEventsWaitParams(const struct /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueEventsWaitWithBarrierParams(const struct ur_enqueue_events_wait_with_barrier_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueEventsWaitWithBarrierParams(const struct ur_enqueue_events_wait_with_barrier_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_enqueue_mem_buffer_read_params_t struct @@ -1920,7 +1921,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueEventsWaitWithBarrierParams(co /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueMemBufferReadParams(const struct ur_enqueue_mem_buffer_read_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueMemBufferReadParams(const struct ur_enqueue_mem_buffer_read_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_enqueue_mem_buffer_write_params_t struct @@ -1928,7 +1929,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueMemBufferReadParams(const stru /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueMemBufferWriteParams(const struct ur_enqueue_mem_buffer_write_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueMemBufferWriteParams(const struct ur_enqueue_mem_buffer_write_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_enqueue_mem_buffer_read_rect_params_t struct @@ -1936,7 +1937,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueMemBufferWriteParams(const str /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueMemBufferReadRectParams(const struct ur_enqueue_mem_buffer_read_rect_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueMemBufferReadRectParams(const struct ur_enqueue_mem_buffer_read_rect_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_enqueue_mem_buffer_write_rect_params_t struct @@ -1944,7 +1945,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueMemBufferReadRectParams(const /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueMemBufferWriteRectParams(const struct ur_enqueue_mem_buffer_write_rect_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueMemBufferWriteRectParams(const struct ur_enqueue_mem_buffer_write_rect_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_enqueue_mem_buffer_copy_params_t struct @@ -1952,7 +1953,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueMemBufferWriteRectParams(const /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueMemBufferCopyParams(const struct ur_enqueue_mem_buffer_copy_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueMemBufferCopyParams(const struct ur_enqueue_mem_buffer_copy_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_enqueue_mem_buffer_copy_rect_params_t struct @@ -1960,7 +1961,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueMemBufferCopyParams(const stru /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueMemBufferCopyRectParams(const struct ur_enqueue_mem_buffer_copy_rect_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueMemBufferCopyRectParams(const struct ur_enqueue_mem_buffer_copy_rect_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_enqueue_mem_buffer_fill_params_t struct @@ -1968,7 +1969,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueMemBufferCopyRectParams(const /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueMemBufferFillParams(const struct ur_enqueue_mem_buffer_fill_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueMemBufferFillParams(const struct ur_enqueue_mem_buffer_fill_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_enqueue_mem_image_read_params_t struct @@ -1976,7 +1977,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueMemBufferFillParams(const stru /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueMemImageReadParams(const struct ur_enqueue_mem_image_read_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueMemImageReadParams(const struct ur_enqueue_mem_image_read_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_enqueue_mem_image_write_params_t struct @@ -1984,7 +1985,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueMemImageReadParams(const struc /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueMemImageWriteParams(const struct ur_enqueue_mem_image_write_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueMemImageWriteParams(const struct ur_enqueue_mem_image_write_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_enqueue_mem_image_copy_params_t struct @@ -1992,7 +1993,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueMemImageWriteParams(const stru /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueMemImageCopyParams(const struct ur_enqueue_mem_image_copy_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueMemImageCopyParams(const struct ur_enqueue_mem_image_copy_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_enqueue_mem_buffer_map_params_t struct @@ -2000,7 +2001,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueMemImageCopyParams(const struc /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueMemBufferMapParams(const struct ur_enqueue_mem_buffer_map_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueMemBufferMapParams(const struct ur_enqueue_mem_buffer_map_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_enqueue_mem_unmap_params_t struct @@ -2008,7 +2009,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueMemBufferMapParams(const struc /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueMemUnmapParams(const struct ur_enqueue_mem_unmap_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueMemUnmapParams(const struct ur_enqueue_mem_unmap_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_enqueue_usm_fill_params_t struct @@ -2016,7 +2017,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueMemUnmapParams(const struct ur /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueUsmFillParams(const struct ur_enqueue_usm_fill_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueUsmFillParams(const struct ur_enqueue_usm_fill_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_enqueue_usm_memcpy_params_t struct @@ -2024,7 +2025,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueUsmFillParams(const struct ur_ /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueUsmMemcpyParams(const struct ur_enqueue_usm_memcpy_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueUsmMemcpyParams(const struct ur_enqueue_usm_memcpy_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_enqueue_usm_prefetch_params_t struct @@ -2032,7 +2033,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueUsmMemcpyParams(const struct u /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueUsmPrefetchParams(const struct ur_enqueue_usm_prefetch_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueUsmPrefetchParams(const struct ur_enqueue_usm_prefetch_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_enqueue_usm_advise_params_t struct @@ -2040,7 +2041,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueUsmPrefetchParams(const struct /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueUsmAdviseParams(const struct ur_enqueue_usm_advise_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueUsmAdviseParams(const struct ur_enqueue_usm_advise_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_enqueue_usm_fill_2d_params_t struct @@ -2048,7 +2049,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueUsmAdviseParams(const struct u /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueUsmFill_2dParams(const struct ur_enqueue_usm_fill_2d_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueUsmFill_2dParams(const struct ur_enqueue_usm_fill_2d_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_enqueue_usm_memcpy_2d_params_t struct @@ -2056,7 +2057,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueUsmFill_2dParams(const struct /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueUsmMemcpy_2dParams(const struct ur_enqueue_usm_memcpy_2d_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueUsmMemcpy_2dParams(const struct ur_enqueue_usm_memcpy_2d_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_enqueue_device_global_variable_write_params_t struct @@ -2064,7 +2065,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueUsmMemcpy_2dParams(const struc /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueDeviceGlobalVariableWriteParams(const struct ur_enqueue_device_global_variable_write_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueDeviceGlobalVariableWriteParams(const struct ur_enqueue_device_global_variable_write_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_enqueue_device_global_variable_read_params_t struct @@ -2072,7 +2073,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueDeviceGlobalVariableWriteParam /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueDeviceGlobalVariableReadParams(const struct ur_enqueue_device_global_variable_read_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueDeviceGlobalVariableReadParams(const struct ur_enqueue_device_global_variable_read_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_enqueue_read_host_pipe_params_t struct @@ -2080,7 +2081,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueDeviceGlobalVariableReadParams /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueReadHostPipeParams(const struct ur_enqueue_read_host_pipe_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueReadHostPipeParams(const struct ur_enqueue_read_host_pipe_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_enqueue_write_host_pipe_params_t struct @@ -2088,7 +2089,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueReadHostPipeParams(const struc /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueWriteHostPipeParams(const struct ur_enqueue_write_host_pipe_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueWriteHostPipeParams(const struct ur_enqueue_write_host_pipe_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_enqueue_kernel_launch_custom_exp_params_t struct @@ -2096,7 +2097,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueWriteHostPipeParams(const stru /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueKernelLaunchCustomExpParams(const struct ur_enqueue_kernel_launch_custom_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueKernelLaunchCustomExpParams(const struct ur_enqueue_kernel_launch_custom_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_enqueue_events_wait_with_barrier_ext_params_t struct @@ -2104,7 +2105,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueKernelLaunchCustomExpParams(co /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueEventsWaitWithBarrierExtParams(const struct ur_enqueue_events_wait_with_barrier_ext_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueEventsWaitWithBarrierExtParams(const struct ur_enqueue_events_wait_with_barrier_ext_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_enqueue_cooperative_kernel_launch_exp_params_t struct @@ -2112,7 +2113,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueEventsWaitWithBarrierExtParams /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueCooperativeKernelLaunchExpParams(const struct ur_enqueue_cooperative_kernel_launch_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueCooperativeKernelLaunchExpParams(const struct ur_enqueue_cooperative_kernel_launch_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_enqueue_timestamp_recording_exp_params_t struct @@ -2120,7 +2121,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueCooperativeKernelLaunchExpPara /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueTimestampRecordingExpParams(const struct ur_enqueue_timestamp_recording_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueTimestampRecordingExpParams(const struct ur_enqueue_timestamp_recording_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_enqueue_native_command_exp_params_t struct @@ -2128,7 +2129,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueTimestampRecordingExpParams(co /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueNativeCommandExpParams(const struct ur_enqueue_native_command_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueNativeCommandExpParams(const struct ur_enqueue_native_command_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_bindless_images_unsampled_image_handle_destroy_exp_params_t struct @@ -2136,7 +2137,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueNativeCommandExpParams(const s /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesUnsampledImageHandleDestroyExpParams(const struct ur_bindless_images_unsampled_image_handle_destroy_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesUnsampledImageHandleDestroyExpParams(const struct ur_bindless_images_unsampled_image_handle_destroy_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_bindless_images_sampled_image_handle_destroy_exp_params_t struct @@ -2144,7 +2145,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesUnsampledImageHandleDes /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesSampledImageHandleDestroyExpParams(const struct ur_bindless_images_sampled_image_handle_destroy_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesSampledImageHandleDestroyExpParams(const struct ur_bindless_images_sampled_image_handle_destroy_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_bindless_images_image_allocate_exp_params_t struct @@ -2152,7 +2153,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesSampledImageHandleDestr /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesImageAllocateExpParams(const struct ur_bindless_images_image_allocate_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesImageAllocateExpParams(const struct ur_bindless_images_image_allocate_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_bindless_images_image_free_exp_params_t struct @@ -2160,7 +2161,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesImageAllocateExpParams( /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesImageFreeExpParams(const struct ur_bindless_images_image_free_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesImageFreeExpParams(const struct ur_bindless_images_image_free_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_bindless_images_unsampled_image_create_exp_params_t struct @@ -2168,7 +2169,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesImageFreeExpParams(cons /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesUnsampledImageCreateExpParams(const struct ur_bindless_images_unsampled_image_create_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesUnsampledImageCreateExpParams(const struct ur_bindless_images_unsampled_image_create_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_bindless_images_sampled_image_create_exp_params_t struct @@ -2176,7 +2177,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesUnsampledImageCreateExp /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesSampledImageCreateExpParams(const struct ur_bindless_images_sampled_image_create_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesSampledImageCreateExpParams(const struct ur_bindless_images_sampled_image_create_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_bindless_images_image_copy_exp_params_t struct @@ -2184,7 +2185,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesSampledImageCreateExpPa /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesImageCopyExpParams(const struct ur_bindless_images_image_copy_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesImageCopyExpParams(const struct ur_bindless_images_image_copy_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_bindless_images_image_get_info_exp_params_t struct @@ -2192,7 +2193,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesImageCopyExpParams(cons /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesImageGetInfoExpParams(const struct ur_bindless_images_image_get_info_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesImageGetInfoExpParams(const struct ur_bindless_images_image_get_info_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_bindless_images_mipmap_get_level_exp_params_t struct @@ -2200,7 +2201,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesImageGetInfoExpParams(c /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesMipmapGetLevelExpParams(const struct ur_bindless_images_mipmap_get_level_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesMipmapGetLevelExpParams(const struct ur_bindless_images_mipmap_get_level_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_bindless_images_mipmap_free_exp_params_t struct @@ -2208,7 +2209,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesMipmapGetLevelExpParams /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesMipmapFreeExpParams(const struct ur_bindless_images_mipmap_free_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesMipmapFreeExpParams(const struct ur_bindless_images_mipmap_free_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_bindless_images_import_external_memory_exp_params_t struct @@ -2216,7 +2217,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesMipmapFreeExpParams(con /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesImportExternalMemoryExpParams(const struct ur_bindless_images_import_external_memory_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesImportExternalMemoryExpParams(const struct ur_bindless_images_import_external_memory_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_bindless_images_map_external_array_exp_params_t struct @@ -2224,7 +2225,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesImportExternalMemoryExp /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesMapExternalArrayExpParams(const struct ur_bindless_images_map_external_array_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesMapExternalArrayExpParams(const struct ur_bindless_images_map_external_array_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_bindless_images_map_external_linear_memory_exp_params_t struct @@ -2232,7 +2233,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesMapExternalArrayExpPara /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesMapExternalLinearMemoryExpParams(const struct ur_bindless_images_map_external_linear_memory_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesMapExternalLinearMemoryExpParams(const struct ur_bindless_images_map_external_linear_memory_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_bindless_images_release_external_memory_exp_params_t struct @@ -2240,7 +2241,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesMapExternalLinearMemory /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesReleaseExternalMemoryExpParams(const struct ur_bindless_images_release_external_memory_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesReleaseExternalMemoryExpParams(const struct ur_bindless_images_release_external_memory_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_bindless_images_import_external_semaphore_exp_params_t struct @@ -2248,7 +2249,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesReleaseExternalMemoryEx /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesImportExternalSemaphoreExpParams(const struct ur_bindless_images_import_external_semaphore_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesImportExternalSemaphoreExpParams(const struct ur_bindless_images_import_external_semaphore_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_bindless_images_release_external_semaphore_exp_params_t struct @@ -2256,7 +2257,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesImportExternalSemaphore /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesReleaseExternalSemaphoreExpParams(const struct ur_bindless_images_release_external_semaphore_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesReleaseExternalSemaphoreExpParams(const struct ur_bindless_images_release_external_semaphore_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_bindless_images_wait_external_semaphore_exp_params_t struct @@ -2264,7 +2265,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesReleaseExternalSemaphor /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesWaitExternalSemaphoreExpParams(const struct ur_bindless_images_wait_external_semaphore_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesWaitExternalSemaphoreExpParams(const struct ur_bindless_images_wait_external_semaphore_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_bindless_images_signal_external_semaphore_exp_params_t struct @@ -2272,7 +2273,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesWaitExternalSemaphoreEx /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesSignalExternalSemaphoreExpParams(const struct ur_bindless_images_signal_external_semaphore_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesSignalExternalSemaphoreExpParams(const struct ur_bindless_images_signal_external_semaphore_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_usm_host_alloc_params_t struct @@ -2280,7 +2281,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintBindlessImagesSignalExternalSemaphore /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmHostAllocParams(const struct ur_usm_host_alloc_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmHostAllocParams(const struct ur_usm_host_alloc_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_usm_device_alloc_params_t struct @@ -2288,7 +2289,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmHostAllocParams(const struct ur_us /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmDeviceAllocParams(const struct ur_usm_device_alloc_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmDeviceAllocParams(const struct ur_usm_device_alloc_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_usm_shared_alloc_params_t struct @@ -2296,7 +2297,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmDeviceAllocParams(const struct ur_ /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmSharedAllocParams(const struct ur_usm_shared_alloc_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmSharedAllocParams(const struct ur_usm_shared_alloc_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_usm_free_params_t struct @@ -2304,7 +2305,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmSharedAllocParams(const struct ur_ /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmFreeParams(const struct ur_usm_free_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmFreeParams(const struct ur_usm_free_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_usm_get_mem_alloc_info_params_t struct @@ -2312,7 +2313,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmFreeParams(const struct ur_usm_fre /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmGetMemAllocInfoParams(const struct ur_usm_get_mem_alloc_info_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmGetMemAllocInfoParams(const struct ur_usm_get_mem_alloc_info_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_usm_pool_create_params_t struct @@ -2320,7 +2321,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmGetMemAllocInfoParams(const struct /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmPoolCreateParams(const struct ur_usm_pool_create_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmPoolCreateParams(const struct ur_usm_pool_create_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_usm_pool_retain_params_t struct @@ -2328,7 +2329,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmPoolCreateParams(const struct ur_u /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmPoolRetainParams(const struct ur_usm_pool_retain_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmPoolRetainParams(const struct ur_usm_pool_retain_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_usm_pool_release_params_t struct @@ -2336,7 +2337,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmPoolRetainParams(const struct ur_u /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmPoolReleaseParams(const struct ur_usm_pool_release_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmPoolReleaseParams(const struct ur_usm_pool_release_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_usm_pool_get_info_params_t struct @@ -2344,7 +2345,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmPoolReleaseParams(const struct ur_ /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmPoolGetInfoParams(const struct ur_usm_pool_get_info_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmPoolGetInfoParams(const struct ur_usm_pool_get_info_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_usm_pitched_alloc_exp_params_t struct @@ -2352,7 +2353,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmPoolGetInfoParams(const struct ur_ /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmPitchedAllocExpParams(const struct ur_usm_pitched_alloc_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmPitchedAllocExpParams(const struct ur_usm_pitched_alloc_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_usm_import_exp_params_t struct @@ -2360,7 +2361,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmPitchedAllocExpParams(const struct /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmImportExpParams(const struct ur_usm_import_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmImportExpParams(const struct ur_usm_import_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_usm_release_exp_params_t struct @@ -2368,7 +2369,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmImportExpParams(const struct ur_us /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmReleaseExpParams(const struct ur_usm_release_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmReleaseExpParams(const struct ur_usm_release_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_command_buffer_create_exp_params_t struct @@ -2376,7 +2377,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmReleaseExpParams(const struct ur_u /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferCreateExpParams(const struct ur_command_buffer_create_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferCreateExpParams(const struct ur_command_buffer_create_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_command_buffer_retain_exp_params_t struct @@ -2384,7 +2385,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferCreateExpParams(const st /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferRetainExpParams(const struct ur_command_buffer_retain_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferRetainExpParams(const struct ur_command_buffer_retain_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_command_buffer_release_exp_params_t struct @@ -2392,7 +2393,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferRetainExpParams(const st /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferReleaseExpParams(const struct ur_command_buffer_release_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferReleaseExpParams(const struct ur_command_buffer_release_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_command_buffer_finalize_exp_params_t struct @@ -2400,7 +2401,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferReleaseExpParams(const s /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferFinalizeExpParams(const struct ur_command_buffer_finalize_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferFinalizeExpParams(const struct ur_command_buffer_finalize_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_command_buffer_append_kernel_launch_exp_params_t struct @@ -2408,7 +2409,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferFinalizeExpParams(const /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferAppendKernelLaunchExpParams(const struct ur_command_buffer_append_kernel_launch_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferAppendKernelLaunchExpParams(const struct ur_command_buffer_append_kernel_launch_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_command_buffer_append_usm_memcpy_exp_params_t struct @@ -2416,7 +2417,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferAppendKernelLaunchExpPar /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferAppendUsmMemcpyExpParams(const struct ur_command_buffer_append_usm_memcpy_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferAppendUsmMemcpyExpParams(const struct ur_command_buffer_append_usm_memcpy_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_command_buffer_append_usm_fill_exp_params_t struct @@ -2424,7 +2425,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferAppendUsmMemcpyExpParams /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferAppendUsmFillExpParams(const struct ur_command_buffer_append_usm_fill_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferAppendUsmFillExpParams(const struct ur_command_buffer_append_usm_fill_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_command_buffer_append_mem_buffer_copy_exp_params_t struct @@ -2432,7 +2433,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferAppendUsmFillExpParams(c /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferAppendMemBufferCopyExpParams(const struct ur_command_buffer_append_mem_buffer_copy_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferAppendMemBufferCopyExpParams(const struct ur_command_buffer_append_mem_buffer_copy_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_command_buffer_append_mem_buffer_write_exp_params_t struct @@ -2440,7 +2441,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferAppendMemBufferCopyExpPa /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferAppendMemBufferWriteExpParams(const struct ur_command_buffer_append_mem_buffer_write_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferAppendMemBufferWriteExpParams(const struct ur_command_buffer_append_mem_buffer_write_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_command_buffer_append_mem_buffer_read_exp_params_t struct @@ -2448,7 +2449,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferAppendMemBufferWriteExpP /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferAppendMemBufferReadExpParams(const struct ur_command_buffer_append_mem_buffer_read_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferAppendMemBufferReadExpParams(const struct ur_command_buffer_append_mem_buffer_read_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_command_buffer_append_mem_buffer_copy_rect_exp_params_t struct @@ -2456,7 +2457,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferAppendMemBufferReadExpPa /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferAppendMemBufferCopyRectExpParams(const struct ur_command_buffer_append_mem_buffer_copy_rect_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferAppendMemBufferCopyRectExpParams(const struct ur_command_buffer_append_mem_buffer_copy_rect_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_command_buffer_append_mem_buffer_write_rect_exp_params_t struct @@ -2464,7 +2465,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferAppendMemBufferCopyRectE /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferAppendMemBufferWriteRectExpParams(const struct ur_command_buffer_append_mem_buffer_write_rect_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferAppendMemBufferWriteRectExpParams(const struct ur_command_buffer_append_mem_buffer_write_rect_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_command_buffer_append_mem_buffer_read_rect_exp_params_t struct @@ -2472,7 +2473,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferAppendMemBufferWriteRect /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferAppendMemBufferReadRectExpParams(const struct ur_command_buffer_append_mem_buffer_read_rect_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferAppendMemBufferReadRectExpParams(const struct ur_command_buffer_append_mem_buffer_read_rect_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_command_buffer_append_mem_buffer_fill_exp_params_t struct @@ -2480,7 +2481,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferAppendMemBufferReadRectE /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferAppendMemBufferFillExpParams(const struct ur_command_buffer_append_mem_buffer_fill_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferAppendMemBufferFillExpParams(const struct ur_command_buffer_append_mem_buffer_fill_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_command_buffer_append_usm_prefetch_exp_params_t struct @@ -2488,7 +2489,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferAppendMemBufferFillExpPa /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferAppendUsmPrefetchExpParams(const struct ur_command_buffer_append_usm_prefetch_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferAppendUsmPrefetchExpParams(const struct ur_command_buffer_append_usm_prefetch_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_command_buffer_append_usm_advise_exp_params_t struct @@ -2496,7 +2497,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferAppendUsmPrefetchExpPara /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferAppendUsmAdviseExpParams(const struct ur_command_buffer_append_usm_advise_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferAppendUsmAdviseExpParams(const struct ur_command_buffer_append_usm_advise_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_command_buffer_enqueue_exp_params_t struct @@ -2504,7 +2505,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferAppendUsmAdviseExpParams /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferEnqueueExpParams(const struct ur_command_buffer_enqueue_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferEnqueueExpParams(const struct ur_command_buffer_enqueue_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_command_buffer_retain_command_exp_params_t struct @@ -2512,7 +2513,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferEnqueueExpParams(const s /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferRetainCommandExpParams(const struct ur_command_buffer_retain_command_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferRetainCommandExpParams(const struct ur_command_buffer_retain_command_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_command_buffer_release_command_exp_params_t struct @@ -2520,7 +2521,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferRetainCommandExpParams(c /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferReleaseCommandExpParams(const struct ur_command_buffer_release_command_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferReleaseCommandExpParams(const struct ur_command_buffer_release_command_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_command_buffer_update_kernel_launch_exp_params_t struct @@ -2528,7 +2529,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferReleaseCommandExpParams( /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferUpdateKernelLaunchExpParams(const struct ur_command_buffer_update_kernel_launch_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferUpdateKernelLaunchExpParams(const struct ur_command_buffer_update_kernel_launch_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_command_buffer_update_signal_event_exp_params_t struct @@ -2536,7 +2537,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferUpdateKernelLaunchExpPar /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferUpdateSignalEventExpParams(const struct ur_command_buffer_update_signal_event_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferUpdateSignalEventExpParams(const struct ur_command_buffer_update_signal_event_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_command_buffer_update_wait_events_exp_params_t struct @@ -2544,7 +2545,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferUpdateSignalEventExpPara /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferUpdateWaitEventsExpParams(const struct ur_command_buffer_update_wait_events_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferUpdateWaitEventsExpParams(const struct ur_command_buffer_update_wait_events_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_command_buffer_get_info_exp_params_t struct @@ -2552,7 +2553,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferUpdateWaitEventsExpParam /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferGetInfoExpParams(const struct ur_command_buffer_get_info_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferGetInfoExpParams(const struct ur_command_buffer_get_info_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_command_buffer_command_get_info_exp_params_t struct @@ -2560,7 +2561,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferGetInfoExpParams(const s /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferCommandGetInfoExpParams(const struct ur_command_buffer_command_get_info_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferCommandGetInfoExpParams(const struct ur_command_buffer_command_get_info_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_tensor_map_encode_im_2_col_exp_params_t struct @@ -2568,7 +2569,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferCommandGetInfoExpParams( /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintTensorMapEncodeIm_2ColExpParams(const struct ur_tensor_map_encode_im_2_col_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintTensorMapEncodeIm_2ColExpParams(const struct ur_tensor_map_encode_im_2_col_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_tensor_map_encode_tiled_exp_params_t struct @@ -2576,7 +2577,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintTensorMapEncodeIm_2ColExpParams(const /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintTensorMapEncodeTiledExpParams(const struct ur_tensor_map_encode_tiled_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintTensorMapEncodeTiledExpParams(const struct ur_tensor_map_encode_tiled_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_usm_p2p_enable_peer_access_exp_params_t struct @@ -2584,7 +2585,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintTensorMapEncodeTiledExpParams(const s /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmP2pEnablePeerAccessExpParams(const struct ur_usm_p2p_enable_peer_access_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmP2pEnablePeerAccessExpParams(const struct ur_usm_p2p_enable_peer_access_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_usm_p2p_disable_peer_access_exp_params_t struct @@ -2592,7 +2593,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmP2pEnablePeerAccessExpParams(const /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmP2pDisablePeerAccessExpParams(const struct ur_usm_p2p_disable_peer_access_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmP2pDisablePeerAccessExpParams(const struct ur_usm_p2p_disable_peer_access_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_usm_p2p_peer_access_get_info_exp_params_t struct @@ -2600,7 +2601,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmP2pDisablePeerAccessExpParams(cons /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmP2pPeerAccessGetInfoExpParams(const struct ur_usm_p2p_peer_access_get_info_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmP2pPeerAccessGetInfoExpParams(const struct ur_usm_p2p_peer_access_get_info_exp_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_loader_init_params_t struct @@ -2608,7 +2609,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmP2pPeerAccessGetInfoExpParams(cons /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintLoaderInitParams(const struct ur_loader_init_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintLoaderInitParams(const struct ur_loader_init_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_loader_tear_down_params_t struct @@ -2616,7 +2617,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintLoaderInitParams(const struct ur_load /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintLoaderTearDownParams(const struct ur_loader_tear_down_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintLoaderTearDownParams(const struct ur_loader_tear_down_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_virtual_mem_granularity_get_info_params_t struct @@ -2624,7 +2625,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintLoaderTearDownParams(const struct ur_ /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintVirtualMemGranularityGetInfoParams(const struct ur_virtual_mem_granularity_get_info_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintVirtualMemGranularityGetInfoParams(const struct ur_virtual_mem_granularity_get_info_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_virtual_mem_reserve_params_t struct @@ -2632,7 +2633,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintVirtualMemGranularityGetInfoParams(co /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintVirtualMemReserveParams(const struct ur_virtual_mem_reserve_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintVirtualMemReserveParams(const struct ur_virtual_mem_reserve_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_virtual_mem_free_params_t struct @@ -2640,7 +2641,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintVirtualMemReserveParams(const struct /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintVirtualMemFreeParams(const struct ur_virtual_mem_free_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintVirtualMemFreeParams(const struct ur_virtual_mem_free_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_virtual_mem_map_params_t struct @@ -2648,7 +2649,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintVirtualMemFreeParams(const struct ur_ /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintVirtualMemMapParams(const struct ur_virtual_mem_map_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintVirtualMemMapParams(const struct ur_virtual_mem_map_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_virtual_mem_unmap_params_t struct @@ -2656,7 +2657,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintVirtualMemMapParams(const struct ur_v /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintVirtualMemUnmapParams(const struct ur_virtual_mem_unmap_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintVirtualMemUnmapParams(const struct ur_virtual_mem_unmap_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_virtual_mem_set_access_params_t struct @@ -2664,7 +2665,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintVirtualMemUnmapParams(const struct ur /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintVirtualMemSetAccessParams(const struct ur_virtual_mem_set_access_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintVirtualMemSetAccessParams(const struct ur_virtual_mem_set_access_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_virtual_mem_get_info_params_t struct @@ -2672,7 +2673,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintVirtualMemSetAccessParams(const struc /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintVirtualMemGetInfoParams(const struct ur_virtual_mem_get_info_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintVirtualMemGetInfoParams(const struct ur_virtual_mem_get_info_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_device_get_params_t struct @@ -2680,7 +2681,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintVirtualMemGetInfoParams(const struct /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceGetParams(const struct ur_device_get_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceGetParams(const struct ur_device_get_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_device_get_selected_params_t struct @@ -2688,7 +2689,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceGetParams(const struct ur_devic /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceGetSelectedParams(const struct ur_device_get_selected_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceGetSelectedParams(const struct ur_device_get_selected_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_device_get_info_params_t struct @@ -2696,7 +2697,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceGetSelectedParams(const struct /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceGetInfoParams(const struct ur_device_get_info_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceGetInfoParams(const struct ur_device_get_info_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_device_retain_params_t struct @@ -2704,7 +2705,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceGetInfoParams(const struct ur_d /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceRetainParams(const struct ur_device_retain_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceRetainParams(const struct ur_device_retain_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_device_release_params_t struct @@ -2712,7 +2713,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceRetainParams(const struct ur_de /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceReleaseParams(const struct ur_device_release_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceReleaseParams(const struct ur_device_release_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_device_partition_params_t struct @@ -2720,7 +2721,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceReleaseParams(const struct ur_d /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintDevicePartitionParams(const struct ur_device_partition_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintDevicePartitionParams(const struct ur_device_partition_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_device_select_binary_params_t struct @@ -2728,7 +2729,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintDevicePartitionParams(const struct ur /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceSelectBinaryParams(const struct ur_device_select_binary_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceSelectBinaryParams(const struct ur_device_select_binary_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_device_get_native_handle_params_t struct @@ -2736,7 +2737,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceSelectBinaryParams(const struct /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceGetNativeHandleParams(const struct ur_device_get_native_handle_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceGetNativeHandleParams(const struct ur_device_get_native_handle_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_device_create_with_native_handle_params_t struct @@ -2744,7 +2745,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceGetNativeHandleParams(const str /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceCreateWithNativeHandleParams(const struct ur_device_create_with_native_handle_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceCreateWithNativeHandleParams(const struct ur_device_create_with_native_handle_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_device_get_global_timestamps_params_t struct @@ -2752,7 +2753,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceCreateWithNativeHandleParams(co /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_INVALID_SIZE /// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceGetGlobalTimestampsParams(const struct ur_device_get_global_timestamps_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +UR_APIEXPORT ur_result_t UR_APICALL urPrintDeviceGetGlobalTimestampsParams(const struct ur_device_get_global_timestamps_params_t * params, char * buffer, const size_t buff_size, size_t * out_size); + /////////////////////////////////////////////////////////////////////////////// /// @brief Print function parameters diff --git a/include/ur_print.hpp b/include/ur_print.hpp index 8284731dc1..c4c80ce1e4 100644 --- a/include/ur_print.hpp +++ b/include/ur_print.hpp @@ -14,19331 +14,26010 @@ #define UR_PRINT_HPP 1 #include "ur_api.h" -#include -#include - -namespace ur::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 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 ur_result_t printStruct(std::ostream &os, const void *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, ur_loader_config_info_t value, size_t size); - -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_adapter_info_t value, size_t size); - -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_platform_info_t value, size_t size); - -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_device_info_t value, size_t size); - -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - -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 ur_result_t printFlag(std::ostream &os, uint32_t flag); - -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_context_info_t value, size_t size); - -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_mem_info_t value, size_t size); - -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_image_info_t value, size_t size); - -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_sampler_info_t value, size_t size); - -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_usm_alloc_info_t value, size_t size); - -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_usm_pool_info_t value, size_t size); - -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_virtual_mem_granularity_info_t value, size_t size); - -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_virtual_mem_info_t value, size_t size); - -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - -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 ur_result_t printTagged(std::ostream &os, const void *ptr, ur_program_info_t value, size_t size); - -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_program_build_info_t value, size_t size); - -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_kernel_info_t value, size_t size); - -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_kernel_group_info_t value, size_t size); - -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_kernel_sub_group_info_t value, size_t size); - -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_kernel_exec_info_t value, size_t size); - -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_queue_info_t value, size_t size); - -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_event_info_t value, size_t size); - -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_profiling_info_t value, size_t size); - -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag); -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_exp_command_buffer_info_t value, size_t size); - -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_exp_command_buffer_command_info_t value, size_t size); - -inline ur_result_t printUnion( - std::ostream &os, - const union ur_exp_launch_property_value_t params, - const enum ur_exp_launch_property_id_t tag); - -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_exp_peer_info_t value, size_t size); - -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - -} // namespace ur::details - -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_alloc_location_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_device_2d_block_array_capability_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, enum ur_exp_sampler_cubemap_filter_mode_t value); -inline std::ostream &operator<<(std::ostream &os, enum ur_exp_external_mem_type_t value); -inline std::ostream &operator<<(std::ostream &os, enum ur_exp_external_semaphore_type_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_sampler_cubemap_properties_t params); -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_external_mem_desc_t params); -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_external_semaphore_desc_t params); -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_image_copy_region_t params); -inline std::ostream &operator<<(std::ostream &os, enum ur_device_command_buffer_update_capability_flag_t value); -inline std::ostream &operator<<(std::ostream &os, enum ur_exp_command_buffer_info_t value); -inline std::ostream &operator<<(std::ostream &os, enum ur_exp_command_buffer_command_info_t value); -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, [[maybe_unused]] const struct ur_exp_command_buffer_update_memobj_arg_desc_t params); -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_command_buffer_update_pointer_arg_desc_t params); -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_command_buffer_update_value_arg_desc_t params); -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_command_buffer_update_kernel_launch_desc_t params); -inline std::ostream &operator<<(std::ostream &os, enum ur_exp_launch_property_id_t value); -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_launch_property_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_exp_enqueue_ext_flag_t value); -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_enqueue_ext_properties_t params); -inline std::ostream &operator<<(std::ostream &os, enum ur_exp_enqueue_native_command_flag_t value); -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_enqueue_native_command_properties_t params); -inline std::ostream &operator<<(std::ostream &os, enum ur_exp_tensor_map_data_type_flag_t value); -inline std::ostream &operator<<(std::ostream &os, enum ur_exp_tensor_map_interleave_flag_t value); -inline std::ostream &operator<<(std::ostream &os, enum ur_exp_tensor_map_l2_promotion_flag_t value); -inline std::ostream &operator<<(std::ostream &os, enum ur_exp_tensor_map_swizzle_flag_t value); -inline std::ostream &operator<<(std::ostream &os, enum ur_exp_tensor_map_oob_fill_flag_t value); - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_function_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum 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_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_MAP_EXTERNAL_ARRAY_EXP: - os << "UR_FUNCTION_BINDLESS_IMAGES_MAP_EXTERNAL_ARRAY_EXP"; - break; - case UR_FUNCTION_BINDLESS_IMAGES_RELEASE_EXTERNAL_SEMAPHORE_EXP: - os << "UR_FUNCTION_BINDLESS_IMAGES_RELEASE_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_PROGRAM_BUILD_EXP: - os << "UR_FUNCTION_PROGRAM_BUILD_EXP"; - break; - case UR_FUNCTION_PROGRAM_COMPILE_EXP: - os << "UR_FUNCTION_PROGRAM_COMPILE_EXP"; - break; - case UR_FUNCTION_PROGRAM_LINK_EXP: - os << "UR_FUNCTION_PROGRAM_LINK_EXP"; - break; - case UR_FUNCTION_LOADER_CONFIG_SET_CODE_LOCATION_CALLBACK: - os << "UR_FUNCTION_LOADER_CONFIG_SET_CODE_LOCATION_CALLBACK"; - 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_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_PROGRAM_GET_GLOBAL_VARIABLE_POINTER: - os << "UR_FUNCTION_PROGRAM_GET_GLOBAL_VARIABLE_POINTER"; - break; - case UR_FUNCTION_DEVICE_GET_SELECTED: - os << "UR_FUNCTION_DEVICE_GET_SELECTED"; - break; - case UR_FUNCTION_COMMAND_BUFFER_RETAIN_COMMAND_EXP: - os << "UR_FUNCTION_COMMAND_BUFFER_RETAIN_COMMAND_EXP"; - break; - case UR_FUNCTION_COMMAND_BUFFER_RELEASE_COMMAND_EXP: - os << "UR_FUNCTION_COMMAND_BUFFER_RELEASE_COMMAND_EXP"; - break; - case UR_FUNCTION_COMMAND_BUFFER_UPDATE_KERNEL_LAUNCH_EXP: - os << "UR_FUNCTION_COMMAND_BUFFER_UPDATE_KERNEL_LAUNCH_EXP"; - break; - case UR_FUNCTION_COMMAND_BUFFER_GET_INFO_EXP: - os << "UR_FUNCTION_COMMAND_BUFFER_GET_INFO_EXP"; - break; - case UR_FUNCTION_COMMAND_BUFFER_COMMAND_GET_INFO_EXP: - os << "UR_FUNCTION_COMMAND_BUFFER_COMMAND_GET_INFO_EXP"; - break; - case UR_FUNCTION_ENQUEUE_TIMESTAMP_RECORDING_EXP: - os << "UR_FUNCTION_ENQUEUE_TIMESTAMP_RECORDING_EXP"; - break; - case UR_FUNCTION_ENQUEUE_KERNEL_LAUNCH_CUSTOM_EXP: - os << "UR_FUNCTION_ENQUEUE_KERNEL_LAUNCH_CUSTOM_EXP"; - break; - case UR_FUNCTION_KERNEL_GET_SUGGESTED_LOCAL_WORK_SIZE: - os << "UR_FUNCTION_KERNEL_GET_SUGGESTED_LOCAL_WORK_SIZE"; - break; - case UR_FUNCTION_BINDLESS_IMAGES_IMPORT_EXTERNAL_MEMORY_EXP: - os << "UR_FUNCTION_BINDLESS_IMAGES_IMPORT_EXTERNAL_MEMORY_EXP"; - break; - case UR_FUNCTION_BINDLESS_IMAGES_IMPORT_EXTERNAL_SEMAPHORE_EXP: - os << "UR_FUNCTION_BINDLESS_IMAGES_IMPORT_EXTERNAL_SEMAPHORE_EXP"; - break; - case UR_FUNCTION_ENQUEUE_NATIVE_COMMAND_EXP: - os << "UR_FUNCTION_ENQUEUE_NATIVE_COMMAND_EXP"; - break; - case UR_FUNCTION_LOADER_CONFIG_SET_MOCKING_ENABLED: - os << "UR_FUNCTION_LOADER_CONFIG_SET_MOCKING_ENABLED"; - break; - case UR_FUNCTION_BINDLESS_IMAGES_RELEASE_EXTERNAL_MEMORY_EXP: - os << "UR_FUNCTION_BINDLESS_IMAGES_RELEASE_EXTERNAL_MEMORY_EXP"; - 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_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_COMMAND_BUFFER_ENQUEUE_EXP: - os << "UR_FUNCTION_COMMAND_BUFFER_ENQUEUE_EXP"; - break; - case UR_FUNCTION_COMMAND_BUFFER_UPDATE_SIGNAL_EVENT_EXP: - os << "UR_FUNCTION_COMMAND_BUFFER_UPDATE_SIGNAL_EVENT_EXP"; - break; - case UR_FUNCTION_COMMAND_BUFFER_UPDATE_WAIT_EVENTS_EXP: - os << "UR_FUNCTION_COMMAND_BUFFER_UPDATE_WAIT_EVENTS_EXP"; - break; - case UR_FUNCTION_BINDLESS_IMAGES_MAP_EXTERNAL_LINEAR_MEMORY_EXP: - os << "UR_FUNCTION_BINDLESS_IMAGES_MAP_EXTERNAL_LINEAR_MEMORY_EXP"; - break; - case UR_FUNCTION_ENQUEUE_EVENTS_WAIT_WITH_BARRIER_EXT: - os << "UR_FUNCTION_ENQUEUE_EVENTS_WAIT_WITH_BARRIER_EXT"; - break; - case UR_FUNCTION_TENSOR_MAP_ENCODE_IM_2_COL_EXP: - os << "UR_FUNCTION_TENSOR_MAP_ENCODE_IM_2_COL_EXP"; - break; - case UR_FUNCTION_TENSOR_MAP_ENCODE_TILED_EXP: - os << "UR_FUNCTION_TENSOR_MAP_ENCODE_TILED_EXP"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_structure_type_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_structure_type_t value) { - switch (value) { - case UR_STRUCTURE_TYPE_CONTEXT_PROPERTIES: - os << "UR_STRUCTURE_TYPE_CONTEXT_PROPERTIES"; - 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_USM_ALLOC_LOCATION_DESC: - os << "UR_STRUCTURE_TYPE_USM_ALLOC_LOCATION_DESC"; - break; - case UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_DESC: - os << "UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_DESC"; - break; - case UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_KERNEL_LAUNCH_DESC: - os << "UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_KERNEL_LAUNCH_DESC"; - break; - case UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_MEMOBJ_ARG_DESC: - os << "UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_MEMOBJ_ARG_DESC"; - break; - case UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_POINTER_ARG_DESC: - os << "UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_POINTER_ARG_DESC"; - break; - case UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_VALUE_ARG_DESC: - os << "UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_VALUE_ARG_DESC"; - break; - case UR_STRUCTURE_TYPE_EXP_SAMPLER_MIP_PROPERTIES: - os << "UR_STRUCTURE_TYPE_EXP_SAMPLER_MIP_PROPERTIES"; - break; - case UR_STRUCTURE_TYPE_EXP_EXTERNAL_MEM_DESC: - os << "UR_STRUCTURE_TYPE_EXP_EXTERNAL_MEM_DESC"; - break; - case UR_STRUCTURE_TYPE_EXP_EXTERNAL_SEMAPHORE_DESC: - os << "UR_STRUCTURE_TYPE_EXP_EXTERNAL_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_SAMPLER_ADDR_MODES: - os << "UR_STRUCTURE_TYPE_EXP_SAMPLER_ADDR_MODES"; - break; - case UR_STRUCTURE_TYPE_EXP_SAMPLER_CUBEMAP_PROPERTIES: - os << "UR_STRUCTURE_TYPE_EXP_SAMPLER_CUBEMAP_PROPERTIES"; - break; - case UR_STRUCTURE_TYPE_EXP_IMAGE_COPY_REGION: - os << "UR_STRUCTURE_TYPE_EXP_IMAGE_COPY_REGION"; - break; - case UR_STRUCTURE_TYPE_EXP_ENQUEUE_NATIVE_COMMAND_PROPERTIES: - os << "UR_STRUCTURE_TYPE_EXP_ENQUEUE_NATIVE_COMMAND_PROPERTIES"; - break; - case UR_STRUCTURE_TYPE_EXP_ENQUEUE_EXT_PROPERTIES: - os << "UR_STRUCTURE_TYPE_EXP_ENQUEUE_EXT_PROPERTIES"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_structure_type_t struct -inline ur_result_t printStruct(std::ostream &os, const void *ptr) { - if (ptr == NULL) { - return printPtr(os, 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; - printPtr(os, pstruct); - } break; - - case UR_STRUCTURE_TYPE_IMAGE_DESC: { - const ur_image_desc_t *pstruct = (const ur_image_desc_t *)ptr; - printPtr(os, pstruct); - } break; - - case UR_STRUCTURE_TYPE_BUFFER_PROPERTIES: { - const ur_buffer_properties_t *pstruct = (const ur_buffer_properties_t *)ptr; - printPtr(os, pstruct); - } break; - - case UR_STRUCTURE_TYPE_BUFFER_REGION: { - const ur_buffer_region_t *pstruct = (const ur_buffer_region_t *)ptr; - 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; - 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; - printPtr(os, pstruct); - } break; - - case UR_STRUCTURE_TYPE_PROGRAM_PROPERTIES: { - const ur_program_properties_t *pstruct = (const ur_program_properties_t *)ptr; - printPtr(os, pstruct); - } break; - - case UR_STRUCTURE_TYPE_USM_DESC: { - const ur_usm_desc_t *pstruct = (const ur_usm_desc_t *)ptr; - 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; - 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; - 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; - 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; - printPtr(os, pstruct); - } break; - - case UR_STRUCTURE_TYPE_DEVICE_BINARY: { - const ur_device_binary_t *pstruct = (const ur_device_binary_t *)ptr; - printPtr(os, pstruct); - } break; - - case UR_STRUCTURE_TYPE_SAMPLER_DESC: { - const ur_sampler_desc_t *pstruct = (const ur_sampler_desc_t *)ptr; - printPtr(os, pstruct); - } break; - - case UR_STRUCTURE_TYPE_QUEUE_PROPERTIES: { - 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; - 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; - 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; - 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; - 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; - 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; - 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; - 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; - 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; - 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; - 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; - 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; - 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; - 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; - 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; - 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; - 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; - 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; - 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; - printPtr(os, pstruct); - } break; - - case UR_STRUCTURE_TYPE_USM_ALLOC_LOCATION_DESC: { - const ur_usm_alloc_location_desc_t *pstruct = (const ur_usm_alloc_location_desc_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; - printPtr(os, pstruct); - } break; - - case UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_KERNEL_LAUNCH_DESC: { - const ur_exp_command_buffer_update_kernel_launch_desc_t *pstruct = (const ur_exp_command_buffer_update_kernel_launch_desc_t *)ptr; - printPtr(os, pstruct); - } break; - - case UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_MEMOBJ_ARG_DESC: { - const ur_exp_command_buffer_update_memobj_arg_desc_t *pstruct = (const ur_exp_command_buffer_update_memobj_arg_desc_t *)ptr; - printPtr(os, pstruct); - } break; - - case UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_POINTER_ARG_DESC: { - const ur_exp_command_buffer_update_pointer_arg_desc_t *pstruct = (const ur_exp_command_buffer_update_pointer_arg_desc_t *)ptr; - printPtr(os, pstruct); - } break; - - case UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_VALUE_ARG_DESC: { - const ur_exp_command_buffer_update_value_arg_desc_t *pstruct = (const ur_exp_command_buffer_update_value_arg_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; - printPtr(os, pstruct); - } break; - - case UR_STRUCTURE_TYPE_EXP_EXTERNAL_MEM_DESC: { - const ur_exp_external_mem_desc_t *pstruct = (const ur_exp_external_mem_desc_t *)ptr; - printPtr(os, pstruct); - } break; - - case UR_STRUCTURE_TYPE_EXP_EXTERNAL_SEMAPHORE_DESC: { - const ur_exp_external_semaphore_desc_t *pstruct = (const ur_exp_external_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; - 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; - 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; - printPtr(os, pstruct); - } break; - - case UR_STRUCTURE_TYPE_EXP_SAMPLER_CUBEMAP_PROPERTIES: { - const ur_exp_sampler_cubemap_properties_t *pstruct = (const ur_exp_sampler_cubemap_properties_t *)ptr; - printPtr(os, pstruct); - } break; - - case UR_STRUCTURE_TYPE_EXP_IMAGE_COPY_REGION: { - const ur_exp_image_copy_region_t *pstruct = (const ur_exp_image_copy_region_t *)ptr; - printPtr(os, pstruct); - } break; - - case UR_STRUCTURE_TYPE_EXP_ENQUEUE_NATIVE_COMMAND_PROPERTIES: { - const ur_exp_enqueue_native_command_properties_t *pstruct = (const ur_exp_enqueue_native_command_properties_t *)ptr; - printPtr(os, pstruct); - } break; - - case UR_STRUCTURE_TYPE_EXP_ENQUEUE_EXT_PROPERTIES: { - const ur_exp_enqueue_ext_properties_t *pstruct = (const ur_exp_enqueue_ext_properties_t *)ptr; - printPtr(os, pstruct); - } break; - default: - os << "unknown enumerator"; - return UR_RESULT_ERROR_INVALID_ENUMERATION; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_result_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum 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_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_FUNCTION_ADDRESS_NOT_AVAILABLE: - os << "UR_RESULT_ERROR_FUNCTION_ADDRESS_NOT_AVAILABLE"; - 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_IN_EVENT_LIST_EXEC_STATUS: - os << "UR_RESULT_ERROR_IN_EVENT_LIST_EXEC_STATUS"; - break; - case UR_RESULT_ERROR_DEVICE_NOT_AVAILABLE: - os << "UR_RESULT_ERROR_DEVICE_NOT_AVAILABLE"; - break; - case UR_RESULT_ERROR_INVALID_SPEC_ID: - os << "UR_RESULT_ERROR_INVALID_SPEC_ID"; - 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_INVALID_COMMAND_BUFFER_COMMAND_HANDLE_EXP: - os << "UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_COMMAND_HANDLE_EXP"; - break; - case UR_RESULT_ERROR_UNKNOWN: - os << "UR_RESULT_ERROR_UNKNOWN"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - - os << (params.stype); - - os << ", "; - os << ".pNext = "; - - ur::details::printStruct(os, - (params.pNext)); - - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - - os << (params.stype); - - os << ", "; - os << ".pNext = "; - - ur::details::printStruct(os, - (params.pNext)); - - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - - os << (params.x); - - os << ", "; - os << ".y = "; - - os << (params.y); - - os << ", "; - os << ".z = "; - - os << (params.z); - - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - - os << (params.width); - - os << ", "; - os << ".height = "; - - os << (params.height); - - os << ", "; - os << ".depth = "; - - os << (params.depth); - - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_device_init_flag_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_device_init_flag_t value) { - switch (value) { - case UR_DEVICE_INIT_FLAG_GPU: - os << "UR_DEVICE_INIT_FLAG_GPU"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} - -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_device_init_flag_t flag -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { - uint32_t val = flag; - bool first = true; - - if ((val & UR_DEVICE_INIT_FLAG_GPU) == (uint32_t)UR_DEVICE_INIT_FLAG_GPU) { - val ^= (uint32_t)UR_DEVICE_INIT_FLAG_GPU; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_DEVICE_INIT_FLAG_GPU; - } - - if ((val & UR_DEVICE_INIT_FLAG_CPU) == (uint32_t)UR_DEVICE_INIT_FLAG_CPU) { - val ^= (uint32_t)UR_DEVICE_INIT_FLAG_CPU; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_DEVICE_INIT_FLAG_CPU; - } - - 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 << " | "; - } else { - first = false; - } - os << UR_DEVICE_INIT_FLAG_FPGA; - } - - if ((val & UR_DEVICE_INIT_FLAG_MCA) == (uint32_t)UR_DEVICE_INIT_FLAG_MCA) { - val ^= (uint32_t)UR_DEVICE_INIT_FLAG_MCA; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_DEVICE_INIT_FLAG_MCA; - } - - if ((val & UR_DEVICE_INIT_FLAG_VPU) == (uint32_t)UR_DEVICE_INIT_FLAG_VPU) { - val ^= (uint32_t)UR_DEVICE_INIT_FLAG_VPU; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_DEVICE_INIT_FLAG_VPU; - } - if (val != 0) { - std::bitset<32> bits(val); - if (!first) { - os << " | "; - } - os << "unknown bit flags " << bits; - } else if (first) { - os << "0"; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_loader_config_info_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_loader_config_info_t value) { - switch (value) { - case UR_LOADER_CONFIG_INFO_AVAILABLE_LAYERS: - os << "UR_LOADER_CONFIG_INFO_AVAILABLE_LAYERS"; - break; - case UR_LOADER_CONFIG_INFO_REFERENCE_COUNT: - os << "UR_LOADER_CONFIG_INFO_REFERENCE_COUNT"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_loader_config_info_t enum value -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_loader_config_info_t value, size_t size) { - if (ptr == NULL) { - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - os << ")"; - } break; - default: - os << "unknown enumerator"; - return UR_RESULT_ERROR_INVALID_ENUMERATION; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details - -/////////////////////////////////////////////////////////////////////////////// -/// @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::details::printPtr(os, - (params.functionName)); - - os << ", "; - os << ".sourceFile = "; - - ur::details::printPtr(os, - (params.sourceFile)); - - os << ", "; - os << ".lineNumber = "; - - os << (params.lineNumber); - - os << ", "; - os << ".columnNumber = "; - - os << (params.columnNumber); - - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_adapter_info_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_adapter_info_t value) { - switch (value) { - case UR_ADAPTER_INFO_BACKEND: - os << "UR_ADAPTER_INFO_BACKEND"; - break; - case UR_ADAPTER_INFO_REFERENCE_COUNT: - os << "UR_ADAPTER_INFO_REFERENCE_COUNT"; - break; - case UR_ADAPTER_INFO_VERSION: - os << "UR_ADAPTER_INFO_VERSION"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_adapter_info_t enum value -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_adapter_info_t value, size_t size) { - if (ptr == NULL) { - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - os << ")"; - } break; - case UR_ADAPTER_INFO_VERSION: { - const uint32_t *tptr = (const uint32_t *)ptr; - if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; - return UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - os << ")"; - } break; - default: - os << "unknown enumerator"; - return UR_RESULT_ERROR_INVALID_ENUMERATION; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_adapter_backend_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_adapter_backend_t value) { - switch (value) { - case UR_ADAPTER_BACKEND_UNKNOWN: - os << "UR_ADAPTER_BACKEND_UNKNOWN"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_platform_info_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_platform_info_t value) { - switch (value) { - case UR_PLATFORM_INFO_NAME: - os << "UR_PLATFORM_INFO_NAME"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_platform_info_t enum value -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_platform_info_t value, size_t size) { - if (ptr == NULL) { - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - os << ")"; - } break; - default: - os << "unknown enumerator"; - return UR_RESULT_ERROR_INVALID_ENUMERATION; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_api_version_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_api_version_t value) { - os << UR_MAJOR_VERSION(value) << "." << UR_MINOR_VERSION(value); - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - - os << (params.stype); - - os << ", "; - os << ".pNext = "; - - ur::details::printStruct(os, - (params.pNext)); - - os << ", "; - os << ".isNativeHandleOwned = "; - - os << (params.isNativeHandleOwned); - - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_platform_backend_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_platform_backend_t value) { - switch (value) { - case UR_PLATFORM_BACKEND_UNKNOWN: - os << "UR_PLATFORM_BACKEND_UNKNOWN"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - - os << (params.stype); - - os << ", "; - os << ".pNext = "; - - ur::details::printStruct(os, - (params.pNext)); - - os << ", "; - os << ".pDeviceTargetSpec = "; - - ur::details::printPtr(os, - (params.pDeviceTargetSpec)); - - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_device_type_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_device_type_t value) { - switch (value) { - case UR_DEVICE_TYPE_DEFAULT: - os << "UR_DEVICE_TYPE_DEFAULT"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_device_info_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_device_info_t value) { - switch (value) { - case UR_DEVICE_INFO_TYPE: - os << "UR_DEVICE_INFO_TYPE"; - 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_COMPONENT_DEVICES: - os << "UR_DEVICE_INFO_COMPONENT_DEVICES"; - break; - case UR_DEVICE_INFO_COMPOSITE_DEVICE: - os << "UR_DEVICE_INFO_COMPOSITE_DEVICE"; - break; - case UR_DEVICE_INFO_GLOBAL_VARIABLE_SUPPORT: - os << "UR_DEVICE_INFO_GLOBAL_VARIABLE_SUPPORT"; - break; - case UR_DEVICE_INFO_USM_POOL_SUPPORT: - os << "UR_DEVICE_INFO_USM_POOL_SUPPORT"; - break; - case UR_DEVICE_INFO_COMMAND_BUFFER_SUPPORT_EXP: - os << "UR_DEVICE_INFO_COMMAND_BUFFER_SUPPORT_EXP"; - break; - case UR_DEVICE_INFO_COMMAND_BUFFER_UPDATE_CAPABILITIES_EXP: - os << "UR_DEVICE_INFO_COMMAND_BUFFER_UPDATE_CAPABILITIES_EXP"; - break; - case UR_DEVICE_INFO_COMMAND_BUFFER_EVENT_SUPPORT_EXP: - os << "UR_DEVICE_INFO_COMMAND_BUFFER_EVENT_SUPPORT_EXP"; - break; - case UR_DEVICE_INFO_CLUSTER_LAUNCH_EXP: - os << "UR_DEVICE_INFO_CLUSTER_LAUNCH_EXP"; - 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_EXTERNAL_MEMORY_IMPORT_SUPPORT_EXP: - os << "UR_DEVICE_INFO_EXTERNAL_MEMORY_IMPORT_SUPPORT_EXP"; - break; - case UR_DEVICE_INFO_EXTERNAL_SEMAPHORE_IMPORT_SUPPORT_EXP: - os << "UR_DEVICE_INFO_EXTERNAL_SEMAPHORE_IMPORT_SUPPORT_EXP"; - break; - case UR_DEVICE_INFO_CUBEMAP_SUPPORT_EXP: - os << "UR_DEVICE_INFO_CUBEMAP_SUPPORT_EXP"; - break; - case UR_DEVICE_INFO_CUBEMAP_SEAMLESS_FILTERING_SUPPORT_EXP: - os << "UR_DEVICE_INFO_CUBEMAP_SEAMLESS_FILTERING_SUPPORT_EXP"; - break; - case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_USM_EXP: - os << "UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_USM_EXP"; - break; - case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_EXP: - os << "UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_EXP"; - break; - case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_USM_EXP: - os << "UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_USM_EXP"; - break; - case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_EXP: - os << "UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_EXP"; - break; - case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_3D_EXP: - os << "UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_3D_EXP"; - break; - case UR_DEVICE_INFO_TIMESTAMP_RECORDING_SUPPORT_EXP: - os << "UR_DEVICE_INFO_TIMESTAMP_RECORDING_SUPPORT_EXP"; - break; - case UR_DEVICE_INFO_IMAGE_ARRAY_SUPPORT_EXP: - os << "UR_DEVICE_INFO_IMAGE_ARRAY_SUPPORT_EXP"; - break; - case UR_DEVICE_INFO_BINDLESS_UNIQUE_ADDRESSING_PER_DIM_EXP: - os << "UR_DEVICE_INFO_BINDLESS_UNIQUE_ADDRESSING_PER_DIM_EXP"; - break; - case UR_DEVICE_INFO_BINDLESS_SAMPLE_1D_USM_EXP: - os << "UR_DEVICE_INFO_BINDLESS_SAMPLE_1D_USM_EXP"; - break; - case UR_DEVICE_INFO_BINDLESS_SAMPLE_2D_USM_EXP: - os << "UR_DEVICE_INFO_BINDLESS_SAMPLE_2D_USM_EXP"; - break; - case UR_DEVICE_INFO_ENQUEUE_NATIVE_COMMAND_SUPPORT_EXP: - os << "UR_DEVICE_INFO_ENQUEUE_NATIVE_COMMAND_SUPPORT_EXP"; - break; - case UR_DEVICE_INFO_LOW_POWER_EVENTS_EXP: - os << "UR_DEVICE_INFO_LOW_POWER_EVENTS_EXP"; - break; - case UR_DEVICE_INFO_2D_BLOCK_ARRAY_CAPABILITIES_EXP: - os << "UR_DEVICE_INFO_2D_BLOCK_ARRAY_CAPABILITIES_EXP"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_device_info_t enum value -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_device_info_t value, size_t size) { - if (ptr == NULL) { - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - os << ")"; - } break; - case UR_DEVICE_INFO_MAX_WORK_ITEM_SIZES: { - - const size_t *tptr = (const size_t *)ptr; - os << "{"; - size_t nelems = size / sizeof(size_t); - for (size_t i = 0; i < nelems; ++i) { - if (i != 0) { - os << ", "; - } - - os << tptr[i]; - } - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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; - if (sizeof(ur_device_fp_capability_flags_t) > size) { - os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_device_fp_capability_flags_t) << ")"; - return UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - ur::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; - if (sizeof(ur_device_fp_capability_flags_t) > size) { - os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_device_fp_capability_flags_t) << ")"; - return UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - ur::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; - if (sizeof(ur_device_fp_capability_flags_t) > size) { - os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_device_fp_capability_flags_t) << ")"; - return UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - ur::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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - ur::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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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; - if (sizeof(ur_device_mem_cache_type_t) > size) { - os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_device_mem_cache_type_t) << ")"; - return UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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; - if (sizeof(ur_device_local_mem_type_t) > size) { - os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_device_local_mem_type_t) << ")"; - return UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - os << ")"; - } break; - case UR_DEVICE_INFO_EXECUTION_CAPABILITIES: { - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - ur::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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - ur::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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - ur::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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - ur::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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - ur::details::printPtr(os, - *tptr); - - os << ")"; - } break; - case UR_DEVICE_INFO_SUPPORTED_PARTITIONS: { - - const ur_device_partition_t *tptr = (const ur_device_partition_t *)ptr; - os << "{"; - size_t nelems = size / sizeof(ur_device_partition_t); - for (size_t i = 0; i < nelems; ++i) { - if (i != 0) { - os << ", "; - } - - os << tptr[i]; - } - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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; - if (sizeof(ur_device_affinity_domain_flags_t) > size) { - os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_device_affinity_domain_flags_t) << ")"; - return UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - ur::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; - os << "{"; - size_t nelems = size / sizeof(ur_device_partition_property_t); - for (size_t i = 0; i < nelems; ++i) { - if (i != 0) { - os << ", "; - } - - os << tptr[i]; - } - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - os << ")"; - } break; - case UR_DEVICE_INFO_SUB_GROUP_SIZES_INTEL: { - - const uint32_t *tptr = (const uint32_t *)ptr; - os << "{"; - size_t nelems = size / sizeof(uint32_t); - for (size_t i = 0; i < nelems; ++i) { - if (i != 0) { - os << ", "; - } - - os << tptr[i]; - } - 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; - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - ur::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; - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - ur::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; - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - ur::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; - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - ur::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; - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - ur::details::printFlag(os, - *tptr); - - os << ")"; - } break; - case UR_DEVICE_INFO_UUID: { - - const uint8_t *tptr = (const uint8_t *)ptr; - os << "{"; - size_t nelems = size / sizeof(uint8_t); - for (size_t i = 0; i < nelems; ++i) { - if (i != 0) { - os << ", "; - } - - os << static_cast( - tptr[i]); - } - os << "}"; - } 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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; - if (sizeof(ur_memory_order_capability_flags_t) > size) { - os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_memory_order_capability_flags_t) << ")"; - return UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - ur::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; - if (sizeof(ur_memory_scope_capability_flags_t) > size) { - os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_memory_scope_capability_flags_t) << ")"; - return UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - ur::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; - if (sizeof(ur_memory_order_capability_flags_t) > size) { - os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_memory_order_capability_flags_t) << ")"; - return UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - ur::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; - if (sizeof(ur_memory_scope_capability_flags_t) > size) { - os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_memory_scope_capability_flags_t) << ")"; - return UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - ur::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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - os << ")"; - } break; - case UR_DEVICE_INFO_MAX_WORK_GROUPS_3D: { - - const size_t *tptr = (const size_t *)ptr; - os << "{"; - size_t nelems = size / sizeof(size_t); - for (size_t i = 0; i < nelems; ++i) { - if (i != 0) { - os << ", "; - } - - os << tptr[i]; - } - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - os << ")"; - } break; - case UR_DEVICE_INFO_ESIMD_SUPPORT: { - const ur_bool_t *tptr = (const ur_bool_t *)ptr; - if (sizeof(ur_bool_t) > size) { - os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")"; - return UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - os << ")"; - } break; - case UR_DEVICE_INFO_COMPONENT_DEVICES: { - - const ur_device_handle_t *tptr = (const ur_device_handle_t *)ptr; - os << "{"; - size_t nelems = size / sizeof(ur_device_handle_t); - for (size_t i = 0; i < nelems; ++i) { - if (i != 0) { - os << ", "; - } - - ur::details::printPtr(os, - tptr[i]); - } - os << "}"; - } break; - case UR_DEVICE_INFO_COMPOSITE_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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - ur::details::printPtr(os, - *tptr); - - os << ")"; - } break; - case UR_DEVICE_INFO_GLOBAL_VARIABLE_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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - os << ")"; - } break; - case UR_DEVICE_INFO_USM_POOL_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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - os << ")"; - } break; - case UR_DEVICE_INFO_COMMAND_BUFFER_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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - os << ")"; - } break; - case UR_DEVICE_INFO_COMMAND_BUFFER_UPDATE_CAPABILITIES_EXP: { - const ur_device_command_buffer_update_capability_flags_t *tptr = (const ur_device_command_buffer_update_capability_flags_t *)ptr; - if (sizeof(ur_device_command_buffer_update_capability_flags_t) > size) { - os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_device_command_buffer_update_capability_flags_t) << ")"; - return UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - ur::details::printFlag(os, - *tptr); - - os << ")"; - } break; - case UR_DEVICE_INFO_COMMAND_BUFFER_EVENT_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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - os << ")"; - } break; - case UR_DEVICE_INFO_CLUSTER_LAUNCH_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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - os << ")"; - } break; - case UR_DEVICE_INFO_EXTERNAL_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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - os << ")"; - } break; - case UR_DEVICE_INFO_EXTERNAL_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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - os << ")"; - } break; - case UR_DEVICE_INFO_CUBEMAP_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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - os << ")"; - } break; - case UR_DEVICE_INFO_CUBEMAP_SEAMLESS_FILTERING_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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - os << ")"; - } break; - case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_USM_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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - os << ")"; - } break; - case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - os << ")"; - } break; - case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_USM_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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - os << ")"; - } break; - case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - os << ")"; - } break; - case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_3D_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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - os << ")"; - } break; - case UR_DEVICE_INFO_TIMESTAMP_RECORDING_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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - os << ")"; - } break; - case UR_DEVICE_INFO_IMAGE_ARRAY_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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - os << ")"; - } break; - case UR_DEVICE_INFO_BINDLESS_UNIQUE_ADDRESSING_PER_DIM_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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - os << ")"; - } break; - case UR_DEVICE_INFO_BINDLESS_SAMPLE_1D_USM_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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - os << ")"; - } break; - case UR_DEVICE_INFO_BINDLESS_SAMPLE_2D_USM_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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - os << ")"; - } break; - case UR_DEVICE_INFO_ENQUEUE_NATIVE_COMMAND_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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - os << ")"; - } break; - case UR_DEVICE_INFO_LOW_POWER_EVENTS_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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - os << ")"; - } break; - case UR_DEVICE_INFO_2D_BLOCK_ARRAY_CAPABILITIES_EXP: { - const ur_exp_device_2d_block_array_capability_flags_t *tptr = (const ur_exp_device_2d_block_array_capability_flags_t *)ptr; - if (sizeof(ur_exp_device_2d_block_array_capability_flags_t) > size) { - os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_exp_device_2d_block_array_capability_flags_t) << ")"; - return UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - ur::details::printFlag(os, - *tptr); - - os << ")"; - } break; - default: - os << "unknown enumerator"; - return UR_RESULT_ERROR_INVALID_ENUMERATION; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_device_affinity_domain_flag_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_device_affinity_domain_flag_t value) { - switch (value) { - case UR_DEVICE_AFFINITY_DOMAIN_FLAG_NUMA: - os << "UR_DEVICE_AFFINITY_DOMAIN_FLAG_NUMA"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} - -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_device_affinity_domain_flag_t flag -template <> -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) { - val ^= (uint32_t)UR_DEVICE_AFFINITY_DOMAIN_FLAG_NUMA; - if (!first) { - os << " | "; - } else { - first = false; - } - 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) { - val ^= (uint32_t)UR_DEVICE_AFFINITY_DOMAIN_FLAG_L4_CACHE; - if (!first) { - os << " | "; - } else { - first = false; - } - 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) { - val ^= (uint32_t)UR_DEVICE_AFFINITY_DOMAIN_FLAG_L3_CACHE; - if (!first) { - os << " | "; - } else { - first = false; - } - 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) { - val ^= (uint32_t)UR_DEVICE_AFFINITY_DOMAIN_FLAG_L2_CACHE; - if (!first) { - os << " | "; - } else { - first = false; - } - 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) { - val ^= (uint32_t)UR_DEVICE_AFFINITY_DOMAIN_FLAG_L1_CACHE; - if (!first) { - os << " | "; - } else { - first = false; - } - 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) { - val ^= (uint32_t)UR_DEVICE_AFFINITY_DOMAIN_FLAG_NEXT_PARTITIONABLE; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_DEVICE_AFFINITY_DOMAIN_FLAG_NEXT_PARTITIONABLE; - } - if (val != 0) { - std::bitset<32> bits(val); - if (!first) { - os << " | "; - } - os << "unknown bit flags " << bits; - } else if (first) { - os << "0"; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_device_partition_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_device_partition_t value) { - switch (value) { - case UR_DEVICE_PARTITION_EQUALLY: - os << "UR_DEVICE_PARTITION_EQUALLY"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { - -/////////////////////////////////////////////////////////////////////////////// -// @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) { - case UR_DEVICE_PARTITION_EQUALLY: - - os << ".equally = "; - - os << (params.equally); - - break; - case UR_DEVICE_PARTITION_BY_COUNTS: - - os << ".count = "; - - os << (params.count); - - break; - case UR_DEVICE_PARTITION_BY_AFFINITY_DOMAIN: - - os << ".affinity_domain = "; - - ur::details::printFlag(os, - (params.affinity_domain)); - - break; - default: - os << ""; - return UR_RESULT_ERROR_INVALID_ENUMERATION; - } - os << "}"; - return UR_RESULT_SUCCESS; -} -} // namespace ur::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 = "; - - os << (params.type); - - os << ", "; - os << ".value = "; - ur::details::printUnion(os, (params.value), params.type); - - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - - os << (params.stype); - - os << ", "; - os << ".pNext = "; - - ur::details::printStruct(os, - (params.pNext)); - - os << ", "; - os << ".pProperties = "; - - ur::details::printPtr(os, - (params.pProperties)); - - os << ", "; - os << ".PropCount = "; - - os << (params.PropCount); - - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_device_fp_capability_flag_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_device_fp_capability_flag_t value) { - switch (value) { - case UR_DEVICE_FP_CAPABILITY_FLAG_CORRECTLY_ROUNDED_DIVIDE_SQRT: - os << "UR_DEVICE_FP_CAPABILITY_FLAG_CORRECTLY_ROUNDED_DIVIDE_SQRT"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} - -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_device_fp_capability_flag_t flag -template <> -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 (!first) { - os << " | "; - } else { - first = false; - } - 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) { - val ^= (uint32_t)UR_DEVICE_FP_CAPABILITY_FLAG_ROUND_TO_NEAREST; - if (!first) { - os << " | "; - } else { - first = false; - } - 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) { - val ^= (uint32_t)UR_DEVICE_FP_CAPABILITY_FLAG_ROUND_TO_ZERO; - if (!first) { - os << " | "; - } else { - first = false; - } - 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) { - val ^= (uint32_t)UR_DEVICE_FP_CAPABILITY_FLAG_ROUND_TO_INF; - if (!first) { - os << " | "; - } else { - first = false; - } - 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) { - val ^= (uint32_t)UR_DEVICE_FP_CAPABILITY_FLAG_INF_NAN; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_DEVICE_FP_CAPABILITY_FLAG_INF_NAN; - } - - 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 << " | "; - } else { - first = false; - } - os << UR_DEVICE_FP_CAPABILITY_FLAG_DENORM; - } - - 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 << " | "; - } else { - first = false; - } - 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) { - val ^= (uint32_t)UR_DEVICE_FP_CAPABILITY_FLAG_SOFT_FLOAT; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_DEVICE_FP_CAPABILITY_FLAG_SOFT_FLOAT; - } - if (val != 0) { - std::bitset<32> bits(val); - if (!first) { - os << " | "; - } - os << "unknown bit flags " << bits; - } else if (first) { - os << "0"; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_device_mem_cache_type_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_device_mem_cache_type_t value) { - switch (value) { - case UR_DEVICE_MEM_CACHE_TYPE_NONE: - os << "UR_DEVICE_MEM_CACHE_TYPE_NONE"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_device_local_mem_type_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_device_local_mem_type_t value) { - switch (value) { - case UR_DEVICE_LOCAL_MEM_TYPE_NONE: - os << "UR_DEVICE_LOCAL_MEM_TYPE_NONE"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_device_exec_capability_flag_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_device_exec_capability_flag_t value) { - switch (value) { - case UR_DEVICE_EXEC_CAPABILITY_FLAG_KERNEL: - os << "UR_DEVICE_EXEC_CAPABILITY_FLAG_KERNEL"; - break; - case UR_DEVICE_EXEC_CAPABILITY_FLAG_NATIVE_KERNEL: - os << "UR_DEVICE_EXEC_CAPABILITY_FLAG_NATIVE_KERNEL"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} - -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_device_exec_capability_flag_t flag -template <> -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) { - val ^= (uint32_t)UR_DEVICE_EXEC_CAPABILITY_FLAG_KERNEL; - if (!first) { - os << " | "; - } else { - first = false; - } - 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) { - val ^= (uint32_t)UR_DEVICE_EXEC_CAPABILITY_FLAG_NATIVE_KERNEL; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_DEVICE_EXEC_CAPABILITY_FLAG_NATIVE_KERNEL; - } - if (val != 0) { - std::bitset<32> bits(val); - if (!first) { - os << " | "; - } - os << "unknown bit flags " << bits; - } else if (first) { - os << "0"; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::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 = "; - - os << (params.stype); - - os << ", "; - os << ".pNext = "; - - ur::details::printStruct(os, - (params.pNext)); - - os << ", "; - os << ".isNativeHandleOwned = "; - - os << (params.isNativeHandleOwned); - - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_memory_order_capability_flag_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_memory_order_capability_flag_t value) { - switch (value) { - case UR_MEMORY_ORDER_CAPABILITY_FLAG_RELAXED: - os << "UR_MEMORY_ORDER_CAPABILITY_FLAG_RELAXED"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} - -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_memory_order_capability_flag_t flag -template <> -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) { - val ^= (uint32_t)UR_MEMORY_ORDER_CAPABILITY_FLAG_RELAXED; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_MEMORY_ORDER_CAPABILITY_FLAG_RELAXED; - } - - 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 << " | "; - } else { - first = false; - } - os << UR_MEMORY_ORDER_CAPABILITY_FLAG_ACQUIRE; - } - - 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 << " | "; - } else { - first = false; - } - 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) { - val ^= (uint32_t)UR_MEMORY_ORDER_CAPABILITY_FLAG_ACQ_REL; - if (!first) { - os << " | "; - } else { - first = false; - } - 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) { - val ^= (uint32_t)UR_MEMORY_ORDER_CAPABILITY_FLAG_SEQ_CST; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_MEMORY_ORDER_CAPABILITY_FLAG_SEQ_CST; - } - if (val != 0) { - std::bitset<32> bits(val); - if (!first) { - os << " | "; - } - os << "unknown bit flags " << bits; - } else if (first) { - os << "0"; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_memory_scope_capability_flag_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_memory_scope_capability_flag_t value) { - switch (value) { - case UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_ITEM: - os << "UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_ITEM"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} - -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_memory_scope_capability_flag_t flag -template <> -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) { - val ^= (uint32_t)UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_ITEM; - if (!first) { - os << " | "; - } else { - first = false; - } - 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) { - val ^= (uint32_t)UR_MEMORY_SCOPE_CAPABILITY_FLAG_SUB_GROUP; - if (!first) { - os << " | "; - } else { - first = false; - } - 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) { - val ^= (uint32_t)UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_GROUP; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_GROUP; - } - - 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 << " | "; - } else { - first = false; - } - os << UR_MEMORY_SCOPE_CAPABILITY_FLAG_DEVICE; - } - - 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 << " | "; - } else { - first = false; - } - os << UR_MEMORY_SCOPE_CAPABILITY_FLAG_SYSTEM; - } - if (val != 0) { - std::bitset<32> bits(val); - if (!first) { - os << " | "; - } - os << "unknown bit flags " << bits; - } else if (first) { - os << "0"; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_device_usm_access_capability_flag_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_device_usm_access_capability_flag_t value) { - switch (value) { - case UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_ACCESS: - os << "UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_ACCESS"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} - -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_device_usm_access_capability_flag_t flag -template <> -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) { - val ^= (uint32_t)UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_ACCESS; - if (!first) { - os << " | "; - } else { - first = false; - } - 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) { - val ^= (uint32_t)UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_ATOMIC_ACCESS; - if (!first) { - os << " | "; - } else { - first = false; - } - 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) { - val ^= (uint32_t)UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_CONCURRENT_ACCESS; - if (!first) { - os << " | "; - } else { - first = false; - } - 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 (!first) { - os << " | "; - } else { - first = false; - } - os << UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_ATOMIC_CONCURRENT_ACCESS; - } - if (val != 0) { - std::bitset<32> bits(val); - if (!first) { - os << " | "; - } - os << "unknown bit flags " << bits; - } else if (first) { - os << "0"; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_context_flag_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_context_flag_t value) { - switch (value) { - case UR_CONTEXT_FLAG_TBD: - os << "UR_CONTEXT_FLAG_TBD"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} - -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_context_flag_t flag -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { - uint32_t val = flag; - bool first = true; - - if ((val & UR_CONTEXT_FLAG_TBD) == (uint32_t)UR_CONTEXT_FLAG_TBD) { - val ^= (uint32_t)UR_CONTEXT_FLAG_TBD; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_CONTEXT_FLAG_TBD; - } - if (val != 0) { - std::bitset<32> bits(val); - if (!first) { - os << " | "; - } - os << "unknown bit flags " << bits; - } else if (first) { - os << "0"; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::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 = "; - - os << (params.stype); - - os << ", "; - os << ".pNext = "; - - ur::details::printStruct(os, - (params.pNext)); - - os << ", "; - os << ".flags = "; - - ur::details::printFlag(os, - (params.flags)); - - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_context_info_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_context_info_t value) { - switch (value) { - case UR_CONTEXT_INFO_NUM_DEVICES: - os << "UR_CONTEXT_INFO_NUM_DEVICES"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_context_info_t enum value -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_context_info_t value, size_t size) { - if (ptr == NULL) { - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - os << ")"; - } break; - case UR_CONTEXT_INFO_DEVICES: { - - const ur_device_handle_t *tptr = (const ur_device_handle_t *)ptr; - os << "{"; - size_t nelems = size / sizeof(ur_device_handle_t); - for (size_t i = 0; i < nelems; ++i) { - if (i != 0) { - os << ", "; - } - - ur::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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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; - if (sizeof(ur_memory_order_capability_flags_t) > size) { - os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_memory_order_capability_flags_t) << ")"; - return UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - ur::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; - if (sizeof(ur_memory_scope_capability_flags_t) > size) { - os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_memory_scope_capability_flags_t) << ")"; - return UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - ur::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; - if (sizeof(ur_memory_order_capability_flags_t) > size) { - os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_memory_order_capability_flags_t) << ")"; - return UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - ur::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; - if (sizeof(ur_memory_scope_capability_flags_t) > size) { - os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_memory_scope_capability_flags_t) << ")"; - return UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - ur::details::printFlag(os, - *tptr); - - os << ")"; - } break; - default: - os << "unknown enumerator"; - return UR_RESULT_ERROR_INVALID_ENUMERATION; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details - -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - - os << (params.stype); - - os << ", "; - os << ".pNext = "; - - ur::details::printStruct(os, - (params.pNext)); - - os << ", "; - os << ".isNativeHandleOwned = "; - - os << (params.isNativeHandleOwned); - - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_mem_flag_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_mem_flag_t value) { - switch (value) { - case UR_MEM_FLAG_READ_WRITE: - os << "UR_MEM_FLAG_READ_WRITE"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} - -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_mem_flag_t flag -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { - uint32_t val = flag; - bool first = true; - - if ((val & UR_MEM_FLAG_READ_WRITE) == (uint32_t)UR_MEM_FLAG_READ_WRITE) { - val ^= (uint32_t)UR_MEM_FLAG_READ_WRITE; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_MEM_FLAG_READ_WRITE; - } - - if ((val & UR_MEM_FLAG_WRITE_ONLY) == (uint32_t)UR_MEM_FLAG_WRITE_ONLY) { - val ^= (uint32_t)UR_MEM_FLAG_WRITE_ONLY; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_MEM_FLAG_WRITE_ONLY; - } - - if ((val & UR_MEM_FLAG_READ_ONLY) == (uint32_t)UR_MEM_FLAG_READ_ONLY) { - val ^= (uint32_t)UR_MEM_FLAG_READ_ONLY; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_MEM_FLAG_READ_ONLY; - } - - 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 << " | "; - } else { - first = false; - } - os << UR_MEM_FLAG_USE_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 << " | "; - } else { - first = false; - } - 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) { - val ^= (uint32_t)UR_MEM_FLAG_ALLOC_COPY_HOST_POINTER; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_MEM_FLAG_ALLOC_COPY_HOST_POINTER; - } - if (val != 0) { - std::bitset<32> bits(val); - if (!first) { - os << " | "; - } - os << "unknown bit flags " << bits; - } else if (first) { - os << "0"; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_mem_type_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_mem_type_t value) { - switch (value) { - 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_IMAGE_CUBEMAP_EXP: - os << "UR_MEM_TYPE_IMAGE_CUBEMAP_EXP"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_mem_info_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_mem_info_t value) { - switch (value) { - case UR_MEM_INFO_SIZE: - os << "UR_MEM_INFO_SIZE"; - break; - case UR_MEM_INFO_CONTEXT: - os << "UR_MEM_INFO_CONTEXT"; - break; - case UR_MEM_INFO_REFERENCE_COUNT: - os << "UR_MEM_INFO_REFERENCE_COUNT"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_mem_info_t enum value -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_mem_info_t value, size_t size) { - if (ptr == NULL) { - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - ur::details::printPtr(os, - *tptr); - - os << ")"; - } break; - case UR_MEM_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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - os << ")"; - } break; - default: - os << "unknown enumerator"; - return UR_RESULT_ERROR_INVALID_ENUMERATION; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_image_channel_order_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_image_channel_order_t value) { - switch (value) { - case UR_IMAGE_CHANNEL_ORDER_A: - os << "UR_IMAGE_CHANNEL_ORDER_A"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_image_channel_type_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_image_channel_type_t value) { - switch (value) { - case UR_IMAGE_CHANNEL_TYPE_SNORM_INT8: - os << "UR_IMAGE_CHANNEL_TYPE_SNORM_INT8"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_image_info_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_image_info_t value) { - switch (value) { - case UR_IMAGE_INFO_FORMAT: - os << "UR_IMAGE_INFO_FORMAT"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_image_info_t enum value -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_image_info_t value, size_t size) { - if (ptr == NULL) { - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - os << ")"; - } break; - default: - os << "unknown enumerator"; - return UR_RESULT_ERROR_INVALID_ENUMERATION; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details - -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - - os << (params.channelOrder); - - os << ", "; - os << ".channelType = "; - - os << (params.channelType); - - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - - os << (params.stype); - - os << ", "; - os << ".pNext = "; - - ur::details::printStruct(os, - (params.pNext)); - - os << ", "; - os << ".type = "; - - os << (params.type); - - os << ", "; - os << ".width = "; - - os << (params.width); - - os << ", "; - os << ".height = "; - - os << (params.height); - - os << ", "; - os << ".depth = "; - - os << (params.depth); - - os << ", "; - os << ".arraySize = "; - - os << (params.arraySize); - - os << ", "; - os << ".rowPitch = "; - - os << (params.rowPitch); - - os << ", "; - os << ".slicePitch = "; - - os << (params.slicePitch); - - os << ", "; - os << ".numMipLevel = "; - - os << (params.numMipLevel); - - os << ", "; - os << ".numSamples = "; - - os << (params.numSamples); - - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - - os << (params.stype); - - os << ", "; - os << ".pNext = "; - - ur::details::printStruct(os, - (params.pNext)); - - os << ", "; - os << ".pHost = "; - - ur::details::printPtr(os, - (params.pHost)); - - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - - os << (params.stype); - - os << ", "; - os << ".pNext = "; - - ur::details::printStruct(os, - (params.pNext)); - - os << ", "; - os << ".channel = "; - - os << (params.channel); - - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - - os << (params.stype); - - os << ", "; - os << ".pNext = "; - - ur::details::printStruct(os, - (params.pNext)); - - os << ", "; - os << ".location = "; - - os << (params.location); - - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - - os << (params.stype); - - os << ", "; - os << ".pNext = "; - - ur::details::printStruct(os, - (params.pNext)); - - os << ", "; - os << ".origin = "; - - os << (params.origin); - - os << ", "; - os << ".size = "; - - os << (params.size); - - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_buffer_create_type_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_buffer_create_type_t value) { - switch (value) { - case UR_BUFFER_CREATE_TYPE_REGION: - os << "UR_BUFFER_CREATE_TYPE_REGION"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - - os << (params.stype); - - os << ", "; - os << ".pNext = "; - - ur::details::printStruct(os, - (params.pNext)); - - os << ", "; - os << ".isNativeHandleOwned = "; - - os << (params.isNativeHandleOwned); - - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_sampler_filter_mode_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_sampler_filter_mode_t value) { - switch (value) { - case UR_SAMPLER_FILTER_MODE_NEAREST: - os << "UR_SAMPLER_FILTER_MODE_NEAREST"; - break; - case UR_SAMPLER_FILTER_MODE_LINEAR: - os << "UR_SAMPLER_FILTER_MODE_LINEAR"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_sampler_addressing_mode_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_sampler_addressing_mode_t value) { - switch (value) { - case UR_SAMPLER_ADDRESSING_MODE_NONE: - os << "UR_SAMPLER_ADDRESSING_MODE_NONE"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_sampler_info_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_sampler_info_t value) { - switch (value) { - case UR_SAMPLER_INFO_REFERENCE_COUNT: - os << "UR_SAMPLER_INFO_REFERENCE_COUNT"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_sampler_info_t enum value -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_sampler_info_t value, size_t size) { - if (ptr == NULL) { - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - ur::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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - os << ")"; - } break; - case UR_SAMPLER_INFO_ADDRESSING_MODE: { - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - os << ")"; - } break; - case UR_SAMPLER_INFO_FILTER_MODE: { - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - os << ")"; - } break; - default: - os << "unknown enumerator"; - return UR_RESULT_ERROR_INVALID_ENUMERATION; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details - -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - - os << (params.stype); - - os << ", "; - os << ".pNext = "; - - ur::details::printStruct(os, - (params.pNext)); - - os << ", "; - os << ".normalizedCoords = "; - - os << (params.normalizedCoords); - - os << ", "; - os << ".addressingMode = "; - - os << (params.addressingMode); - - os << ", "; - os << ".filterMode = "; - - os << (params.filterMode); - - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - - os << (params.stype); - - os << ", "; - os << ".pNext = "; - - ur::details::printStruct(os, - (params.pNext)); - - os << ", "; - os << ".isNativeHandleOwned = "; - - os << (params.isNativeHandleOwned); - - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_usm_host_mem_flag_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_usm_host_mem_flag_t value) { - switch (value) { - case UR_USM_HOST_MEM_FLAG_INITIAL_PLACEMENT: - os << "UR_USM_HOST_MEM_FLAG_INITIAL_PLACEMENT"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} - -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_usm_host_mem_flag_t flag -template <> -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) { - val ^= (uint32_t)UR_USM_HOST_MEM_FLAG_INITIAL_PLACEMENT; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_USM_HOST_MEM_FLAG_INITIAL_PLACEMENT; - } - if (val != 0) { - std::bitset<32> bits(val); - if (!first) { - os << " | "; - } - os << "unknown bit flags " << bits; - } else if (first) { - os << "0"; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_usm_device_mem_flag_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_usm_device_mem_flag_t value) { - switch (value) { - case UR_USM_DEVICE_MEM_FLAG_WRITE_COMBINED: - os << "UR_USM_DEVICE_MEM_FLAG_WRITE_COMBINED"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} - -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_usm_device_mem_flag_t flag -template <> -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) { - val ^= (uint32_t)UR_USM_DEVICE_MEM_FLAG_WRITE_COMBINED; - if (!first) { - os << " | "; - } else { - first = false; - } - 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) { - val ^= (uint32_t)UR_USM_DEVICE_MEM_FLAG_INITIAL_PLACEMENT; - if (!first) { - os << " | "; - } else { - first = false; - } - 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) { - val ^= (uint32_t)UR_USM_DEVICE_MEM_FLAG_DEVICE_READ_ONLY; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_USM_DEVICE_MEM_FLAG_DEVICE_READ_ONLY; - } - if (val != 0) { - std::bitset<32> bits(val); - if (!first) { - os << " | "; - } - os << "unknown bit flags " << bits; - } else if (first) { - os << "0"; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_usm_pool_flag_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_usm_pool_flag_t value) { - switch (value) { - case UR_USM_POOL_FLAG_ZERO_INITIALIZE_BLOCK: - os << "UR_USM_POOL_FLAG_ZERO_INITIALIZE_BLOCK"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} - -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_usm_pool_flag_t flag -template <> -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) { - val ^= (uint32_t)UR_USM_POOL_FLAG_ZERO_INITIALIZE_BLOCK; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_USM_POOL_FLAG_ZERO_INITIALIZE_BLOCK; - } - if (val != 0) { - std::bitset<32> bits(val); - if (!first) { - os << " | "; - } - os << "unknown bit flags " << bits; - } else if (first) { - os << "0"; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_usm_type_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_usm_type_t value) { - switch (value) { - case UR_USM_TYPE_UNKNOWN: - os << "UR_USM_TYPE_UNKNOWN"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_usm_alloc_info_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_usm_alloc_info_t value) { - switch (value) { - case UR_USM_ALLOC_INFO_TYPE: - os << "UR_USM_ALLOC_INFO_TYPE"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_usm_alloc_info_t enum value -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_usm_alloc_info_t value, size_t size) { - if (ptr == NULL) { - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - os << *tptr; - - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - ur::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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - - ur::details::printPtr(os, - *tptr); - - os << ")"; - } break; - default: - os << "unknown enumerator"; - return UR_RESULT_ERROR_INVALID_ENUMERATION; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details - -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_usm_advice_flag_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_usm_advice_flag_t value) { - switch (value) { - case UR_USM_ADVICE_FLAG_DEFAULT: - os << "UR_USM_ADVICE_FLAG_DEFAULT"; - 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; - case UR_USM_ADVICE_FLAG_SET_NON_COHERENT_MEMORY: - os << "UR_USM_ADVICE_FLAG_SET_NON_COHERENT_MEMORY"; - break; - case UR_USM_ADVICE_FLAG_CLEAR_NON_COHERENT_MEMORY: - os << "UR_USM_ADVICE_FLAG_CLEAR_NON_COHERENT_MEMORY"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} - -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_usm_advice_flag_t flag -template <> -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) { - val ^= (uint32_t)UR_USM_ADVICE_FLAG_DEFAULT; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_USM_ADVICE_FLAG_DEFAULT; - } - - 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 << " | "; - } else { - first = false; - } - 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) { - val ^= (uint32_t)UR_USM_ADVICE_FLAG_CLEAR_READ_MOSTLY; - if (!first) { - os << " | "; - } else { - first = false; - } - 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) { - val ^= (uint32_t)UR_USM_ADVICE_FLAG_SET_PREFERRED_LOCATION; - if (!first) { - os << " | "; - } else { - first = false; - } - 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) { - val ^= (uint32_t)UR_USM_ADVICE_FLAG_CLEAR_PREFERRED_LOCATION; - if (!first) { - os << " | "; - } else { - first = false; - } - 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) { - val ^= (uint32_t)UR_USM_ADVICE_FLAG_SET_NON_ATOMIC_MOSTLY; - if (!first) { - os << " | "; - } else { - first = false; - } - 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) { - val ^= (uint32_t)UR_USM_ADVICE_FLAG_CLEAR_NON_ATOMIC_MOSTLY; - if (!first) { - os << " | "; - } else { - first = false; - } - 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) { - val ^= (uint32_t)UR_USM_ADVICE_FLAG_BIAS_CACHED; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_USM_ADVICE_FLAG_BIAS_CACHED; - } - - 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 << " | "; - } else { - first = false; - } - 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) { - val ^= (uint32_t)UR_USM_ADVICE_FLAG_SET_ACCESSED_BY_DEVICE; - if (!first) { - os << " | "; - } else { - first = false; - } - 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) { - val ^= (uint32_t)UR_USM_ADVICE_FLAG_CLEAR_ACCESSED_BY_DEVICE; - if (!first) { - os << " | "; - } else { - first = false; - } - 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) { - val ^= (uint32_t)UR_USM_ADVICE_FLAG_SET_ACCESSED_BY_HOST; - if (!first) { - os << " | "; - } else { - first = false; - } - 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) { - val ^= (uint32_t)UR_USM_ADVICE_FLAG_CLEAR_ACCESSED_BY_HOST; - if (!first) { - os << " | "; - } else { - first = false; - } - 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) { - val ^= (uint32_t)UR_USM_ADVICE_FLAG_SET_PREFERRED_LOCATION_HOST; - if (!first) { - os << " | "; - } else { - first = false; - } - 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) { - val ^= (uint32_t)UR_USM_ADVICE_FLAG_CLEAR_PREFERRED_LOCATION_HOST; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_USM_ADVICE_FLAG_CLEAR_PREFERRED_LOCATION_HOST; - } - - if ((val & UR_USM_ADVICE_FLAG_SET_NON_COHERENT_MEMORY) == (uint32_t)UR_USM_ADVICE_FLAG_SET_NON_COHERENT_MEMORY) { - val ^= (uint32_t)UR_USM_ADVICE_FLAG_SET_NON_COHERENT_MEMORY; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_USM_ADVICE_FLAG_SET_NON_COHERENT_MEMORY; - } - - if ((val & UR_USM_ADVICE_FLAG_CLEAR_NON_COHERENT_MEMORY) == (uint32_t)UR_USM_ADVICE_FLAG_CLEAR_NON_COHERENT_MEMORY) { - val ^= (uint32_t)UR_USM_ADVICE_FLAG_CLEAR_NON_COHERENT_MEMORY; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_USM_ADVICE_FLAG_CLEAR_NON_COHERENT_MEMORY; - } - if (val != 0) { - std::bitset<32> bits(val); - if (!first) { - os << " | "; - } - os << "unknown bit flags " << bits; - } else if (first) { - os << "0"; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::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 = "; - - os << (params.stype); - - os << ", "; - os << ".pNext = "; - - ur::details::printStruct(os, - (params.pNext)); - - os << ", "; - os << ".hints = "; - - ur::details::printFlag(os, - (params.hints)); - - os << ", "; - os << ".align = "; - - os << (params.align); - - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - - os << (params.stype); - - os << ", "; - os << ".pNext = "; - - ur::details::printStruct(os, - (params.pNext)); - - os << ", "; - os << ".flags = "; - - ur::details::printFlag(os, - (params.flags)); - - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - - os << (params.stype); - - os << ", "; - os << ".pNext = "; - - ur::details::printStruct(os, - (params.pNext)); - - os << ", "; - os << ".flags = "; - - ur::details::printFlag(os, - (params.flags)); - - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_usm_alloc_location_desc_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, const struct ur_usm_alloc_location_desc_t params) { - os << "(struct ur_usm_alloc_location_desc_t){"; - - os << ".stype = "; - - os << (params.stype); - - os << ", "; - os << ".pNext = "; - - ur::details::printStruct(os, - (params.pNext)); - - os << ", "; - os << ".location = "; - - os << (params.location); - - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - - os << (params.stype); - - os << ", "; - os << ".pNext = "; - - ur::details::printStruct(os, - (params.pNext)); - - os << ", "; - os << ".flags = "; - - ur::details::printFlag(os, - (params.flags)); - - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - - os << (params.stype); - - os << ", "; - os << ".pNext = "; - - ur::details::printStruct(os, - (params.pNext)); - - os << ", "; - os << ".maxPoolableSize = "; - - os << (params.maxPoolableSize); - - os << ", "; - os << ".minDriverAllocSize = "; - - os << (params.minDriverAllocSize); +#include +#include - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_usm_pool_info_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_usm_pool_info_t value) { - switch (value) { - case UR_USM_POOL_INFO_REFERENCE_COUNT: - os << "UR_USM_POOL_INFO_REFERENCE_COUNT"; - break; - case UR_USM_POOL_INFO_CONTEXT: - os << "UR_USM_POOL_INFO_CONTEXT"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_usm_pool_info_t enum value -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_usm_pool_info_t value, size_t size) { - if (ptr == NULL) { - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - os << *tptr; - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - ur::details::printPtr(os, - *tptr); - os << ")"; - } break; - default: - os << "unknown enumerator"; - return UR_RESULT_ERROR_INVALID_ENUMERATION; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_virtual_mem_granularity_info_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_virtual_mem_granularity_info_t value) { - switch (value) { - case UR_VIRTUAL_MEM_GRANULARITY_INFO_MINIMUM: - os << "UR_VIRTUAL_MEM_GRANULARITY_INFO_MINIMUM"; - break; - case UR_VIRTUAL_MEM_GRANULARITY_INFO_RECOMMENDED: - os << "UR_VIRTUAL_MEM_GRANULARITY_INFO_RECOMMENDED"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_virtual_mem_granularity_info_t enum value -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_virtual_mem_granularity_info_t value, size_t size) { - if (ptr == NULL) { - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; +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 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); - os << *tptr; - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - os << *tptr; + inline ur_result_t printStruct(std::ostream &os, const void *ptr); - os << ")"; - } break; - default: - os << "unknown enumerator"; - return UR_RESULT_ERROR_INVALID_ENUMERATION; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_virtual_mem_access_flag_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_virtual_mem_access_flag_t value) { - switch (value) { - case UR_VIRTUAL_MEM_ACCESS_FLAG_NONE: - os << "UR_VIRTUAL_MEM_ACCESS_FLAG_NONE"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_virtual_mem_access_flag_t flag -template <> -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) { - val ^= (uint32_t)UR_VIRTUAL_MEM_ACCESS_FLAG_NONE; - if (!first) { - os << " | "; - } else { - first = false; - } - 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) { - val ^= (uint32_t)UR_VIRTUAL_MEM_ACCESS_FLAG_READ_WRITE; - if (!first) { - os << " | "; - } else { - first = false; - } - 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) { - val ^= (uint32_t)UR_VIRTUAL_MEM_ACCESS_FLAG_READ_ONLY; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_VIRTUAL_MEM_ACCESS_FLAG_READ_ONLY; - } - if (val != 0) { - std::bitset<32> bits(val); - if (!first) { - os << " | "; - } - os << "unknown bit flags " << bits; - } else if (first) { - os << "0"; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_virtual_mem_info_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_virtual_mem_info_t value) { - switch (value) { - case UR_VIRTUAL_MEM_INFO_ACCESS_MODE: - os << "UR_VIRTUAL_MEM_INFO_ACCESS_MODE"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_virtual_mem_info_t enum value -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_virtual_mem_info_t value, size_t size) { - if (ptr == NULL) { - 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; - if (sizeof(ur_virtual_mem_access_flags_t) > size) { - os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_virtual_mem_access_flags_t) << ")"; - return UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - ur::details::printFlag(os, - *tptr); - os << ")"; - } break; - default: - os << "unknown enumerator"; - return UR_RESULT_ERROR_INVALID_ENUMERATION; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_physical_mem_flag_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_physical_mem_flag_t value) { - switch (value) { - case UR_PHYSICAL_MEM_FLAG_TBD: - os << "UR_PHYSICAL_MEM_FLAG_TBD"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_physical_mem_flag_t flag -template <> -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) { - val ^= (uint32_t)UR_PHYSICAL_MEM_FLAG_TBD; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_PHYSICAL_MEM_FLAG_TBD; - } - if (val != 0) { - std::bitset<32> bits(val); - if (!first) { - os << " | "; - } - os << "unknown bit flags " << bits; - } else if (first) { - os << "0"; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::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 = "; - os << (params.stype); - os << ", "; - os << ".pNext = "; - ur::details::printStruct(os, - (params.pNext)); - os << ", "; - os << ".flags = "; - ur::details::printFlag(os, - (params.flags)); - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_program_metadata_type_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_program_metadata_type_t value) { - switch (value) { - case UR_PROGRAM_METADATA_TYPE_UINT32: - os << "UR_PROGRAM_METADATA_TYPE_UINT32"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -// @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) { - case UR_PROGRAM_METADATA_TYPE_UINT32: - os << ".data32 = "; - os << (params.data32); - break; - case UR_PROGRAM_METADATA_TYPE_UINT64: - os << ".data64 = "; - os << (params.data64); - break; - case UR_PROGRAM_METADATA_TYPE_STRING: - os << ".pString = "; - ur::details::printPtr(os, - (params.pString)); - break; - case UR_PROGRAM_METADATA_TYPE_BYTE_ARRAY: - os << ".pData = "; - ur::details::printPtr(os, - (params.pData)); - break; - default: - os << ""; - return UR_RESULT_ERROR_INVALID_ENUMERATION; - } - os << "}"; - return UR_RESULT_SUCCESS; -} -} // namespace ur::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 = "; - ur::details::printPtr(os, - (params.pName)); - os << ", "; - os << ".type = "; - os << (params.type); - os << ", "; - os << ".size = "; - os << (params.size); - os << ", "; - os << ".value = "; - ur::details::printUnion(os, (params.value), params.type); - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - os << (params.stype); - os << ", "; - os << ".pNext = "; - ur::details::printStruct(os, - (params.pNext)); - os << ", "; - os << ".count = "; - os << (params.count); - os << ", "; - os << ".pMetadatas = "; - ur::details::printPtr(os, reinterpret_cast((params.pMetadatas))); - if ((params.pMetadatas) != NULL) { - os << " {"; - for (size_t i = 0; i < params.count; ++i) { - if (i != 0) { - os << ", "; - } - os << ((params.pMetadatas))[i]; - } - os << "}"; - } - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_program_info_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_program_info_t value) { - switch (value) { - case UR_PROGRAM_INFO_REFERENCE_COUNT: - os << "UR_PROGRAM_INFO_REFERENCE_COUNT"; - 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_IL: - os << "UR_PROGRAM_INFO_IL"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_program_info_t enum value -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_program_info_t value, size_t size) { - if (ptr == NULL) { - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - os << *tptr; - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - ur::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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - os << *tptr; - os << ")"; - } break; - case UR_PROGRAM_INFO_DEVICES: { - const ur_device_handle_t *tptr = (const ur_device_handle_t *)ptr; - os << "{"; - size_t nelems = size / sizeof(ur_device_handle_t); - for (size_t i = 0; i < nelems; ++i) { - if (i != 0) { - os << ", "; - } - ur::details::printPtr(os, - tptr[i]); - } - os << "}"; - } break; - case UR_PROGRAM_INFO_IL: { - - const char *tptr = (const char *)ptr; - printPtr(os, tptr); - } break; - case UR_PROGRAM_INFO_BINARY_SIZES: { - - const size_t *tptr = (const size_t *)ptr; - os << "{"; - size_t nelems = size / sizeof(size_t); - for (size_t i = 0; i < nelems; ++i) { - if (i != 0) { - os << ", "; - } - os << tptr[i]; - } - os << "}"; - } break; - case UR_PROGRAM_INFO_BINARIES: { + template<> inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - os << *tptr; - os << ")"; - } break; - case UR_PROGRAM_INFO_KERNEL_NAMES: { - const char *tptr = (const char *)ptr; - printPtr(os, tptr); - } break; - default: - os << "unknown enumerator"; - return UR_RESULT_ERROR_INVALID_ENUMERATION; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_program_build_status_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_program_build_status_t value) { - switch (value) { - case UR_PROGRAM_BUILD_STATUS_NONE: - os << "UR_PROGRAM_BUILD_STATUS_NONE"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_program_binary_type_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_program_binary_type_t value) { - switch (value) { - case UR_PROGRAM_BINARY_TYPE_NONE: - os << "UR_PROGRAM_BINARY_TYPE_NONE"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_program_build_info_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_program_build_info_t value) { - switch (value) { - case UR_PROGRAM_BUILD_INFO_STATUS: - os << "UR_PROGRAM_BUILD_INFO_STATUS"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_program_build_info_t enum value -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_program_build_info_t value, size_t size) { - if (ptr == NULL) { - 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; - if (sizeof(ur_program_build_status_t) > size) { - os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_program_build_status_t) << ")"; - return UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; + template <> inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_loader_config_info_t value, size_t size); - os << *tptr; - 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; - if (sizeof(ur_program_binary_type_t) > size) { - os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_program_binary_type_t) << ")"; - return UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - os << *tptr; - os << ")"; - } break; - default: - os << "unknown enumerator"; - return UR_RESULT_ERROR_INVALID_ENUMERATION; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - os << (params.id); - os << ", "; - os << ".size = "; - os << (params.size); - os << ", "; - os << ".pValue = "; - ur::details::printPtr(os, - (params.pValue)); - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - os << (params.stype); - os << ", "; - os << ".pNext = "; - ur::details::printStruct(os, - (params.pNext)); - os << ", "; - os << ".isNativeHandleOwned = "; - os << (params.isNativeHandleOwned); - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - os << (params.stype); - os << ", "; - os << ".pNext = "; - ur::details::printStruct(os, - (params.pNext)); - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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){"; + template <> inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_adapter_info_t value, size_t size); - os << ".stype = "; - os << (params.stype); - os << ", "; - os << ".pNext = "; - ur::details::printStruct(os, - (params.pNext)); - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_kernel_info_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_kernel_info_t value) { - switch (value) { - case UR_KERNEL_INFO_FUNCTION_NAME: - os << "UR_KERNEL_INFO_FUNCTION_NAME"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_kernel_info_t enum value -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_kernel_info_t value, size_t size) { - if (ptr == NULL) { - 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 uint32_t *tptr = (const uint32_t *)ptr; - if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; - return UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - os << *tptr; + template <> inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_platform_info_t value, size_t size); - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - os << *tptr; - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - ur::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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - ur::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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - os << *tptr; - os << ")"; - } break; - default: - os << "unknown enumerator"; - return UR_RESULT_ERROR_INVALID_ENUMERATION; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_kernel_group_info_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_kernel_group_info_t value) { - switch (value) { - case UR_KERNEL_GROUP_INFO_GLOBAL_WORK_SIZE: - os << "UR_KERNEL_GROUP_INFO_GLOBAL_WORK_SIZE"; - 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; - case UR_KERNEL_GROUP_INFO_COMPILE_MAX_WORK_GROUP_SIZE: - os << "UR_KERNEL_GROUP_INFO_COMPILE_MAX_WORK_GROUP_SIZE"; - break; - case UR_KERNEL_GROUP_INFO_COMPILE_MAX_LINEAR_WORK_GROUP_SIZE: - os << "UR_KERNEL_GROUP_INFO_COMPILE_MAX_LINEAR_WORK_GROUP_SIZE"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_kernel_group_info_t enum value -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_kernel_group_info_t value, size_t size) { - if (ptr == NULL) { - return printPtr(os, ptr); - } - switch (value) { - case UR_KERNEL_GROUP_INFO_GLOBAL_WORK_SIZE: { - const size_t *tptr = (const size_t *)ptr; - os << "{"; - size_t nelems = size / sizeof(size_t); - for (size_t i = 0; i < nelems; ++i) { - if (i != 0) { - os << ", "; - } - os << tptr[i]; - } - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - os << *tptr; - os << ")"; - } break; - case UR_KERNEL_GROUP_INFO_COMPILE_WORK_GROUP_SIZE: { - const size_t *tptr = (const size_t *)ptr; - os << "{"; - size_t nelems = size / sizeof(size_t); - for (size_t i = 0; i < nelems; ++i) { - if (i != 0) { - os << ", "; - } - os << tptr[i]; - } - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - os << *tptr; - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - os << *tptr; - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - os << *tptr; - os << ")"; - } break; - case UR_KERNEL_GROUP_INFO_COMPILE_MAX_WORK_GROUP_SIZE: { - const size_t *tptr = (const size_t *)ptr; - os << "{"; - size_t nelems = size / sizeof(size_t); - for (size_t i = 0; i < nelems; ++i) { - if (i != 0) { - os << ", "; - } - os << tptr[i]; - } - os << "}"; - } break; - case UR_KERNEL_GROUP_INFO_COMPILE_MAX_LINEAR_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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - os << *tptr; - os << ")"; - } break; - default: - os << "unknown enumerator"; - return UR_RESULT_ERROR_INVALID_ENUMERATION; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_kernel_sub_group_info_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_kernel_sub_group_info_t value) { - switch (value) { - case UR_KERNEL_SUB_GROUP_INFO_MAX_SUB_GROUP_SIZE: - os << "UR_KERNEL_SUB_GROUP_INFO_MAX_SUB_GROUP_SIZE"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_kernel_sub_group_info_t enum value -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_kernel_sub_group_info_t value, size_t size) { - if (ptr == NULL) { - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - os << *tptr; - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - os << *tptr; - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - os << *tptr; - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - os << *tptr; - os << ")"; - } break; - default: - os << "unknown enumerator"; - return UR_RESULT_ERROR_INVALID_ENUMERATION; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_kernel_cache_config_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_kernel_cache_config_t value) { - switch (value) { - case UR_KERNEL_CACHE_CONFIG_DEFAULT: - os << "UR_KERNEL_CACHE_CONFIG_DEFAULT"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_kernel_exec_info_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_kernel_exec_info_t value) { - switch (value) { - case UR_KERNEL_EXEC_INFO_USM_INDIRECT_ACCESS: - os << "UR_KERNEL_EXEC_INFO_USM_INDIRECT_ACCESS"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_kernel_exec_info_t enum value -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_kernel_exec_info_t value, size_t size) { - if (ptr == NULL) { - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - os << *tptr; - os << ")"; - } break; - case UR_KERNEL_EXEC_INFO_USM_PTRS: { - const void *const *tptr = (const void *const *)ptr; - os << "{"; - size_t nelems = size / sizeof(void *); - for (size_t i = 0; i < nelems; ++i) { - if (i != 0) { - os << ", "; - } - os << tptr[i]; - } - os << "}"; - } break; - case UR_KERNEL_EXEC_INFO_CACHE_CONFIG: { - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; + template <> inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_device_info_t value, size_t size); - os << *tptr; - os << ")"; - } break; - default: - os << "unknown enumerator"; - return UR_RESULT_ERROR_INVALID_ENUMERATION; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - os << (params.stype); - os << ", "; - os << ".pNext = "; - ur::details::printStruct(os, - (params.pNext)); - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - os << (params.stype); + template<> inline ur_result_t printFlag(std::ostream &os, uint32_t flag); + + + + + inline ur_result_t printUnion( + std::ostream &os, + const union ur_device_partition_value_t params, + const enum ur_device_partition_t tag + ); - os << ", "; - os << ".pNext = "; - ur::details::printStruct(os, - (params.pNext)); - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - os << (params.stype); - os << ", "; - os << ".pNext = "; - ur::details::printStruct(os, - (params.pNext)); - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - os << (params.stype); - os << ", "; - os << ".pNext = "; + template<> inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - ur::details::printStruct(os, - (params.pNext)); - os << ", "; - os << ".memoryAccess = "; - ur::details::printFlag(os, - (params.memoryAccess)); - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - os << (params.stype); + template<> inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - os << ", "; - os << ".pNext = "; - ur::details::printStruct(os, - (params.pNext)); - os << ", "; - os << ".isNativeHandleOwned = "; - os << (params.isNativeHandleOwned); - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_queue_info_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_queue_info_t value) { - switch (value) { - case UR_QUEUE_INFO_CONTEXT: - os << "UR_QUEUE_INFO_CONTEXT"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_queue_info_t enum value -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_queue_info_t value, size_t size) { - if (ptr == NULL) { - return printPtr(os, ptr); - } - switch (value) { - case UR_QUEUE_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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - ur::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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - ur::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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - ur::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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; + template<> inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - ur::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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; + template<> inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - os << *tptr; - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; + template<> inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - os << *tptr; - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; + template<> inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - os << *tptr; - os << ")"; - } break; - default: - os << "unknown enumerator"; - return UR_RESULT_ERROR_INVALID_ENUMERATION; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_queue_flag_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_queue_flag_t value) { - switch (value) { - case UR_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_ENABLE: - os << "UR_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_ENABLE"; - 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; - case UR_QUEUE_FLAG_LOW_POWER_EVENTS_EXP: - os << "UR_QUEUE_FLAG_LOW_POWER_EVENTS_EXP"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_queue_flag_t flag -template <> -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) { - val ^= (uint32_t)UR_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_ENABLE; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_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 << " | "; - } else { - first = false; - } - os << UR_QUEUE_FLAG_PROFILING_ENABLE; - } + template <> inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_context_info_t value, size_t size); - if ((val & UR_QUEUE_FLAG_ON_DEVICE) == (uint32_t)UR_QUEUE_FLAG_ON_DEVICE) { - val ^= (uint32_t)UR_QUEUE_FLAG_ON_DEVICE; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_QUEUE_FLAG_ON_DEVICE; - } - 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 << " | "; - } else { - first = false; - } - os << UR_QUEUE_FLAG_ON_DEVICE_DEFAULT; - } - 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 << " | "; - } else { - first = false; - } - os << UR_QUEUE_FLAG_DISCARD_EVENTS; - } - 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 << " | "; - } else { - first = false; - } - os << UR_QUEUE_FLAG_PRIORITY_LOW; - } - 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 << " | "; - } else { - first = false; - } - os << UR_QUEUE_FLAG_PRIORITY_HIGH; - } - 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 << " | "; - } else { - first = false; - } - os << UR_QUEUE_FLAG_SUBMISSION_BATCHED; - } - 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 << " | "; - } else { - first = false; - } - os << UR_QUEUE_FLAG_SUBMISSION_IMMEDIATE; - } - 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 << " | "; - } else { - first = false; - } - 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) { - val ^= (uint32_t)UR_QUEUE_FLAG_SYNC_WITH_DEFAULT_STREAM; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_QUEUE_FLAG_SYNC_WITH_DEFAULT_STREAM; - } - if ((val & UR_QUEUE_FLAG_LOW_POWER_EVENTS_EXP) == (uint32_t)UR_QUEUE_FLAG_LOW_POWER_EVENTS_EXP) { - val ^= (uint32_t)UR_QUEUE_FLAG_LOW_POWER_EVENTS_EXP; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_QUEUE_FLAG_LOW_POWER_EVENTS_EXP; - } - if (val != 0) { - std::bitset<32> bits(val); - if (!first) { - os << " | "; - } - os << "unknown bit flags " << bits; - } else if (first) { - os << "0"; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::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 = "; - os << (params.stype); - os << ", "; - os << ".pNext = "; - ur::details::printStruct(os, - (params.pNext)); - os << ", "; - os << ".flags = "; - ur::details::printFlag(os, - (params.flags)); - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; + template<> inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - os << (params.stype); - os << ", "; - os << ".pNext = "; + template <> inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_mem_info_t value, size_t size); - ur::details::printStruct(os, - (params.pNext)); - os << ", "; - os << ".computeIndex = "; - os << (params.computeIndex); - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - os << (params.stype); + template <> inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_image_info_t value, size_t size); + + + - os << ", "; - os << ".pNext = "; - ur::details::printStruct(os, - (params.pNext)); - os << ", "; - os << ".pNativeData = "; - ur::details::printPtr(os, - (params.pNativeData)); - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - os << (params.stype); - os << ", "; - os << ".pNext = "; - ur::details::printStruct(os, - (params.pNext)); - os << ", "; - os << ".isNativeHandleOwned = "; - os << (params.isNativeHandleOwned); - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_command_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum 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_EXTERNAL_SEMAPHORE_WAIT_EXP: - os << "UR_COMMAND_EXTERNAL_SEMAPHORE_WAIT_EXP"; - break; - case UR_COMMAND_EXTERNAL_SEMAPHORE_SIGNAL_EXP: - os << "UR_COMMAND_EXTERNAL_SEMAPHORE_SIGNAL_EXP"; - break; - case UR_COMMAND_TIMESTAMP_RECORDING_EXP: - os << "UR_COMMAND_TIMESTAMP_RECORDING_EXP"; - break; - case UR_COMMAND_ENQUEUE_NATIVE_EXP: - os << "UR_COMMAND_ENQUEUE_NATIVE_EXP"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_event_status_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_event_status_t value) { - switch (value) { - case UR_EVENT_STATUS_COMPLETE: - os << "UR_EVENT_STATUS_COMPLETE"; - 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; - case UR_EVENT_STATUS_ERROR: - os << "UR_EVENT_STATUS_ERROR"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_event_info_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_event_info_t value) { - switch (value) { - case UR_EVENT_INFO_COMMAND_QUEUE: - os << "UR_EVENT_INFO_COMMAND_QUEUE"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_event_info_t enum value -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_event_info_t value, size_t size) { - if (ptr == NULL) { - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - ur::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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - ur::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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - os << *tptr; - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - os << *tptr; - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - os << *tptr; - os << ")"; - } break; - default: - os << "unknown enumerator"; - return UR_RESULT_ERROR_INVALID_ENUMERATION; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_profiling_info_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_profiling_info_t value) { - switch (value) { - case UR_PROFILING_INFO_COMMAND_QUEUED: - os << "UR_PROFILING_INFO_COMMAND_QUEUED"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_profiling_info_t enum value -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_profiling_info_t value, size_t size) { - if (ptr == NULL) { - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - os << *tptr; - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - os << *tptr; - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - os << *tptr; - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - os << *tptr; - 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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - os << *tptr; - os << ")"; - } break; - default: - os << "unknown enumerator"; - return UR_RESULT_ERROR_INVALID_ENUMERATION; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - os << (params.stype); - os << ", "; - os << ".pNext = "; + template <> inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_sampler_info_t value, size_t size); - ur::details::printStruct(os, - (params.pNext)); - os << ", "; - os << ".isNativeHandleOwned = "; - os << (params.isNativeHandleOwned); - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_execution_info_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_execution_info_t value) { - switch (value) { - case UR_EXECUTION_INFO_COMPLETE: - os << "UR_EXECUTION_INFO_COMPLETE"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_map_flag_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_map_flag_t value) { - switch (value) { - case UR_MAP_FLAG_READ: - os << "UR_MAP_FLAG_READ"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_map_flag_t flag -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { - uint32_t val = flag; - bool first = true; - if ((val & UR_MAP_FLAG_READ) == (uint32_t)UR_MAP_FLAG_READ) { - val ^= (uint32_t)UR_MAP_FLAG_READ; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_MAP_FLAG_READ; - } - if ((val & UR_MAP_FLAG_WRITE) == (uint32_t)UR_MAP_FLAG_WRITE) { - val ^= (uint32_t)UR_MAP_FLAG_WRITE; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_MAP_FLAG_WRITE; - } - 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 << " | "; - } else { - first = false; - } - os << UR_MAP_FLAG_WRITE_INVALIDATE_REGION; - } - if (val != 0) { - std::bitset<32> bits(val); - if (!first) { - os << " | "; - } - os << "unknown bit flags " << bits; - } else if (first) { - os << "0"; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_usm_migration_flag_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_usm_migration_flag_t value) { - switch (value) { - case UR_USM_MIGRATION_FLAG_DEFAULT: - os << "UR_USM_MIGRATION_FLAG_DEFAULT"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_usm_migration_flag_t flag -template <> -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) { - val ^= (uint32_t)UR_USM_MIGRATION_FLAG_DEFAULT; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_USM_MIGRATION_FLAG_DEFAULT; - } - if (val != 0) { - std::bitset<32> bits(val); - if (!first) { - os << " | "; - } - os << "unknown bit flags " << bits; - } else if (first) { - os << "0"; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_exp_device_2d_block_array_capability_flag_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_exp_device_2d_block_array_capability_flag_t value) { - switch (value) { - case UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_LOAD: - os << "UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_LOAD"; - break; - case UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_STORE: - os << "UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_STORE"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_exp_device_2d_block_array_capability_flag_t flag -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { - uint32_t val = flag; - bool first = true; - if ((val & UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_LOAD) == (uint32_t)UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_LOAD) { - val ^= (uint32_t)UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_LOAD; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_LOAD; - } - if ((val & UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_STORE) == (uint32_t)UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_STORE) { - val ^= (uint32_t)UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_STORE; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_STORE; - } - if (val != 0) { - std::bitset<32> bits(val); - if (!first) { - os << " | "; - } - os << "unknown bit flags " << bits; - } else if (first) { - os << "0"; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_exp_image_copy_flag_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_exp_image_copy_flag_t value) { - switch (value) { - case UR_EXP_IMAGE_COPY_FLAG_HOST_TO_DEVICE: - os << "UR_EXP_IMAGE_COPY_FLAG_HOST_TO_DEVICE"; - 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; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_exp_image_copy_flag_t flag -template <> -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) { - val ^= (uint32_t)UR_EXP_IMAGE_COPY_FLAG_HOST_TO_DEVICE; - if (!first) { - os << " | "; - } else { - first = false; - } - 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) { - val ^= (uint32_t)UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_HOST; - if (!first) { - os << " | "; - } else { - first = false; - } - 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) { - val ^= (uint32_t)UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_DEVICE; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_DEVICE; - } - if (val != 0) { - std::bitset<32> bits(val); - if (!first) { - os << " | "; - } - os << "unknown bit flags " << bits; - } else if (first) { - os << "0"; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_exp_sampler_cubemap_filter_mode_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_exp_sampler_cubemap_filter_mode_t value) { - switch (value) { - case UR_EXP_SAMPLER_CUBEMAP_FILTER_MODE_DISJOINTED: - os << "UR_EXP_SAMPLER_CUBEMAP_FILTER_MODE_DISJOINTED"; - break; - case UR_EXP_SAMPLER_CUBEMAP_FILTER_MODE_SEAMLESS: - os << "UR_EXP_SAMPLER_CUBEMAP_FILTER_MODE_SEAMLESS"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_exp_external_mem_type_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_exp_external_mem_type_t value) { - switch (value) { - case UR_EXP_EXTERNAL_MEM_TYPE_OPAQUE_FD: - os << "UR_EXP_EXTERNAL_MEM_TYPE_OPAQUE_FD"; - break; - case UR_EXP_EXTERNAL_MEM_TYPE_WIN32_NT: - os << "UR_EXP_EXTERNAL_MEM_TYPE_WIN32_NT"; - break; - case UR_EXP_EXTERNAL_MEM_TYPE_WIN32_NT_DX12_RESOURCE: - os << "UR_EXP_EXTERNAL_MEM_TYPE_WIN32_NT_DX12_RESOURCE"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_exp_external_semaphore_type_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_exp_external_semaphore_type_t value) { - switch (value) { - case UR_EXP_EXTERNAL_SEMAPHORE_TYPE_OPAQUE_FD: - os << "UR_EXP_EXTERNAL_SEMAPHORE_TYPE_OPAQUE_FD"; - break; - case UR_EXP_EXTERNAL_SEMAPHORE_TYPE_WIN32_NT: - os << "UR_EXP_EXTERNAL_SEMAPHORE_TYPE_WIN32_NT"; - break; - case UR_EXP_EXTERNAL_SEMAPHORE_TYPE_WIN32_NT_DX12_FENCE: - os << "UR_EXP_EXTERNAL_SEMAPHORE_TYPE_WIN32_NT_DX12_FENCE"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - os << (params.stype); - os << ", "; - os << ".pNext = "; + template<> inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - ur::details::printStruct(os, - (params.pNext)); - os << ", "; - os << ".fd = "; + template<> inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - os << (params.fd); - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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){"; + template<> inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - os << ".stype = "; - os << (params.stype); + template <> inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_usm_alloc_info_t value, size_t size); - os << ", "; - os << ".pNext = "; - ur::details::printStruct(os, - (params.pNext)); - os << ", "; - os << ".handle = "; - ur::details::printPtr(os, - (params.handle)); + template<> inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - os << (params.stype); - os << ", "; - os << ".pNext = "; - ur::details::printStruct(os, - (params.pNext)); - os << ", "; - os << ".minMipmapLevelClamp = "; - os << (params.minMipmapLevelClamp); - os << ", "; - os << ".maxMipmapLevelClamp = "; - os << (params.maxMipmapLevelClamp); - os << ", "; - os << ".maxAnisotropy = "; - os << (params.maxAnisotropy); - os << ", "; - os << ".mipFilterMode = "; - os << (params.mipFilterMode); - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - os << (params.stype); - os << ", "; - os << ".pNext = "; - ur::details::printStruct(os, - (params.pNext)); - os << ", "; - os << ".addrModes = {"; - for (auto i = 0; i < 3; i++) { - if (i != 0) { - os << ", "; - } - os << (params.addrModes[i]); - } - os << "}"; - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_exp_sampler_cubemap_properties_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_sampler_cubemap_properties_t params) { - os << "(struct ur_exp_sampler_cubemap_properties_t){"; - os << ".stype = "; - os << (params.stype); - os << ", "; - os << ".pNext = "; - ur::details::printStruct(os, - (params.pNext)); - os << ", "; - os << ".cubemapFilterMode = "; - os << (params.cubemapFilterMode); - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_exp_external_mem_desc_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_external_mem_desc_t params) { - os << "(struct ur_exp_external_mem_desc_t){"; - os << ".stype = "; - os << (params.stype); + template <> inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_usm_pool_info_t value, size_t size); - os << ", "; - os << ".pNext = "; - ur::details::printStruct(os, - (params.pNext)); - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_exp_external_semaphore_desc_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_external_semaphore_desc_t params) { - os << "(struct ur_exp_external_semaphore_desc_t){"; - os << ".stype = "; + template <> inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_virtual_mem_granularity_info_t value, size_t size); - os << (params.stype); - os << ", "; - os << ".pNext = "; - ur::details::printStruct(os, - (params.pNext)); - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_exp_image_copy_region_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_image_copy_region_t params) { - os << "(struct ur_exp_image_copy_region_t){"; - os << ".stype = "; - os << (params.stype); - os << ", "; - os << ".pNext = "; - ur::details::printStruct(os, - (params.pNext)); - os << ", "; - os << ".srcOffset = "; - os << (params.srcOffset); + template<> inline ur_result_t printFlag(std::ostream &os, uint32_t flag); + + + + + + + template <> inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_virtual_mem_info_t value, size_t size); + + + + + + + template<> inline ur_result_t printFlag(std::ostream &os, uint32_t flag); + + + - os << ", "; - os << ".dstOffset = "; - os << (params.dstOffset); - os << ", "; - os << ".copyExtent = "; - os << (params.copyExtent); - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_device_command_buffer_update_capability_flag_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_device_command_buffer_update_capability_flag_t value) { - switch (value) { - case UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_KERNEL_ARGUMENTS: - os << "UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_KERNEL_ARGUMENTS"; - break; - case UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_LOCAL_WORK_SIZE: - os << "UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_LOCAL_WORK_SIZE"; - break; - case UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_GLOBAL_WORK_SIZE: - os << "UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_GLOBAL_WORK_SIZE"; - break; - case UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_GLOBAL_WORK_OFFSET: - os << "UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_GLOBAL_WORK_OFFSET"; - break; - case UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_KERNEL_HANDLE: - os << "UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_KERNEL_HANDLE"; - break; - case UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_EVENTS: - os << "UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_EVENTS"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_device_command_buffer_update_capability_flag_t flag -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { - uint32_t val = flag; - bool first = true; - if ((val & UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_KERNEL_ARGUMENTS) == (uint32_t)UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_KERNEL_ARGUMENTS) { - val ^= (uint32_t)UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_KERNEL_ARGUMENTS; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_KERNEL_ARGUMENTS; - } - if ((val & UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_LOCAL_WORK_SIZE) == (uint32_t)UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_LOCAL_WORK_SIZE) { - val ^= (uint32_t)UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_LOCAL_WORK_SIZE; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_LOCAL_WORK_SIZE; - } + + inline ur_result_t printUnion( + std::ostream &os, + const union ur_program_metadata_value_t params, + const enum ur_program_metadata_type_t tag + ); - if ((val & UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_GLOBAL_WORK_SIZE) == (uint32_t)UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_GLOBAL_WORK_SIZE) { - val ^= (uint32_t)UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_GLOBAL_WORK_SIZE; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_GLOBAL_WORK_SIZE; - } - if ((val & UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_GLOBAL_WORK_OFFSET) == (uint32_t)UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_GLOBAL_WORK_OFFSET) { - val ^= (uint32_t)UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_GLOBAL_WORK_OFFSET; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_GLOBAL_WORK_OFFSET; - } - if ((val & UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_KERNEL_HANDLE) == (uint32_t)UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_KERNEL_HANDLE) { - val ^= (uint32_t)UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_KERNEL_HANDLE; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_KERNEL_HANDLE; - } - if ((val & UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_EVENTS) == (uint32_t)UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_EVENTS) { - val ^= (uint32_t)UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_EVENTS; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_EVENTS; - } - if (val != 0) { - std::bitset<32> bits(val); - if (!first) { - os << " | "; - } - os << "unknown bit flags " << bits; - } else if (first) { - os << "0"; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_exp_command_buffer_info_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_exp_command_buffer_info_t value) { - switch (value) { - case UR_EXP_COMMAND_BUFFER_INFO_REFERENCE_COUNT: - os << "UR_EXP_COMMAND_BUFFER_INFO_REFERENCE_COUNT"; - break; - case UR_EXP_COMMAND_BUFFER_INFO_DESCRIPTOR: - os << "UR_EXP_COMMAND_BUFFER_INFO_DESCRIPTOR"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_exp_command_buffer_info_t enum value -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_exp_command_buffer_info_t value, size_t size) { - if (ptr == NULL) { - return printPtr(os, ptr); - } - switch (value) { - case UR_EXP_COMMAND_BUFFER_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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - os << *tptr; - os << ")"; - } break; - case UR_EXP_COMMAND_BUFFER_INFO_DESCRIPTOR: { - const ur_exp_command_buffer_desc_t *tptr = (const ur_exp_command_buffer_desc_t *)ptr; - if (sizeof(ur_exp_command_buffer_desc_t) > size) { - os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_exp_command_buffer_desc_t) << ")"; - return UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - os << *tptr; - os << ")"; - } break; - default: - os << "unknown enumerator"; - return UR_RESULT_ERROR_INVALID_ENUMERATION; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_exp_command_buffer_command_info_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_exp_command_buffer_command_info_t value) { - switch (value) { - case UR_EXP_COMMAND_BUFFER_COMMAND_INFO_REFERENCE_COUNT: - os << "UR_EXP_COMMAND_BUFFER_COMMAND_INFO_REFERENCE_COUNT"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_exp_command_buffer_command_info_t enum value -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_exp_command_buffer_command_info_t value, size_t size) { - if (ptr == NULL) { - return printPtr(os, ptr); - } - switch (value) { - case UR_EXP_COMMAND_BUFFER_COMMAND_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 UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - os << *tptr; - os << ")"; - } break; - default: - os << "unknown enumerator"; - return UR_RESULT_ERROR_INVALID_ENUMERATION; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - os << (params.stype); - os << ", "; - os << ".pNext = "; - ur::details::printStruct(os, - (params.pNext)); - os << ", "; - os << ".isUpdatable = "; - os << (params.isUpdatable); - os << ", "; - os << ".isInOrder = "; - os << (params.isInOrder); - os << ", "; - os << ".enableProfiling = "; + template <> inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_program_info_t value, size_t size); - os << (params.enableProfiling); - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_exp_command_buffer_update_memobj_arg_desc_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_command_buffer_update_memobj_arg_desc_t params) { - os << "(struct ur_exp_command_buffer_update_memobj_arg_desc_t){"; - os << ".stype = "; - os << (params.stype); - os << ", "; - os << ".pNext = "; - ur::details::printStruct(os, - (params.pNext)); - os << ", "; - os << ".argIndex = "; - os << (params.argIndex); + template <> inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_program_build_info_t value, size_t size); - os << ", "; - os << ".pProperties = "; - os << (params.pProperties); - os << ", "; - os << ".hNewMemObjArg = "; - ur::details::printPtr(os, - (params.hNewMemObjArg)); - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_exp_command_buffer_update_pointer_arg_desc_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_command_buffer_update_pointer_arg_desc_t params) { - os << "(struct ur_exp_command_buffer_update_pointer_arg_desc_t){"; - os << ".stype = "; - os << (params.stype); - os << ", "; - os << ".pNext = "; - ur::details::printStruct(os, - (params.pNext)); - os << ", "; - os << ".argIndex = "; - os << (params.argIndex); - os << ", "; - os << ".pProperties = "; - os << (params.pProperties); - os << ", "; - os << ".pNewPointerArg = "; - os << (params.pNewPointerArg); - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_exp_command_buffer_update_value_arg_desc_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_command_buffer_update_value_arg_desc_t params) { - os << "(struct ur_exp_command_buffer_update_value_arg_desc_t){"; - os << ".stype = "; - os << (params.stype); - os << ", "; - os << ".pNext = "; - ur::details::printStruct(os, - (params.pNext)); - os << ", "; - os << ".argIndex = "; - os << (params.argIndex); - os << ", "; - os << ".argSize = "; - os << (params.argSize); + template <> inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_kernel_info_t value, size_t size); - os << ", "; - os << ".pProperties = "; - os << (params.pProperties); + template <> inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_kernel_group_info_t value, size_t size); - os << ", "; - os << ".pNewValueArg = "; - os << (params.pNewValueArg); + template <> inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_kernel_sub_group_info_t value, size_t size); - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_exp_command_buffer_update_kernel_launch_desc_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_command_buffer_update_kernel_launch_desc_t params) { - os << "(struct ur_exp_command_buffer_update_kernel_launch_desc_t){"; - os << ".stype = "; - os << (params.stype); - os << ", "; - os << ".pNext = "; + template <> inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_kernel_exec_info_t value, size_t size); - ur::details::printStruct(os, - (params.pNext)); - os << ", "; - os << ".hNewKernel = "; - ur::details::printPtr(os, - (params.hNewKernel)); - os << ", "; - os << ".numNewMemObjArgs = "; - os << (params.numNewMemObjArgs); - os << ", "; - os << ".numNewPointerArgs = "; - os << (params.numNewPointerArgs); - os << ", "; - os << ".numNewValueArgs = "; - os << (params.numNewValueArgs); - os << ", "; - os << ".newWorkDim = "; - os << (params.newWorkDim); - os << ", "; - os << ".pNewMemObjArgList = "; - ur::details::printPtr(os, reinterpret_cast((params.pNewMemObjArgList))); - if ((params.pNewMemObjArgList) != NULL) { - os << " {"; - for (size_t i = 0; i < params.numNewMemObjArgs; ++i) { - if (i != 0) { - os << ", "; - } - os << ((params.pNewMemObjArgList))[i]; - } - os << "}"; - } - os << ", "; - os << ".pNewPointerArgList = "; - ur::details::printPtr(os, reinterpret_cast((params.pNewPointerArgList))); - if ((params.pNewPointerArgList) != NULL) { - os << " {"; - for (size_t i = 0; i < params.numNewPointerArgs; ++i) { - if (i != 0) { - os << ", "; - } - os << ((params.pNewPointerArgList))[i]; - } - os << "}"; - } - os << ", "; - os << ".pNewValueArgList = "; - ur::details::printPtr(os, reinterpret_cast((params.pNewValueArgList))); - if ((params.pNewValueArgList) != NULL) { - os << " {"; - for (size_t i = 0; i < params.numNewValueArgs; ++i) { - if (i != 0) { - os << ", "; - } - os << ((params.pNewValueArgList))[i]; - } - os << "}"; - } - os << ", "; - os << ".pNewGlobalWorkOffset = "; - ur::details::printPtr(os, reinterpret_cast((params.pNewGlobalWorkOffset))); - if ((params.pNewGlobalWorkOffset) != NULL) { - os << " {"; - for (size_t i = 0; i < params.newWorkDim; ++i) { - if (i != 0) { - os << ", "; - } - os << ((params.pNewGlobalWorkOffset))[i]; - } - os << "}"; - } - os << ", "; - os << ".pNewGlobalWorkSize = "; - ur::details::printPtr(os, reinterpret_cast((params.pNewGlobalWorkSize))); - if ((params.pNewGlobalWorkSize) != NULL) { - os << " {"; - for (size_t i = 0; i < params.newWorkDim; ++i) { - if (i != 0) { - os << ", "; - } - os << ((params.pNewGlobalWorkSize))[i]; - } - os << "}"; - } - os << ", "; - os << ".pNewLocalWorkSize = "; - ur::details::printPtr(os, reinterpret_cast((params.pNewLocalWorkSize))); - if ((params.pNewLocalWorkSize) != NULL) { - os << " {"; - for (size_t i = 0; i < params.newWorkDim; ++i) { - if (i != 0) { - os << ", "; - } - os << ((params.pNewLocalWorkSize))[i]; - } - os << "}"; - } - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_exp_launch_property_id_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_exp_launch_property_id_t value) { - switch (value) { - case UR_EXP_LAUNCH_PROPERTY_ID_IGNORE: - os << "UR_EXP_LAUNCH_PROPERTY_ID_IGNORE"; - break; - case UR_EXP_LAUNCH_PROPERTY_ID_COOPERATIVE: - os << "UR_EXP_LAUNCH_PROPERTY_ID_COOPERATIVE"; - break; - case UR_EXP_LAUNCH_PROPERTY_ID_CLUSTER_DIMENSION: - os << "UR_EXP_LAUNCH_PROPERTY_ID_CLUSTER_DIMENSION"; - break; - case UR_EXP_LAUNCH_PROPERTY_ID_WORK_GROUP_MEMORY: - os << "UR_EXP_LAUNCH_PROPERTY_ID_WORK_GROUP_MEMORY"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -// @brief Print ur_exp_launch_property_value_t union -inline ur_result_t printUnion( - std::ostream &os, - const union ur_exp_launch_property_value_t params, - const enum ur_exp_launch_property_id_t tag) { - os << "(union ur_exp_launch_property_value_t){"; - switch (tag) { - case UR_EXP_LAUNCH_PROPERTY_ID_CLUSTER_DIMENSION: - os << ".clusterDim = {"; - for (auto i = 0; i < 3; i++) { - if (i != 0) { - os << ", "; - } - os << (params.clusterDim[i]); - } - os << "}"; - break; - case UR_EXP_LAUNCH_PROPERTY_ID_COOPERATIVE: - os << ".cooperative = "; - os << (params.cooperative); - break; - case UR_EXP_LAUNCH_PROPERTY_ID_WORK_GROUP_MEMORY: - os << ".workgroup_mem_size = "; - os << (params.workgroup_mem_size); - break; - default: - os << ""; - return UR_RESULT_ERROR_INVALID_ENUMERATION; - } - os << "}"; - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_exp_launch_property_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_launch_property_t params) { - os << "(struct ur_exp_launch_property_t){"; - os << ".id = "; - os << (params.id); - os << ", "; - os << ".value = "; - ur::details::printUnion(os, (params.value), params.id); + template <> inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_queue_info_t value, size_t size); + + + + + template<> inline ur_result_t printFlag(std::ostream &os, uint32_t flag); + - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_exp_peer_info_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_exp_peer_info_t value) { - switch (value) { - case UR_EXP_PEER_INFO_UR_PEER_ACCESS_SUPPORTED: - os << "UR_EXP_PEER_INFO_UR_PEER_ACCESS_SUPPORTED"; - break; - case UR_EXP_PEER_INFO_UR_PEER_ATOMICS_SUPPORTED: - os << "UR_EXP_PEER_INFO_UR_PEER_ATOMICS_SUPPORTED"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_exp_peer_info_t enum value -template <> -inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_exp_peer_info_t value, size_t size) { - if (ptr == NULL) { - return printPtr(os, ptr); - } - switch (value) { - case UR_EXP_PEER_INFO_UR_PEER_ACCESS_SUPPORTED: { - const int *tptr = (const int *)ptr; - if (sizeof(int) > size) { - os << "invalid size (is: " << size << ", expected: >=" << sizeof(int) << ")"; - return UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - os << *tptr; - os << ")"; - } break; - case UR_EXP_PEER_INFO_UR_PEER_ATOMICS_SUPPORTED: { - const int *tptr = (const int *)ptr; - if (sizeof(int) > size) { - os << "invalid size (is: " << size << ", expected: >=" << sizeof(int) << ")"; - return UR_RESULT_ERROR_INVALID_SIZE; - } - os << (const void *)(tptr) << " ("; - os << *tptr; - os << ")"; - } break; - default: - os << "unknown enumerator"; - return UR_RESULT_ERROR_INVALID_ENUMERATION; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_exp_enqueue_ext_flag_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_exp_enqueue_ext_flag_t value) { - switch (value) { - case UR_EXP_ENQUEUE_EXT_FLAG_LOW_POWER_EVENTS: - os << "UR_EXP_ENQUEUE_EXT_FLAG_LOW_POWER_EVENTS"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_exp_enqueue_ext_flag_t flag -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { - uint32_t val = flag; - bool first = true; - if ((val & UR_EXP_ENQUEUE_EXT_FLAG_LOW_POWER_EVENTS) == (uint32_t)UR_EXP_ENQUEUE_EXT_FLAG_LOW_POWER_EVENTS) { - val ^= (uint32_t)UR_EXP_ENQUEUE_EXT_FLAG_LOW_POWER_EVENTS; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_EXP_ENQUEUE_EXT_FLAG_LOW_POWER_EVENTS; - } - if (val != 0) { - std::bitset<32> bits(val); - if (!first) { - os << " | "; - } - os << "unknown bit flags " << bits; - } else if (first) { - os << "0"; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_exp_enqueue_ext_properties_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_enqueue_ext_properties_t params) { - os << "(struct ur_exp_enqueue_ext_properties_t){"; - os << ".stype = "; - os << (params.stype); - os << ", "; - os << ".pNext = "; - ur::details::printStruct(os, - (params.pNext)); - os << ", "; - os << ".flags = "; - ur::details::printFlag(os, - (params.flags)); - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_exp_enqueue_native_command_flag_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_exp_enqueue_native_command_flag_t value) { - switch (value) { - case UR_EXP_ENQUEUE_NATIVE_COMMAND_FLAG_TBD: - os << "UR_EXP_ENQUEUE_NATIVE_COMMAND_FLAG_TBD"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_exp_enqueue_native_command_flag_t flag -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { - uint32_t val = flag; - bool first = true; - if ((val & UR_EXP_ENQUEUE_NATIVE_COMMAND_FLAG_TBD) == (uint32_t)UR_EXP_ENQUEUE_NATIVE_COMMAND_FLAG_TBD) { - val ^= (uint32_t)UR_EXP_ENQUEUE_NATIVE_COMMAND_FLAG_TBD; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_EXP_ENQUEUE_NATIVE_COMMAND_FLAG_TBD; - } - if (val != 0) { - std::bitset<32> bits(val); - if (!first) { - os << " | "; - } - os << "unknown bit flags " << bits; - } else if (first) { - os << "0"; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_exp_enqueue_native_command_properties_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_enqueue_native_command_properties_t params) { - os << "(struct ur_exp_enqueue_native_command_properties_t){"; - os << ".stype = "; - os << (params.stype); - os << ", "; - os << ".pNext = "; - ur::details::printStruct(os, - (params.pNext)); - os << ", "; - os << ".flags = "; - ur::details::printFlag(os, - (params.flags)); - os << "}"; - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_exp_tensor_map_data_type_flag_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_exp_tensor_map_data_type_flag_t value) { - switch (value) { - case UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT8: - os << "UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT8"; - break; - case UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT16: - os << "UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT16"; - break; - case UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT32: - os << "UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT32"; - break; - case UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_INT32: - os << "UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_INT32"; - break; - case UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT64: - os << "UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT64"; - break; - case UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_INT64: - os << "UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_INT64"; - break; - case UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT16: - os << "UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT16"; - break; - case UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT32: - os << "UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT32"; - break; - case UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT64: - os << "UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT64"; - break; - case UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_BFLOAT16: - os << "UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_BFLOAT16"; - break; - case UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT32_FTZ: - os << "UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT32_FTZ"; - break; - case UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_TFLOAT32: - os << "UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_TFLOAT32"; - break; - case UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_TFLOAT32_FTZ: - os << "UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_TFLOAT32_FTZ"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_exp_tensor_map_data_type_flag_t flag -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { - uint32_t val = flag; - bool first = true; - if ((val & UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT8) == (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT8) { - val ^= (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT8; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT8; - } + template <> inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_event_info_t value, size_t size); - if ((val & UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT16) == (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT16) { - val ^= (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT16; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT16; - } - if ((val & UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT32) == (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT32) { - val ^= (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT32; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT32; - } + template <> inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_profiling_info_t value, size_t size); - if ((val & UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_INT32) == (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_INT32) { - val ^= (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_INT32; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_INT32; - } - if ((val & UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT64) == (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT64) { - val ^= (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT64; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT64; - } - if ((val & UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_INT64) == (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_INT64) { - val ^= (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_INT64; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_INT64; - } - if ((val & UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT16) == (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT16) { - val ^= (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT16; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT16; - } - if ((val & UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT32) == (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT32) { - val ^= (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT32; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT32; - } - if ((val & UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT64) == (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT64) { - val ^= (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT64; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT64; - } - if ((val & UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_BFLOAT16) == (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_BFLOAT16) { - val ^= (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_BFLOAT16; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_BFLOAT16; - } - if ((val & UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT32_FTZ) == (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT32_FTZ) { - val ^= (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT32_FTZ; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT32_FTZ; - } - if ((val & UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_TFLOAT32) == (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_TFLOAT32) { - val ^= (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_TFLOAT32; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_TFLOAT32; - } - if ((val & UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_TFLOAT32_FTZ) == (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_TFLOAT32_FTZ) { - val ^= (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_TFLOAT32_FTZ; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_TFLOAT32_FTZ; - } - if (val != 0) { - std::bitset<32> bits(val); - if (!first) { - os << " | "; - } - os << "unknown bit flags " << bits; - } else if (first) { - os << "0"; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_exp_tensor_map_interleave_flag_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_exp_tensor_map_interleave_flag_t value) { - switch (value) { - case UR_EXP_TENSOR_MAP_INTERLEAVE_FLAG_NONE: - os << "UR_EXP_TENSOR_MAP_INTERLEAVE_FLAG_NONE"; - break; - case UR_EXP_TENSOR_MAP_INTERLEAVE_FLAG_16B: - os << "UR_EXP_TENSOR_MAP_INTERLEAVE_FLAG_16B"; - break; - case UR_EXP_TENSOR_MAP_INTERLEAVE_FLAG_32B: - os << "UR_EXP_TENSOR_MAP_INTERLEAVE_FLAG_32B"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_exp_tensor_map_interleave_flag_t flag -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { - uint32_t val = flag; - bool first = true; - if ((val & UR_EXP_TENSOR_MAP_INTERLEAVE_FLAG_NONE) == (uint32_t)UR_EXP_TENSOR_MAP_INTERLEAVE_FLAG_NONE) { - val ^= (uint32_t)UR_EXP_TENSOR_MAP_INTERLEAVE_FLAG_NONE; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_EXP_TENSOR_MAP_INTERLEAVE_FLAG_NONE; - } - if ((val & UR_EXP_TENSOR_MAP_INTERLEAVE_FLAG_16B) == (uint32_t)UR_EXP_TENSOR_MAP_INTERLEAVE_FLAG_16B) { - val ^= (uint32_t)UR_EXP_TENSOR_MAP_INTERLEAVE_FLAG_16B; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_EXP_TENSOR_MAP_INTERLEAVE_FLAG_16B; - } - if ((val & UR_EXP_TENSOR_MAP_INTERLEAVE_FLAG_32B) == (uint32_t)UR_EXP_TENSOR_MAP_INTERLEAVE_FLAG_32B) { - val ^= (uint32_t)UR_EXP_TENSOR_MAP_INTERLEAVE_FLAG_32B; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_EXP_TENSOR_MAP_INTERLEAVE_FLAG_32B; - } - if (val != 0) { - std::bitset<32> bits(val); - if (!first) { - os << " | "; - } - os << "unknown bit flags " << bits; - } else if (first) { - os << "0"; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_exp_tensor_map_l2_promotion_flag_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_exp_tensor_map_l2_promotion_flag_t value) { - switch (value) { - case UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_NONE: - os << "UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_NONE"; - break; - case UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_64B: - os << "UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_64B"; - break; - case UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_128B: - os << "UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_128B"; - break; - case UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_256B: - os << "UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_256B"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_exp_tensor_map_l2_promotion_flag_t flag -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { - uint32_t val = flag; - bool first = true; - if ((val & UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_NONE) == (uint32_t)UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_NONE) { - val ^= (uint32_t)UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_NONE; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_NONE; - } - if ((val & UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_64B) == (uint32_t)UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_64B) { - val ^= (uint32_t)UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_64B; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_64B; - } - if ((val & UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_128B) == (uint32_t)UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_128B) { - val ^= (uint32_t)UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_128B; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_128B; - } - if ((val & UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_256B) == (uint32_t)UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_256B) { - val ^= (uint32_t)UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_256B; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_256B; - } - if (val != 0) { - std::bitset<32> bits(val); - if (!first) { - os << " | "; - } - os << "unknown bit flags " << bits; - } else if (first) { - os << "0"; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_exp_tensor_map_swizzle_flag_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_exp_tensor_map_swizzle_flag_t value) { - switch (value) { - case UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_NONE: - os << "UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_NONE"; - break; - case UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_32B: - os << "UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_32B"; - break; - case UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_64B: - os << "UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_64B"; - break; - case UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_128B: - os << "UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_128B"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_exp_tensor_map_swizzle_flag_t flag -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { - uint32_t val = flag; - bool first = true; - if ((val & UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_NONE) == (uint32_t)UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_NONE) { - val ^= (uint32_t)UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_NONE; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_NONE; - } - if ((val & UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_32B) == (uint32_t)UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_32B) { - val ^= (uint32_t)UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_32B; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_32B; - } - if ((val & UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_64B) == (uint32_t)UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_64B) { - val ^= (uint32_t)UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_64B; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_64B; - } - if ((val & UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_128B) == (uint32_t)UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_128B) { - val ^= (uint32_t)UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_128B; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_128B; - } - if (val != 0) { - std::bitset<32> bits(val); - if (!first) { - os << " | "; - } - os << "unknown bit flags " << bits; - } else if (first) { - os << "0"; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_exp_tensor_map_oob_fill_flag_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, enum ur_exp_tensor_map_oob_fill_flag_t value) { - switch (value) { - case UR_EXP_TENSOR_MAP_OOB_FILL_FLAG_NONE: - os << "UR_EXP_TENSOR_MAP_OOB_FILL_FLAG_NONE"; - break; - case UR_EXP_TENSOR_MAP_OOB_FILL_FLAG_REQUEST_ZERO_FMA: - os << "UR_EXP_TENSOR_MAP_OOB_FILL_FLAG_REQUEST_ZERO_FMA"; - break; - default: - os << "unknown enumerator"; - break; - } - return os; -} -namespace ur::details { -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_exp_tensor_map_oob_fill_flag_t flag -template <> -inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { - uint32_t val = flag; - bool first = true; - if ((val & UR_EXP_TENSOR_MAP_OOB_FILL_FLAG_NONE) == (uint32_t)UR_EXP_TENSOR_MAP_OOB_FILL_FLAG_NONE) { - val ^= (uint32_t)UR_EXP_TENSOR_MAP_OOB_FILL_FLAG_NONE; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_EXP_TENSOR_MAP_OOB_FILL_FLAG_NONE; - } - if ((val & UR_EXP_TENSOR_MAP_OOB_FILL_FLAG_REQUEST_ZERO_FMA) == (uint32_t)UR_EXP_TENSOR_MAP_OOB_FILL_FLAG_REQUEST_ZERO_FMA) { - val ^= (uint32_t)UR_EXP_TENSOR_MAP_OOB_FILL_FLAG_REQUEST_ZERO_FMA; - if (!first) { - os << " | "; - } else { - first = false; - } - os << UR_EXP_TENSOR_MAP_OOB_FILL_FLAG_REQUEST_ZERO_FMA; - } - if (val != 0) { - std::bitset<32> bits(val); - if (!first) { - os << " | "; - } - os << "unknown bit flags " << bits; - } else if (first) { - os << "0"; - } - return UR_RESULT_SUCCESS; -} -} // namespace ur::details -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_loader_config_create_params_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_loader_config_create_params_t *params) { - os << ".phLoaderConfig = "; - ur::details::printPtr(os, - *(params->pphLoaderConfig)); - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_loader_config_retain_params_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_loader_config_retain_params_t *params) { - os << ".hLoaderConfig = "; - ur::details::printPtr(os, - *(params->phLoaderConfig)); - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_loader_config_release_params_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_loader_config_release_params_t *params) { - os << ".hLoaderConfig = "; - ur::details::printPtr(os, - *(params->phLoaderConfig)); - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_loader_config_get_info_params_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_loader_config_get_info_params_t *params) { - os << ".hLoaderConfig = "; - ur::details::printPtr(os, - *(params->phLoaderConfig)); - os << ", "; - os << ".propName = "; - os << *(params->ppropName); - os << ", "; - os << ".propSize = "; - os << *(params->ppropSize); - os << ", "; - os << ".pPropValue = "; - ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); - os << ", "; - os << ".pPropSizeRet = "; - ur::details::printPtr(os, - *(params->ppPropSizeRet)); - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_loader_config_enable_layer_params_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_loader_config_enable_layer_params_t *params) { - os << ".hLoaderConfig = "; + template<> inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - ur::details::printPtr(os, - *(params->phLoaderConfig)); - os << ", "; - os << ".pLayerName = "; + template<> inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - ur::details::printPtr(os, - *(params->ppLayerName)); - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_loader_config_set_code_location_callback_params_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_loader_config_set_code_location_callback_params_t *params) { - os << ".hLoaderConfig = "; - ur::details::printPtr(os, - *(params->phLoaderConfig)); - os << ", "; - os << ".pfnCodeloc = "; - os << reinterpret_cast( - *(params->ppfnCodeloc)); - os << ", "; - os << ".pUserData = "; - ur::details::printPtr(os, - *(params->ppUserData)); - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_loader_config_set_mocking_enabled_params_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_loader_config_set_mocking_enabled_params_t *params) { - os << ".hLoaderConfig = "; - ur::details::printPtr(os, - *(params->phLoaderConfig)); - os << ", "; - os << ".enable = "; - os << *(params->penable); - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_platform_get_params_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_platform_get_params_t *params) { - os << ".phAdapters = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphAdapters))); - if (*(params->pphAdapters) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pNumAdapters; ++i) { - if (i != 0) { - os << ", "; - } - ur::details::printPtr(os, - (*(params->pphAdapters))[i]); - } - os << "}"; - } - os << ", "; - os << ".NumAdapters = "; - os << *(params->pNumAdapters); - os << ", "; - os << ".NumEntries = "; - os << *(params->pNumEntries); - os << ", "; - os << ".phPlatforms = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphPlatforms))); - if (*(params->pphPlatforms) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pNumEntries; ++i) { - if (i != 0) { - os << ", "; - } - ur::details::printPtr(os, - (*(params->pphPlatforms))[i]); - } - os << "}"; - } - os << ", "; - os << ".pNumPlatforms = "; + template<> inline ur_result_t printFlag(std::ostream &os, uint32_t flag); + + + + + + + - ur::details::printPtr(os, - *(params->ppNumPlatforms)); - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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) { + template<> inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - os << ".hPlatform = "; - ur::details::printPtr(os, - *(params->phPlatform)); - os << ", "; - os << ".propName = "; - os << *(params->ppropName); - os << ", "; - os << ".propSize = "; - os << *(params->ppropSize); - os << ", "; - os << ".pPropValue = "; - ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); - os << ", "; - os << ".pPropSizeRet = "; - ur::details::printPtr(os, - *(params->ppPropSizeRet)); - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_platform_get_native_handle_params_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_platform_get_native_handle_params_t *params) { - os << ".hPlatform = "; - ur::details::printPtr(os, - *(params->phPlatform)); - os << ", "; - os << ".phNativePlatform = "; - ur::details::printPtr(os, - *(params->pphNativePlatform)); - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_platform_create_with_native_handle_params_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_platform_create_with_native_handle_params_t *params) { - os << ".hNativePlatform = "; - ur::details::printPtr(os, reinterpret_cast( - *(params->phNativePlatform))); - os << ", "; - os << ".hAdapter = "; - ur::details::printPtr(os, - *(params->phAdapter)); - os << ", "; - os << ".pProperties = "; - ur::details::printPtr(os, - *(params->ppProperties)); - os << ", "; - os << ".phPlatform = "; - ur::details::printPtr(os, - *(params->pphPlatform)); - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_platform_get_api_version_params_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_platform_get_api_version_params_t *params) { - os << ".hPlatform = "; - ur::details::printPtr(os, - *(params->phPlatform)); - os << ", "; - os << ".pVersion = "; - ur::details::printPtr(os, - *(params->ppVersion)); - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_platform_get_backend_option_params_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_platform_get_backend_option_params_t *params) { - os << ".hPlatform = "; - ur::details::printPtr(os, - *(params->phPlatform)); - os << ", "; - os << ".pFrontendOption = "; - ur::details::printPtr(os, - *(params->ppFrontendOption)); - os << ", "; - os << ".ppPlatformOption = "; - ur::details::printPtr(os, - *(params->pppPlatformOption)); - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_context_create_params_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_context_create_params_t *params) { - os << ".DeviceCount = "; - os << *(params->pDeviceCount); - os << ", "; - os << ".phDevices = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphDevices))); - if (*(params->pphDevices) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pDeviceCount; ++i) { - if (i != 0) { - os << ", "; - } - ur::details::printPtr(os, - (*(params->pphDevices))[i]); - } - os << "}"; - } - os << ", "; - os << ".pProperties = "; - ur::details::printPtr(os, - *(params->ppProperties)); - os << ", "; - os << ".phContext = "; - ur::details::printPtr(os, - *(params->pphContext)); - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 << ".hContext = "; - ur::details::printPtr(os, - *(params->phContext)); - return 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 << ".hContext = "; - ur::details::printPtr(os, - *(params->phContext)); - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_context_get_info_params_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_context_get_info_params_t *params) { - os << ".hContext = "; - ur::details::printPtr(os, - *(params->phContext)); - os << ", "; - os << ".propName = "; + template<> inline ur_result_t printFlag(std::ostream &os, uint32_t flag); + template <> inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_exp_command_buffer_info_t value, size_t size); - os << *(params->ppropName); - os << ", "; - os << ".propSize = "; + template <> inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_exp_command_buffer_command_info_t value, size_t size); - os << *(params->ppropSize); - os << ", "; - os << ".pPropValue = "; - ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); - os << ", "; - os << ".pPropSizeRet = "; - ur::details::printPtr(os, - *(params->ppPropSizeRet)); - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - ur::details::printPtr(os, - *(params->phContext)); - os << ", "; - os << ".phNativeContext = "; - ur::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 = "; - ur::details::printPtr(os, reinterpret_cast( - *(params->phNativeContext))); - os << ", "; - os << ".hAdapter = "; - ur::details::printPtr(os, - *(params->phAdapter)); - os << ", "; - os << ".numDevices = "; - os << *(params->pnumDevices); - os << ", "; - os << ".phDevices = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphDevices))); - if (*(params->pphDevices) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumDevices; ++i) { - if (i != 0) { - os << ", "; - } - ur::details::printPtr(os, - (*(params->pphDevices))[i]); - } - os << "}"; - } - os << ", "; - os << ".pProperties = "; - ur::details::printPtr(os, - *(params->ppProperties)); - os << ", "; - os << ".phContext = "; - ur::details::printPtr(os, - *(params->pphContext)); - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - ur::details::printPtr(os, - *(params->phContext)); - os << ", "; - os << ".pfnDeleter = "; - os << reinterpret_cast( - *(params->ppfnDeleter)); - os << ", "; - os << ".pUserData = "; - ur::details::printPtr(os, - *(params->ppUserData)); - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 << ".hEvent = "; - ur::details::printPtr(os, - *(params->phEvent)); - os << ", "; - os << ".propName = "; - os << *(params->ppropName); - os << ", "; - os << ".propSize = "; - os << *(params->ppropSize); - os << ", "; - os << ".pPropValue = "; - ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); - os << ", "; - os << ".pPropSizeRet = "; - ur::details::printPtr(os, - *(params->ppPropSizeRet)); - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_event_get_profiling_info_params_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_event_get_profiling_info_params_t *params) { - os << ".hEvent = "; - ur::details::printPtr(os, - *(params->phEvent)); - os << ", "; - os << ".propName = "; - os << *(params->ppropName); - os << ", "; - os << ".propSize = "; - os << *(params->ppropSize); - os << ", "; - os << ".pPropValue = "; - ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); - os << ", "; - os << ".pPropSizeRet = "; - ur::details::printPtr(os, - *(params->ppPropSizeRet)); - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_event_wait_params_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_event_wait_params_t *params) { - os << ".numEvents = "; - os << *(params->pnumEvents); - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumEvents; ++i) { - if (i != 0) { - os << ", "; - } - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); - } - os << "}"; - } - 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) { - os << ".hEvent = "; - ur::details::printPtr(os, - *(params->phEvent)); - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 << ".hEvent = "; - ur::details::printPtr(os, - *(params->phEvent)); - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 << ".hEvent = "; - ur::details::printPtr(os, - *(params->phEvent)); - os << ", "; - os << ".phNativeEvent = "; - ur::details::printPtr(os, - *(params->pphNativeEvent)); - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - ur::details::printPtr(os, reinterpret_cast( - *(params->phNativeEvent))); - os << ", "; - os << ".hContext = "; - ur::details::printPtr(os, - *(params->phContext)); - os << ", "; - os << ".pProperties = "; + + inline ur_result_t printUnion( + std::ostream &os, + const union ur_exp_launch_property_value_t params, + const enum ur_exp_launch_property_id_t tag + ); - ur::details::printPtr(os, - *(params->ppProperties)); - os << ", "; - os << ".phEvent = "; - ur::details::printPtr(os, - *(params->pphEvent)); - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_event_set_callback_params_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_event_set_callback_params_t *params) { - os << ".hEvent = "; - ur::details::printPtr(os, - *(params->phEvent)); - os << ", "; - os << ".execStatus = "; - os << *(params->pexecStatus); - os << ", "; - os << ".pfnNotify = "; - os << reinterpret_cast( - *(params->ppfnNotify)); - os << ", "; - os << ".pUserData = "; - ur::details::printPtr(os, - *(params->ppUserData)); - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_program_create_with_il_params_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_create_with_il_params_t *params) { - os << ".hContext = "; - ur::details::printPtr(os, - *(params->phContext)); - os << ", "; - os << ".pIL = "; - ur::details::printPtr(os, - *(params->ppIL)); + template <> inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_exp_peer_info_t value, size_t size); - os << ", "; - os << ".length = "; - os << *(params->plength); - os << ", "; - os << ".pProperties = "; - ur::details::printPtr(os, - *(params->ppProperties)); - os << ", "; - os << ".phProgram = "; - ur::details::printPtr(os, - *(params->pphProgram)); - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; - ur::details::printPtr(os, - *(params->phContext)); + template<> inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - os << ", "; - os << ".numDevices = "; - os << *(params->pnumDevices); - os << ", "; - os << ".phDevices = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphDevices))); - if (*(params->pphDevices) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumDevices; ++i) { - if (i != 0) { - os << ", "; - } - ur::details::printPtr(os, - (*(params->pphDevices))[i]); - } - os << "}"; - } - os << ", "; - os << ".pLengths = "; - ur::details::printPtr(os, reinterpret_cast(*(params->ppLengths))); - if (*(params->ppLengths) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumDevices; ++i) { - if (i != 0) { - os << ", "; - } - os << (*(params->ppLengths))[i]; - } - os << "}"; - } + template<> inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - os << ", "; - os << ".ppBinaries = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pppBinaries))); - if (*(params->pppBinaries) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumDevices; ++i) { - if (i != 0) { - os << ", "; - } - ur::details::printPtr(os, - (*(params->pppBinaries))[i]); - } - os << "}"; - } - os << ", "; - os << ".pProperties = "; - ur::details::printPtr(os, - *(params->ppProperties)); - os << ", "; - os << ".phProgram = "; - ur::details::printPtr(os, - *(params->pphProgram)); - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_program_build_params_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_build_params_t *params) { - os << ".hContext = "; - ur::details::printPtr(os, - *(params->phContext)); + template<> inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - os << ", "; - os << ".hProgram = "; - ur::details::printPtr(os, - *(params->phProgram)); + template<> inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - os << ", "; - os << ".pOptions = "; - ur::details::printPtr(os, - *(params->ppOptions)); + template<> inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_program_build_exp_params_t type -/// @returns -/// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_build_exp_params_t *params) { + template<> inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - os << ".hProgram = "; - ur::details::printPtr(os, - *(params->phProgram)); + template<> inline ur_result_t printFlag(std::ostream &os, uint32_t flag); - os << ", "; - os << ".numDevices = "; - os << *(params->pnumDevices); - os << ", "; - os << ".phDevices = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphDevices))); - if (*(params->pphDevices) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumDevices; ++i) { - if (i != 0) { - os << ", "; - } - ur::details::printPtr(os, - (*(params->pphDevices))[i]); - } - os << "}"; - } +} // namespace ur::details - os << ", "; - os << ".pOptions = "; + 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_alloc_location_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_device_2d_block_array_capability_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, enum ur_exp_sampler_cubemap_filter_mode_t value); + inline std::ostream &operator<<(std::ostream &os, enum ur_exp_external_mem_type_t value); + inline std::ostream &operator<<(std::ostream &os, enum ur_exp_external_semaphore_type_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_sampler_cubemap_properties_t params); + inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_external_mem_desc_t params); + inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_external_semaphore_desc_t params); + inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_image_copy_region_t params); + inline std::ostream &operator<<(std::ostream &os, enum ur_device_command_buffer_update_capability_flag_t value); + inline std::ostream &operator<<(std::ostream &os, enum ur_exp_command_buffer_info_t value); + inline std::ostream &operator<<(std::ostream &os, enum ur_exp_command_buffer_command_info_t value); + 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, [[maybe_unused]] const struct ur_exp_command_buffer_update_memobj_arg_desc_t params); + inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_command_buffer_update_pointer_arg_desc_t params); + inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_command_buffer_update_value_arg_desc_t params); + inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_command_buffer_update_kernel_launch_desc_t params); + inline std::ostream &operator<<(std::ostream &os, enum ur_exp_launch_property_id_t value); + inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_launch_property_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_exp_enqueue_ext_flag_t value); + inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_enqueue_ext_properties_t params); + inline std::ostream &operator<<(std::ostream &os, enum ur_exp_enqueue_native_command_flag_t value); + inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_enqueue_native_command_properties_t params); + inline std::ostream &operator<<(std::ostream &os, enum ur_exp_tensor_map_data_type_flag_t value); + inline std::ostream &operator<<(std::ostream &os, enum ur_exp_tensor_map_interleave_flag_t value); + inline std::ostream &operator<<(std::ostream &os, enum ur_exp_tensor_map_l2_promotion_flag_t value); + inline std::ostream &operator<<(std::ostream &os, enum ur_exp_tensor_map_swizzle_flag_t value); + inline std::ostream &operator<<(std::ostream &os, enum ur_exp_tensor_map_oob_fill_flag_t value); + + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_function_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum 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_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_MAP_EXTERNAL_ARRAY_EXP: + os << "UR_FUNCTION_BINDLESS_IMAGES_MAP_EXTERNAL_ARRAY_EXP"; + break; + case UR_FUNCTION_BINDLESS_IMAGES_RELEASE_EXTERNAL_SEMAPHORE_EXP: + os << "UR_FUNCTION_BINDLESS_IMAGES_RELEASE_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_PROGRAM_BUILD_EXP: + os << "UR_FUNCTION_PROGRAM_BUILD_EXP"; + break; + case UR_FUNCTION_PROGRAM_COMPILE_EXP: + os << "UR_FUNCTION_PROGRAM_COMPILE_EXP"; + break; + case UR_FUNCTION_PROGRAM_LINK_EXP: + os << "UR_FUNCTION_PROGRAM_LINK_EXP"; + break; + case UR_FUNCTION_LOADER_CONFIG_SET_CODE_LOCATION_CALLBACK: + os << "UR_FUNCTION_LOADER_CONFIG_SET_CODE_LOCATION_CALLBACK"; + 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_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_PROGRAM_GET_GLOBAL_VARIABLE_POINTER: + os << "UR_FUNCTION_PROGRAM_GET_GLOBAL_VARIABLE_POINTER"; + break; + case UR_FUNCTION_DEVICE_GET_SELECTED: + os << "UR_FUNCTION_DEVICE_GET_SELECTED"; + break; + case UR_FUNCTION_COMMAND_BUFFER_RETAIN_COMMAND_EXP: + os << "UR_FUNCTION_COMMAND_BUFFER_RETAIN_COMMAND_EXP"; + break; + case UR_FUNCTION_COMMAND_BUFFER_RELEASE_COMMAND_EXP: + os << "UR_FUNCTION_COMMAND_BUFFER_RELEASE_COMMAND_EXP"; + break; + case UR_FUNCTION_COMMAND_BUFFER_UPDATE_KERNEL_LAUNCH_EXP: + os << "UR_FUNCTION_COMMAND_BUFFER_UPDATE_KERNEL_LAUNCH_EXP"; + break; + case UR_FUNCTION_COMMAND_BUFFER_GET_INFO_EXP: + os << "UR_FUNCTION_COMMAND_BUFFER_GET_INFO_EXP"; + break; + case UR_FUNCTION_COMMAND_BUFFER_COMMAND_GET_INFO_EXP: + os << "UR_FUNCTION_COMMAND_BUFFER_COMMAND_GET_INFO_EXP"; + break; + case UR_FUNCTION_ENQUEUE_TIMESTAMP_RECORDING_EXP: + os << "UR_FUNCTION_ENQUEUE_TIMESTAMP_RECORDING_EXP"; + break; + case UR_FUNCTION_ENQUEUE_KERNEL_LAUNCH_CUSTOM_EXP: + os << "UR_FUNCTION_ENQUEUE_KERNEL_LAUNCH_CUSTOM_EXP"; + break; + case UR_FUNCTION_KERNEL_GET_SUGGESTED_LOCAL_WORK_SIZE: + os << "UR_FUNCTION_KERNEL_GET_SUGGESTED_LOCAL_WORK_SIZE"; + break; + case UR_FUNCTION_BINDLESS_IMAGES_IMPORT_EXTERNAL_MEMORY_EXP: + os << "UR_FUNCTION_BINDLESS_IMAGES_IMPORT_EXTERNAL_MEMORY_EXP"; + break; + case UR_FUNCTION_BINDLESS_IMAGES_IMPORT_EXTERNAL_SEMAPHORE_EXP: + os << "UR_FUNCTION_BINDLESS_IMAGES_IMPORT_EXTERNAL_SEMAPHORE_EXP"; + break; + case UR_FUNCTION_ENQUEUE_NATIVE_COMMAND_EXP: + os << "UR_FUNCTION_ENQUEUE_NATIVE_COMMAND_EXP"; + break; + case UR_FUNCTION_LOADER_CONFIG_SET_MOCKING_ENABLED: + os << "UR_FUNCTION_LOADER_CONFIG_SET_MOCKING_ENABLED"; + break; + case UR_FUNCTION_BINDLESS_IMAGES_RELEASE_EXTERNAL_MEMORY_EXP: + os << "UR_FUNCTION_BINDLESS_IMAGES_RELEASE_EXTERNAL_MEMORY_EXP"; + 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_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_COMMAND_BUFFER_ENQUEUE_EXP: + os << "UR_FUNCTION_COMMAND_BUFFER_ENQUEUE_EXP"; + break; + case UR_FUNCTION_COMMAND_BUFFER_UPDATE_SIGNAL_EVENT_EXP: + os << "UR_FUNCTION_COMMAND_BUFFER_UPDATE_SIGNAL_EVENT_EXP"; + break; + case UR_FUNCTION_COMMAND_BUFFER_UPDATE_WAIT_EVENTS_EXP: + os << "UR_FUNCTION_COMMAND_BUFFER_UPDATE_WAIT_EVENTS_EXP"; + break; + case UR_FUNCTION_BINDLESS_IMAGES_MAP_EXTERNAL_LINEAR_MEMORY_EXP: + os << "UR_FUNCTION_BINDLESS_IMAGES_MAP_EXTERNAL_LINEAR_MEMORY_EXP"; + break; + case UR_FUNCTION_ENQUEUE_EVENTS_WAIT_WITH_BARRIER_EXT: + os << "UR_FUNCTION_ENQUEUE_EVENTS_WAIT_WITH_BARRIER_EXT"; + break; + case UR_FUNCTION_TENSOR_MAP_ENCODE_IM_2_COL_EXP: + os << "UR_FUNCTION_TENSOR_MAP_ENCODE_IM_2_COL_EXP"; + break; + case UR_FUNCTION_TENSOR_MAP_ENCODE_TILED_EXP: + os << "UR_FUNCTION_TENSOR_MAP_ENCODE_TILED_EXP"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_structure_type_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_structure_type_t value) { + switch (value) { + case UR_STRUCTURE_TYPE_CONTEXT_PROPERTIES: + os << "UR_STRUCTURE_TYPE_CONTEXT_PROPERTIES"; + 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_USM_ALLOC_LOCATION_DESC: + os << "UR_STRUCTURE_TYPE_USM_ALLOC_LOCATION_DESC"; + break; + case UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_DESC: + os << "UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_DESC"; + break; + case UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_KERNEL_LAUNCH_DESC: + os << "UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_KERNEL_LAUNCH_DESC"; + break; + case UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_MEMOBJ_ARG_DESC: + os << "UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_MEMOBJ_ARG_DESC"; + break; + case UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_POINTER_ARG_DESC: + os << "UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_POINTER_ARG_DESC"; + break; + case UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_VALUE_ARG_DESC: + os << "UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_VALUE_ARG_DESC"; + break; + case UR_STRUCTURE_TYPE_EXP_SAMPLER_MIP_PROPERTIES: + os << "UR_STRUCTURE_TYPE_EXP_SAMPLER_MIP_PROPERTIES"; + break; + case UR_STRUCTURE_TYPE_EXP_EXTERNAL_MEM_DESC: + os << "UR_STRUCTURE_TYPE_EXP_EXTERNAL_MEM_DESC"; + break; + case UR_STRUCTURE_TYPE_EXP_EXTERNAL_SEMAPHORE_DESC: + os << "UR_STRUCTURE_TYPE_EXP_EXTERNAL_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_SAMPLER_ADDR_MODES: + os << "UR_STRUCTURE_TYPE_EXP_SAMPLER_ADDR_MODES"; + break; + case UR_STRUCTURE_TYPE_EXP_SAMPLER_CUBEMAP_PROPERTIES: + os << "UR_STRUCTURE_TYPE_EXP_SAMPLER_CUBEMAP_PROPERTIES"; + break; + case UR_STRUCTURE_TYPE_EXP_IMAGE_COPY_REGION: + os << "UR_STRUCTURE_TYPE_EXP_IMAGE_COPY_REGION"; + break; + case UR_STRUCTURE_TYPE_EXP_ENQUEUE_NATIVE_COMMAND_PROPERTIES: + os << "UR_STRUCTURE_TYPE_EXP_ENQUEUE_NATIVE_COMMAND_PROPERTIES"; + break; + case UR_STRUCTURE_TYPE_EXP_ENQUEUE_EXT_PROPERTIES: + os << "UR_STRUCTURE_TYPE_EXP_ENQUEUE_EXT_PROPERTIES"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_structure_type_t struct + inline ur_result_t printStruct(std::ostream &os, const void *ptr) { + if (ptr == NULL) { + return printPtr(os, 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; + printPtr(os, pstruct); + } break; + + case UR_STRUCTURE_TYPE_IMAGE_DESC: { + const ur_image_desc_t *pstruct = (const ur_image_desc_t *)ptr; + printPtr(os, pstruct); + } break; + + case UR_STRUCTURE_TYPE_BUFFER_PROPERTIES: { + const ur_buffer_properties_t *pstruct = (const ur_buffer_properties_t *)ptr; + printPtr(os, pstruct); + } break; + + case UR_STRUCTURE_TYPE_BUFFER_REGION: { + const ur_buffer_region_t *pstruct = (const ur_buffer_region_t *)ptr; + 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; + 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; + printPtr(os, pstruct); + } break; + + case UR_STRUCTURE_TYPE_PROGRAM_PROPERTIES: { + const ur_program_properties_t *pstruct = (const ur_program_properties_t *)ptr; + printPtr(os, pstruct); + } break; + + case UR_STRUCTURE_TYPE_USM_DESC: { + const ur_usm_desc_t *pstruct = (const ur_usm_desc_t *)ptr; + 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; + 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; + 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; + 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; + printPtr(os, pstruct); + } break; + + case UR_STRUCTURE_TYPE_DEVICE_BINARY: { + const ur_device_binary_t *pstruct = (const ur_device_binary_t *)ptr; + printPtr(os, pstruct); + } break; + + case UR_STRUCTURE_TYPE_SAMPLER_DESC: { + const ur_sampler_desc_t *pstruct = (const ur_sampler_desc_t *)ptr; + printPtr(os, pstruct); + } break; + + case UR_STRUCTURE_TYPE_QUEUE_PROPERTIES: { + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + printPtr(os, pstruct); + } break; + + case UR_STRUCTURE_TYPE_USM_ALLOC_LOCATION_DESC: { + const ur_usm_alloc_location_desc_t *pstruct = (const ur_usm_alloc_location_desc_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; + printPtr(os, pstruct); + } break; + + case UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_KERNEL_LAUNCH_DESC: { + const ur_exp_command_buffer_update_kernel_launch_desc_t *pstruct = (const ur_exp_command_buffer_update_kernel_launch_desc_t *)ptr; + printPtr(os, pstruct); + } break; + + case UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_MEMOBJ_ARG_DESC: { + const ur_exp_command_buffer_update_memobj_arg_desc_t *pstruct = (const ur_exp_command_buffer_update_memobj_arg_desc_t *)ptr; + printPtr(os, pstruct); + } break; + + case UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_POINTER_ARG_DESC: { + const ur_exp_command_buffer_update_pointer_arg_desc_t *pstruct = (const ur_exp_command_buffer_update_pointer_arg_desc_t *)ptr; + printPtr(os, pstruct); + } break; + + case UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_VALUE_ARG_DESC: { + const ur_exp_command_buffer_update_value_arg_desc_t *pstruct = (const ur_exp_command_buffer_update_value_arg_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; + printPtr(os, pstruct); + } break; + + case UR_STRUCTURE_TYPE_EXP_EXTERNAL_MEM_DESC: { + const ur_exp_external_mem_desc_t *pstruct = (const ur_exp_external_mem_desc_t *)ptr; + printPtr(os, pstruct); + } break; + + case UR_STRUCTURE_TYPE_EXP_EXTERNAL_SEMAPHORE_DESC: { + const ur_exp_external_semaphore_desc_t *pstruct = (const ur_exp_external_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; + 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; + 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; + printPtr(os, pstruct); + } break; + + case UR_STRUCTURE_TYPE_EXP_SAMPLER_CUBEMAP_PROPERTIES: { + const ur_exp_sampler_cubemap_properties_t *pstruct = (const ur_exp_sampler_cubemap_properties_t *)ptr; + printPtr(os, pstruct); + } break; + + case UR_STRUCTURE_TYPE_EXP_IMAGE_COPY_REGION: { + const ur_exp_image_copy_region_t *pstruct = (const ur_exp_image_copy_region_t *)ptr; + printPtr(os, pstruct); + } break; + + case UR_STRUCTURE_TYPE_EXP_ENQUEUE_NATIVE_COMMAND_PROPERTIES: { + const ur_exp_enqueue_native_command_properties_t *pstruct = (const ur_exp_enqueue_native_command_properties_t *)ptr; + printPtr(os, pstruct); + } break; + + case UR_STRUCTURE_TYPE_EXP_ENQUEUE_EXT_PROPERTIES: { + const ur_exp_enqueue_ext_properties_t *pstruct = (const ur_exp_enqueue_ext_properties_t *)ptr; + printPtr(os, pstruct); + } break; + default: + os << "unknown enumerator"; + return UR_RESULT_ERROR_INVALID_ENUMERATION; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_result_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum 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_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_FUNCTION_ADDRESS_NOT_AVAILABLE: + os << "UR_RESULT_ERROR_FUNCTION_ADDRESS_NOT_AVAILABLE"; + 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_IN_EVENT_LIST_EXEC_STATUS: + os << "UR_RESULT_ERROR_IN_EVENT_LIST_EXEC_STATUS"; + break; + case UR_RESULT_ERROR_DEVICE_NOT_AVAILABLE: + os << "UR_RESULT_ERROR_DEVICE_NOT_AVAILABLE"; + break; + case UR_RESULT_ERROR_INVALID_SPEC_ID: + os << "UR_RESULT_ERROR_INVALID_SPEC_ID"; + 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_INVALID_COMMAND_BUFFER_COMMAND_HANDLE_EXP: + os << "UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_COMMAND_HANDLE_EXP"; + break; + case UR_RESULT_ERROR_UNKNOWN: + os << "UR_RESULT_ERROR_UNKNOWN"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); - ur::details::printPtr(os, - *(params->ppOptions)); + os << "}"; return os; } - /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_program_compile_params_t type +/// @brief Print operator for the ur_base_desc_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_compile_params_t *params) { - - os << ".hContext = "; +inline std::ostream &operator<<(std::ostream &os, const struct ur_base_desc_t params) { + os << "(struct ur_base_desc_t){"; + + + + os << ".stype = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); - ur::details::printPtr(os, - *(params->phContext)); - os << ", "; - os << ".hProgram = "; + os << "}"; + return os; +} +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; + + os << + (params.x) + ; + + + + + os << ", "; + os << ".y = "; + + os << + (params.y) + ; + + + + + os << ", "; + os << ".z = "; + + os << + (params.z) + ; - ur::details::printPtr(os, - *(params->phProgram)); - os << ", "; - os << ".pOptions = "; + os << "}"; + return os; +} +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; + + os << + (params.width) + ; + + + + + os << ", "; + os << ".height = "; + + os << + (params.height) + ; + + + + + os << ", "; + os << ".depth = "; + + os << + (params.depth) + ; - ur::details::printPtr(os, - *(params->ppOptions)); + os << "}"; return os; } + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_device_init_flag_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_device_init_flag_t value) { + switch (value) { + case UR_DEVICE_INIT_FLAG_GPU: + os << "UR_DEVICE_INIT_FLAG_GPU"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } + + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_device_init_flag_t flag + template<> + inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { + uint32_t val = flag; + bool first = true; + + if ((val & UR_DEVICE_INIT_FLAG_GPU) == (uint32_t)UR_DEVICE_INIT_FLAG_GPU) { + val ^= (uint32_t)UR_DEVICE_INIT_FLAG_GPU; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_DEVICE_INIT_FLAG_GPU; + } + + if ((val & UR_DEVICE_INIT_FLAG_CPU) == (uint32_t)UR_DEVICE_INIT_FLAG_CPU) { + val ^= (uint32_t)UR_DEVICE_INIT_FLAG_CPU; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_DEVICE_INIT_FLAG_CPU; + } + + 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 << " | "; + } else { + first = false; + } + os << UR_DEVICE_INIT_FLAG_FPGA; + } + + if ((val & UR_DEVICE_INIT_FLAG_MCA) == (uint32_t)UR_DEVICE_INIT_FLAG_MCA) { + val ^= (uint32_t)UR_DEVICE_INIT_FLAG_MCA; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_DEVICE_INIT_FLAG_MCA; + } + + if ((val & UR_DEVICE_INIT_FLAG_VPU) == (uint32_t)UR_DEVICE_INIT_FLAG_VPU) { + val ^= (uint32_t)UR_DEVICE_INIT_FLAG_VPU; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_DEVICE_INIT_FLAG_VPU; + } + if (val != 0) { + std::bitset<32> bits(val); + if (!first) { + os << " | "; + } + os << "unknown bit flags " << bits; + } else if (first) { + os << "0"; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_loader_config_info_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_loader_config_info_t value) { + switch (value) { + case UR_LOADER_CONFIG_INFO_AVAILABLE_LAYERS: + os << "UR_LOADER_CONFIG_INFO_AVAILABLE_LAYERS"; + break; + case UR_LOADER_CONFIG_INFO_REFERENCE_COUNT: + os << "UR_LOADER_CONFIG_INFO_REFERENCE_COUNT"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_loader_config_info_t enum value + template <> + inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_loader_config_info_t value, size_t size) { + if (ptr == NULL) { + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + default: + os << "unknown enumerator"; + return UR_RESULT_ERROR_INVALID_ENUMERATION; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_program_compile_exp_params_t type +/// @brief Print operator for the ur_code_location_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_compile_exp_params_t *params) { - - os << ".hProgram = "; - - ur::details::printPtr(os, - *(params->phProgram)); - - os << ", "; - os << ".numDevices = "; - - os << *(params->pnumDevices); +inline std::ostream &operator<<(std::ostream &os, const struct ur_code_location_t params) { + os << "(struct ur_code_location_t){"; + + + + os << ".functionName = "; + + ur::details::printPtr(os, + (params.functionName) + ); + + + + + os << ", "; + os << ".sourceFile = "; + + ur::details::printPtr(os, + (params.sourceFile) + ); + + + + + os << ", "; + os << ".lineNumber = "; + + os << + (params.lineNumber) + ; + + + + + os << ", "; + os << ".columnNumber = "; + + os << + (params.columnNumber) + ; - os << ", "; - os << ".phDevices = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphDevices))); - if (*(params->pphDevices) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumDevices; ++i) { - if (i != 0) { - os << ", "; - } - ur::details::printPtr(os, - (*(params->pphDevices))[i]); - } - os << "}"; + os << "}"; + return os; +} + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_adapter_info_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_adapter_info_t value) { + switch (value) { + case UR_ADAPTER_INFO_BACKEND: + os << "UR_ADAPTER_INFO_BACKEND"; + break; + case UR_ADAPTER_INFO_REFERENCE_COUNT: + os << "UR_ADAPTER_INFO_REFERENCE_COUNT"; + break; + case UR_ADAPTER_INFO_VERSION: + os << "UR_ADAPTER_INFO_VERSION"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_adapter_info_t enum value + template <> + inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_adapter_info_t value, size_t size) { + if (ptr == NULL) { + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_ADAPTER_INFO_VERSION: { + const uint32_t *tptr = (const uint32_t *)ptr; + if (sizeof(uint32_t) > size) { + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + default: + os << "unknown enumerator"; + return UR_RESULT_ERROR_INVALID_ENUMERATION; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details + + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_adapter_backend_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_adapter_backend_t value) { + switch (value) { + case UR_ADAPTER_BACKEND_UNKNOWN: + os << "UR_ADAPTER_BACKEND_UNKNOWN"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_platform_info_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_platform_info_t value) { + switch (value) { + case UR_PLATFORM_INFO_NAME: + os << "UR_PLATFORM_INFO_NAME"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_platform_info_t enum value + template <> + inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_platform_info_t value, size_t size) { + if (ptr == NULL) { + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + default: + os << "unknown enumerator"; + return UR_RESULT_ERROR_INVALID_ENUMERATION; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details + + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_api_version_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_api_version_t value) { + os << UR_MAJOR_VERSION(value) << "." << UR_MINOR_VERSION(value); + return os; } +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".isNativeHandleOwned = "; + + os << + (params.isNativeHandleOwned) + ; - os << ", "; - os << ".pOptions = "; - - ur::details::printPtr(os, - *(params->ppOptions)); + os << "}"; return os; } - + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_platform_backend_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_platform_backend_t value) { + switch (value) { + case UR_PLATFORM_BACKEND_UNKNOWN: + os << "UR_PLATFORM_BACKEND_UNKNOWN"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_program_link_params_t type +/// @brief Print operator for the ur_device_binary_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_link_params_t *params) { +inline std::ostream &operator<<(std::ostream &os, const struct ur_device_binary_t params) { + os << "(struct ur_device_binary_t){"; + + + + os << ".stype = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".pDeviceTargetSpec = "; + + ur::details::printPtr(os, + (params.pDeviceTargetSpec) + ); - os << ".hContext = "; - ur::details::printPtr(os, - *(params->phContext)); + os << "}"; + return os; +} + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_device_type_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_device_type_t value) { + switch (value) { + case UR_DEVICE_TYPE_DEFAULT: + os << "UR_DEVICE_TYPE_DEFAULT"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_device_info_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_device_info_t value) { + switch (value) { + case UR_DEVICE_INFO_TYPE: + os << "UR_DEVICE_INFO_TYPE"; + 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_SUPPORT: + os << "UR_DEVICE_INFO_IMAGE_SUPPORT"; + 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_SUPPORT: + os << "UR_DEVICE_INFO_HOST_PIPE_READ_WRITE_SUPPORT"; + 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_COMPONENT_DEVICES: + os << "UR_DEVICE_INFO_COMPONENT_DEVICES"; + break; + case UR_DEVICE_INFO_COMPOSITE_DEVICE: + os << "UR_DEVICE_INFO_COMPOSITE_DEVICE"; + break; + case UR_DEVICE_INFO_GLOBAL_VARIABLE_SUPPORT: + os << "UR_DEVICE_INFO_GLOBAL_VARIABLE_SUPPORT"; + break; + case UR_DEVICE_INFO_USM_POOL_SUPPORT: + os << "UR_DEVICE_INFO_USM_POOL_SUPPORT"; + break; + case UR_DEVICE_INFO_COMMAND_BUFFER_SUPPORT_EXP: + os << "UR_DEVICE_INFO_COMMAND_BUFFER_SUPPORT_EXP"; + break; + case UR_DEVICE_INFO_COMMAND_BUFFER_UPDATE_CAPABILITIES_EXP: + os << "UR_DEVICE_INFO_COMMAND_BUFFER_UPDATE_CAPABILITIES_EXP"; + break; + case UR_DEVICE_INFO_COMMAND_BUFFER_EVENT_SUPPORT_EXP: + os << "UR_DEVICE_INFO_COMMAND_BUFFER_EVENT_SUPPORT_EXP"; + break; + case UR_DEVICE_INFO_CLUSTER_LAUNCH_SUPPORT_EXP: + os << "UR_DEVICE_INFO_CLUSTER_LAUNCH_SUPPORT_EXP"; + 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_EXTERNAL_MEMORY_IMPORT_SUPPORT_EXP: + os << "UR_DEVICE_INFO_EXTERNAL_MEMORY_IMPORT_SUPPORT_EXP"; + break; + case UR_DEVICE_INFO_EXTERNAL_SEMAPHORE_IMPORT_SUPPORT_EXP: + os << "UR_DEVICE_INFO_EXTERNAL_SEMAPHORE_IMPORT_SUPPORT_EXP"; + break; + case UR_DEVICE_INFO_CUBEMAP_SUPPORT_EXP: + os << "UR_DEVICE_INFO_CUBEMAP_SUPPORT_EXP"; + break; + case UR_DEVICE_INFO_CUBEMAP_SEAMLESS_FILTERING_SUPPORT_EXP: + os << "UR_DEVICE_INFO_CUBEMAP_SEAMLESS_FILTERING_SUPPORT_EXP"; + break; + case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_USM_SUPPORT_EXP: + os << "UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_USM_SUPPORT_EXP"; + break; + case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_SUPPORT_EXP: + os << "UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_SUPPORT_EXP"; + break; + case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_USM_SUPPORT_EXP: + os << "UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_USM_SUPPORT_EXP"; + break; + case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_SUPPORT_EXP: + os << "UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_SUPPORT_EXP"; + break; + case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_3D_SUPPORT_EXP: + os << "UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_3D_SUPPORT_EXP"; + break; + case UR_DEVICE_INFO_TIMESTAMP_RECORDING_SUPPORT_EXP: + os << "UR_DEVICE_INFO_TIMESTAMP_RECORDING_SUPPORT_EXP"; + break; + case UR_DEVICE_INFO_IMAGE_ARRAY_SUPPORT_EXP: + os << "UR_DEVICE_INFO_IMAGE_ARRAY_SUPPORT_EXP"; + break; + case UR_DEVICE_INFO_BINDLESS_UNIQUE_ADDRESSING_PER_DIM_SUPPORT_EXP: + os << "UR_DEVICE_INFO_BINDLESS_UNIQUE_ADDRESSING_PER_DIM_SUPPORT_EXP"; + break; + case UR_DEVICE_INFO_BINDLESS_SAMPLE_1D_USM_SUPPORT_EXP: + os << "UR_DEVICE_INFO_BINDLESS_SAMPLE_1D_USM_SUPPORT_EXP"; + break; + case UR_DEVICE_INFO_BINDLESS_SAMPLE_2D_USM_SUPPORT_EXP: + os << "UR_DEVICE_INFO_BINDLESS_SAMPLE_2D_USM_SUPPORT_EXP"; + break; + case UR_DEVICE_INFO_ENQUEUE_NATIVE_COMMAND_SUPPORT_EXP: + os << "UR_DEVICE_INFO_ENQUEUE_NATIVE_COMMAND_SUPPORT_EXP"; + break; + case UR_DEVICE_INFO_LOW_POWER_EVENTS_SUPPORT_EXP: + os << "UR_DEVICE_INFO_LOW_POWER_EVENTS_SUPPORT_EXP"; + break; + case UR_DEVICE_INFO_2D_BLOCK_ARRAY_CAPABILITIES_EXP: + os << "UR_DEVICE_INFO_2D_BLOCK_ARRAY_CAPABILITIES_EXP"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_device_info_t enum value + template <> + inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_device_info_t value, size_t size) { + if (ptr == NULL) { + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_DEVICE_INFO_MAX_WORK_ITEM_SIZES: { + + const size_t *tptr = (const size_t *)ptr; + os << "{"; + size_t nelems = size / sizeof(size_t); + for (size_t i = 0; i < nelems; ++i) { + if (i != 0) { + os << ", "; + } + + os << + tptr[i] + ; + + } + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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; + if (sizeof(ur_device_fp_capability_flags_t) > size) { + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_device_fp_capability_flags_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::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; + if (sizeof(ur_device_fp_capability_flags_t) > size) { + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_device_fp_capability_flags_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::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; + if (sizeof(ur_device_fp_capability_flags_t) > size) { + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_device_fp_capability_flags_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_DEVICE_INFO_IMAGE_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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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; + if (sizeof(ur_device_mem_cache_type_t) > size) { + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_device_mem_cache_type_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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; + if (sizeof(ur_device_local_mem_type_t) > size) { + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_device_local_mem_type_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_DEVICE_INFO_EXECUTION_CAPABILITIES: { + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::details::printPtr(os, + *tptr + ); + + os << ")"; + } break; + case UR_DEVICE_INFO_SUPPORTED_PARTITIONS: { + + const ur_device_partition_t *tptr = (const ur_device_partition_t *)ptr; + os << "{"; + size_t nelems = size / sizeof(ur_device_partition_t); + for (size_t i = 0; i < nelems; ++i) { + if (i != 0) { + os << ", "; + } + + os << + tptr[i] + ; + + } + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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; + if (sizeof(ur_device_affinity_domain_flags_t) > size) { + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_device_affinity_domain_flags_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::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; + os << "{"; + size_t nelems = size / sizeof(ur_device_partition_property_t); + for (size_t i = 0; i < nelems; ++i) { + if (i != 0) { + os << ", "; + } + + os << + tptr[i] + ; + + } + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_DEVICE_INFO_SUB_GROUP_SIZES_INTEL: { + + const uint32_t *tptr = (const uint32_t *)ptr; + os << "{"; + size_t nelems = size / sizeof(uint32_t); + for (size_t i = 0; i < nelems; ++i) { + if (i != 0) { + os << ", "; + } + + os << + tptr[i] + ; + + } + 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; + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::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; + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::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; + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::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; + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::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; + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::details::printFlag(os, + *tptr + ); + + os << ")"; + } break; + case UR_DEVICE_INFO_UUID: { + + const uint8_t *tptr = (const uint8_t *)ptr; + os << "{"; + size_t nelems = size / sizeof(uint8_t); + for (size_t i = 0; i < nelems; ++i) { + if (i != 0) { + os << ", "; + } + + os << static_cast( + tptr[i] + ); + + } + os << "}"; + } 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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; + if (sizeof(ur_memory_order_capability_flags_t) > size) { + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_memory_order_capability_flags_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::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; + if (sizeof(ur_memory_scope_capability_flags_t) > size) { + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_memory_scope_capability_flags_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::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; + if (sizeof(ur_memory_order_capability_flags_t) > size) { + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_memory_order_capability_flags_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::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; + if (sizeof(ur_memory_scope_capability_flags_t) > size) { + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_memory_scope_capability_flags_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_DEVICE_INFO_MAX_WORK_GROUPS_3D: { + + const size_t *tptr = (const size_t *)ptr; + os << "{"; + size_t nelems = size / sizeof(size_t); + for (size_t i = 0; i < nelems; ++i) { + if (i != 0) { + os << ", "; + } + + os << + tptr[i] + ; + + } + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_DEVICE_INFO_HOST_PIPE_READ_WRITE_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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_DEVICE_INFO_ESIMD_SUPPORT: { + const ur_bool_t *tptr = (const ur_bool_t *)ptr; + if (sizeof(ur_bool_t) > size) { + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_bool_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_DEVICE_INFO_COMPONENT_DEVICES: { + + const ur_device_handle_t *tptr = (const ur_device_handle_t *)ptr; + os << "{"; + size_t nelems = size / sizeof(ur_device_handle_t); + for (size_t i = 0; i < nelems; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + tptr[i] + ); + + } + os << "}"; + } break; + case UR_DEVICE_INFO_COMPOSITE_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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::details::printPtr(os, + *tptr + ); + + os << ")"; + } break; + case UR_DEVICE_INFO_GLOBAL_VARIABLE_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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_DEVICE_INFO_USM_POOL_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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_DEVICE_INFO_COMMAND_BUFFER_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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_DEVICE_INFO_COMMAND_BUFFER_UPDATE_CAPABILITIES_EXP: { + const ur_device_command_buffer_update_capability_flags_t *tptr = (const ur_device_command_buffer_update_capability_flags_t *)ptr; + if (sizeof(ur_device_command_buffer_update_capability_flags_t) > size) { + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_device_command_buffer_update_capability_flags_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::details::printFlag(os, + *tptr + ); + + os << ")"; + } break; + case UR_DEVICE_INFO_COMMAND_BUFFER_EVENT_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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_DEVICE_INFO_CLUSTER_LAUNCH_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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_DEVICE_INFO_EXTERNAL_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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_DEVICE_INFO_EXTERNAL_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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_DEVICE_INFO_CUBEMAP_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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_DEVICE_INFO_CUBEMAP_SEAMLESS_FILTERING_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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_3D_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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_DEVICE_INFO_TIMESTAMP_RECORDING_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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_DEVICE_INFO_IMAGE_ARRAY_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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_DEVICE_INFO_BINDLESS_UNIQUE_ADDRESSING_PER_DIM_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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_DEVICE_INFO_BINDLESS_SAMPLE_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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_DEVICE_INFO_BINDLESS_SAMPLE_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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_DEVICE_INFO_ENQUEUE_NATIVE_COMMAND_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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_DEVICE_INFO_LOW_POWER_EVENTS_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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_DEVICE_INFO_2D_BLOCK_ARRAY_CAPABILITIES_EXP: { + const ur_exp_device_2d_block_array_capability_flags_t *tptr = (const ur_exp_device_2d_block_array_capability_flags_t *)ptr; + if (sizeof(ur_exp_device_2d_block_array_capability_flags_t) > size) { + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_exp_device_2d_block_array_capability_flags_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::details::printFlag(os, + *tptr + ); + + os << ")"; + } break; + default: + os << "unknown enumerator"; + return UR_RESULT_ERROR_INVALID_ENUMERATION; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details + + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_device_affinity_domain_flag_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_device_affinity_domain_flag_t value) { + switch (value) { + case UR_DEVICE_AFFINITY_DOMAIN_FLAG_NUMA: + os << "UR_DEVICE_AFFINITY_DOMAIN_FLAG_NUMA"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } + + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_device_affinity_domain_flag_t flag + template<> + 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) { + val ^= (uint32_t)UR_DEVICE_AFFINITY_DOMAIN_FLAG_NUMA; + if (!first) { + os << " | "; + } else { + first = false; + } + 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) { + val ^= (uint32_t)UR_DEVICE_AFFINITY_DOMAIN_FLAG_L4_CACHE; + if (!first) { + os << " | "; + } else { + first = false; + } + 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) { + val ^= (uint32_t)UR_DEVICE_AFFINITY_DOMAIN_FLAG_L3_CACHE; + if (!first) { + os << " | "; + } else { + first = false; + } + 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) { + val ^= (uint32_t)UR_DEVICE_AFFINITY_DOMAIN_FLAG_L2_CACHE; + if (!first) { + os << " | "; + } else { + first = false; + } + 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) { + val ^= (uint32_t)UR_DEVICE_AFFINITY_DOMAIN_FLAG_L1_CACHE; + if (!first) { + os << " | "; + } else { + first = false; + } + 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) { + val ^= (uint32_t)UR_DEVICE_AFFINITY_DOMAIN_FLAG_NEXT_PARTITIONABLE; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_DEVICE_AFFINITY_DOMAIN_FLAG_NEXT_PARTITIONABLE; + } + if (val != 0) { + std::bitset<32> bits(val); + if (!first) { + os << " | "; + } + os << "unknown bit flags " << bits; + } else if (first) { + os << "0"; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_device_partition_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_device_partition_t value) { + switch (value) { + case UR_DEVICE_PARTITION_EQUALLY: + os << "UR_DEVICE_PARTITION_EQUALLY"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } +namespace ur::details { - os << ", "; - os << ".count = "; + /////////////////////////////////////////////////////////////////////////////// + // @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){"; - os << *(params->pcount); + switch(tag){ + case UR_DEVICE_PARTITION_EQUALLY: + + + os << ".equally = "; + + os << + (params.equally) + ; - os << ", "; - os << ".phPrograms = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphPrograms))); - if (*(params->pphPrograms) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pcount; ++i) { - if (i != 0) { - os << ", "; - } - ur::details::printPtr(os, - (*(params->pphPrograms))[i]); - } - os << "}"; - } + break; + case UR_DEVICE_PARTITION_BY_COUNTS: + + + os << ".count = "; + + os << + (params.count) + ; - os << ", "; - os << ".pOptions = "; - ur::details::printPtr(os, - *(params->ppOptions)); + break; + case UR_DEVICE_PARTITION_BY_AFFINITY_DOMAIN: + + + os << ".affinity_domain = "; + + ur::details::printFlag(os, + (params.affinity_domain) + ); - os << ", "; - os << ".phProgram = "; - ur::details::printPtr(os, - *(params->pphProgram)); + break; + default: + os << ""; + return UR_RESULT_ERROR_INVALID_ENUMERATION; + } + os << "}"; + return UR_RESULT_SUCCESS; +} +} // namespace ur::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 = "; + + os << + (params.type) + ; + + + + + os << ", "; + os << ".value = "; + ur::details::printUnion(os, (params.value), params.type); + os << "}"; return os; } - /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_program_link_exp_params_t type +/// @brief Print operator for the ur_device_partition_properties_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_link_exp_params_t *params) { - - os << ".hContext = "; - - ur::details::printPtr(os, - *(params->phContext)); - - os << ", "; - os << ".numDevices = "; +inline std::ostream &operator<<(std::ostream &os, const struct ur_device_partition_properties_t params) { + os << "(struct ur_device_partition_properties_t){"; + + + + os << ".stype = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".pProperties = "; + + ur::details::printPtr(os, + (params.pProperties) + ); + + + + + os << ", "; + os << ".PropCount = "; + + os << + (params.PropCount) + ; - os << *(params->pnumDevices); - os << ", "; - os << ".phDevices = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphDevices))); - if (*(params->pphDevices) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumDevices; ++i) { - if (i != 0) { - os << ", "; + os << "}"; + return os; +} + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_device_fp_capability_flag_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_device_fp_capability_flag_t value) { + switch (value) { + case UR_DEVICE_FP_CAPABILITY_FLAG_CORRECTLY_ROUNDED_DIVIDE_SQRT: + os << "UR_DEVICE_FP_CAPABILITY_FLAG_CORRECTLY_ROUNDED_DIVIDE_SQRT"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } + + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_device_fp_capability_flag_t flag + template<> + 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 (!first) { + os << " | "; + } else { + first = false; + } + os << UR_DEVICE_FP_CAPABILITY_FLAG_CORRECTLY_ROUNDED_DIVIDE_SQRT; } - - ur::details::printPtr(os, - (*(params->pphDevices))[i]); + + 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 << " | "; + } else { + first = false; + } + 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) { + val ^= (uint32_t)UR_DEVICE_FP_CAPABILITY_FLAG_ROUND_TO_ZERO; + if (!first) { + os << " | "; + } else { + first = false; + } + 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) { + val ^= (uint32_t)UR_DEVICE_FP_CAPABILITY_FLAG_ROUND_TO_INF; + if (!first) { + os << " | "; + } else { + first = false; + } + 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) { + val ^= (uint32_t)UR_DEVICE_FP_CAPABILITY_FLAG_INF_NAN; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_DEVICE_FP_CAPABILITY_FLAG_INF_NAN; + } + + 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 << " | "; + } else { + first = false; + } + os << UR_DEVICE_FP_CAPABILITY_FLAG_DENORM; + } + + 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 << " | "; + } else { + first = false; + } + 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) { + val ^= (uint32_t)UR_DEVICE_FP_CAPABILITY_FLAG_SOFT_FLOAT; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_DEVICE_FP_CAPABILITY_FLAG_SOFT_FLOAT; + } + if (val != 0) { + std::bitset<32> bits(val); + if (!first) { + os << " | "; + } + os << "unknown bit flags " << bits; + } else if (first) { + os << "0"; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_device_mem_cache_type_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_device_mem_cache_type_t value) { + switch (value) { + case UR_DEVICE_MEM_CACHE_TYPE_NONE: + os << "UR_DEVICE_MEM_CACHE_TYPE_NONE"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_device_local_mem_type_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_device_local_mem_type_t value) { + switch (value) { + case UR_DEVICE_LOCAL_MEM_TYPE_NONE: + os << "UR_DEVICE_LOCAL_MEM_TYPE_NONE"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_device_exec_capability_flag_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_device_exec_capability_flag_t value) { + switch (value) { + case UR_DEVICE_EXEC_CAPABILITY_FLAG_KERNEL: + os << "UR_DEVICE_EXEC_CAPABILITY_FLAG_KERNEL"; + break; + case UR_DEVICE_EXEC_CAPABILITY_FLAG_NATIVE_KERNEL: + os << "UR_DEVICE_EXEC_CAPABILITY_FLAG_NATIVE_KERNEL"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } + + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_device_exec_capability_flag_t flag + template<> + 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) { + val ^= (uint32_t)UR_DEVICE_EXEC_CAPABILITY_FLAG_KERNEL; + if (!first) { + os << " | "; + } else { + first = false; + } + 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) { + val ^= (uint32_t)UR_DEVICE_EXEC_CAPABILITY_FLAG_NATIVE_KERNEL; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_DEVICE_EXEC_CAPABILITY_FLAG_NATIVE_KERNEL; + } + if (val != 0) { + std::bitset<32> bits(val); + if (!first) { + os << " | "; + } + os << "unknown bit flags " << bits; + } else if (first) { + os << "0"; } - os << "}"; + return UR_RESULT_SUCCESS; } + } // namespace ur::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 = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".isNativeHandleOwned = "; + + os << + (params.isNativeHandleOwned) + ; - os << ", "; - os << ".count = "; - - os << *(params->pcount); - os << ", "; - os << ".phPrograms = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphPrograms))); - if (*(params->pphPrograms) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pcount; ++i) { - if (i != 0) { - os << ", "; + os << "}"; + return os; +} + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_memory_order_capability_flag_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_memory_order_capability_flag_t value) { + switch (value) { + case UR_MEMORY_ORDER_CAPABILITY_FLAG_RELAXED: + os << "UR_MEMORY_ORDER_CAPABILITY_FLAG_RELAXED"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } + + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_memory_order_capability_flag_t flag + template<> + 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) { + val ^= (uint32_t)UR_MEMORY_ORDER_CAPABILITY_FLAG_RELAXED; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_MEMORY_ORDER_CAPABILITY_FLAG_RELAXED; } - - ur::details::printPtr(os, - (*(params->pphPrograms))[i]); + + 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 << " | "; + } else { + first = false; + } + os << UR_MEMORY_ORDER_CAPABILITY_FLAG_ACQUIRE; + } + + 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 << " | "; + } else { + first = false; + } + 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) { + val ^= (uint32_t)UR_MEMORY_ORDER_CAPABILITY_FLAG_ACQ_REL; + if (!first) { + os << " | "; + } else { + first = false; + } + 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) { + val ^= (uint32_t)UR_MEMORY_ORDER_CAPABILITY_FLAG_SEQ_CST; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_MEMORY_ORDER_CAPABILITY_FLAG_SEQ_CST; + } + if (val != 0) { + std::bitset<32> bits(val); + if (!first) { + os << " | "; + } + os << "unknown bit flags " << bits; + } else if (first) { + os << "0"; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_memory_scope_capability_flag_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_memory_scope_capability_flag_t value) { + switch (value) { + case UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_ITEM: + os << "UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_ITEM"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } + + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_memory_scope_capability_flag_t flag + template<> + 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) { + val ^= (uint32_t)UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_ITEM; + if (!first) { + os << " | "; + } else { + first = false; + } + 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) { + val ^= (uint32_t)UR_MEMORY_SCOPE_CAPABILITY_FLAG_SUB_GROUP; + if (!first) { + os << " | "; + } else { + first = false; + } + 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) { + val ^= (uint32_t)UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_GROUP; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_MEMORY_SCOPE_CAPABILITY_FLAG_WORK_GROUP; + } + + 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 << " | "; + } else { + first = false; + } + os << UR_MEMORY_SCOPE_CAPABILITY_FLAG_DEVICE; + } + + 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 << " | "; + } else { + first = false; + } + os << UR_MEMORY_SCOPE_CAPABILITY_FLAG_SYSTEM; + } + if (val != 0) { + std::bitset<32> bits(val); + if (!first) { + os << " | "; + } + os << "unknown bit flags " << bits; + } else if (first) { + os << "0"; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_device_usm_access_capability_flag_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_device_usm_access_capability_flag_t value) { + switch (value) { + case UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_ACCESS: + os << "UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_ACCESS"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } + + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_device_usm_access_capability_flag_t flag + template<> + 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) { + val ^= (uint32_t)UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_ACCESS; + if (!first) { + os << " | "; + } else { + first = false; + } + 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) { + val ^= (uint32_t)UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_ATOMIC_ACCESS; + if (!first) { + os << " | "; + } else { + first = false; + } + 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) { + val ^= (uint32_t)UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_CONCURRENT_ACCESS; + if (!first) { + os << " | "; + } else { + first = false; + } + 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 (!first) { + os << " | "; + } else { + first = false; + } + os << UR_DEVICE_USM_ACCESS_CAPABILITY_FLAG_ATOMIC_CONCURRENT_ACCESS; + } + if (val != 0) { + std::bitset<32> bits(val); + if (!first) { + os << " | "; + } + os << "unknown bit flags " << bits; + } else if (first) { + os << "0"; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_context_flag_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_context_flag_t value) { + switch (value) { + case UR_CONTEXT_FLAG_TBD: + os << "UR_CONTEXT_FLAG_TBD"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } + + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_context_flag_t flag + template<> + inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { + uint32_t val = flag; + bool first = true; + + if ((val & UR_CONTEXT_FLAG_TBD) == (uint32_t)UR_CONTEXT_FLAG_TBD) { + val ^= (uint32_t)UR_CONTEXT_FLAG_TBD; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_CONTEXT_FLAG_TBD; + } + if (val != 0) { + std::bitset<32> bits(val); + if (!first) { + os << " | "; + } + os << "unknown bit flags " << bits; + } else if (first) { + os << "0"; } - os << "}"; + return UR_RESULT_SUCCESS; } + } // namespace ur::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 = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".flags = "; + + ur::details::printFlag(os, + (params.flags) + ); - os << ", "; - os << ".pOptions = "; - - ur::details::printPtr(os, - *(params->ppOptions)); - - os << ", "; - os << ".phProgram = "; - - ur::details::printPtr(os, - *(params->pphProgram)); + os << "}"; return os; } + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_context_info_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_context_info_t value) { + switch (value) { + case UR_CONTEXT_INFO_NUM_DEVICES: + os << "UR_CONTEXT_INFO_NUM_DEVICES"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_context_info_t enum value + template <> + inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_context_info_t value, size_t size) { + if (ptr == NULL) { + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_CONTEXT_INFO_DEVICES: { + + const ur_device_handle_t *tptr = (const ur_device_handle_t *)ptr; + os << "{"; + size_t nelems = size / sizeof(ur_device_handle_t); + for (size_t i = 0; i < nelems; ++i) { + if (i != 0) { + os << ", "; + } + + ur::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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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; + if (sizeof(ur_memory_order_capability_flags_t) > size) { + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_memory_order_capability_flags_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::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; + if (sizeof(ur_memory_scope_capability_flags_t) > size) { + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_memory_scope_capability_flags_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::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; + if (sizeof(ur_memory_order_capability_flags_t) > size) { + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_memory_order_capability_flags_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::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; + if (sizeof(ur_memory_scope_capability_flags_t) > size) { + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_memory_scope_capability_flags_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::details::printFlag(os, + *tptr + ); + + os << ")"; + } break; + default: + os << "unknown enumerator"; + return UR_RESULT_ERROR_INVALID_ENUMERATION; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_program_retain_params_t type +/// @brief Print operator for the ur_context_native_properties_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_retain_params_t *params) { - - os << ".hProgram = "; +inline std::ostream &operator<<(std::ostream &os, const struct ur_context_native_properties_t params) { + os << "(struct ur_context_native_properties_t){"; + + + + os << ".stype = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".isNativeHandleOwned = "; + + os << + (params.isNativeHandleOwned) + ; - ur::details::printPtr(os, - *(params->phProgram)); + os << "}"; return os; } + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_mem_flag_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_mem_flag_t value) { + switch (value) { + case UR_MEM_FLAG_READ_WRITE: + os << "UR_MEM_FLAG_READ_WRITE"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } + + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_mem_flag_t flag + template<> + inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { + uint32_t val = flag; + bool first = true; + + if ((val & UR_MEM_FLAG_READ_WRITE) == (uint32_t)UR_MEM_FLAG_READ_WRITE) { + val ^= (uint32_t)UR_MEM_FLAG_READ_WRITE; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_MEM_FLAG_READ_WRITE; + } + + if ((val & UR_MEM_FLAG_WRITE_ONLY) == (uint32_t)UR_MEM_FLAG_WRITE_ONLY) { + val ^= (uint32_t)UR_MEM_FLAG_WRITE_ONLY; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_MEM_FLAG_WRITE_ONLY; + } + + if ((val & UR_MEM_FLAG_READ_ONLY) == (uint32_t)UR_MEM_FLAG_READ_ONLY) { + val ^= (uint32_t)UR_MEM_FLAG_READ_ONLY; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_MEM_FLAG_READ_ONLY; + } + + 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 << " | "; + } else { + first = false; + } + os << UR_MEM_FLAG_USE_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 << " | "; + } else { + first = false; + } + 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) { + val ^= (uint32_t)UR_MEM_FLAG_ALLOC_COPY_HOST_POINTER; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_MEM_FLAG_ALLOC_COPY_HOST_POINTER; + } + if (val != 0) { + std::bitset<32> bits(val); + if (!first) { + os << " | "; + } + os << "unknown bit flags " << bits; + } else if (first) { + os << "0"; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_mem_type_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_mem_type_t value) { + switch (value) { + 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_IMAGE_CUBEMAP_EXP: + os << "UR_MEM_TYPE_IMAGE_CUBEMAP_EXP"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_mem_info_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_mem_info_t value) { + switch (value) { + case UR_MEM_INFO_SIZE: + os << "UR_MEM_INFO_SIZE"; + break; + case UR_MEM_INFO_CONTEXT: + os << "UR_MEM_INFO_CONTEXT"; + break; + case UR_MEM_INFO_REFERENCE_COUNT: + os << "UR_MEM_INFO_REFERENCE_COUNT"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_mem_info_t enum value + template <> + inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_mem_info_t value, size_t size) { + if (ptr == NULL) { + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::details::printPtr(os, + *tptr + ); + + os << ")"; + } break; + case UR_MEM_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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + default: + os << "unknown enumerator"; + return UR_RESULT_ERROR_INVALID_ENUMERATION; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details + + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_image_channel_order_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_image_channel_order_t value) { + switch (value) { + case UR_IMAGE_CHANNEL_ORDER_A: + os << "UR_IMAGE_CHANNEL_ORDER_A"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_image_channel_type_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_image_channel_type_t value) { + switch (value) { + case UR_IMAGE_CHANNEL_TYPE_SNORM_INT8: + os << "UR_IMAGE_CHANNEL_TYPE_SNORM_INT8"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_image_info_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_image_info_t value) { + switch (value) { + case UR_IMAGE_INFO_FORMAT: + os << "UR_IMAGE_INFO_FORMAT"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_image_info_t enum value + template <> + inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_image_info_t value, size_t size) { + if (ptr == NULL) { + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + default: + os << "unknown enumerator"; + return UR_RESULT_ERROR_INVALID_ENUMERATION; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_program_release_params_t type +/// @brief Print operator for the ur_image_format_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_release_params_t *params) { - - os << ".hProgram = "; +inline std::ostream &operator<<(std::ostream &os, const struct ur_image_format_t params) { + os << "(struct ur_image_format_t){"; + + + + os << ".channelOrder = "; + + os << + (params.channelOrder) + ; + + + + + os << ", "; + os << ".channelType = "; + + os << + (params.channelType) + ; - ur::details::printPtr(os, - *(params->phProgram)); + os << "}"; return os; } - /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_program_get_function_pointer_params_t type +/// @brief Print operator for the ur_image_desc_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 = "; - - ur::details::printPtr(os, - *(params->phDevice)); - - os << ", "; - os << ".hProgram = "; - - ur::details::printPtr(os, - *(params->phProgram)); - - os << ", "; - os << ".pFunctionName = "; - - ur::details::printPtr(os, - *(params->ppFunctionName)); - - os << ", "; - os << ".ppFunctionPointer = "; +inline std::ostream &operator<<(std::ostream &os, const struct ur_image_desc_t params) { + os << "(struct ur_image_desc_t){"; + + + + os << ".stype = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".type = "; + + os << + (params.type) + ; + + + + + os << ", "; + os << ".width = "; + + os << + (params.width) + ; + + + + + os << ", "; + os << ".height = "; + + os << + (params.height) + ; + + + + + os << ", "; + os << ".depth = "; + + os << + (params.depth) + ; + + + + + os << ", "; + os << ".arraySize = "; + + os << + (params.arraySize) + ; + + + + + os << ", "; + os << ".rowPitch = "; + + os << + (params.rowPitch) + ; + + + + + os << ", "; + os << ".slicePitch = "; + + os << + (params.slicePitch) + ; + + + + + os << ", "; + os << ".numMipLevel = "; + + os << + (params.numMipLevel) + ; + + + + + os << ", "; + os << ".numSamples = "; + + os << + (params.numSamples) + ; - ur::details::printPtr(os, - *(params->pppFunctionPointer)); + os << "}"; return os; } - /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_program_get_global_variable_pointer_params_t type +/// @brief Print operator for the ur_buffer_properties_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_get_global_variable_pointer_params_t *params) { - - os << ".hDevice = "; - - ur::details::printPtr(os, - *(params->phDevice)); - - os << ", "; - os << ".hProgram = "; - - ur::details::printPtr(os, - *(params->phProgram)); - - os << ", "; - os << ".pGlobalVariableName = "; - - ur::details::printPtr(os, - *(params->ppGlobalVariableName)); - - os << ", "; - os << ".pGlobalVariableSizeRet = "; - - ur::details::printPtr(os, - *(params->ppGlobalVariableSizeRet)); - - os << ", "; - os << ".ppGlobalVariablePointerRet = "; +inline std::ostream &operator<<(std::ostream &os, const struct ur_buffer_properties_t params) { + os << "(struct ur_buffer_properties_t){"; + + + + os << ".stype = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".pHost = "; + + ur::details::printPtr(os, + (params.pHost) + ); - ur::details::printPtr(os, - *(params->pppGlobalVariablePointerRet)); + os << "}"; return os; } - /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_program_get_info_params_t type +/// @brief Print operator for the ur_buffer_channel_properties_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_get_info_params_t *params) { - - os << ".hProgram = "; - - ur::details::printPtr(os, - *(params->phProgram)); - - os << ", "; - os << ".propName = "; - - os << *(params->ppropName); - - os << ", "; - os << ".propSize = "; - - os << *(params->ppropSize); - - os << ", "; - os << ".pPropValue = "; - ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); - - os << ", "; - os << ".pPropSizeRet = "; +inline std::ostream &operator<<(std::ostream &os, const struct ur_buffer_channel_properties_t params) { + os << "(struct ur_buffer_channel_properties_t){"; + + + + os << ".stype = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".channel = "; + + os << + (params.channel) + ; - ur::details::printPtr(os, - *(params->ppPropSizeRet)); + os << "}"; return os; } - /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_program_get_build_info_params_t type +/// @brief Print operator for the ur_buffer_alloc_location_properties_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_get_build_info_params_t *params) { - - os << ".hProgram = "; - - ur::details::printPtr(os, - *(params->phProgram)); - - os << ", "; - os << ".hDevice = "; - - ur::details::printPtr(os, - *(params->phDevice)); - - os << ", "; - os << ".propName = "; - - os << *(params->ppropName); +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 = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".location = "; + + os << + (params.location) + ; - os << ", "; - os << ".propSize = "; - os << *(params->ppropSize); + os << "}"; + return os; +} +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".origin = "; + + os << + (params.origin) + ; + + + + + os << ", "; + os << ".size = "; + + os << + (params.size) + ; - os << ", "; - os << ".pPropValue = "; - ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); - os << ", "; - os << ".pPropSizeRet = "; + os << "}"; + return os; +} + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_buffer_create_type_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_buffer_create_type_t value) { + switch (value) { + case UR_BUFFER_CREATE_TYPE_REGION: + os << "UR_BUFFER_CREATE_TYPE_REGION"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".isNativeHandleOwned = "; + + os << + (params.isNativeHandleOwned) + ; - ur::details::printPtr(os, - *(params->ppPropSizeRet)); + os << "}"; return os; } + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_sampler_filter_mode_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_sampler_filter_mode_t value) { + switch (value) { + case UR_SAMPLER_FILTER_MODE_NEAREST: + os << "UR_SAMPLER_FILTER_MODE_NEAREST"; + break; + case UR_SAMPLER_FILTER_MODE_LINEAR: + os << "UR_SAMPLER_FILTER_MODE_LINEAR"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_sampler_addressing_mode_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_sampler_addressing_mode_t value) { + switch (value) { + case UR_SAMPLER_ADDRESSING_MODE_NONE: + os << "UR_SAMPLER_ADDRESSING_MODE_NONE"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_sampler_info_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_sampler_info_t value) { + switch (value) { + case UR_SAMPLER_INFO_REFERENCE_COUNT: + os << "UR_SAMPLER_INFO_REFERENCE_COUNT"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_sampler_info_t enum value + template <> + inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_sampler_info_t value, size_t size) { + if (ptr == NULL) { + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_SAMPLER_INFO_ADDRESSING_MODE: { + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_SAMPLER_INFO_FILTER_MODE: { + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + default: + os << "unknown enumerator"; + return UR_RESULT_ERROR_INVALID_ENUMERATION; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_program_set_specialization_constants_params_t type +/// @brief Print operator for the ur_sampler_desc_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 << ".hProgram = "; +inline std::ostream &operator<<(std::ostream &os, const struct ur_sampler_desc_t params) { + os << "(struct ur_sampler_desc_t){"; + + + + os << ".stype = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".normalizedCoords = "; + + os << + (params.normalizedCoords) + ; + + + + + os << ", "; + os << ".addressingMode = "; + + os << + (params.addressingMode) + ; + + + + + os << ", "; + os << ".filterMode = "; + + os << + (params.filterMode) + ; - ur::details::printPtr(os, - *(params->phProgram)); - os << ", "; - os << ".count = "; + os << "}"; + return os; +} +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".isNativeHandleOwned = "; + + os << + (params.isNativeHandleOwned) + ; - os << *(params->pcount); - os << ", "; - os << ".pSpecConstants = "; - ur::details::printPtr(os, reinterpret_cast(*(params->ppSpecConstants))); - if (*(params->ppSpecConstants) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pcount; ++i) { - if (i != 0) { - os << ", "; + os << "}"; + return os; +} + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_usm_host_mem_flag_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_usm_host_mem_flag_t value) { + switch (value) { + case UR_USM_HOST_MEM_FLAG_INITIAL_PLACEMENT: + os << "UR_USM_HOST_MEM_FLAG_INITIAL_PLACEMENT"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } + + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_usm_host_mem_flag_t flag + template<> + 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) { + val ^= (uint32_t)UR_USM_HOST_MEM_FLAG_INITIAL_PLACEMENT; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_USM_HOST_MEM_FLAG_INITIAL_PLACEMENT; } - - os << (*(params->ppSpecConstants))[i]; + if (val != 0) { + std::bitset<32> bits(val); + if (!first) { + os << " | "; + } + os << "unknown bit flags " << bits; + } else if (first) { + os << "0"; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_usm_device_mem_flag_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_usm_device_mem_flag_t value) { + switch (value) { + case UR_USM_DEVICE_MEM_FLAG_WRITE_COMBINED: + os << "UR_USM_DEVICE_MEM_FLAG_WRITE_COMBINED"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } + + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_usm_device_mem_flag_t flag + template<> + 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) { + val ^= (uint32_t)UR_USM_DEVICE_MEM_FLAG_WRITE_COMBINED; + if (!first) { + os << " | "; + } else { + first = false; + } + 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) { + val ^= (uint32_t)UR_USM_DEVICE_MEM_FLAG_INITIAL_PLACEMENT; + if (!first) { + os << " | "; + } else { + first = false; + } + 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) { + val ^= (uint32_t)UR_USM_DEVICE_MEM_FLAG_DEVICE_READ_ONLY; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_USM_DEVICE_MEM_FLAG_DEVICE_READ_ONLY; + } + if (val != 0) { + std::bitset<32> bits(val); + if (!first) { + os << " | "; + } + os << "unknown bit flags " << bits; + } else if (first) { + os << "0"; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_usm_pool_flag_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_usm_pool_flag_t value) { + switch (value) { + case UR_USM_POOL_FLAG_ZERO_INITIALIZE_BLOCK: + os << "UR_USM_POOL_FLAG_ZERO_INITIALIZE_BLOCK"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } + + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_usm_pool_flag_t flag + template<> + 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) { + val ^= (uint32_t)UR_USM_POOL_FLAG_ZERO_INITIALIZE_BLOCK; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_USM_POOL_FLAG_ZERO_INITIALIZE_BLOCK; + } + if (val != 0) { + std::bitset<32> bits(val); + if (!first) { + os << " | "; + } + os << "unknown bit flags " << bits; + } else if (first) { + os << "0"; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_usm_type_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_usm_type_t value) { + switch (value) { + case UR_USM_TYPE_UNKNOWN: + os << "UR_USM_TYPE_UNKNOWN"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_usm_alloc_info_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_usm_alloc_info_t value) { + switch (value) { + case UR_USM_ALLOC_INFO_TYPE: + os << "UR_USM_ALLOC_INFO_TYPE"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_usm_alloc_info_t enum value + template <> + inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_usm_alloc_info_t value, size_t size) { + if (ptr == NULL) { + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::details::printPtr(os, + *tptr + ); + + os << ")"; + } break; + default: + os << "unknown enumerator"; + return UR_RESULT_ERROR_INVALID_ENUMERATION; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details + + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_usm_advice_flag_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_usm_advice_flag_t value) { + switch (value) { + case UR_USM_ADVICE_FLAG_DEFAULT: + os << "UR_USM_ADVICE_FLAG_DEFAULT"; + 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; + case UR_USM_ADVICE_FLAG_SET_NON_COHERENT_MEMORY: + os << "UR_USM_ADVICE_FLAG_SET_NON_COHERENT_MEMORY"; + break; + case UR_USM_ADVICE_FLAG_CLEAR_NON_COHERENT_MEMORY: + os << "UR_USM_ADVICE_FLAG_CLEAR_NON_COHERENT_MEMORY"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } + + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_usm_advice_flag_t flag + template<> + 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) { + val ^= (uint32_t)UR_USM_ADVICE_FLAG_DEFAULT; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_USM_ADVICE_FLAG_DEFAULT; + } + + 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 << " | "; + } else { + first = false; + } + 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) { + val ^= (uint32_t)UR_USM_ADVICE_FLAG_CLEAR_READ_MOSTLY; + if (!first) { + os << " | "; + } else { + first = false; + } + 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) { + val ^= (uint32_t)UR_USM_ADVICE_FLAG_SET_PREFERRED_LOCATION; + if (!first) { + os << " | "; + } else { + first = false; + } + 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) { + val ^= (uint32_t)UR_USM_ADVICE_FLAG_CLEAR_PREFERRED_LOCATION; + if (!first) { + os << " | "; + } else { + first = false; + } + 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) { + val ^= (uint32_t)UR_USM_ADVICE_FLAG_SET_NON_ATOMIC_MOSTLY; + if (!first) { + os << " | "; + } else { + first = false; + } + 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) { + val ^= (uint32_t)UR_USM_ADVICE_FLAG_CLEAR_NON_ATOMIC_MOSTLY; + if (!first) { + os << " | "; + } else { + first = false; + } + 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) { + val ^= (uint32_t)UR_USM_ADVICE_FLAG_BIAS_CACHED; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_USM_ADVICE_FLAG_BIAS_CACHED; + } + + 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 << " | "; + } else { + first = false; + } + 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) { + val ^= (uint32_t)UR_USM_ADVICE_FLAG_SET_ACCESSED_BY_DEVICE; + if (!first) { + os << " | "; + } else { + first = false; + } + 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) { + val ^= (uint32_t)UR_USM_ADVICE_FLAG_CLEAR_ACCESSED_BY_DEVICE; + if (!first) { + os << " | "; + } else { + first = false; + } + 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) { + val ^= (uint32_t)UR_USM_ADVICE_FLAG_SET_ACCESSED_BY_HOST; + if (!first) { + os << " | "; + } else { + first = false; + } + 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) { + val ^= (uint32_t)UR_USM_ADVICE_FLAG_CLEAR_ACCESSED_BY_HOST; + if (!first) { + os << " | "; + } else { + first = false; + } + 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) { + val ^= (uint32_t)UR_USM_ADVICE_FLAG_SET_PREFERRED_LOCATION_HOST; + if (!first) { + os << " | "; + } else { + first = false; + } + 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) { + val ^= (uint32_t)UR_USM_ADVICE_FLAG_CLEAR_PREFERRED_LOCATION_HOST; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_USM_ADVICE_FLAG_CLEAR_PREFERRED_LOCATION_HOST; + } + + if ((val & UR_USM_ADVICE_FLAG_SET_NON_COHERENT_MEMORY) == (uint32_t)UR_USM_ADVICE_FLAG_SET_NON_COHERENT_MEMORY) { + val ^= (uint32_t)UR_USM_ADVICE_FLAG_SET_NON_COHERENT_MEMORY; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_USM_ADVICE_FLAG_SET_NON_COHERENT_MEMORY; + } + + if ((val & UR_USM_ADVICE_FLAG_CLEAR_NON_COHERENT_MEMORY) == (uint32_t)UR_USM_ADVICE_FLAG_CLEAR_NON_COHERENT_MEMORY) { + val ^= (uint32_t)UR_USM_ADVICE_FLAG_CLEAR_NON_COHERENT_MEMORY; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_USM_ADVICE_FLAG_CLEAR_NON_COHERENT_MEMORY; + } + if (val != 0) { + std::bitset<32> bits(val); + if (!first) { + os << " | "; + } + os << "unknown bit flags " << bits; + } else if (first) { + os << "0"; } - os << "}"; + return UR_RESULT_SUCCESS; } + } // namespace ur::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 = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".hints = "; + + ur::details::printFlag(os, + (params.hints) + ); + + + + + os << ", "; + os << ".align = "; + + os << + (params.align) + ; + + os << "}"; return os; } - /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_program_get_native_handle_params_t type +/// @brief Print operator for the ur_usm_host_desc_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 = "; - - ur::details::printPtr(os, - *(params->phProgram)); - - os << ", "; - os << ".phNativeProgram = "; +inline std::ostream &operator<<(std::ostream &os, const struct ur_usm_host_desc_t params) { + os << "(struct ur_usm_host_desc_t){"; + + + + os << ".stype = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".flags = "; + + ur::details::printFlag(os, + (params.flags) + ); - ur::details::printPtr(os, - *(params->pphNativeProgram)); + os << "}"; return os; } - /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_program_create_with_native_handle_params_t type +/// @brief Print operator for the ur_usm_device_desc_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 << ".hNativeProgram = "; - - ur::details::printPtr(os, reinterpret_cast( - *(params->phNativeProgram))); - - os << ", "; - os << ".hContext = "; - - ur::details::printPtr(os, - *(params->phContext)); - - os << ", "; - os << ".pProperties = "; - - ur::details::printPtr(os, - *(params->ppProperties)); - - os << ", "; - os << ".phProgram = "; +inline std::ostream &operator<<(std::ostream &os, const struct ur_usm_device_desc_t params) { + os << "(struct ur_usm_device_desc_t){"; + + + + os << ".stype = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".flags = "; + + ur::details::printFlag(os, + (params.flags) + ); - ur::details::printPtr(os, - *(params->pphProgram)); + os << "}"; return os; } - /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_kernel_create_params_t type +/// @brief Print operator for the ur_usm_alloc_location_desc_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_create_params_t *params) { - - os << ".hProgram = "; - - ur::details::printPtr(os, - *(params->phProgram)); - - os << ", "; - os << ".pKernelName = "; - - ur::details::printPtr(os, - *(params->ppKernelName)); - - os << ", "; - os << ".phKernel = "; +inline std::ostream &operator<<(std::ostream &os, const struct ur_usm_alloc_location_desc_t params) { + os << "(struct ur_usm_alloc_location_desc_t){"; + + + + os << ".stype = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".location = "; + + os << + (params.location) + ; - ur::details::printPtr(os, - *(params->pphKernel)); + os << "}"; return os; } - /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_kernel_get_info_params_t type +/// @brief Print operator for the ur_usm_pool_desc_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_get_info_params_t *params) { - - os << ".hKernel = "; - - ur::details::printPtr(os, - *(params->phKernel)); - - os << ", "; - os << ".propName = "; - - os << *(params->ppropName); - - os << ", "; - os << ".propSize = "; - - os << *(params->ppropSize); - - os << ", "; - os << ".pPropValue = "; - ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); - - os << ", "; - os << ".pPropSizeRet = "; +inline std::ostream &operator<<(std::ostream &os, const struct ur_usm_pool_desc_t params) { + os << "(struct ur_usm_pool_desc_t){"; + + + + os << ".stype = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".flags = "; + + ur::details::printFlag(os, + (params.flags) + ); - ur::details::printPtr(os, - *(params->ppPropSizeRet)); + os << "}"; return os; } - /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_kernel_get_group_info_params_t type +/// @brief Print operator for the ur_usm_pool_limits_desc_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_get_group_info_params_t *params) { - - os << ".hKernel = "; - - ur::details::printPtr(os, - *(params->phKernel)); - - os << ", "; - os << ".hDevice = "; - - ur::details::printPtr(os, - *(params->phDevice)); - - os << ", "; - os << ".propName = "; - - os << *(params->ppropName); - - os << ", "; - os << ".propSize = "; - - os << *(params->ppropSize); - - os << ", "; - os << ".pPropValue = "; - ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); - - os << ", "; - os << ".pPropSizeRet = "; +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 = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".maxPoolableSize = "; + + os << + (params.maxPoolableSize) + ; + + + + + os << ", "; + os << ".minDriverAllocSize = "; + + os << + (params.minDriverAllocSize) + ; - ur::details::printPtr(os, - *(params->ppPropSizeRet)); + os << "}"; return os; } - + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_usm_pool_info_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_usm_pool_info_t value) { + switch (value) { + case UR_USM_POOL_INFO_REFERENCE_COUNT: + os << "UR_USM_POOL_INFO_REFERENCE_COUNT"; + break; + case UR_USM_POOL_INFO_CONTEXT: + os << "UR_USM_POOL_INFO_CONTEXT"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_usm_pool_info_t enum value + template <> + inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_usm_pool_info_t value, size_t size) { + if (ptr == NULL) { + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::details::printPtr(os, + *tptr + ); + + os << ")"; + } break; + default: + os << "unknown enumerator"; + return UR_RESULT_ERROR_INVALID_ENUMERATION; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details + + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_virtual_mem_granularity_info_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_virtual_mem_granularity_info_t value) { + switch (value) { + case UR_VIRTUAL_MEM_GRANULARITY_INFO_MINIMUM: + os << "UR_VIRTUAL_MEM_GRANULARITY_INFO_MINIMUM"; + break; + case UR_VIRTUAL_MEM_GRANULARITY_INFO_RECOMMENDED: + os << "UR_VIRTUAL_MEM_GRANULARITY_INFO_RECOMMENDED"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_virtual_mem_granularity_info_t enum value + template <> + inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_virtual_mem_granularity_info_t value, size_t size) { + if (ptr == NULL) { + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + default: + os << "unknown enumerator"; + return UR_RESULT_ERROR_INVALID_ENUMERATION; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details + + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_virtual_mem_access_flag_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_virtual_mem_access_flag_t value) { + switch (value) { + case UR_VIRTUAL_MEM_ACCESS_FLAG_NONE: + os << "UR_VIRTUAL_MEM_ACCESS_FLAG_NONE"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } + + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_virtual_mem_access_flag_t flag + template<> + 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) { + val ^= (uint32_t)UR_VIRTUAL_MEM_ACCESS_FLAG_NONE; + if (!first) { + os << " | "; + } else { + first = false; + } + 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) { + val ^= (uint32_t)UR_VIRTUAL_MEM_ACCESS_FLAG_READ_WRITE; + if (!first) { + os << " | "; + } else { + first = false; + } + 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) { + val ^= (uint32_t)UR_VIRTUAL_MEM_ACCESS_FLAG_READ_ONLY; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_VIRTUAL_MEM_ACCESS_FLAG_READ_ONLY; + } + if (val != 0) { + std::bitset<32> bits(val); + if (!first) { + os << " | "; + } + os << "unknown bit flags " << bits; + } else if (first) { + os << "0"; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_virtual_mem_info_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_virtual_mem_info_t value) { + switch (value) { + case UR_VIRTUAL_MEM_INFO_ACCESS_MODE: + os << "UR_VIRTUAL_MEM_INFO_ACCESS_MODE"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_virtual_mem_info_t enum value + template <> + inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_virtual_mem_info_t value, size_t size) { + if (ptr == NULL) { + 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; + if (sizeof(ur_virtual_mem_access_flags_t) > size) { + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_virtual_mem_access_flags_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::details::printFlag(os, + *tptr + ); + + os << ")"; + } break; + default: + os << "unknown enumerator"; + return UR_RESULT_ERROR_INVALID_ENUMERATION; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details + + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_physical_mem_flag_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_physical_mem_flag_t value) { + switch (value) { + case UR_PHYSICAL_MEM_FLAG_TBD: + os << "UR_PHYSICAL_MEM_FLAG_TBD"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } + + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_physical_mem_flag_t flag + template<> + 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) { + val ^= (uint32_t)UR_PHYSICAL_MEM_FLAG_TBD; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_PHYSICAL_MEM_FLAG_TBD; + } + if (val != 0) { + std::bitset<32> bits(val); + if (!first) { + os << " | "; + } + os << "unknown bit flags " << bits; + } else if (first) { + os << "0"; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_kernel_get_sub_group_info_params_t type +/// @brief Print operator for the ur_physical_mem_properties_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) { +inline std::ostream &operator<<(std::ostream &os, const struct ur_physical_mem_properties_t params) { + os << "(struct ur_physical_mem_properties_t){"; + + + + os << ".stype = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".flags = "; + + ur::details::printFlag(os, + (params.flags) + ); - os << ".hKernel = "; - ur::details::printPtr(os, - *(params->phKernel)); + os << "}"; + return os; +} + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_program_metadata_type_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_program_metadata_type_t value) { + switch (value) { + case UR_PROGRAM_METADATA_TYPE_UINT32: + os << "UR_PROGRAM_METADATA_TYPE_UINT32"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } +namespace ur::details { - os << ", "; - os << ".hDevice = "; + /////////////////////////////////////////////////////////////////////////////// + // @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){"; - ur::details::printPtr(os, - *(params->phDevice)); + switch(tag){ + case UR_PROGRAM_METADATA_TYPE_UINT32: + + + os << ".data32 = "; + + os << + (params.data32) + ; - os << ", "; - os << ".propName = "; - os << *(params->ppropName); + break; + case UR_PROGRAM_METADATA_TYPE_UINT64: + + + os << ".data64 = "; + + os << + (params.data64) + ; - os << ", "; - os << ".propSize = "; - os << *(params->ppropSize); + break; + case UR_PROGRAM_METADATA_TYPE_STRING: + + + os << ".pString = "; + + ur::details::printPtr(os, + (params.pString) + ); - os << ", "; - os << ".pPropValue = "; - ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); - os << ", "; - os << ".pPropSizeRet = "; + break; + case UR_PROGRAM_METADATA_TYPE_BYTE_ARRAY: + + + os << ".pData = "; + + ur::details::printPtr(os, + (params.pData) + ); - ur::details::printPtr(os, - *(params->ppPropSizeRet)); - return os; + break; + default: + os << ""; + return UR_RESULT_ERROR_INVALID_ENUMERATION; + } + os << "}"; + return UR_RESULT_SUCCESS; } - +} // namespace ur::details /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_kernel_retain_params_t type +/// @brief Print operator for the ur_program_metadata_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_retain_params_t *params) { - - os << ".hKernel = "; - - ur::details::printPtr(os, - *(params->phKernel)); +inline std::ostream &operator<<(std::ostream &os, const struct ur_program_metadata_t params) { + os << "(struct ur_program_metadata_t){"; + + + + os << ".pName = "; + + ur::details::printPtr(os, + (params.pName) + ); + + + + + os << ", "; + os << ".type = "; + + os << + (params.type) + ; + + + + + os << ", "; + os << ".size = "; + + os << + (params.size) + ; + + + + + os << ", "; + os << ".value = "; + ur::details::printUnion(os, (params.value), params.type); + os << "}"; return os; } - /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_kernel_release_params_t type +/// @brief Print operator for the ur_program_properties_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_release_params_t *params) { - - os << ".hKernel = "; +inline std::ostream &operator<<(std::ostream &os, const struct ur_program_properties_t params) { + os << "(struct ur_program_properties_t){"; + + + + os << ".stype = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".count = "; + + os << + (params.count) + ; + + + + + os << ", "; + os << ".pMetadatas = "; + ur::details::printPtr(os, reinterpret_cast((params.pMetadatas))); + if ((params.pMetadatas) != NULL) { + os << " {"; + for (size_t i = 0; i < params.count; ++i) { + if (i != 0) { + os << ", "; + } + + os << + ((params.pMetadatas))[i] + ; - ur::details::printPtr(os, - *(params->phKernel)); + } + os << "}"; + } + os << "}"; return os; } + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_program_info_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_program_info_t value) { + switch (value) { + case UR_PROGRAM_INFO_REFERENCE_COUNT: + os << "UR_PROGRAM_INFO_REFERENCE_COUNT"; + 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_IL: + os << "UR_PROGRAM_INFO_IL"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_program_info_t enum value + template <> + inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_program_info_t value, size_t size) { + if (ptr == NULL) { + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_PROGRAM_INFO_DEVICES: { + + const ur_device_handle_t *tptr = (const ur_device_handle_t *)ptr; + os << "{"; + size_t nelems = size / sizeof(ur_device_handle_t); + for (size_t i = 0; i < nelems; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + tptr[i] + ); + + } + os << "}"; + } break; + case UR_PROGRAM_INFO_IL: { + + const char *tptr = (const char *)ptr; + printPtr(os, tptr); + } break; + case UR_PROGRAM_INFO_BINARY_SIZES: { + + const size_t *tptr = (const size_t *)ptr; + os << "{"; + size_t nelems = size / sizeof(size_t); + for (size_t i = 0; i < nelems; ++i) { + if (i != 0) { + os << ", "; + } + + os << + tptr[i] + ; + + } + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_PROGRAM_INFO_KERNEL_NAMES: { + + const char *tptr = (const char *)ptr; + printPtr(os, tptr); + } break; + default: + os << "unknown enumerator"; + return UR_RESULT_ERROR_INVALID_ENUMERATION; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details + + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_program_build_status_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_program_build_status_t value) { + switch (value) { + case UR_PROGRAM_BUILD_STATUS_NONE: + os << "UR_PROGRAM_BUILD_STATUS_NONE"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_program_binary_type_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_program_binary_type_t value) { + switch (value) { + case UR_PROGRAM_BINARY_TYPE_NONE: + os << "UR_PROGRAM_BINARY_TYPE_NONE"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_program_build_info_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_program_build_info_t value) { + switch (value) { + case UR_PROGRAM_BUILD_INFO_STATUS: + os << "UR_PROGRAM_BUILD_INFO_STATUS"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_program_build_info_t enum value + template <> + inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_program_build_info_t value, size_t size) { + if (ptr == NULL) { + 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; + if (sizeof(ur_program_build_status_t) > size) { + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_program_build_status_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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; + if (sizeof(ur_program_binary_type_t) > size) { + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_program_binary_type_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + default: + os << "unknown enumerator"; + return UR_RESULT_ERROR_INVALID_ENUMERATION; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_kernel_get_native_handle_params_t type +/// @brief Print operator for the ur_specialization_constant_info_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 << ".hKernel = "; - - ur::details::printPtr(os, - *(params->phKernel)); - - os << ", "; - os << ".phNativeKernel = "; +inline std::ostream &operator<<(std::ostream &os, const struct ur_specialization_constant_info_t params) { + os << "(struct ur_specialization_constant_info_t){"; + + + + os << ".id = "; + + os << + (params.id) + ; + + + + + os << ", "; + os << ".size = "; + + os << + (params.size) + ; + + + + + os << ", "; + os << ".pValue = "; + + ur::details::printPtr(os, + (params.pValue) + ); - ur::details::printPtr(os, - *(params->pphNativeKernel)); + os << "}"; return os; } - /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_kernel_create_with_native_handle_params_t type +/// @brief Print operator for the ur_program_native_properties_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 << ".hNativeKernel = "; - - ur::details::printPtr(os, reinterpret_cast( - *(params->phNativeKernel))); - - os << ", "; - os << ".hContext = "; - - ur::details::printPtr(os, - *(params->phContext)); - - os << ", "; - os << ".hProgram = "; - - ur::details::printPtr(os, - *(params->phProgram)); - - os << ", "; - os << ".pProperties = "; - - ur::details::printPtr(os, - *(params->ppProperties)); - - os << ", "; - os << ".phKernel = "; +inline std::ostream &operator<<(std::ostream &os, const struct ur_program_native_properties_t params) { + os << "(struct ur_program_native_properties_t){"; + + + + os << ".stype = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".isNativeHandleOwned = "; + + os << + (params.isNativeHandleOwned) + ; - ur::details::printPtr(os, - *(params->pphKernel)); + os << "}"; return os; } - /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_kernel_get_suggested_local_work_size_params_t type +/// @brief Print operator for the ur_kernel_arg_value_properties_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_get_suggested_local_work_size_params_t *params) { - - os << ".hKernel = "; - - ur::details::printPtr(os, - *(params->phKernel)); - - os << ", "; - os << ".hQueue = "; - - ur::details::printPtr(os, - *(params->phQueue)); - - os << ", "; - os << ".numWorkDim = "; - - os << *(params->pnumWorkDim); - - os << ", "; - os << ".pGlobalWorkOffset = "; - - ur::details::printPtr(os, - *(params->ppGlobalWorkOffset)); - - os << ", "; - os << ".pGlobalWorkSize = "; - - ur::details::printPtr(os, - *(params->ppGlobalWorkSize)); - - os << ", "; - os << ".pSuggestedLocalWorkSize = "; +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 = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); - ur::details::printPtr(os, - *(params->ppSuggestedLocalWorkSize)); + os << "}"; return os; } - /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_kernel_set_arg_value_params_t type +/// @brief Print operator for the ur_kernel_arg_local_properties_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 = "; - - ur::details::printPtr(os, - *(params->phKernel)); - - os << ", "; - os << ".argIndex = "; - - os << *(params->pargIndex); - - os << ", "; - os << ".argSize = "; - - os << *(params->pargSize); - - os << ", "; - os << ".pProperties = "; - - ur::details::printPtr(os, - *(params->ppProperties)); - - os << ", "; - os << ".pArgValue = "; +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 = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); - ur::details::printPtr(os, - *(params->ppArgValue)); + os << "}"; return os; } + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_kernel_info_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_kernel_info_t value) { + switch (value) { + case UR_KERNEL_INFO_FUNCTION_NAME: + os << "UR_KERNEL_INFO_FUNCTION_NAME"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_kernel_info_t enum value + template <> + inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_kernel_info_t value, size_t size) { + if (ptr == NULL) { + 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 uint32_t *tptr = (const uint32_t *)ptr; + if (sizeof(uint32_t) > size) { + os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + default: + os << "unknown enumerator"; + return UR_RESULT_ERROR_INVALID_ENUMERATION; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details + + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_kernel_group_info_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_kernel_group_info_t value) { + switch (value) { + case UR_KERNEL_GROUP_INFO_GLOBAL_WORK_SIZE: + os << "UR_KERNEL_GROUP_INFO_GLOBAL_WORK_SIZE"; + 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; + case UR_KERNEL_GROUP_INFO_COMPILE_MAX_WORK_GROUP_SIZE: + os << "UR_KERNEL_GROUP_INFO_COMPILE_MAX_WORK_GROUP_SIZE"; + break; + case UR_KERNEL_GROUP_INFO_COMPILE_MAX_LINEAR_WORK_GROUP_SIZE: + os << "UR_KERNEL_GROUP_INFO_COMPILE_MAX_LINEAR_WORK_GROUP_SIZE"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_kernel_group_info_t enum value + template <> + inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_kernel_group_info_t value, size_t size) { + if (ptr == NULL) { + return printPtr(os, ptr); + } + + switch (value) { + case UR_KERNEL_GROUP_INFO_GLOBAL_WORK_SIZE: { + + const size_t *tptr = (const size_t *)ptr; + os << "{"; + size_t nelems = size / sizeof(size_t); + for (size_t i = 0; i < nelems; ++i) { + if (i != 0) { + os << ", "; + } + + os << + tptr[i] + ; + + } + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_KERNEL_GROUP_INFO_COMPILE_WORK_GROUP_SIZE: { + + const size_t *tptr = (const size_t *)ptr; + os << "{"; + size_t nelems = size / sizeof(size_t); + for (size_t i = 0; i < nelems; ++i) { + if (i != 0) { + os << ", "; + } + + os << + tptr[i] + ; + + } + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_KERNEL_GROUP_INFO_COMPILE_MAX_WORK_GROUP_SIZE: { + + const size_t *tptr = (const size_t *)ptr; + os << "{"; + size_t nelems = size / sizeof(size_t); + for (size_t i = 0; i < nelems; ++i) { + if (i != 0) { + os << ", "; + } + + os << + tptr[i] + ; + + } + os << "}"; + } break; + case UR_KERNEL_GROUP_INFO_COMPILE_MAX_LINEAR_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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + default: + os << "unknown enumerator"; + return UR_RESULT_ERROR_INVALID_ENUMERATION; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details + + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_kernel_sub_group_info_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_kernel_sub_group_info_t value) { + switch (value) { + case UR_KERNEL_SUB_GROUP_INFO_MAX_SUB_GROUP_SIZE: + os << "UR_KERNEL_SUB_GROUP_INFO_MAX_SUB_GROUP_SIZE"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_kernel_sub_group_info_t enum value + template <> + inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_kernel_sub_group_info_t value, size_t size) { + if (ptr == NULL) { + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + default: + os << "unknown enumerator"; + return UR_RESULT_ERROR_INVALID_ENUMERATION; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details + + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_kernel_cache_config_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_kernel_cache_config_t value) { + switch (value) { + case UR_KERNEL_CACHE_CONFIG_DEFAULT: + os << "UR_KERNEL_CACHE_CONFIG_DEFAULT"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_kernel_exec_info_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_kernel_exec_info_t value) { + switch (value) { + case UR_KERNEL_EXEC_INFO_USM_INDIRECT_ACCESS: + os << "UR_KERNEL_EXEC_INFO_USM_INDIRECT_ACCESS"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_kernel_exec_info_t enum value + template <> + inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_kernel_exec_info_t value, size_t size) { + if (ptr == NULL) { + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_KERNEL_EXEC_INFO_USM_PTRS: { + + const void * const *tptr = (const void * const*)ptr; + os << "{"; + size_t nelems = size / sizeof(void *); + for (size_t i = 0; i < nelems; ++i) { + if (i != 0) { + os << ", "; + } + + os << + tptr[i] + ; + + } + os << "}"; + } break; + case UR_KERNEL_EXEC_INFO_CACHE_CONFIG: { + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + default: + os << "unknown enumerator"; + return UR_RESULT_ERROR_INVALID_ENUMERATION; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_kernel_set_arg_local_params_t type +/// @brief Print operator for the ur_kernel_arg_pointer_properties_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_set_arg_local_params_t *params) { - - os << ".hKernel = "; - - ur::details::printPtr(os, - *(params->phKernel)); - - os << ", "; - os << ".argIndex = "; - - os << *(params->pargIndex); - - os << ", "; - os << ".argSize = "; - - os << *(params->pargSize); - - os << ", "; - os << ".pProperties = "; +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 = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); - ur::details::printPtr(os, - *(params->ppProperties)); + os << "}"; return os; } - /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_kernel_set_arg_pointer_params_t type +/// @brief Print operator for the ur_kernel_exec_info_properties_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 << ".hKernel = "; - - ur::details::printPtr(os, - *(params->phKernel)); - - os << ", "; - os << ".argIndex = "; - - os << *(params->pargIndex); - - os << ", "; - os << ".pProperties = "; - - ur::details::printPtr(os, - *(params->ppProperties)); - - os << ", "; - os << ".pArgValue = "; +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 = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); - ur::details::printPtr(os, - *(params->ppArgValue)); + os << "}"; return os; } - /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_kernel_set_exec_info_params_t type +/// @brief Print operator for the ur_kernel_arg_sampler_properties_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 = "; - - ur::details::printPtr(os, - *(params->phKernel)); - - os << ", "; - os << ".propName = "; - - os << *(params->ppropName); - - os << ", "; - os << ".propSize = "; - - os << *(params->ppropSize); - - os << ", "; - os << ".pProperties = "; - - ur::details::printPtr(os, - *(params->ppProperties)); +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 = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); - os << ", "; - os << ".pPropValue = "; - ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); + os << "}"; return os; } - /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_kernel_set_arg_sampler_params_t type +/// @brief Print operator for the ur_kernel_arg_mem_obj_properties_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 << ".hKernel = "; - - ur::details::printPtr(os, - *(params->phKernel)); - - os << ", "; - os << ".argIndex = "; - - os << *(params->pargIndex); - - os << ", "; - os << ".pProperties = "; - - ur::details::printPtr(os, - *(params->ppProperties)); - - os << ", "; - os << ".hArgValue = "; +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 = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".memoryAccess = "; + + ur::details::printFlag(os, + (params.memoryAccess) + ); - ur::details::printPtr(os, - *(params->phArgValue)); + os << "}"; return os; } - /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_kernel_set_arg_mem_obj_params_t type +/// @brief Print operator for the ur_kernel_native_properties_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_set_arg_mem_obj_params_t *params) { - - os << ".hKernel = "; - - ur::details::printPtr(os, - *(params->phKernel)); - - os << ", "; - os << ".argIndex = "; - - os << *(params->pargIndex); - - os << ", "; - os << ".pProperties = "; - - ur::details::printPtr(os, - *(params->ppProperties)); - - os << ", "; - os << ".hArgValue = "; +inline std::ostream &operator<<(std::ostream &os, const struct ur_kernel_native_properties_t params) { + os << "(struct ur_kernel_native_properties_t){"; + + + + os << ".stype = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".isNativeHandleOwned = "; + + os << + (params.isNativeHandleOwned) + ; - ur::details::printPtr(os, - *(params->phArgValue)); + os << "}"; return os; } - + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_queue_info_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_queue_info_t value) { + switch (value) { + case UR_QUEUE_INFO_CONTEXT: + os << "UR_QUEUE_INFO_CONTEXT"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_queue_info_t enum value + template <> + inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_queue_info_t value, size_t size) { + if (ptr == NULL) { + return printPtr(os, ptr); + } + + switch (value) { + case UR_QUEUE_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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + default: + os << "unknown enumerator"; + return UR_RESULT_ERROR_INVALID_ENUMERATION; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details + + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_queue_flag_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_queue_flag_t value) { + switch (value) { + case UR_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_ENABLE: + os << "UR_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_ENABLE"; + 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; + case UR_QUEUE_FLAG_LOW_POWER_EVENTS_EXP: + os << "UR_QUEUE_FLAG_LOW_POWER_EVENTS_EXP"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } + + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_queue_flag_t flag + template<> + 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) { + val ^= (uint32_t)UR_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_ENABLE; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_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 << " | "; + } else { + first = false; + } + os << UR_QUEUE_FLAG_PROFILING_ENABLE; + } + + if ((val & UR_QUEUE_FLAG_ON_DEVICE) == (uint32_t)UR_QUEUE_FLAG_ON_DEVICE) { + val ^= (uint32_t)UR_QUEUE_FLAG_ON_DEVICE; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_QUEUE_FLAG_ON_DEVICE; + } + + 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 << " | "; + } else { + first = false; + } + os << UR_QUEUE_FLAG_ON_DEVICE_DEFAULT; + } + + 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 << " | "; + } else { + first = false; + } + os << UR_QUEUE_FLAG_DISCARD_EVENTS; + } + + 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 << " | "; + } else { + first = false; + } + os << UR_QUEUE_FLAG_PRIORITY_LOW; + } + + 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 << " | "; + } else { + first = false; + } + os << UR_QUEUE_FLAG_PRIORITY_HIGH; + } + + 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 << " | "; + } else { + first = false; + } + os << UR_QUEUE_FLAG_SUBMISSION_BATCHED; + } + + 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 << " | "; + } else { + first = false; + } + os << UR_QUEUE_FLAG_SUBMISSION_IMMEDIATE; + } + + 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 << " | "; + } else { + first = false; + } + 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) { + val ^= (uint32_t)UR_QUEUE_FLAG_SYNC_WITH_DEFAULT_STREAM; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_QUEUE_FLAG_SYNC_WITH_DEFAULT_STREAM; + } + + if ((val & UR_QUEUE_FLAG_LOW_POWER_EVENTS_EXP) == (uint32_t)UR_QUEUE_FLAG_LOW_POWER_EVENTS_EXP) { + val ^= (uint32_t)UR_QUEUE_FLAG_LOW_POWER_EVENTS_EXP; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_QUEUE_FLAG_LOW_POWER_EVENTS_EXP; + } + if (val != 0) { + std::bitset<32> bits(val); + if (!first) { + os << " | "; + } + os << "unknown bit flags " << bits; + } else if (first) { + os << "0"; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_kernel_set_specialization_constants_params_t type +/// @brief Print operator for the ur_queue_properties_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 << ".hKernel = "; - - ur::details::printPtr(os, - *(params->phKernel)); - - os << ", "; - os << ".count = "; - - os << *(params->pcount); - - os << ", "; - os << ".pSpecConstants = "; +inline std::ostream &operator<<(std::ostream &os, const struct ur_queue_properties_t params) { + os << "(struct ur_queue_properties_t){"; + + + + os << ".stype = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".flags = "; + + ur::details::printFlag(os, + (params.flags) + ); - ur::details::printPtr(os, - *(params->ppSpecConstants)); + os << "}"; return os; } - /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_kernel_suggest_max_cooperative_group_count_exp_params_t type +/// @brief Print operator for the ur_queue_index_properties_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 << ".hKernel = "; - - ur::details::printPtr(os, - *(params->phKernel)); - - os << ", "; - os << ".workDim = "; - - os << *(params->pworkDim); - - os << ", "; - os << ".pLocalWorkSize = "; - - ur::details::printPtr(os, - *(params->ppLocalWorkSize)); - - os << ", "; - os << ".dynamicSharedMemorySize = "; - - os << *(params->pdynamicSharedMemorySize); - - os << ", "; - os << ".pGroupCountRet = "; +inline std::ostream &operator<<(std::ostream &os, const struct ur_queue_index_properties_t params) { + os << "(struct ur_queue_index_properties_t){"; + + + + os << ".stype = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".computeIndex = "; + + os << + (params.computeIndex) + ; - ur::details::printPtr(os, - *(params->ppGroupCountRet)); + os << "}"; return os; } - /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_queue_get_info_params_t type +/// @brief Print operator for the ur_queue_native_desc_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_queue_get_info_params_t *params) { - - os << ".hQueue = "; - - ur::details::printPtr(os, - *(params->phQueue)); - - os << ", "; - os << ".propName = "; - - os << *(params->ppropName); - - os << ", "; - os << ".propSize = "; - - os << *(params->ppropSize); - - os << ", "; - os << ".pPropValue = "; - ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); - - os << ", "; - os << ".pPropSizeRet = "; +inline std::ostream &operator<<(std::ostream &os, const struct ur_queue_native_desc_t params) { + os << "(struct ur_queue_native_desc_t){"; + + + + os << ".stype = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".pNativeData = "; + + ur::details::printPtr(os, + (params.pNativeData) + ); - ur::details::printPtr(os, - *(params->ppPropSizeRet)); + os << "}"; return os; } - /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_queue_create_params_t type +/// @brief Print operator for the ur_queue_native_properties_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_queue_create_params_t *params) { - - os << ".hContext = "; - - ur::details::printPtr(os, - *(params->phContext)); - - os << ", "; - os << ".hDevice = "; - - ur::details::printPtr(os, - *(params->phDevice)); - - os << ", "; - os << ".pProperties = "; - - ur::details::printPtr(os, - *(params->ppProperties)); - - os << ", "; - os << ".phQueue = "; +inline std::ostream &operator<<(std::ostream &os, const struct ur_queue_native_properties_t params) { + os << "(struct ur_queue_native_properties_t){"; + + + + os << ".stype = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".isNativeHandleOwned = "; + + os << + (params.isNativeHandleOwned) + ; - ur::details::printPtr(os, - *(params->pphQueue)); + os << "}"; return os; } + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_command_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum 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_EXTERNAL_SEMAPHORE_WAIT_EXP: + os << "UR_COMMAND_EXTERNAL_SEMAPHORE_WAIT_EXP"; + break; + case UR_COMMAND_EXTERNAL_SEMAPHORE_SIGNAL_EXP: + os << "UR_COMMAND_EXTERNAL_SEMAPHORE_SIGNAL_EXP"; + break; + case UR_COMMAND_TIMESTAMP_RECORDING_EXP: + os << "UR_COMMAND_TIMESTAMP_RECORDING_EXP"; + break; + case UR_COMMAND_ENQUEUE_NATIVE_EXP: + os << "UR_COMMAND_ENQUEUE_NATIVE_EXP"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_event_status_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_event_status_t value) { + switch (value) { + case UR_EVENT_STATUS_COMPLETE: + os << "UR_EVENT_STATUS_COMPLETE"; + 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; + case UR_EVENT_STATUS_ERROR: + os << "UR_EVENT_STATUS_ERROR"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_event_info_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_event_info_t value) { + switch (value) { + case UR_EVENT_INFO_COMMAND_QUEUE: + os << "UR_EVENT_INFO_COMMAND_QUEUE"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_event_info_t enum value + template <> + inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_event_info_t value, size_t size) { + if (ptr == NULL) { + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + ur::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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + default: + os << "unknown enumerator"; + return UR_RESULT_ERROR_INVALID_ENUMERATION; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details + + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_profiling_info_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_profiling_info_t value) { + switch (value) { + case UR_PROFILING_INFO_COMMAND_QUEUED: + os << "UR_PROFILING_INFO_COMMAND_QUEUED"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_profiling_info_t enum value + template <> + inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_profiling_info_t value, size_t size) { + if (ptr == NULL) { + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + 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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + default: + os << "unknown enumerator"; + return UR_RESULT_ERROR_INVALID_ENUMERATION; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_queue_retain_params_t type +/// @brief Print operator for the ur_event_native_properties_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_queue_retain_params_t *params) { - - os << ".hQueue = "; +inline std::ostream &operator<<(std::ostream &os, const struct ur_event_native_properties_t params) { + os << "(struct ur_event_native_properties_t){"; + + + + os << ".stype = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".isNativeHandleOwned = "; + + os << + (params.isNativeHandleOwned) + ; - ur::details::printPtr(os, - *(params->phQueue)); + os << "}"; return os; } - + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_execution_info_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_execution_info_t value) { + switch (value) { + case UR_EXECUTION_INFO_COMPLETE: + os << "UR_EXECUTION_INFO_COMPLETE"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_map_flag_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_map_flag_t value) { + switch (value) { + case UR_MAP_FLAG_READ: + os << "UR_MAP_FLAG_READ"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } + + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_map_flag_t flag + template<> + inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { + uint32_t val = flag; + bool first = true; + + if ((val & UR_MAP_FLAG_READ) == (uint32_t)UR_MAP_FLAG_READ) { + val ^= (uint32_t)UR_MAP_FLAG_READ; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_MAP_FLAG_READ; + } + + if ((val & UR_MAP_FLAG_WRITE) == (uint32_t)UR_MAP_FLAG_WRITE) { + val ^= (uint32_t)UR_MAP_FLAG_WRITE; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_MAP_FLAG_WRITE; + } + + 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 << " | "; + } else { + first = false; + } + os << UR_MAP_FLAG_WRITE_INVALIDATE_REGION; + } + if (val != 0) { + std::bitset<32> bits(val); + if (!first) { + os << " | "; + } + os << "unknown bit flags " << bits; + } else if (first) { + os << "0"; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_usm_migration_flag_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_usm_migration_flag_t value) { + switch (value) { + case UR_USM_MIGRATION_FLAG_DEFAULT: + os << "UR_USM_MIGRATION_FLAG_DEFAULT"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } + + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_usm_migration_flag_t flag + template<> + 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) { + val ^= (uint32_t)UR_USM_MIGRATION_FLAG_DEFAULT; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_USM_MIGRATION_FLAG_DEFAULT; + } + if (val != 0) { + std::bitset<32> bits(val); + if (!first) { + os << " | "; + } + os << "unknown bit flags " << bits; + } else if (first) { + os << "0"; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_exp_device_2d_block_array_capability_flag_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_exp_device_2d_block_array_capability_flag_t value) { + switch (value) { + case UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_LOAD: + os << "UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_LOAD"; + break; + case UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_STORE: + os << "UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_STORE"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } + + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_exp_device_2d_block_array_capability_flag_t flag + template<> + inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { + uint32_t val = flag; + bool first = true; + + if ((val & UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_LOAD) == (uint32_t)UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_LOAD) { + val ^= (uint32_t)UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_LOAD; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_LOAD; + } + + if ((val & UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_STORE) == (uint32_t)UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_STORE) { + val ^= (uint32_t)UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_STORE; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_STORE; + } + if (val != 0) { + std::bitset<32> bits(val); + if (!first) { + os << " | "; + } + os << "unknown bit flags " << bits; + } else if (first) { + os << "0"; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_exp_image_copy_flag_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_exp_image_copy_flag_t value) { + switch (value) { + case UR_EXP_IMAGE_COPY_FLAG_HOST_TO_DEVICE: + os << "UR_EXP_IMAGE_COPY_FLAG_HOST_TO_DEVICE"; + 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; + default: + os << "unknown enumerator"; + break; + } + return os; + } + + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_exp_image_copy_flag_t flag + template<> + 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) { + val ^= (uint32_t)UR_EXP_IMAGE_COPY_FLAG_HOST_TO_DEVICE; + if (!first) { + os << " | "; + } else { + first = false; + } + 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) { + val ^= (uint32_t)UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_HOST; + if (!first) { + os << " | "; + } else { + first = false; + } + 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) { + val ^= (uint32_t)UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_DEVICE; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_DEVICE; + } + if (val != 0) { + std::bitset<32> bits(val); + if (!first) { + os << " | "; + } + os << "unknown bit flags " << bits; + } else if (first) { + os << "0"; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_exp_sampler_cubemap_filter_mode_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_exp_sampler_cubemap_filter_mode_t value) { + switch (value) { + case UR_EXP_SAMPLER_CUBEMAP_FILTER_MODE_DISJOINTED: + os << "UR_EXP_SAMPLER_CUBEMAP_FILTER_MODE_DISJOINTED"; + break; + case UR_EXP_SAMPLER_CUBEMAP_FILTER_MODE_SEAMLESS: + os << "UR_EXP_SAMPLER_CUBEMAP_FILTER_MODE_SEAMLESS"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_exp_external_mem_type_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_exp_external_mem_type_t value) { + switch (value) { + case UR_EXP_EXTERNAL_MEM_TYPE_OPAQUE_FD: + os << "UR_EXP_EXTERNAL_MEM_TYPE_OPAQUE_FD"; + break; + case UR_EXP_EXTERNAL_MEM_TYPE_WIN32_NT: + os << "UR_EXP_EXTERNAL_MEM_TYPE_WIN32_NT"; + break; + case UR_EXP_EXTERNAL_MEM_TYPE_WIN32_NT_DX12_RESOURCE: + os << "UR_EXP_EXTERNAL_MEM_TYPE_WIN32_NT_DX12_RESOURCE"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_exp_external_semaphore_type_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_exp_external_semaphore_type_t value) { + switch (value) { + case UR_EXP_EXTERNAL_SEMAPHORE_TYPE_OPAQUE_FD: + os << "UR_EXP_EXTERNAL_SEMAPHORE_TYPE_OPAQUE_FD"; + break; + case UR_EXP_EXTERNAL_SEMAPHORE_TYPE_WIN32_NT: + os << "UR_EXP_EXTERNAL_SEMAPHORE_TYPE_WIN32_NT"; + break; + case UR_EXP_EXTERNAL_SEMAPHORE_TYPE_WIN32_NT_DX12_FENCE: + os << "UR_EXP_EXTERNAL_SEMAPHORE_TYPE_WIN32_NT_DX12_FENCE"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_queue_release_params_t type +/// @brief Print operator for the ur_exp_file_descriptor_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_queue_release_params_t *params) { - - os << ".hQueue = "; +inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_file_descriptor_t params) { + os << "(struct ur_exp_file_descriptor_t){"; + + + + os << ".stype = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".fd = "; + + os << + (params.fd) + ; - ur::details::printPtr(os, - *(params->phQueue)); + os << "}"; return os; } - /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_queue_get_native_handle_params_t type +/// @brief Print operator for the ur_exp_win32_handle_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_queue_get_native_handle_params_t *params) { - - os << ".hQueue = "; - - ur::details::printPtr(os, - *(params->phQueue)); - - os << ", "; - os << ".pDesc = "; - - ur::details::printPtr(os, - *(params->ppDesc)); - - os << ", "; - os << ".phNativeQueue = "; +inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_win32_handle_t params) { + os << "(struct ur_exp_win32_handle_t){"; + + + + os << ".stype = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".handle = "; + + ur::details::printPtr(os, + (params.handle) + ); - ur::details::printPtr(os, - *(params->pphNativeQueue)); + os << "}"; return os; } - /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_queue_create_with_native_handle_params_t type +/// @brief Print operator for the ur_exp_sampler_mip_properties_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_queue_create_with_native_handle_params_t *params) { - - os << ".hNativeQueue = "; - - ur::details::printPtr(os, reinterpret_cast( - *(params->phNativeQueue))); - - os << ", "; - os << ".hContext = "; - - ur::details::printPtr(os, - *(params->phContext)); - - os << ", "; - os << ".hDevice = "; - - ur::details::printPtr(os, - *(params->phDevice)); - - os << ", "; - os << ".pProperties = "; - - ur::details::printPtr(os, - *(params->ppProperties)); - - os << ", "; - os << ".phQueue = "; +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 = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".minMipmapLevelClamp = "; + + os << + (params.minMipmapLevelClamp) + ; + + + + + os << ", "; + os << ".maxMipmapLevelClamp = "; + + os << + (params.maxMipmapLevelClamp) + ; + + + + + os << ", "; + os << ".maxAnisotropy = "; + + os << + (params.maxAnisotropy) + ; + + + + + os << ", "; + os << ".mipFilterMode = "; + + os << + (params.mipFilterMode) + ; - ur::details::printPtr(os, - *(params->pphQueue)); + os << "}"; return os; } - /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_queue_finish_params_t type +/// @brief Print operator for the ur_exp_sampler_addr_modes_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_queue_finish_params_t *params) { - - os << ".hQueue = "; +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 = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".addrModes = {"; + for(auto i = 0; i < 3; i++){ + if(i != 0){ + os << ", "; + } + + os << + (params.addrModes[i]) + ; - ur::details::printPtr(os, - *(params->phQueue)); + } + os << "}"; + os << "}"; return os; } - /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_queue_flush_params_t type +/// @brief Print operator for the ur_exp_sampler_cubemap_properties_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_queue_flush_params_t *params) { - - os << ".hQueue = "; +inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_sampler_cubemap_properties_t params) { + os << "(struct ur_exp_sampler_cubemap_properties_t){"; + + + + os << ".stype = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".cubemapFilterMode = "; + + os << + (params.cubemapFilterMode) + ; - ur::details::printPtr(os, - *(params->phQueue)); + os << "}"; return os; } - /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_sampler_create_params_t type +/// @brief Print operator for the ur_exp_external_mem_desc_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_sampler_create_params_t *params) { - - os << ".hContext = "; +inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_external_mem_desc_t params) { + os << "(struct ur_exp_external_mem_desc_t){"; + + + + os << ".stype = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); - ur::details::printPtr(os, - *(params->phContext)); - os << ", "; - os << ".pDesc = "; + os << "}"; + return os; +} +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_exp_external_semaphore_desc_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_external_semaphore_desc_t params) { + os << "(struct ur_exp_external_semaphore_desc_t){"; + + + + os << ".stype = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); - ur::details::printPtr(os, - *(params->ppDesc)); - os << ", "; - os << ".phSampler = "; + os << "}"; + return os; +} +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_exp_image_copy_region_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_image_copy_region_t params) { + os << "(struct ur_exp_image_copy_region_t){"; + + + + os << ".stype = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".srcOffset = "; + + os << + (params.srcOffset) + ; + + + + + os << ", "; + os << ".dstOffset = "; + + os << + (params.dstOffset) + ; + + + + + os << ", "; + os << ".copyExtent = "; + + os << + (params.copyExtent) + ; - ur::details::printPtr(os, - *(params->pphSampler)); + os << "}"; return os; } + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_device_command_buffer_update_capability_flag_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_device_command_buffer_update_capability_flag_t value) { + switch (value) { + case UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_KERNEL_ARGUMENTS: + os << "UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_KERNEL_ARGUMENTS"; + break; + case UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_LOCAL_WORK_SIZE: + os << "UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_LOCAL_WORK_SIZE"; + break; + case UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_GLOBAL_WORK_SIZE: + os << "UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_GLOBAL_WORK_SIZE"; + break; + case UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_GLOBAL_WORK_OFFSET: + os << "UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_GLOBAL_WORK_OFFSET"; + break; + case UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_KERNEL_HANDLE: + os << "UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_KERNEL_HANDLE"; + break; + case UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_EVENTS: + os << "UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_EVENTS"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } + + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_device_command_buffer_update_capability_flag_t flag + template<> + inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { + uint32_t val = flag; + bool first = true; + + if ((val & UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_KERNEL_ARGUMENTS) == (uint32_t)UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_KERNEL_ARGUMENTS) { + val ^= (uint32_t)UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_KERNEL_ARGUMENTS; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_KERNEL_ARGUMENTS; + } + + if ((val & UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_LOCAL_WORK_SIZE) == (uint32_t)UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_LOCAL_WORK_SIZE) { + val ^= (uint32_t)UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_LOCAL_WORK_SIZE; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_LOCAL_WORK_SIZE; + } + + if ((val & UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_GLOBAL_WORK_SIZE) == (uint32_t)UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_GLOBAL_WORK_SIZE) { + val ^= (uint32_t)UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_GLOBAL_WORK_SIZE; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_GLOBAL_WORK_SIZE; + } + + if ((val & UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_GLOBAL_WORK_OFFSET) == (uint32_t)UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_GLOBAL_WORK_OFFSET) { + val ^= (uint32_t)UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_GLOBAL_WORK_OFFSET; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_GLOBAL_WORK_OFFSET; + } + + if ((val & UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_KERNEL_HANDLE) == (uint32_t)UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_KERNEL_HANDLE) { + val ^= (uint32_t)UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_KERNEL_HANDLE; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_KERNEL_HANDLE; + } + + if ((val & UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_EVENTS) == (uint32_t)UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_EVENTS) { + val ^= (uint32_t)UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_EVENTS; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_EVENTS; + } + if (val != 0) { + std::bitset<32> bits(val); + if (!first) { + os << " | "; + } + os << "unknown bit flags " << bits; + } else if (first) { + os << "0"; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_exp_command_buffer_info_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_exp_command_buffer_info_t value) { + switch (value) { + case UR_EXP_COMMAND_BUFFER_INFO_REFERENCE_COUNT: + os << "UR_EXP_COMMAND_BUFFER_INFO_REFERENCE_COUNT"; + break; + case UR_EXP_COMMAND_BUFFER_INFO_DESCRIPTOR: + os << "UR_EXP_COMMAND_BUFFER_INFO_DESCRIPTOR"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_exp_command_buffer_info_t enum value + template <> + inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_exp_command_buffer_info_t value, size_t size) { + if (ptr == NULL) { + return printPtr(os, ptr); + } + + switch (value) { + case UR_EXP_COMMAND_BUFFER_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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_EXP_COMMAND_BUFFER_INFO_DESCRIPTOR: { + const ur_exp_command_buffer_desc_t *tptr = (const ur_exp_command_buffer_desc_t *)ptr; + if (sizeof(ur_exp_command_buffer_desc_t) > size) { + os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_exp_command_buffer_desc_t) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + default: + os << "unknown enumerator"; + return UR_RESULT_ERROR_INVALID_ENUMERATION; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details + + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_exp_command_buffer_command_info_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_exp_command_buffer_command_info_t value) { + switch (value) { + case UR_EXP_COMMAND_BUFFER_COMMAND_INFO_REFERENCE_COUNT: + os << "UR_EXP_COMMAND_BUFFER_COMMAND_INFO_REFERENCE_COUNT"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_exp_command_buffer_command_info_t enum value + template <> + inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_exp_command_buffer_command_info_t value, size_t size) { + if (ptr == NULL) { + return printPtr(os, ptr); + } + + switch (value) { + case UR_EXP_COMMAND_BUFFER_COMMAND_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 UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + default: + os << "unknown enumerator"; + return UR_RESULT_ERROR_INVALID_ENUMERATION; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_sampler_retain_params_t type +/// @brief Print operator for the ur_exp_command_buffer_desc_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_sampler_retain_params_t *params) { - - os << ".hSampler = "; +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 = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".isUpdatable = "; + + os << + (params.isUpdatable) + ; + + + + + os << ", "; + os << ".isInOrder = "; + + os << + (params.isInOrder) + ; + + + + + os << ", "; + os << ".enableProfiling = "; + + os << + (params.enableProfiling) + ; - ur::details::printPtr(os, - *(params->phSampler)); + os << "}"; return os; } - /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_sampler_release_params_t type +/// @brief Print operator for the ur_exp_command_buffer_update_memobj_arg_desc_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_sampler_release_params_t *params) { - - os << ".hSampler = "; +inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_command_buffer_update_memobj_arg_desc_t params) { + os << "(struct ur_exp_command_buffer_update_memobj_arg_desc_t){"; + + + + os << ".stype = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".argIndex = "; + + os << + (params.argIndex) + ; + + + + + os << ", "; + os << ".pProperties = "; + + os << + (params.pProperties) + ; + + + + + os << ", "; + os << ".hNewMemObjArg = "; + + ur::details::printPtr(os, + (params.hNewMemObjArg) + ); - ur::details::printPtr(os, - *(params->phSampler)); + os << "}"; return os; } - /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_sampler_get_info_params_t type +/// @brief Print operator for the ur_exp_command_buffer_update_pointer_arg_desc_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_sampler_get_info_params_t *params) { - - os << ".hSampler = "; - - ur::details::printPtr(os, - *(params->phSampler)); - - os << ", "; - os << ".propName = "; - - os << *(params->ppropName); - - os << ", "; - os << ".propSize = "; - - os << *(params->ppropSize); - - os << ", "; - os << ".pPropValue = "; - ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); - - os << ", "; - os << ".pPropSizeRet = "; +inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_command_buffer_update_pointer_arg_desc_t params) { + os << "(struct ur_exp_command_buffer_update_pointer_arg_desc_t){"; + + + + os << ".stype = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".argIndex = "; + + os << + (params.argIndex) + ; + + + + + os << ", "; + os << ".pProperties = "; + + os << + (params.pProperties) + ; + + + + + os << ", "; + os << ".pNewPointerArg = "; + + os << + (params.pNewPointerArg) + ; - ur::details::printPtr(os, - *(params->ppPropSizeRet)); + os << "}"; return os; } - /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_sampler_get_native_handle_params_t type +/// @brief Print operator for the ur_exp_command_buffer_update_value_arg_desc_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 << ".hSampler = "; - - ur::details::printPtr(os, - *(params->phSampler)); - - os << ", "; - os << ".phNativeSampler = "; +inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_command_buffer_update_value_arg_desc_t params) { + os << "(struct ur_exp_command_buffer_update_value_arg_desc_t){"; + + + + os << ".stype = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".argIndex = "; + + os << + (params.argIndex) + ; + + + + + os << ", "; + os << ".argSize = "; + + os << + (params.argSize) + ; + + + + + os << ", "; + os << ".pProperties = "; + + os << + (params.pProperties) + ; + + + + + os << ", "; + os << ".pNewValueArg = "; + + os << + (params.pNewValueArg) + ; - ur::details::printPtr(os, - *(params->pphNativeSampler)); + os << "}"; return os; } - /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_sampler_create_with_native_handle_params_t type +/// @brief Print operator for the ur_exp_command_buffer_update_kernel_launch_desc_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 = "; - - ur::details::printPtr(os, reinterpret_cast( - *(params->phNativeSampler))); +inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_command_buffer_update_kernel_launch_desc_t params) { + os << "(struct ur_exp_command_buffer_update_kernel_launch_desc_t){"; + + + + os << ".stype = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".hNewKernel = "; + + ur::details::printPtr(os, + (params.hNewKernel) + ); + + + + + os << ", "; + os << ".numNewMemObjArgs = "; + + os << + (params.numNewMemObjArgs) + ; + + + + + os << ", "; + os << ".numNewPointerArgs = "; + + os << + (params.numNewPointerArgs) + ; + + + + + os << ", "; + os << ".numNewValueArgs = "; + + os << + (params.numNewValueArgs) + ; + + + + + os << ", "; + os << ".newWorkDim = "; + + os << + (params.newWorkDim) + ; + + + + + os << ", "; + os << ".pNewMemObjArgList = "; + ur::details::printPtr(os, reinterpret_cast((params.pNewMemObjArgList))); + if ((params.pNewMemObjArgList) != NULL) { + os << " {"; + for (size_t i = 0; i < params.numNewMemObjArgs; ++i) { + if (i != 0) { + os << ", "; + } + + os << + ((params.pNewMemObjArgList))[i] + ; - os << ", "; - os << ".hContext = "; + } + os << "}"; + } - ur::details::printPtr(os, - *(params->phContext)); + + + os << ", "; + os << ".pNewPointerArgList = "; + ur::details::printPtr(os, reinterpret_cast((params.pNewPointerArgList))); + if ((params.pNewPointerArgList) != NULL) { + os << " {"; + for (size_t i = 0; i < params.numNewPointerArgs; ++i) { + if (i != 0) { + os << ", "; + } + + os << + ((params.pNewPointerArgList))[i] + ; - os << ", "; - os << ".pProperties = "; + } + os << "}"; + } - ur::details::printPtr(os, - *(params->ppProperties)); + + + os << ", "; + os << ".pNewValueArgList = "; + ur::details::printPtr(os, reinterpret_cast((params.pNewValueArgList))); + if ((params.pNewValueArgList) != NULL) { + os << " {"; + for (size_t i = 0; i < params.numNewValueArgs; ++i) { + if (i != 0) { + os << ", "; + } + + os << + ((params.pNewValueArgList))[i] + ; - os << ", "; - os << ".phSampler = "; + } + os << "}"; + } - ur::details::printPtr(os, - *(params->pphSampler)); + + + os << ", "; + os << ".pNewGlobalWorkOffset = "; + ur::details::printPtr(os, reinterpret_cast((params.pNewGlobalWorkOffset))); + if ((params.pNewGlobalWorkOffset) != NULL) { + os << " {"; + for (size_t i = 0; i < params.newWorkDim; ++i) { + if (i != 0) { + os << ", "; + } + + os << + ((params.pNewGlobalWorkOffset))[i] + ; - return os; -} + } + os << "}"; + } -/////////////////////////////////////////////////////////////////////////////// -/// @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 << ", "; + os << ".pNewGlobalWorkSize = "; + ur::details::printPtr(os, reinterpret_cast((params.pNewGlobalWorkSize))); + if ((params.pNewGlobalWorkSize) != NULL) { + os << " {"; + for (size_t i = 0; i < params.newWorkDim; ++i) { + if (i != 0) { + os << ", "; + } + + os << + ((params.pNewGlobalWorkSize))[i] + ; - os << ".hContext = "; + } + os << "}"; + } - ur::details::printPtr(os, - *(params->phContext)); + + + os << ", "; + os << ".pNewLocalWorkSize = "; + ur::details::printPtr(os, reinterpret_cast((params.pNewLocalWorkSize))); + if ((params.pNewLocalWorkSize) != NULL) { + os << " {"; + for (size_t i = 0; i < params.newWorkDim; ++i) { + if (i != 0) { + os << ", "; + } + + os << + ((params.pNewLocalWorkSize))[i] + ; - os << ", "; - os << ".flags = "; + } + os << "}"; + } - ur::details::printFlag(os, - *(params->pflags)); + os << "}"; + return os; +} + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_exp_launch_property_id_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_exp_launch_property_id_t value) { + switch (value) { + case UR_EXP_LAUNCH_PROPERTY_ID_IGNORE: + os << "UR_EXP_LAUNCH_PROPERTY_ID_IGNORE"; + break; + case UR_EXP_LAUNCH_PROPERTY_ID_COOPERATIVE: + os << "UR_EXP_LAUNCH_PROPERTY_ID_COOPERATIVE"; + break; + case UR_EXP_LAUNCH_PROPERTY_ID_CLUSTER_DIMENSION: + os << "UR_EXP_LAUNCH_PROPERTY_ID_CLUSTER_DIMENSION"; + break; + case UR_EXP_LAUNCH_PROPERTY_ID_WORK_GROUP_MEMORY: + os << "UR_EXP_LAUNCH_PROPERTY_ID_WORK_GROUP_MEMORY"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } +namespace ur::details { - os << ", "; - os << ".pImageFormat = "; + /////////////////////////////////////////////////////////////////////////////// + // @brief Print ur_exp_launch_property_value_t union + inline ur_result_t printUnion( + std::ostream &os, + const union ur_exp_launch_property_value_t params, + const enum ur_exp_launch_property_id_t tag +){ + os << "(union ur_exp_launch_property_value_t){"; - ur::details::printPtr(os, - *(params->ppImageFormat)); + switch(tag){ + case UR_EXP_LAUNCH_PROPERTY_ID_CLUSTER_DIMENSION: + + + os << ".clusterDim = {"; + for(auto i = 0; i < 3; i++){ + if(i != 0){ + os << ", "; + } + + os << + (params.clusterDim[i]) + ; - os << ", "; - os << ".pImageDesc = "; + } + os << "}"; - ur::details::printPtr(os, - *(params->ppImageDesc)); + break; + case UR_EXP_LAUNCH_PROPERTY_ID_COOPERATIVE: + + + os << ".cooperative = "; + + os << + (params.cooperative) + ; - os << ", "; - os << ".pHost = "; - ur::details::printPtr(os, - *(params->ppHost)); + break; + case UR_EXP_LAUNCH_PROPERTY_ID_WORK_GROUP_MEMORY: + + + os << ".workgroup_mem_size = "; + + os << + (params.workgroup_mem_size) + ; - os << ", "; - os << ".phMem = "; - ur::details::printPtr(os, - *(params->pphMem)); + break; + default: + os << ""; + return UR_RESULT_ERROR_INVALID_ENUMERATION; + } + os << "}"; + return UR_RESULT_SUCCESS; +} +} // namespace ur::details +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_exp_launch_property_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_launch_property_t params) { + os << "(struct ur_exp_launch_property_t){"; + + + + os << ".id = "; + + os << + (params.id) + ; + + + + + os << ", "; + os << ".value = "; + ur::details::printUnion(os, (params.value), params.id); + os << "}"; return os; } - + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_exp_peer_info_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_exp_peer_info_t value) { + switch (value) { + case UR_EXP_PEER_INFO_UR_PEER_ACCESS_SUPPORT: + os << "UR_EXP_PEER_INFO_UR_PEER_ACCESS_SUPPORT"; + break; + case UR_EXP_PEER_INFO_UR_PEER_ATOMICS_SUPPORT: + os << "UR_EXP_PEER_INFO_UR_PEER_ATOMICS_SUPPORT"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_exp_peer_info_t enum value + template <> + inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_exp_peer_info_t value, size_t size) { + if (ptr == NULL) { + return printPtr(os, ptr); + } + + switch (value) { + case UR_EXP_PEER_INFO_UR_PEER_ACCESS_SUPPORT: { + const int *tptr = (const int *)ptr; + if (sizeof(int) > size) { + os << "invalid size (is: " << size << ", expected: >=" << sizeof(int) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + case UR_EXP_PEER_INFO_UR_PEER_ATOMICS_SUPPORT: { + const int *tptr = (const int *)ptr; + if (sizeof(int) > size) { + os << "invalid size (is: " << size << ", expected: >=" << sizeof(int) << ")"; + return UR_RESULT_ERROR_INVALID_SIZE; + } + os << (const void *)(tptr) << " ("; + + os << + *tptr + ; + + os << ")"; + } break; + default: + os << "unknown enumerator"; + return UR_RESULT_ERROR_INVALID_ENUMERATION; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details + + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_exp_enqueue_ext_flag_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_exp_enqueue_ext_flag_t value) { + switch (value) { + case UR_EXP_ENQUEUE_EXT_FLAG_LOW_POWER_EVENTS: + os << "UR_EXP_ENQUEUE_EXT_FLAG_LOW_POWER_EVENTS"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } + + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_exp_enqueue_ext_flag_t flag + template<> + inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { + uint32_t val = flag; + bool first = true; + + if ((val & UR_EXP_ENQUEUE_EXT_FLAG_LOW_POWER_EVENTS) == (uint32_t)UR_EXP_ENQUEUE_EXT_FLAG_LOW_POWER_EVENTS) { + val ^= (uint32_t)UR_EXP_ENQUEUE_EXT_FLAG_LOW_POWER_EVENTS; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_EXP_ENQUEUE_EXT_FLAG_LOW_POWER_EVENTS; + } + if (val != 0) { + std::bitset<32> bits(val); + if (!first) { + os << " | "; + } + os << "unknown bit flags " << bits; + } else if (first) { + os << "0"; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_mem_buffer_create_params_t type +/// @brief Print operator for the ur_exp_enqueue_ext_properties_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 = "; - - ur::details::printPtr(os, - *(params->phContext)); - - os << ", "; - os << ".flags = "; +inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_enqueue_ext_properties_t params) { + os << "(struct ur_exp_enqueue_ext_properties_t){"; + + + + os << ".stype = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".flags = "; + + ur::details::printFlag(os, + (params.flags) + ); - ur::details::printFlag(os, - *(params->pflags)); - os << ", "; - os << ".size = "; + os << "}"; + return os; +} + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_exp_enqueue_native_command_flag_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_exp_enqueue_native_command_flag_t value) { + switch (value) { + case UR_EXP_ENQUEUE_NATIVE_COMMAND_FLAG_TBD: + os << "UR_EXP_ENQUEUE_NATIVE_COMMAND_FLAG_TBD"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } + + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_exp_enqueue_native_command_flag_t flag + template<> + inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { + uint32_t val = flag; + bool first = true; + + if ((val & UR_EXP_ENQUEUE_NATIVE_COMMAND_FLAG_TBD) == (uint32_t)UR_EXP_ENQUEUE_NATIVE_COMMAND_FLAG_TBD) { + val ^= (uint32_t)UR_EXP_ENQUEUE_NATIVE_COMMAND_FLAG_TBD; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_EXP_ENQUEUE_NATIVE_COMMAND_FLAG_TBD; + } + if (val != 0) { + std::bitset<32> bits(val); + if (!first) { + os << " | "; + } + os << "unknown bit flags " << bits; + } else if (first) { + os << "0"; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_exp_enqueue_native_command_properties_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_enqueue_native_command_properties_t params) { + os << "(struct ur_exp_enqueue_native_command_properties_t){"; + + + + os << ".stype = "; + + os << + (params.stype) + ; + + + + + os << ", "; + os << ".pNext = "; + + ur::details::printStruct(os, + (params.pNext) + ); + + + + + os << ", "; + os << ".flags = "; + + ur::details::printFlag(os, + (params.flags) + ); - os << *(params->psize); - os << ", "; - os << ".pProperties = "; + os << "}"; + return os; +} + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_exp_tensor_map_data_type_flag_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_exp_tensor_map_data_type_flag_t value) { + switch (value) { + case UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT8: + os << "UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT8"; + break; + case UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT16: + os << "UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT16"; + break; + case UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT32: + os << "UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT32"; + break; + case UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_INT32: + os << "UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_INT32"; + break; + case UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT64: + os << "UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT64"; + break; + case UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_INT64: + os << "UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_INT64"; + break; + case UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT16: + os << "UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT16"; + break; + case UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT32: + os << "UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT32"; + break; + case UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT64: + os << "UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT64"; + break; + case UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_BFLOAT16: + os << "UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_BFLOAT16"; + break; + case UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT32_FTZ: + os << "UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT32_FTZ"; + break; + case UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_TFLOAT32: + os << "UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_TFLOAT32"; + break; + case UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_TFLOAT32_FTZ: + os << "UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_TFLOAT32_FTZ"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } + + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_exp_tensor_map_data_type_flag_t flag + template<> + inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { + uint32_t val = flag; + bool first = true; + + if ((val & UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT8) == (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT8) { + val ^= (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT8; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT8; + } + + if ((val & UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT16) == (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT16) { + val ^= (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT16; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT16; + } + + if ((val & UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT32) == (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT32) { + val ^= (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT32; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT32; + } + + if ((val & UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_INT32) == (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_INT32) { + val ^= (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_INT32; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_INT32; + } + + if ((val & UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT64) == (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT64) { + val ^= (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT64; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_UINT64; + } + + if ((val & UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_INT64) == (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_INT64) { + val ^= (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_INT64; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_INT64; + } + + if ((val & UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT16) == (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT16) { + val ^= (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT16; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT16; + } + + if ((val & UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT32) == (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT32) { + val ^= (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT32; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT32; + } + + if ((val & UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT64) == (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT64) { + val ^= (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT64; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT64; + } + + if ((val & UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_BFLOAT16) == (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_BFLOAT16) { + val ^= (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_BFLOAT16; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_BFLOAT16; + } + + if ((val & UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT32_FTZ) == (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT32_FTZ) { + val ^= (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT32_FTZ; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_FLOAT32_FTZ; + } + + if ((val & UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_TFLOAT32) == (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_TFLOAT32) { + val ^= (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_TFLOAT32; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_TFLOAT32; + } + + if ((val & UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_TFLOAT32_FTZ) == (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_TFLOAT32_FTZ) { + val ^= (uint32_t)UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_TFLOAT32_FTZ; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_EXP_TENSOR_MAP_DATA_TYPE_FLAG_TFLOAT32_FTZ; + } + if (val != 0) { + std::bitset<32> bits(val); + if (!first) { + os << " | "; + } + os << "unknown bit flags " << bits; + } else if (first) { + os << "0"; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_exp_tensor_map_interleave_flag_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_exp_tensor_map_interleave_flag_t value) { + switch (value) { + case UR_EXP_TENSOR_MAP_INTERLEAVE_FLAG_NONE: + os << "UR_EXP_TENSOR_MAP_INTERLEAVE_FLAG_NONE"; + break; + case UR_EXP_TENSOR_MAP_INTERLEAVE_FLAG_16B: + os << "UR_EXP_TENSOR_MAP_INTERLEAVE_FLAG_16B"; + break; + case UR_EXP_TENSOR_MAP_INTERLEAVE_FLAG_32B: + os << "UR_EXP_TENSOR_MAP_INTERLEAVE_FLAG_32B"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } + + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_exp_tensor_map_interleave_flag_t flag + template<> + inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { + uint32_t val = flag; + bool first = true; + + if ((val & UR_EXP_TENSOR_MAP_INTERLEAVE_FLAG_NONE) == (uint32_t)UR_EXP_TENSOR_MAP_INTERLEAVE_FLAG_NONE) { + val ^= (uint32_t)UR_EXP_TENSOR_MAP_INTERLEAVE_FLAG_NONE; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_EXP_TENSOR_MAP_INTERLEAVE_FLAG_NONE; + } + + if ((val & UR_EXP_TENSOR_MAP_INTERLEAVE_FLAG_16B) == (uint32_t)UR_EXP_TENSOR_MAP_INTERLEAVE_FLAG_16B) { + val ^= (uint32_t)UR_EXP_TENSOR_MAP_INTERLEAVE_FLAG_16B; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_EXP_TENSOR_MAP_INTERLEAVE_FLAG_16B; + } + + if ((val & UR_EXP_TENSOR_MAP_INTERLEAVE_FLAG_32B) == (uint32_t)UR_EXP_TENSOR_MAP_INTERLEAVE_FLAG_32B) { + val ^= (uint32_t)UR_EXP_TENSOR_MAP_INTERLEAVE_FLAG_32B; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_EXP_TENSOR_MAP_INTERLEAVE_FLAG_32B; + } + if (val != 0) { + std::bitset<32> bits(val); + if (!first) { + os << " | "; + } + os << "unknown bit flags " << bits; + } else if (first) { + os << "0"; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_exp_tensor_map_l2_promotion_flag_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_exp_tensor_map_l2_promotion_flag_t value) { + switch (value) { + case UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_NONE: + os << "UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_NONE"; + break; + case UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_64B: + os << "UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_64B"; + break; + case UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_128B: + os << "UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_128B"; + break; + case UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_256B: + os << "UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_256B"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } + + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_exp_tensor_map_l2_promotion_flag_t flag + template<> + inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { + uint32_t val = flag; + bool first = true; + + if ((val & UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_NONE) == (uint32_t)UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_NONE) { + val ^= (uint32_t)UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_NONE; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_NONE; + } + + if ((val & UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_64B) == (uint32_t)UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_64B) { + val ^= (uint32_t)UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_64B; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_64B; + } + + if ((val & UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_128B) == (uint32_t)UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_128B) { + val ^= (uint32_t)UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_128B; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_128B; + } + + if ((val & UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_256B) == (uint32_t)UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_256B) { + val ^= (uint32_t)UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_256B; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_EXP_TENSOR_MAP_L2_PROMOTION_FLAG_256B; + } + if (val != 0) { + std::bitset<32> bits(val); + if (!first) { + os << " | "; + } + os << "unknown bit flags " << bits; + } else if (first) { + os << "0"; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_exp_tensor_map_swizzle_flag_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_exp_tensor_map_swizzle_flag_t value) { + switch (value) { + case UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_NONE: + os << "UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_NONE"; + break; + case UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_32B: + os << "UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_32B"; + break; + case UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_64B: + os << "UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_64B"; + break; + case UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_128B: + os << "UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_128B"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } + + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_exp_tensor_map_swizzle_flag_t flag + template<> + inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { + uint32_t val = flag; + bool first = true; + + if ((val & UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_NONE) == (uint32_t)UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_NONE) { + val ^= (uint32_t)UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_NONE; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_NONE; + } + + if ((val & UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_32B) == (uint32_t)UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_32B) { + val ^= (uint32_t)UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_32B; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_32B; + } + + if ((val & UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_64B) == (uint32_t)UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_64B) { + val ^= (uint32_t)UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_64B; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_64B; + } + + if ((val & UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_128B) == (uint32_t)UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_128B) { + val ^= (uint32_t)UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_128B; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_EXP_TENSOR_MAP_SWIZZLE_FLAG_128B; + } + if (val != 0) { + std::bitset<32> bits(val); + if (!first) { + os << " | "; + } + os << "unknown bit flags " << bits; + } else if (first) { + os << "0"; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print operator for the ur_exp_tensor_map_oob_fill_flag_t type + /// @returns + /// std::ostream & + inline std::ostream &operator<<(std::ostream &os, enum ur_exp_tensor_map_oob_fill_flag_t value) { + switch (value) { + case UR_EXP_TENSOR_MAP_OOB_FILL_FLAG_NONE: + os << "UR_EXP_TENSOR_MAP_OOB_FILL_FLAG_NONE"; + break; + case UR_EXP_TENSOR_MAP_OOB_FILL_FLAG_REQUEST_ZERO_FMA: + os << "UR_EXP_TENSOR_MAP_OOB_FILL_FLAG_REQUEST_ZERO_FMA"; + break; + default: + os << "unknown enumerator"; + break; + } + return os; + } + + namespace ur::details { + /////////////////////////////////////////////////////////////////////////////// + /// @brief Print ur_exp_tensor_map_oob_fill_flag_t flag + template<> + inline ur_result_t printFlag(std::ostream &os, uint32_t flag) { + uint32_t val = flag; + bool first = true; + + if ((val & UR_EXP_TENSOR_MAP_OOB_FILL_FLAG_NONE) == (uint32_t)UR_EXP_TENSOR_MAP_OOB_FILL_FLAG_NONE) { + val ^= (uint32_t)UR_EXP_TENSOR_MAP_OOB_FILL_FLAG_NONE; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_EXP_TENSOR_MAP_OOB_FILL_FLAG_NONE; + } + + if ((val & UR_EXP_TENSOR_MAP_OOB_FILL_FLAG_REQUEST_ZERO_FMA) == (uint32_t)UR_EXP_TENSOR_MAP_OOB_FILL_FLAG_REQUEST_ZERO_FMA) { + val ^= (uint32_t)UR_EXP_TENSOR_MAP_OOB_FILL_FLAG_REQUEST_ZERO_FMA; + if (!first) { + os << " | "; + } else { + first = false; + } + os << UR_EXP_TENSOR_MAP_OOB_FILL_FLAG_REQUEST_ZERO_FMA; + } + if (val != 0) { + std::bitset<32> bits(val); + if (!first) { + os << " | "; + } + os << "unknown bit flags " << bits; + } else if (first) { + os << "0"; + } + return UR_RESULT_SUCCESS; + } + } // namespace ur::details - ur::details::printPtr(os, - *(params->ppProperties)); - os << ", "; - os << ".phBuffer = "; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_loader_config_create_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_loader_config_create_params_t *params) { + + + + os << ".phLoaderConfig = "; + + ur::details::printPtr(os, + *(params->pphLoaderConfig) + ); - ur::details::printPtr(os, - *(params->pphBuffer)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_mem_retain_params_t type +/// @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_mem_retain_params_t *params) { - - os << ".hMem = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_loader_config_retain_params_t *params) { + + + + os << ".hLoaderConfig = "; + + ur::details::printPtr(os, + *(params->phLoaderConfig) + ); - ur::details::printPtr(os, - *(params->phMem)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_mem_release_params_t type +/// @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_mem_release_params_t *params) { - - os << ".hMem = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_loader_config_release_params_t *params) { + + + + os << ".hLoaderConfig = "; + + ur::details::printPtr(os, + *(params->phLoaderConfig) + ); - ur::details::printPtr(os, - *(params->phMem)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_mem_buffer_partition_params_t type +/// @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_mem_buffer_partition_params_t *params) { - - os << ".hBuffer = "; - - ur::details::printPtr(os, - *(params->phBuffer)); +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_loader_config_get_info_params_t *params) { + + + + os << ".hLoaderConfig = "; + + ur::details::printPtr(os, + *(params->phLoaderConfig) + ); - os << ", "; - os << ".flags = "; - ur::details::printFlag(os, - *(params->pflags)); + + + os << ", "; + os << ".propName = "; + + os << + *(params->ppropName) + ; - os << ", "; - os << ".bufferCreateType = "; - os << *(params->pbufferCreateType); + + + os << ", "; + os << ".propSize = "; + + os << + *(params->ppropSize) + ; - os << ", "; - os << ".pRegion = "; - ur::details::printPtr(os, - *(params->ppRegion)); + + + os << ", "; + os << ".pPropValue = "; + ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); - os << ", "; - os << ".phMem = "; + + + os << ", "; + os << ".pPropSizeRet = "; + + ur::details::printPtr(os, + *(params->ppPropSizeRet) + ); - ur::details::printPtr(os, - *(params->pphMem)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_mem_get_native_handle_params_t type +/// @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_mem_get_native_handle_params_t *params) { - - os << ".hMem = "; - - ur::details::printPtr(os, - *(params->phMem)); - - os << ", "; - os << ".hDevice = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_loader_config_enable_layer_params_t *params) { + + + + os << ".hLoaderConfig = "; + + ur::details::printPtr(os, + *(params->phLoaderConfig) + ); - ur::details::printPtr(os, - *(params->phDevice)); - os << ", "; - os << ".phNativeMem = "; + + + os << ", "; + os << ".pLayerName = "; + + ur::details::printPtr(os, + *(params->ppLayerName) + ); - ur::details::printPtr(os, - *(params->pphNativeMem)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_mem_buffer_create_with_native_handle_params_t type +/// @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_mem_buffer_create_with_native_handle_params_t *params) { - - os << ".hNativeMem = "; - - ur::details::printPtr(os, reinterpret_cast( - *(params->phNativeMem))); - - os << ", "; - os << ".hContext = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_loader_config_set_code_location_callback_params_t *params) { + + + + os << ".hLoaderConfig = "; + + ur::details::printPtr(os, + *(params->phLoaderConfig) + ); - ur::details::printPtr(os, - *(params->phContext)); - os << ", "; - os << ".pProperties = "; + + + os << ", "; + os << ".pfnCodeloc = "; + + os << reinterpret_cast( + *(params->ppfnCodeloc) + ); - ur::details::printPtr(os, - *(params->ppProperties)); - os << ", "; - os << ".phMem = "; + + + os << ", "; + os << ".pUserData = "; + + ur::details::printPtr(os, + *(params->ppUserData) + ); - ur::details::printPtr(os, - *(params->pphMem)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_mem_image_create_with_native_handle_params_t type +/// @brief Print operator for the ur_loader_config_set_mocking_enabled_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 = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_loader_config_set_mocking_enabled_params_t *params) { + + + + os << ".hLoaderConfig = "; + + ur::details::printPtr(os, + *(params->phLoaderConfig) + ); - ur::details::printPtr(os, reinterpret_cast( - *(params->phNativeMem))); - os << ", "; - os << ".hContext = "; + + + os << ", "; + os << ".enable = "; + + os << + *(params->penable) + ; - ur::details::printPtr(os, - *(params->phContext)); - os << ", "; - os << ".pImageFormat = "; + return os; +} - ur::details::printPtr(os, - *(params->ppImageFormat)); - os << ", "; - os << ".pImageDesc = "; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_platform_get_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_platform_get_params_t *params) { + + + + os << ".phAdapters = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphAdapters))); + if (*(params->pphAdapters) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pNumAdapters; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphAdapters))[i] + ); - ur::details::printPtr(os, - *(params->ppImageDesc)); + } + os << "}"; + } - os << ", "; - os << ".pProperties = "; + + + os << ", "; + os << ".NumAdapters = "; + + os << + *(params->pNumAdapters) + ; + + + + + os << ", "; + os << ".NumEntries = "; + + os << + *(params->pNumEntries) + ; + + + + + os << ", "; + os << ".phPlatforms = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphPlatforms))); + if (*(params->pphPlatforms) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pNumEntries; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphPlatforms))[i] + ); - ur::details::printPtr(os, - *(params->ppProperties)); + } + os << "}"; + } - os << ", "; - os << ".phMem = "; + + + os << ", "; + os << ".pNumPlatforms = "; + + ur::details::printPtr(os, + *(params->ppNumPlatforms) + ); - ur::details::printPtr(os, - *(params->pphMem)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_mem_get_info_params_t type +/// @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_mem_get_info_params_t *params) { - - os << ".hMemory = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_platform_get_info_params_t *params) { + + + + os << ".hPlatform = "; + + ur::details::printPtr(os, + *(params->phPlatform) + ); - ur::details::printPtr(os, - *(params->phMemory)); - os << ", "; - os << ".propName = "; + + + os << ", "; + os << ".propName = "; + + os << + *(params->ppropName) + ; - os << *(params->ppropName); - os << ", "; - os << ".propSize = "; + + + os << ", "; + os << ".propSize = "; + + os << + *(params->ppropSize) + ; - os << *(params->ppropSize); - os << ", "; - os << ".pPropValue = "; - ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); + + + os << ", "; + os << ".pPropValue = "; + ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); - os << ", "; - os << ".pPropSizeRet = "; + + + os << ", "; + os << ".pPropSizeRet = "; + + ur::details::printPtr(os, + *(params->ppPropSizeRet) + ); - ur::details::printPtr(os, - *(params->ppPropSizeRet)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_mem_image_get_info_params_t type +/// @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_mem_image_get_info_params_t *params) { - - os << ".hMemory = "; - - ur::details::printPtr(os, - *(params->phMemory)); - - os << ", "; - os << ".propName = "; - - os << *(params->ppropName); - - os << ", "; - os << ".propSize = "; - - os << *(params->ppropSize); +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_platform_get_native_handle_params_t *params) { + + + + os << ".hPlatform = "; + + ur::details::printPtr(os, + *(params->phPlatform) + ); - os << ", "; - os << ".pPropValue = "; - ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); - os << ", "; - os << ".pPropSizeRet = "; + + + os << ", "; + os << ".phNativePlatform = "; + + ur::details::printPtr(os, + *(params->pphNativePlatform) + ); - ur::details::printPtr(os, - *(params->ppPropSizeRet)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_physical_mem_create_params_t type +/// @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_physical_mem_create_params_t *params) { - - os << ".hContext = "; - - ur::details::printPtr(os, - *(params->phContext)); - - os << ", "; - os << ".hDevice = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_platform_create_with_native_handle_params_t *params) { + + + + os << ".hNativePlatform = "; + + ur::details::printPtr(os, reinterpret_cast( + *(params->phNativePlatform) + )); - ur::details::printPtr(os, - *(params->phDevice)); - os << ", "; - os << ".size = "; + + + os << ", "; + os << ".hAdapter = "; + + ur::details::printPtr(os, + *(params->phAdapter) + ); - os << *(params->psize); - os << ", "; - os << ".pProperties = "; + + + os << ", "; + os << ".pProperties = "; + + ur::details::printPtr(os, + *(params->ppProperties) + ); - ur::details::printPtr(os, - *(params->ppProperties)); - os << ", "; - os << ".phPhysicalMem = "; + + + os << ", "; + os << ".phPlatform = "; + + ur::details::printPtr(os, + *(params->pphPlatform) + ); - ur::details::printPtr(os, - *(params->pphPhysicalMem)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_physical_mem_retain_params_t type +/// @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_physical_mem_retain_params_t *params) { +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_platform_get_api_version_params_t *params) { + + + + os << ".hPlatform = "; + + ur::details::printPtr(os, + *(params->phPlatform) + ); - os << ".hPhysicalMem = "; - ur::details::printPtr(os, - *(params->phPhysicalMem)); + + + os << ", "; + os << ".pVersion = "; + + ur::details::printPtr(os, + *(params->ppVersion) + ); + return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_physical_mem_release_params_t type +/// @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_physical_mem_release_params_t *params) { +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_platform_get_backend_option_params_t *params) { + + + + os << ".hPlatform = "; + + ur::details::printPtr(os, + *(params->phPlatform) + ); + + + + + os << ", "; + os << ".pFrontendOption = "; + + ur::details::printPtr(os, + *(params->ppFrontendOption) + ); - os << ".hPhysicalMem = "; - ur::details::printPtr(os, - *(params->phPhysicalMem)); + + + os << ", "; + os << ".ppPlatformOption = "; + + ur::details::printPtr(os, + *(params->pppPlatformOption) + ); + return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_adapter_get_params_t type +/// @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_adapter_get_params_t *params) { - - os << ".NumEntries = "; - - os << *(params->pNumEntries); - - os << ", "; - os << ".phAdapters = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphAdapters))); - if (*(params->pphAdapters) != NULL) { +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_context_create_params_t *params) { + + + + os << ".DeviceCount = "; + + os << + *(params->pDeviceCount) + ; + + + + + os << ", "; + os << ".phDevices = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphDevices))); + if (*(params->pphDevices) != NULL) { os << " {"; - for (size_t i = 0; i < *params->pNumEntries; ++i) { + for (size_t i = 0; i < *params->pDeviceCount; ++i) { if (i != 0) { os << ", "; } + + ur::details::printPtr(os, + (*(params->pphDevices))[i] + ); - ur::details::printPtr(os, - (*(params->pphAdapters))[i]); } os << "}"; - } + } + + + + os << ", "; + os << ".pProperties = "; + + ur::details::printPtr(os, + *(params->ppProperties) + ); - os << ", "; - os << ".pNumAdapters = "; - ur::details::printPtr(os, - *(params->ppNumAdapters)); + + + os << ", "; + os << ".phContext = "; + + ur::details::printPtr(os, + *(params->pphContext) + ); + return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_adapter_release_params_t type +/// @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_adapter_release_params_t *params) { - - os << ".hAdapter = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_context_retain_params_t *params) { + + + + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - ur::details::printPtr(os, - *(params->phAdapter)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_adapter_retain_params_t type +/// @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_adapter_retain_params_t *params) { - - os << ".hAdapter = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_context_release_params_t *params) { + + + + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - ur::details::printPtr(os, - *(params->phAdapter)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_adapter_get_last_error_params_t type +/// @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_adapter_get_last_error_params_t *params) { +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_context_get_info_params_t *params) { + + + + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - os << ".hAdapter = "; - ur::details::printPtr(os, - *(params->phAdapter)); + + + os << ", "; + os << ".propName = "; + + os << + *(params->ppropName) + ; - os << ", "; - os << ".ppMessage = "; - ur::details::printPtr(os, - *(params->pppMessage)); + + + os << ", "; + os << ".propSize = "; + + os << + *(params->ppropSize) + ; - os << ", "; - os << ".pError = "; - ur::details::printPtr(os, - *(params->ppError)); + + + os << ", "; + os << ".pPropValue = "; + ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); + + + + os << ", "; + os << ".pPropSizeRet = "; + + ur::details::printPtr(os, + *(params->ppPropSizeRet) + ); + return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_adapter_get_info_params_t type +/// @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_adapter_get_info_params_t *params) { +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_context_get_native_handle_params_t *params) { + + + + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); + - os << ".hAdapter = "; + + + os << ", "; + os << ".phNativeContext = "; + + ur::details::printPtr(os, + *(params->pphNativeContext) + ); - ur::details::printPtr(os, - *(params->phAdapter)); - os << ", "; - os << ".propName = "; + return os; +} - os << *(params->ppropName); - os << ", "; - os << ".propSize = "; +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; + + ur::details::printPtr(os, reinterpret_cast( + *(params->phNativeContext) + )); + + + + + os << ", "; + os << ".hAdapter = "; + + ur::details::printPtr(os, + *(params->phAdapter) + ); + + + + + os << ", "; + os << ".numDevices = "; + + os << + *(params->pnumDevices) + ; + + + + + os << ", "; + os << ".phDevices = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphDevices))); + if (*(params->pphDevices) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumDevices; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphDevices))[i] + ); + + } + os << "}"; + } - os << *(params->ppropSize); + + + os << ", "; + os << ".pProperties = "; + + ur::details::printPtr(os, + *(params->ppProperties) + ); - os << ", "; - os << ".pPropValue = "; - ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); - os << ", "; - os << ".pPropSizeRet = "; + + + os << ", "; + os << ".phContext = "; + + ur::details::printPtr(os, + *(params->pphContext) + ); - ur::details::printPtr(os, - *(params->ppPropSizeRet)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_enqueue_kernel_launch_params_t type +/// @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_enqueue_kernel_launch_params_t *params) { - - os << ".hQueue = "; - - ur::details::printPtr(os, - *(params->phQueue)); +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_context_set_extended_deleter_params_t *params) { + + + + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - os << ", "; - os << ".hKernel = "; - ur::details::printPtr(os, - *(params->phKernel)); + + + os << ", "; + os << ".pfnDeleter = "; + + os << reinterpret_cast( + *(params->ppfnDeleter) + ); - os << ", "; - os << ".workDim = "; - os << *(params->pworkDim); + + + os << ", "; + os << ".pUserData = "; + + ur::details::printPtr(os, + *(params->ppUserData) + ); - os << ", "; - os << ".pGlobalWorkOffset = "; - ur::details::printPtr(os, - *(params->ppGlobalWorkOffset)); + return os; +} - os << ", "; - os << ".pGlobalWorkSize = "; - ur::details::printPtr(os, - *(params->ppGlobalWorkSize)); +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ".hEvent = "; + + ur::details::printPtr(os, + *(params->phEvent) + ); - os << ", "; - os << ".pLocalWorkSize = "; - ur::details::printPtr(os, - *(params->ppLocalWorkSize)); + + + os << ", "; + os << ".propName = "; + + os << + *(params->ppropName) + ; - os << ", "; - os << ".numEventsInWaitList = "; - os << *(params->pnumEventsInWaitList); + + + os << ", "; + os << ".propSize = "; + + os << + *(params->ppropSize) + ; - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { - if (i != 0) { - os << ", "; - } - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); - } - os << "}"; - } + + + os << ", "; + os << ".pPropValue = "; + ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); - os << ", "; - os << ".phEvent = "; + + + os << ", "; + os << ".pPropSizeRet = "; + + ur::details::printPtr(os, + *(params->ppPropSizeRet) + ); - ur::details::printPtr(os, - *(params->pphEvent)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_enqueue_events_wait_params_t type +/// @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_enqueue_events_wait_params_t *params) { +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_event_get_profiling_info_params_t *params) { + + + + os << ".hEvent = "; + + ur::details::printPtr(os, + *(params->phEvent) + ); - os << ".hQueue = "; - ur::details::printPtr(os, - *(params->phQueue)); + + + os << ", "; + os << ".propName = "; + + os << + *(params->ppropName) + ; - os << ", "; - os << ".numEventsInWaitList = "; - os << *(params->pnumEventsInWaitList); + + + os << ", "; + os << ".propSize = "; + + os << + *(params->ppropSize) + ; - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { - if (i != 0) { - os << ", "; - } - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); - } - os << "}"; - } + + + os << ", "; + os << ".pPropValue = "; + ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); - os << ", "; - os << ".phEvent = "; + + + os << ", "; + os << ".pPropSizeRet = "; + + ur::details::printPtr(os, + *(params->ppPropSizeRet) + ); - ur::details::printPtr(os, - *(params->pphEvent)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_enqueue_events_wait_with_barrier_params_t type +/// @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_enqueue_events_wait_with_barrier_params_t *params) { - - os << ".hQueue = "; - - ur::details::printPtr(os, - *(params->phQueue)); - - os << ", "; - os << ".numEventsInWaitList = "; - - os << *(params->pnumEventsInWaitList); - - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_event_wait_params_t *params) { + + + + os << ".numEvents = "; + + os << + *(params->pnumEvents) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { os << " {"; - for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + for (size_t i = 0; i < *params->pnumEvents; ++i) { if (i != 0) { os << ", "; } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); } os << "}"; - } + } + + return os; +} - os << ", "; - os << ".phEvent = "; - ur::details::printPtr(os, - *(params->pphEvent)); +/////////////////////////////////////////////////////////////////////////////// +/// @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) { + + + + os << ".hEvent = "; + + ur::details::printPtr(os, + *(params->phEvent) + ); + return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_enqueue_mem_buffer_read_params_t type +/// @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_enqueue_mem_buffer_read_params_t *params) { - - os << ".hQueue = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_event_release_params_t *params) { + + + + os << ".hEvent = "; + + ur::details::printPtr(os, + *(params->phEvent) + ); - ur::details::printPtr(os, - *(params->phQueue)); - os << ", "; - os << ".hBuffer = "; + return os; +} - ur::details::printPtr(os, - *(params->phBuffer)); - os << ", "; - os << ".blockingRead = "; +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ".hEvent = "; + + ur::details::printPtr(os, + *(params->phEvent) + ); - os << *(params->pblockingRead); - os << ", "; - os << ".offset = "; + + + os << ", "; + os << ".phNativeEvent = "; + + ur::details::printPtr(os, + *(params->pphNativeEvent) + ); - os << *(params->poffset); - os << ", "; - os << ".size = "; + return os; +} - os << *(params->psize); - os << ", "; - os << ".pDst = "; +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; + + ur::details::printPtr(os, reinterpret_cast( + *(params->phNativeEvent) + )); - ur::details::printPtr(os, - *(params->ppDst)); - os << ", "; - os << ".numEventsInWaitList = "; + + + os << ", "; + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - os << *(params->pnumEventsInWaitList); - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { - if (i != 0) { - os << ", "; - } + + + os << ", "; + os << ".pProperties = "; + + ur::details::printPtr(os, + *(params->ppProperties) + ); - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); - } - os << "}"; - } - os << ", "; - os << ".phEvent = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printPtr(os, - *(params->pphEvent)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_enqueue_mem_buffer_write_params_t type +/// @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_enqueue_mem_buffer_write_params_t *params) { +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_event_set_callback_params_t *params) { + + + + os << ".hEvent = "; + + ur::details::printPtr(os, + *(params->phEvent) + ); - os << ".hQueue = "; - ur::details::printPtr(os, - *(params->phQueue)); + + + os << ", "; + os << ".execStatus = "; + + os << + *(params->pexecStatus) + ; - os << ", "; - os << ".hBuffer = "; - ur::details::printPtr(os, - *(params->phBuffer)); + + + os << ", "; + os << ".pfnNotify = "; + + os << reinterpret_cast( + *(params->ppfnNotify) + ); - os << ", "; - os << ".blockingWrite = "; - os << *(params->pblockingWrite); + + + os << ", "; + os << ".pUserData = "; + + ur::details::printPtr(os, + *(params->ppUserData) + ); - os << ", "; - os << ".offset = "; - os << *(params->poffset); + return os; +} - os << ", "; - os << ".size = "; - os << *(params->psize); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_program_create_with_il_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_create_with_il_params_t *params) { + + + + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - os << ", "; - os << ".pSrc = "; - ur::details::printPtr(os, - *(params->ppSrc)); + + + os << ", "; + os << ".pIL = "; + + ur::details::printPtr(os, + *(params->ppIL) + ); - os << ", "; - os << ".numEventsInWaitList = "; - os << *(params->pnumEventsInWaitList); + + + os << ", "; + os << ".length = "; + + os << + *(params->plength) + ; - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { - if (i != 0) { - os << ", "; - } - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); - } - os << "}"; - } + + + os << ", "; + os << ".pProperties = "; + + ur::details::printPtr(os, + *(params->ppProperties) + ); - os << ", "; - os << ".phEvent = "; - ur::details::printPtr(os, - *(params->pphEvent)); + + + os << ", "; + os << ".phProgram = "; + + ur::details::printPtr(os, + *(params->pphProgram) + ); + return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_enqueue_mem_buffer_read_rect_params_t type +/// @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_enqueue_mem_buffer_read_rect_params_t *params) { - - os << ".hQueue = "; - - ur::details::printPtr(os, - *(params->phQueue)); - - os << ", "; - os << ".hBuffer = "; - - ur::details::printPtr(os, - *(params->phBuffer)); - - os << ", "; - os << ".blockingRead = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_create_with_binary_params_t *params) { + + + + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); + + + + + os << ", "; + os << ".numDevices = "; + + os << + *(params->pnumDevices) + ; + + + + + os << ", "; + os << ".phDevices = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphDevices))); + if (*(params->pphDevices) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumDevices; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphDevices))[i] + ); - os << *(params->pblockingRead); + } + os << "}"; + } - os << ", "; - os << ".bufferOrigin = "; + + + os << ", "; + os << ".pLengths = "; + ur::details::printPtr(os, reinterpret_cast(*(params->ppLengths))); + if (*(params->ppLengths) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumDevices; ++i) { + if (i != 0) { + os << ", "; + } + + os << + (*(params->ppLengths))[i] + ; - os << *(params->pbufferOrigin); + } + os << "}"; + } - os << ", "; - os << ".hostOrigin = "; + + + os << ", "; + os << ".ppBinaries = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pppBinaries))); + if (*(params->pppBinaries) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumDevices; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pppBinaries))[i] + ); - os << *(params->phostOrigin); + } + os << "}"; + } - os << ", "; - os << ".region = "; + + + os << ", "; + os << ".pProperties = "; + + ur::details::printPtr(os, + *(params->ppProperties) + ); - os << *(params->pregion); - os << ", "; - os << ".bufferRowPitch = "; + + + os << ", "; + os << ".phProgram = "; + + ur::details::printPtr(os, + *(params->pphProgram) + ); - os << *(params->pbufferRowPitch); - os << ", "; - os << ".bufferSlicePitch = "; + return os; +} - os << *(params->pbufferSlicePitch); - os << ", "; - os << ".hostRowPitch = "; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_program_build_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_build_params_t *params) { + + + + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - os << *(params->phostRowPitch); - os << ", "; - os << ".hostSlicePitch = "; + + + os << ", "; + os << ".hProgram = "; + + ur::details::printPtr(os, + *(params->phProgram) + ); - os << *(params->phostSlicePitch); - os << ", "; - os << ".pDst = "; + + + os << ", "; + os << ".pOptions = "; + + ur::details::printPtr(os, + *(params->ppOptions) + ); - ur::details::printPtr(os, - *(params->ppDst)); - os << ", "; - os << ".numEventsInWaitList = "; + return os; +} - os << *(params->pnumEventsInWaitList); - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_program_build_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_build_exp_params_t *params) { + + + + os << ".hProgram = "; + + ur::details::printPtr(os, + *(params->phProgram) + ); + + + + + os << ", "; + os << ".numDevices = "; + + os << + *(params->pnumDevices) + ; + + + + + os << ", "; + os << ".phDevices = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphDevices))); + if (*(params->pphDevices) != NULL) { os << " {"; - for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + for (size_t i = 0; i < *params->pnumDevices; ++i) { if (i != 0) { os << ", "; } + + ur::details::printPtr(os, + (*(params->pphDevices))[i] + ); - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); } os << "}"; - } + } - os << ", "; - os << ".phEvent = "; + + + os << ", "; + os << ".pOptions = "; + + ur::details::printPtr(os, + *(params->ppOptions) + ); - ur::details::printPtr(os, - *(params->pphEvent)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_enqueue_mem_buffer_write_rect_params_t type +/// @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_enqueue_mem_buffer_write_rect_params_t *params) { - - os << ".hQueue = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_compile_params_t *params) { + + + + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - ur::details::printPtr(os, - *(params->phQueue)); - os << ", "; - os << ".hBuffer = "; + + + os << ", "; + os << ".hProgram = "; + + ur::details::printPtr(os, + *(params->phProgram) + ); - ur::details::printPtr(os, - *(params->phBuffer)); - os << ", "; - os << ".blockingWrite = "; + + + os << ", "; + os << ".pOptions = "; + + ur::details::printPtr(os, + *(params->ppOptions) + ); - os << *(params->pblockingWrite); - os << ", "; - os << ".bufferOrigin = "; + return os; +} - os << *(params->pbufferOrigin); - os << ", "; - os << ".hostOrigin = "; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_program_compile_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_compile_exp_params_t *params) { + + + + os << ".hProgram = "; + + ur::details::printPtr(os, + *(params->phProgram) + ); + + + + + os << ", "; + os << ".numDevices = "; + + os << + *(params->pnumDevices) + ; + + + + + os << ", "; + os << ".phDevices = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphDevices))); + if (*(params->pphDevices) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumDevices; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphDevices))[i] + ); - os << *(params->phostOrigin); + } + os << "}"; + } - os << ", "; - os << ".region = "; + + + os << ", "; + os << ".pOptions = "; + + ur::details::printPtr(os, + *(params->ppOptions) + ); - os << *(params->pregion); - os << ", "; - os << ".bufferRowPitch = "; + return os; +} - os << *(params->pbufferRowPitch); - os << ", "; - os << ".bufferSlicePitch = "; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_program_link_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_link_params_t *params) { + + + + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); + + + + + os << ", "; + os << ".count = "; + + os << + *(params->pcount) + ; + + + + + os << ", "; + os << ".phPrograms = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphPrograms))); + if (*(params->pphPrograms) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pcount; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphPrograms))[i] + ); - os << *(params->pbufferSlicePitch); + } + os << "}"; + } - os << ", "; - os << ".hostRowPitch = "; + + + os << ", "; + os << ".pOptions = "; + + ur::details::printPtr(os, + *(params->ppOptions) + ); - os << *(params->phostRowPitch); - os << ", "; - os << ".hostSlicePitch = "; + + + os << ", "; + os << ".phProgram = "; + + ur::details::printPtr(os, + *(params->pphProgram) + ); - os << *(params->phostSlicePitch); - os << ", "; - os << ".pSrc = "; + return os; +} - ur::details::printPtr(os, - *(params->ppSrc)); - os << ", "; - os << ".numEventsInWaitList = "; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_program_link_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_link_exp_params_t *params) { + + + + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); + + + + + os << ", "; + os << ".numDevices = "; + + os << + *(params->pnumDevices) + ; + + + + + os << ", "; + os << ".phDevices = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphDevices))); + if (*(params->pphDevices) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumDevices; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphDevices))[i] + ); - os << *(params->pnumEventsInWaitList); + } + os << "}"; + } - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { + + + os << ", "; + os << ".count = "; + + os << + *(params->pcount) + ; + + + + + os << ", "; + os << ".phPrograms = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphPrograms))); + if (*(params->pphPrograms) != NULL) { os << " {"; - for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + for (size_t i = 0; i < *params->pcount; ++i) { if (i != 0) { os << ", "; } + + ur::details::printPtr(os, + (*(params->pphPrograms))[i] + ); - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); } os << "}"; - } + } - os << ", "; - os << ".phEvent = "; + + + os << ", "; + os << ".pOptions = "; + + ur::details::printPtr(os, + *(params->ppOptions) + ); + + + + + os << ", "; + os << ".phProgram = "; + + ur::details::printPtr(os, + *(params->pphProgram) + ); - ur::details::printPtr(os, - *(params->pphEvent)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_enqueue_mem_buffer_copy_params_t type +/// @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_enqueue_mem_buffer_copy_params_t *params) { - - os << ".hQueue = "; - - ur::details::printPtr(os, - *(params->phQueue)); - - os << ", "; - os << ".hBufferSrc = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_retain_params_t *params) { + + + + os << ".hProgram = "; + + ur::details::printPtr(os, + *(params->phProgram) + ); - ur::details::printPtr(os, - *(params->phBufferSrc)); - os << ", "; - os << ".hBufferDst = "; + return os; +} - ur::details::printPtr(os, - *(params->phBufferDst)); - os << ", "; - os << ".srcOffset = "; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_program_release_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_release_params_t *params) { + + + + os << ".hProgram = "; + + ur::details::printPtr(os, + *(params->phProgram) + ); - os << *(params->psrcOffset); - os << ", "; - os << ".dstOffset = "; + return os; +} - os << *(params->pdstOffset); - os << ", "; - os << ".size = "; +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; + + ur::details::printPtr(os, + *(params->phDevice) + ); - os << *(params->psize); - os << ", "; - os << ".numEventsInWaitList = "; + + + os << ", "; + os << ".hProgram = "; + + ur::details::printPtr(os, + *(params->phProgram) + ); - os << *(params->pnumEventsInWaitList); - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { - if (i != 0) { - os << ", "; - } + + + os << ", "; + os << ".pFunctionName = "; + + ur::details::printPtr(os, + *(params->ppFunctionName) + ); - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); - } - os << "}"; - } - os << ", "; - os << ".phEvent = "; + + + os << ", "; + os << ".ppFunctionPointer = "; + + ur::details::printPtr(os, + *(params->pppFunctionPointer) + ); - ur::details::printPtr(os, - *(params->pphEvent)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_enqueue_mem_buffer_copy_rect_params_t type +/// @brief Print operator for the ur_program_get_global_variable_pointer_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 = "; - - ur::details::printPtr(os, - *(params->phQueue)); - - os << ", "; - os << ".hBufferSrc = "; - - ur::details::printPtr(os, - *(params->phBufferSrc)); - - os << ", "; - os << ".hBufferDst = "; - - ur::details::printPtr(os, - *(params->phBufferDst)); +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_get_global_variable_pointer_params_t *params) { + + + + os << ".hDevice = "; + + ur::details::printPtr(os, + *(params->phDevice) + ); - os << ", "; - os << ".srcOrigin = "; - os << *(params->psrcOrigin); + + + os << ", "; + os << ".hProgram = "; + + ur::details::printPtr(os, + *(params->phProgram) + ); - os << ", "; - os << ".dstOrigin = "; - os << *(params->pdstOrigin); + + + os << ", "; + os << ".pGlobalVariableName = "; + + ur::details::printPtr(os, + *(params->ppGlobalVariableName) + ); - os << ", "; - os << ".region = "; - os << *(params->pregion); + + + os << ", "; + os << ".pGlobalVariableSizeRet = "; + + ur::details::printPtr(os, + *(params->ppGlobalVariableSizeRet) + ); - os << ", "; - os << ".srcRowPitch = "; - os << *(params->psrcRowPitch); + + + os << ", "; + os << ".ppGlobalVariablePointerRet = "; + + ur::details::printPtr(os, + *(params->pppGlobalVariablePointerRet) + ); - os << ", "; - os << ".srcSlicePitch = "; - os << *(params->psrcSlicePitch); + return os; +} - os << ", "; - os << ".dstRowPitch = "; - os << *(params->pdstRowPitch); +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ".hProgram = "; + + ur::details::printPtr(os, + *(params->phProgram) + ); - os << ", "; - os << ".dstSlicePitch = "; - os << *(params->pdstSlicePitch); + + + os << ", "; + os << ".propName = "; + + os << + *(params->ppropName) + ; - os << ", "; - os << ".numEventsInWaitList = "; - os << *(params->pnumEventsInWaitList); + + + os << ", "; + os << ".propSize = "; + + os << + *(params->ppropSize) + ; - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { - if (i != 0) { - os << ", "; - } - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); - } - os << "}"; - } + + + os << ", "; + os << ".pPropValue = "; + ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); - os << ", "; - os << ".phEvent = "; + + + os << ", "; + os << ".pPropSizeRet = "; + + ur::details::printPtr(os, + *(params->ppPropSizeRet) + ); - ur::details::printPtr(os, - *(params->pphEvent)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_enqueue_mem_buffer_fill_params_t type +/// @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_enqueue_mem_buffer_fill_params_t *params) { - - os << ".hQueue = "; - - ur::details::printPtr(os, - *(params->phQueue)); +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_get_build_info_params_t *params) { + + + + os << ".hProgram = "; + + ur::details::printPtr(os, + *(params->phProgram) + ); - os << ", "; - os << ".hBuffer = "; - ur::details::printPtr(os, - *(params->phBuffer)); + + + os << ", "; + os << ".hDevice = "; + + ur::details::printPtr(os, + *(params->phDevice) + ); - os << ", "; - os << ".pPattern = "; - ur::details::printPtr(os, - *(params->ppPattern)); + + + os << ", "; + os << ".propName = "; + + os << + *(params->ppropName) + ; - os << ", "; - os << ".patternSize = "; - os << *(params->ppatternSize); + + + os << ", "; + os << ".propSize = "; + + os << + *(params->ppropSize) + ; - os << ", "; - os << ".offset = "; - os << *(params->poffset); + + + os << ", "; + os << ".pPropValue = "; + ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); - os << ", "; - os << ".size = "; + + + os << ", "; + os << ".pPropSizeRet = "; + + ur::details::printPtr(os, + *(params->ppPropSizeRet) + ); - os << *(params->psize); - os << ", "; - os << ".numEventsInWaitList = "; + return os; +} - os << *(params->pnumEventsInWaitList); - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ".hProgram = "; + + ur::details::printPtr(os, + *(params->phProgram) + ); + + + + + os << ", "; + os << ".count = "; + + os << + *(params->pcount) + ; + + + + + os << ", "; + os << ".pSpecConstants = "; + ur::details::printPtr(os, reinterpret_cast(*(params->ppSpecConstants))); + if (*(params->ppSpecConstants) != NULL) { os << " {"; - for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + for (size_t i = 0; i < *params->pcount; ++i) { if (i != 0) { os << ", "; } + + os << + (*(params->ppSpecConstants))[i] + ; - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); } os << "}"; - } - - os << ", "; - os << ".phEvent = "; - - ur::details::printPtr(os, - *(params->pphEvent)); + } return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_enqueue_mem_image_read_params_t type +/// @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_enqueue_mem_image_read_params_t *params) { - - os << ".hQueue = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_program_get_native_handle_params_t *params) { + + + + os << ".hProgram = "; + + ur::details::printPtr(os, + *(params->phProgram) + ); - ur::details::printPtr(os, - *(params->phQueue)); - os << ", "; - os << ".hImage = "; + + + os << ", "; + os << ".phNativeProgram = "; + + ur::details::printPtr(os, + *(params->pphNativeProgram) + ); - ur::details::printPtr(os, - *(params->phImage)); - os << ", "; - os << ".blockingRead = "; + return os; +} - os << *(params->pblockingRead); - os << ", "; - os << ".origin = "; +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ".hNativeProgram = "; + + ur::details::printPtr(os, reinterpret_cast( + *(params->phNativeProgram) + )); - os << *(params->porigin); - os << ", "; - os << ".region = "; + + + os << ", "; + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - os << *(params->pregion); - os << ", "; - os << ".rowPitch = "; + + + os << ", "; + os << ".pProperties = "; + + ur::details::printPtr(os, + *(params->ppProperties) + ); - os << *(params->prowPitch); - os << ", "; - os << ".slicePitch = "; + + + os << ", "; + os << ".phProgram = "; + + ur::details::printPtr(os, + *(params->pphProgram) + ); - os << *(params->pslicePitch); - os << ", "; - os << ".pDst = "; + return os; +} - ur::details::printPtr(os, - *(params->ppDst)); - os << ", "; - os << ".numEventsInWaitList = "; +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ".hProgram = "; + + ur::details::printPtr(os, + *(params->phProgram) + ); - os << *(params->pnumEventsInWaitList); - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { - if (i != 0) { - os << ", "; - } + + + os << ", "; + os << ".pKernelName = "; + + ur::details::printPtr(os, + *(params->ppKernelName) + ); - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); - } - os << "}"; - } - os << ", "; - os << ".phEvent = "; + + + os << ", "; + os << ".phKernel = "; + + ur::details::printPtr(os, + *(params->pphKernel) + ); - ur::details::printPtr(os, - *(params->pphEvent)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_enqueue_mem_image_write_params_t type +/// @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_enqueue_mem_image_write_params_t *params) { - - os << ".hQueue = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_get_info_params_t *params) { + + + + os << ".hKernel = "; + + ur::details::printPtr(os, + *(params->phKernel) + ); - ur::details::printPtr(os, - *(params->phQueue)); - os << ", "; - os << ".hImage = "; + + + os << ", "; + os << ".propName = "; + + os << + *(params->ppropName) + ; - ur::details::printPtr(os, - *(params->phImage)); - os << ", "; - os << ".blockingWrite = "; + + + os << ", "; + os << ".propSize = "; + + os << + *(params->ppropSize) + ; - os << *(params->pblockingWrite); - os << ", "; - os << ".origin = "; + + + os << ", "; + os << ".pPropValue = "; + ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); - os << *(params->porigin); + + + os << ", "; + os << ".pPropSizeRet = "; + + ur::details::printPtr(os, + *(params->ppPropSizeRet) + ); - os << ", "; - os << ".region = "; - os << *(params->pregion); + return os; +} - os << ", "; - os << ".rowPitch = "; - os << *(params->prowPitch); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_kernel_get_group_info_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_get_group_info_params_t *params) { + + + + os << ".hKernel = "; + + ur::details::printPtr(os, + *(params->phKernel) + ); - os << ", "; - os << ".slicePitch = "; - os << *(params->pslicePitch); + + + os << ", "; + os << ".hDevice = "; + + ur::details::printPtr(os, + *(params->phDevice) + ); - os << ", "; - os << ".pSrc = "; - ur::details::printPtr(os, - *(params->ppSrc)); + + + os << ", "; + os << ".propName = "; + + os << + *(params->ppropName) + ; - os << ", "; - os << ".numEventsInWaitList = "; - os << *(params->pnumEventsInWaitList); + + + os << ", "; + os << ".propSize = "; + + os << + *(params->ppropSize) + ; - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { - if (i != 0) { - os << ", "; - } - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); - } - os << "}"; - } + + + os << ", "; + os << ".pPropValue = "; + ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); - os << ", "; - os << ".phEvent = "; + + + os << ", "; + os << ".pPropSizeRet = "; + + ur::details::printPtr(os, + *(params->ppPropSizeRet) + ); - ur::details::printPtr(os, - *(params->pphEvent)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_enqueue_mem_image_copy_params_t type +/// @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_enqueue_mem_image_copy_params_t *params) { +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_get_sub_group_info_params_t *params) { + + + + os << ".hKernel = "; + + ur::details::printPtr(os, + *(params->phKernel) + ); - os << ".hQueue = "; - ur::details::printPtr(os, - *(params->phQueue)); + + + os << ", "; + os << ".hDevice = "; + + ur::details::printPtr(os, + *(params->phDevice) + ); - os << ", "; - os << ".hImageSrc = "; - ur::details::printPtr(os, - *(params->phImageSrc)); + + + os << ", "; + os << ".propName = "; + + os << + *(params->ppropName) + ; - os << ", "; - os << ".hImageDst = "; - ur::details::printPtr(os, - *(params->phImageDst)); + + + os << ", "; + os << ".propSize = "; + + os << + *(params->ppropSize) + ; - os << ", "; - os << ".srcOrigin = "; - os << *(params->psrcOrigin); + + + os << ", "; + os << ".pPropValue = "; + ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); - os << ", "; - os << ".dstOrigin = "; + + + os << ", "; + os << ".pPropSizeRet = "; + + ur::details::printPtr(os, + *(params->ppPropSizeRet) + ); - os << *(params->pdstOrigin); - os << ", "; - os << ".region = "; + return os; +} - os << *(params->pregion); - os << ", "; - os << ".numEventsInWaitList = "; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_kernel_retain_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_retain_params_t *params) { + + + + os << ".hKernel = "; + + ur::details::printPtr(os, + *(params->phKernel) + ); - os << *(params->pnumEventsInWaitList); - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { - if (i != 0) { - os << ", "; - } + return os; +} - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); - } - os << "}"; - } - os << ", "; - os << ".phEvent = "; +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; + + ur::details::printPtr(os, + *(params->phKernel) + ); - ur::details::printPtr(os, - *(params->pphEvent)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_enqueue_mem_buffer_map_params_t type +/// @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_enqueue_mem_buffer_map_params_t *params) { +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_get_native_handle_params_t *params) { + + + + os << ".hKernel = "; + + ur::details::printPtr(os, + *(params->phKernel) + ); - os << ".hQueue = "; - ur::details::printPtr(os, - *(params->phQueue)); + + + os << ", "; + os << ".phNativeKernel = "; + + ur::details::printPtr(os, + *(params->pphNativeKernel) + ); - os << ", "; - os << ".hBuffer = "; - ur::details::printPtr(os, - *(params->phBuffer)); + return os; +} - os << ", "; - os << ".blockingMap = "; - os << *(params->pblockingMap); +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ".hNativeKernel = "; + + ur::details::printPtr(os, reinterpret_cast( + *(params->phNativeKernel) + )); - os << ", "; - os << ".mapFlags = "; - ur::details::printFlag(os, - *(params->pmapFlags)); + + + os << ", "; + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - os << ", "; - os << ".offset = "; - os << *(params->poffset); + + + os << ", "; + os << ".hProgram = "; + + ur::details::printPtr(os, + *(params->phProgram) + ); - os << ", "; - os << ".size = "; - os << *(params->psize); + + + os << ", "; + os << ".pProperties = "; + + ur::details::printPtr(os, + *(params->ppProperties) + ); - os << ", "; - os << ".numEventsInWaitList = "; - os << *(params->pnumEventsInWaitList); + + + os << ", "; + os << ".phKernel = "; + + ur::details::printPtr(os, + *(params->pphKernel) + ); - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { - if (i != 0) { - os << ", "; - } - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); - } - os << "}"; - } + return os; +} + + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_kernel_get_suggested_local_work_size_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_get_suggested_local_work_size_params_t *params) { + + + + os << ".hKernel = "; + + ur::details::printPtr(os, + *(params->phKernel) + ); - os << ", "; - os << ".phEvent = "; - ur::details::printPtr(os, - *(params->pphEvent)); + + + os << ", "; + os << ".hQueue = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); - os << ", "; - os << ".ppRetMap = "; - ur::details::printPtr(os, - *(params->pppRetMap)); + + + os << ", "; + os << ".numWorkDim = "; + + os << + *(params->pnumWorkDim) + ; + + + + + os << ", "; + os << ".pGlobalWorkOffset = "; + + ur::details::printPtr(os, + *(params->ppGlobalWorkOffset) + ); + + + + + os << ", "; + os << ".pGlobalWorkSize = "; + + ur::details::printPtr(os, + *(params->ppGlobalWorkSize) + ); + + + + + os << ", "; + os << ".pSuggestedLocalWorkSize = "; + + ur::details::printPtr(os, + *(params->ppSuggestedLocalWorkSize) + ); + return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_enqueue_mem_unmap_params_t type +/// @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_enqueue_mem_unmap_params_t *params) { - - os << ".hQueue = "; - - ur::details::printPtr(os, - *(params->phQueue)); - - os << ", "; - os << ".hMem = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_set_arg_value_params_t *params) { + + + + os << ".hKernel = "; + + ur::details::printPtr(os, + *(params->phKernel) + ); - ur::details::printPtr(os, - *(params->phMem)); - os << ", "; - os << ".pMappedPtr = "; + + + os << ", "; + os << ".argIndex = "; + + os << + *(params->pargIndex) + ; - ur::details::printPtr(os, - *(params->ppMappedPtr)); - os << ", "; - os << ".numEventsInWaitList = "; + + + os << ", "; + os << ".argSize = "; + + os << + *(params->pargSize) + ; - os << *(params->pnumEventsInWaitList); - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { - if (i != 0) { - os << ", "; - } + + + os << ", "; + os << ".pProperties = "; + + ur::details::printPtr(os, + *(params->ppProperties) + ); - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); - } - os << "}"; - } - os << ", "; - os << ".phEvent = "; + + + os << ", "; + os << ".pArgValue = "; + + ur::details::printPtr(os, + *(params->ppArgValue) + ); - ur::details::printPtr(os, - *(params->pphEvent)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_enqueue_usm_fill_params_t type +/// @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_enqueue_usm_fill_params_t *params) { +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_set_arg_local_params_t *params) { + + + + os << ".hKernel = "; + + ur::details::printPtr(os, + *(params->phKernel) + ); - os << ".hQueue = "; - ur::details::printPtr(os, - *(params->phQueue)); + + + os << ", "; + os << ".argIndex = "; + + os << + *(params->pargIndex) + ; - os << ", "; - os << ".pMem = "; - ur::details::printPtr(os, - *(params->ppMem)); + + + os << ", "; + os << ".argSize = "; + + os << + *(params->pargSize) + ; - os << ", "; - os << ".patternSize = "; - os << *(params->ppatternSize); + + + os << ", "; + os << ".pProperties = "; + + ur::details::printPtr(os, + *(params->ppProperties) + ); - os << ", "; - os << ".pPattern = "; - ur::details::printPtr(os, - *(params->ppPattern)); + return os; +} - os << ", "; - os << ".size = "; - os << *(params->psize); +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ".hKernel = "; + + ur::details::printPtr(os, + *(params->phKernel) + ); - os << ", "; - os << ".numEventsInWaitList = "; - os << *(params->pnumEventsInWaitList); + + + os << ", "; + os << ".argIndex = "; + + os << + *(params->pargIndex) + ; - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { - if (i != 0) { - os << ", "; - } - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); - } - os << "}"; - } + + + os << ", "; + os << ".pProperties = "; + + ur::details::printPtr(os, + *(params->ppProperties) + ); + - os << ", "; - os << ".phEvent = "; + + + os << ", "; + os << ".pArgValue = "; + + ur::details::printPtr(os, + *(params->ppArgValue) + ); - ur::details::printPtr(os, - *(params->pphEvent)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_enqueue_usm_memcpy_params_t type +/// @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_enqueue_usm_memcpy_params_t *params) { +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_set_exec_info_params_t *params) { + + + + os << ".hKernel = "; + + ur::details::printPtr(os, + *(params->phKernel) + ); + - os << ".hQueue = "; + + + os << ", "; + os << ".propName = "; + + os << + *(params->ppropName) + ; - ur::details::printPtr(os, - *(params->phQueue)); - os << ", "; - os << ".blocking = "; + + + os << ", "; + os << ".propSize = "; + + os << + *(params->ppropSize) + ; - os << *(params->pblocking); - os << ", "; - os << ".pDst = "; + + + os << ", "; + os << ".pProperties = "; + + ur::details::printPtr(os, + *(params->ppProperties) + ); - ur::details::printPtr(os, - *(params->ppDst)); - os << ", "; - os << ".pSrc = "; + + + os << ", "; + os << ".pPropValue = "; + ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); + + return os; +} - ur::details::printPtr(os, - *(params->ppSrc)); - os << ", "; - os << ".size = "; +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ".hKernel = "; + + ur::details::printPtr(os, + *(params->phKernel) + ); - os << *(params->psize); - os << ", "; - os << ".numEventsInWaitList = "; + + + os << ", "; + os << ".argIndex = "; + + os << + *(params->pargIndex) + ; - os << *(params->pnumEventsInWaitList); - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { - if (i != 0) { - os << ", "; - } + + + os << ", "; + os << ".pProperties = "; + + ur::details::printPtr(os, + *(params->ppProperties) + ); - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); - } - os << "}"; - } - os << ", "; - os << ".phEvent = "; + + + os << ", "; + os << ".hArgValue = "; + + ur::details::printPtr(os, + *(params->phArgValue) + ); - ur::details::printPtr(os, - *(params->pphEvent)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_enqueue_usm_prefetch_params_t type +/// @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_enqueue_usm_prefetch_params_t *params) { - - os << ".hQueue = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_set_arg_mem_obj_params_t *params) { + + + + os << ".hKernel = "; + + ur::details::printPtr(os, + *(params->phKernel) + ); - ur::details::printPtr(os, - *(params->phQueue)); - os << ", "; - os << ".pMem = "; + + + os << ", "; + os << ".argIndex = "; + + os << + *(params->pargIndex) + ; - ur::details::printPtr(os, - *(params->ppMem)); - os << ", "; - os << ".size = "; + + + os << ", "; + os << ".pProperties = "; + + ur::details::printPtr(os, + *(params->ppProperties) + ); - os << *(params->psize); - os << ", "; - os << ".flags = "; + + + os << ", "; + os << ".hArgValue = "; + + ur::details::printPtr(os, + *(params->phArgValue) + ); - ur::details::printFlag(os, - *(params->pflags)); - os << ", "; - os << ".numEventsInWaitList = "; + return os; +} - os << *(params->pnumEventsInWaitList); - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { - if (i != 0) { - os << ", "; - } +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ".hKernel = "; + + ur::details::printPtr(os, + *(params->phKernel) + ); + + + + + os << ", "; + os << ".count = "; + + os << + *(params->pcount) + ; - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); - } - os << "}"; - } - os << ", "; - os << ".phEvent = "; + + + os << ", "; + os << ".pSpecConstants = "; + + ur::details::printPtr(os, + *(params->ppSpecConstants) + ); - ur::details::printPtr(os, - *(params->pphEvent)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_enqueue_usm_advise_params_t type +/// @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_enqueue_usm_advise_params_t *params) { - - os << ".hQueue = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_kernel_suggest_max_cooperative_group_count_exp_params_t *params) { + + + + os << ".hKernel = "; + + ur::details::printPtr(os, + *(params->phKernel) + ); - ur::details::printPtr(os, - *(params->phQueue)); - os << ", "; - os << ".pMem = "; + + + os << ", "; + os << ".workDim = "; + + os << + *(params->pworkDim) + ; - ur::details::printPtr(os, - *(params->ppMem)); - os << ", "; - os << ".size = "; + + + os << ", "; + os << ".pLocalWorkSize = "; + + ur::details::printPtr(os, + *(params->ppLocalWorkSize) + ); - os << *(params->psize); - os << ", "; - os << ".advice = "; + + + os << ", "; + os << ".dynamicSharedMemorySize = "; + + os << + *(params->pdynamicSharedMemorySize) + ; - ur::details::printFlag(os, - *(params->padvice)); - os << ", "; - os << ".phEvent = "; + + + os << ", "; + os << ".pGroupCountRet = "; + + ur::details::printPtr(os, + *(params->ppGroupCountRet) + ); - ur::details::printPtr(os, - *(params->pphEvent)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_enqueue_usm_fill_2d_params_t type +/// @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_enqueue_usm_fill_2d_params_t *params) { +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_queue_get_info_params_t *params) { + + + + os << ".hQueue = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); + - os << ".hQueue = "; + + + os << ", "; + os << ".propName = "; + + os << + *(params->ppropName) + ; - ur::details::printPtr(os, - *(params->phQueue)); - os << ", "; - os << ".pMem = "; + + + os << ", "; + os << ".propSize = "; + + os << + *(params->ppropSize) + ; - ur::details::printPtr(os, - *(params->ppMem)); - os << ", "; - os << ".pitch = "; + + + os << ", "; + os << ".pPropValue = "; + ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); - os << *(params->ppitch); + + + os << ", "; + os << ".pPropSizeRet = "; + + ur::details::printPtr(os, + *(params->ppPropSizeRet) + ); - os << ", "; - os << ".patternSize = "; - os << *(params->ppatternSize); + return os; +} - os << ", "; - os << ".pPattern = "; - ur::details::printPtr(os, - *(params->ppPattern)); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_queue_create_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_queue_create_params_t *params) { + + + + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); + - os << ", "; - os << ".width = "; + + + os << ", "; + os << ".hDevice = "; + + ur::details::printPtr(os, + *(params->phDevice) + ); - os << *(params->pwidth); - os << ", "; - os << ".height = "; + + + os << ", "; + os << ".pProperties = "; + + ur::details::printPtr(os, + *(params->ppProperties) + ); - os << *(params->pheight); - os << ", "; - os << ".numEventsInWaitList = "; + + + os << ", "; + os << ".phQueue = "; + + ur::details::printPtr(os, + *(params->pphQueue) + ); - os << *(params->pnumEventsInWaitList); - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { - if (i != 0) { - os << ", "; - } + return os; +} - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); - } - os << "}"; - } - os << ", "; - os << ".phEvent = "; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_queue_retain_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_queue_retain_params_t *params) { + + + + os << ".hQueue = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); - ur::details::printPtr(os, - *(params->pphEvent)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_enqueue_usm_memcpy_2d_params_t type +/// @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_enqueue_usm_memcpy_2d_params_t *params) { - - os << ".hQueue = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_queue_release_params_t *params) { + + + + os << ".hQueue = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); - ur::details::printPtr(os, - *(params->phQueue)); - os << ", "; - os << ".blocking = "; + return os; +} - os << *(params->pblocking); - os << ", "; - os << ".pDst = "; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_queue_get_native_handle_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_queue_get_native_handle_params_t *params) { + + + + os << ".hQueue = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); - ur::details::printPtr(os, - *(params->ppDst)); - os << ", "; - os << ".dstPitch = "; + + + os << ", "; + os << ".pDesc = "; + + ur::details::printPtr(os, + *(params->ppDesc) + ); - os << *(params->pdstPitch); - os << ", "; - os << ".pSrc = "; + + + os << ", "; + os << ".phNativeQueue = "; + + ur::details::printPtr(os, + *(params->pphNativeQueue) + ); - ur::details::printPtr(os, - *(params->ppSrc)); - os << ", "; - os << ".srcPitch = "; + return os; +} - os << *(params->psrcPitch); - os << ", "; - os << ".width = "; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_queue_create_with_native_handle_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_queue_create_with_native_handle_params_t *params) { + + + + os << ".hNativeQueue = "; + + ur::details::printPtr(os, reinterpret_cast( + *(params->phNativeQueue) + )); - os << *(params->pwidth); - os << ", "; - os << ".height = "; + + + os << ", "; + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - os << *(params->pheight); - os << ", "; - os << ".numEventsInWaitList = "; + + + os << ", "; + os << ".hDevice = "; + + ur::details::printPtr(os, + *(params->phDevice) + ); - os << *(params->pnumEventsInWaitList); - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { - if (i != 0) { - os << ", "; - } + + + os << ", "; + os << ".pProperties = "; + + ur::details::printPtr(os, + *(params->ppProperties) + ); - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); - } - os << "}"; - } - os << ", "; - os << ".phEvent = "; + + + os << ", "; + os << ".phQueue = "; + + ur::details::printPtr(os, + *(params->pphQueue) + ); - ur::details::printPtr(os, - *(params->pphEvent)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_enqueue_device_global_variable_write_params_t type +/// @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_enqueue_device_global_variable_write_params_t *params) { - - os << ".hQueue = "; - - ur::details::printPtr(os, - *(params->phQueue)); - - os << ", "; - os << ".hProgram = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_queue_finish_params_t *params) { + + + + os << ".hQueue = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); - ur::details::printPtr(os, - *(params->phProgram)); - os << ", "; - os << ".name = "; + return os; +} - ur::details::printPtr(os, - *(params->pname)); - os << ", "; - os << ".blockingWrite = "; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_queue_flush_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_queue_flush_params_t *params) { + + + + os << ".hQueue = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); - os << *(params->pblockingWrite); - os << ", "; - os << ".count = "; + return os; +} - os << *(params->pcount); - os << ", "; - os << ".offset = "; +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - os << *(params->poffset); - os << ", "; - os << ".pSrc = "; + + + os << ", "; + os << ".pDesc = "; + + ur::details::printPtr(os, + *(params->ppDesc) + ); - ur::details::printPtr(os, - *(params->ppSrc)); - os << ", "; - os << ".numEventsInWaitList = "; + + + os << ", "; + os << ".phSampler = "; + + ur::details::printPtr(os, + *(params->pphSampler) + ); - os << *(params->pnumEventsInWaitList); - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { - if (i != 0) { - os << ", "; - } + return os; +} - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); - } - os << "}"; - } - os << ", "; - os << ".phEvent = "; +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ".hSampler = "; + + ur::details::printPtr(os, + *(params->phSampler) + ); - ur::details::printPtr(os, - *(params->pphEvent)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_enqueue_device_global_variable_read_params_t type +/// @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_enqueue_device_global_variable_read_params_t *params) { - - os << ".hQueue = "; - - ur::details::printPtr(os, - *(params->phQueue)); +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_sampler_release_params_t *params) { + + + + os << ".hSampler = "; + + ur::details::printPtr(os, + *(params->phSampler) + ); - os << ", "; - os << ".hProgram = "; - ur::details::printPtr(os, - *(params->phProgram)); + return os; +} - os << ", "; - os << ".name = "; - ur::details::printPtr(os, - *(params->pname)); +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ".hSampler = "; + + ur::details::printPtr(os, + *(params->phSampler) + ); - os << ", "; - os << ".blockingRead = "; - os << *(params->pblockingRead); + + + os << ", "; + os << ".propName = "; + + os << + *(params->ppropName) + ; - os << ", "; - os << ".count = "; - os << *(params->pcount); + + + os << ", "; + os << ".propSize = "; + + os << + *(params->ppropSize) + ; - os << ", "; - os << ".offset = "; - os << *(params->poffset); + + + os << ", "; + os << ".pPropValue = "; + ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); - os << ", "; - os << ".pDst = "; + + + os << ", "; + os << ".pPropSizeRet = "; + + ur::details::printPtr(os, + *(params->ppPropSizeRet) + ); - ur::details::printPtr(os, - *(params->ppDst)); - os << ", "; - os << ".numEventsInWaitList = "; + return os; +} - os << *(params->pnumEventsInWaitList); - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { - if (i != 0) { - os << ", "; - } +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ".hSampler = "; + + ur::details::printPtr(os, + *(params->phSampler) + ); - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); - } - os << "}"; - } - os << ", "; - os << ".phEvent = "; + + + os << ", "; + os << ".phNativeSampler = "; + + ur::details::printPtr(os, + *(params->pphNativeSampler) + ); - ur::details::printPtr(os, - *(params->pphEvent)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_enqueue_read_host_pipe_params_t type +/// @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_enqueue_read_host_pipe_params_t *params) { +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_sampler_create_with_native_handle_params_t *params) { + + + + os << ".hNativeSampler = "; + + ur::details::printPtr(os, reinterpret_cast( + *(params->phNativeSampler) + )); - os << ".hQueue = "; - ur::details::printPtr(os, - *(params->phQueue)); + + + os << ", "; + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - os << ", "; - os << ".hProgram = "; - ur::details::printPtr(os, - *(params->phProgram)); + + + os << ", "; + os << ".pProperties = "; + + ur::details::printPtr(os, + *(params->ppProperties) + ); - os << ", "; - os << ".pipe_symbol = "; - ur::details::printPtr(os, - *(params->ppipe_symbol)); + + + os << ", "; + os << ".phSampler = "; + + ur::details::printPtr(os, + *(params->pphSampler) + ); - os << ", "; - os << ".blocking = "; - os << *(params->pblocking); + return os; +} - os << ", "; - os << ".pDst = "; - ur::details::printPtr(os, - *(params->ppDst)); +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - os << ", "; - os << ".size = "; - os << *(params->psize); + + + os << ", "; + os << ".flags = "; + + ur::details::printFlag(os, + *(params->pflags) + ); - os << ", "; - os << ".numEventsInWaitList = "; - os << *(params->pnumEventsInWaitList); + + + os << ", "; + os << ".pImageFormat = "; + + ur::details::printPtr(os, + *(params->ppImageFormat) + ); - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { - if (i != 0) { - os << ", "; - } - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); - } - os << "}"; - } + + + os << ", "; + os << ".pImageDesc = "; + + ur::details::printPtr(os, + *(params->ppImageDesc) + ); + + + + + os << ", "; + os << ".pHost = "; + + ur::details::printPtr(os, + *(params->ppHost) + ); + - os << ", "; - os << ".phEvent = "; + + + os << ", "; + os << ".phMem = "; + + ur::details::printPtr(os, + *(params->pphMem) + ); - ur::details::printPtr(os, - *(params->pphEvent)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_enqueue_write_host_pipe_params_t type +/// @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_enqueue_write_host_pipe_params_t *params) { - - os << ".hQueue = "; - - ur::details::printPtr(os, - *(params->phQueue)); +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_mem_buffer_create_params_t *params) { + + + + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - os << ", "; - os << ".hProgram = "; - ur::details::printPtr(os, - *(params->phProgram)); + + + os << ", "; + os << ".flags = "; + + ur::details::printFlag(os, + *(params->pflags) + ); - os << ", "; - os << ".pipe_symbol = "; - ur::details::printPtr(os, - *(params->ppipe_symbol)); + + + os << ", "; + os << ".size = "; + + os << + *(params->psize) + ; - os << ", "; - os << ".blocking = "; - os << *(params->pblocking); + + + os << ", "; + os << ".pProperties = "; + + ur::details::printPtr(os, + *(params->ppProperties) + ); - os << ", "; - os << ".pSrc = "; - ur::details::printPtr(os, - *(params->ppSrc)); + + + os << ", "; + os << ".phBuffer = "; + + ur::details::printPtr(os, + *(params->pphBuffer) + ); - os << ", "; - os << ".size = "; - os << *(params->psize); + return os; +} - os << ", "; - os << ".numEventsInWaitList = "; - os << *(params->pnumEventsInWaitList); +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ".hMem = "; + + ur::details::printPtr(os, + *(params->phMem) + ); - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { - if (i != 0) { - os << ", "; - } - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); - } - os << "}"; - } + return os; +} - os << ", "; - os << ".phEvent = "; - ur::details::printPtr(os, - *(params->pphEvent)); +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; + + ur::details::printPtr(os, + *(params->phMem) + ); + return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_enqueue_kernel_launch_custom_exp_params_t type +/// @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_enqueue_kernel_launch_custom_exp_params_t *params) { +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_mem_buffer_partition_params_t *params) { + + + + os << ".hBuffer = "; + + ur::details::printPtr(os, + *(params->phBuffer) + ); - os << ".hQueue = "; - ur::details::printPtr(os, - *(params->phQueue)); + + + os << ", "; + os << ".flags = "; + + ur::details::printFlag(os, + *(params->pflags) + ); - os << ", "; - os << ".hKernel = "; - ur::details::printPtr(os, - *(params->phKernel)); + + + os << ", "; + os << ".bufferCreateType = "; + + os << + *(params->pbufferCreateType) + ; - os << ", "; - os << ".workDim = "; - os << *(params->pworkDim); + + + os << ", "; + os << ".pRegion = "; + + ur::details::printPtr(os, + *(params->ppRegion) + ); - os << ", "; - os << ".pGlobalWorkOffset = "; - ur::details::printPtr(os, - *(params->ppGlobalWorkOffset)); + + + os << ", "; + os << ".phMem = "; + + ur::details::printPtr(os, + *(params->pphMem) + ); - os << ", "; - os << ".pGlobalWorkSize = "; - ur::details::printPtr(os, - *(params->ppGlobalWorkSize)); + return os; +} - os << ", "; - os << ".pLocalWorkSize = "; - ur::details::printPtr(os, - *(params->ppLocalWorkSize)); +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ".hMem = "; + + ur::details::printPtr(os, + *(params->phMem) + ); - os << ", "; - os << ".numPropsInLaunchPropList = "; - os << *(params->pnumPropsInLaunchPropList); + + + os << ", "; + os << ".hDevice = "; + + ur::details::printPtr(os, + *(params->phDevice) + ); - os << ", "; - os << ".launchPropList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->plaunchPropList))); - if (*(params->plaunchPropList) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumPropsInLaunchPropList; ++i) { - if (i != 0) { - os << ", "; - } - os << (*(params->plaunchPropList))[i]; - } - os << "}"; - } + + + os << ", "; + os << ".phNativeMem = "; + + ur::details::printPtr(os, + *(params->pphNativeMem) + ); - os << ", "; - os << ".numEventsInWaitList = "; - os << *(params->pnumEventsInWaitList); + return os; +} - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { - if (i != 0) { - os << ", "; - } - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); - } - os << "}"; - } +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ".hNativeMem = "; + + ur::details::printPtr(os, reinterpret_cast( + *(params->phNativeMem) + )); + + + + + os << ", "; + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); + - os << ", "; - os << ".phEvent = "; + + + os << ", "; + os << ".pProperties = "; + + ur::details::printPtr(os, + *(params->ppProperties) + ); + + + + + os << ", "; + os << ".phMem = "; + + ur::details::printPtr(os, + *(params->pphMem) + ); - ur::details::printPtr(os, - *(params->pphEvent)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_enqueue_events_wait_with_barrier_ext_params_t type +/// @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_enqueue_events_wait_with_barrier_ext_params_t *params) { +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_mem_image_create_with_native_handle_params_t *params) { + + + + os << ".hNativeMem = "; + + ur::details::printPtr(os, reinterpret_cast( + *(params->phNativeMem) + )); - os << ".hQueue = "; - ur::details::printPtr(os, - *(params->phQueue)); + + + os << ", "; + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - os << ", "; - os << ".pProperties = "; - ur::details::printPtr(os, - *(params->ppProperties)); + + + os << ", "; + os << ".pImageFormat = "; + + ur::details::printPtr(os, + *(params->ppImageFormat) + ); - os << ", "; - os << ".numEventsInWaitList = "; - os << *(params->pnumEventsInWaitList); + + + os << ", "; + os << ".pImageDesc = "; + + ur::details::printPtr(os, + *(params->ppImageDesc) + ); - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { - if (i != 0) { - os << ", "; - } - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); - } - os << "}"; - } + + + os << ", "; + os << ".pProperties = "; + + ur::details::printPtr(os, + *(params->ppProperties) + ); + - os << ", "; - os << ".phEvent = "; + + + os << ", "; + os << ".phMem = "; + + ur::details::printPtr(os, + *(params->pphMem) + ); - ur::details::printPtr(os, - *(params->pphEvent)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_enqueue_cooperative_kernel_launch_exp_params_t type +/// @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_enqueue_cooperative_kernel_launch_exp_params_t *params) { +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_mem_get_info_params_t *params) { + + + + os << ".hMemory = "; + + ur::details::printPtr(os, + *(params->phMemory) + ); - os << ".hQueue = "; - ur::details::printPtr(os, - *(params->phQueue)); + + + os << ", "; + os << ".propName = "; + + os << + *(params->ppropName) + ; - os << ", "; - os << ".hKernel = "; - ur::details::printPtr(os, - *(params->phKernel)); + + + os << ", "; + os << ".propSize = "; + + os << + *(params->ppropSize) + ; - os << ", "; - os << ".workDim = "; - os << *(params->pworkDim); + + + os << ", "; + os << ".pPropValue = "; + ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); - os << ", "; - os << ".pGlobalWorkOffset = "; + + + os << ", "; + os << ".pPropSizeRet = "; + + ur::details::printPtr(os, + *(params->ppPropSizeRet) + ); - ur::details::printPtr(os, - *(params->ppGlobalWorkOffset)); - os << ", "; - os << ".pGlobalWorkSize = "; + return os; +} - ur::details::printPtr(os, - *(params->ppGlobalWorkSize)); - os << ", "; - os << ".pLocalWorkSize = "; +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ".hMemory = "; + + ur::details::printPtr(os, + *(params->phMemory) + ); - ur::details::printPtr(os, - *(params->ppLocalWorkSize)); - os << ", "; - os << ".numEventsInWaitList = "; + + + os << ", "; + os << ".propName = "; + + os << + *(params->ppropName) + ; - os << *(params->pnumEventsInWaitList); - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { - if (i != 0) { - os << ", "; - } + + + os << ", "; + os << ".propSize = "; + + os << + *(params->ppropSize) + ; - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); - } - os << "}"; - } - os << ", "; - os << ".phEvent = "; + + + os << ", "; + os << ".pPropValue = "; + ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); + + + + os << ", "; + os << ".pPropSizeRet = "; + + ur::details::printPtr(os, + *(params->ppPropSizeRet) + ); - ur::details::printPtr(os, - *(params->pphEvent)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_enqueue_timestamp_recording_exp_params_t type +/// @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_enqueue_timestamp_recording_exp_params_t *params) { - - os << ".hQueue = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_physical_mem_create_params_t *params) { + + + + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - ur::details::printPtr(os, - *(params->phQueue)); - os << ", "; - os << ".blocking = "; + + + os << ", "; + os << ".hDevice = "; + + ur::details::printPtr(os, + *(params->phDevice) + ); - os << *(params->pblocking); - os << ", "; - os << ".numEventsInWaitList = "; + + + os << ", "; + os << ".size = "; + + os << + *(params->psize) + ; - os << *(params->pnumEventsInWaitList); - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { - if (i != 0) { - os << ", "; - } + + + os << ", "; + os << ".pProperties = "; + + ur::details::printPtr(os, + *(params->ppProperties) + ); - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); - } - os << "}"; - } - os << ", "; - os << ".phEvent = "; + + + os << ", "; + os << ".phPhysicalMem = "; + + ur::details::printPtr(os, + *(params->pphPhysicalMem) + ); - ur::details::printPtr(os, - *(params->pphEvent)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_enqueue_native_command_exp_params_t type +/// @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_enqueue_native_command_exp_params_t *params) { - - os << ".hQueue = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_physical_mem_retain_params_t *params) { + + + + os << ".hPhysicalMem = "; + + ur::details::printPtr(os, + *(params->phPhysicalMem) + ); - ur::details::printPtr(os, - *(params->phQueue)); - os << ", "; - os << ".pfnNativeEnqueue = "; + return os; +} - os << reinterpret_cast( - *(params->ppfnNativeEnqueue)); - os << ", "; - os << ".data = "; +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; + + ur::details::printPtr(os, + *(params->phPhysicalMem) + ); - ur::details::printPtr(os, - *(params->pdata)); - os << ", "; - os << ".numMemsInMemList = "; + return os; +} - os << *(params->pnumMemsInMemList); - os << ", "; - os << ".phMemList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphMemList))); - if (*(params->pphMemList) != NULL) { +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ".phAdapters = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphAdapters))); + if (*(params->pphAdapters) != NULL) { os << " {"; - for (size_t i = 0; i < *params->pnumMemsInMemList; ++i) { + for (size_t i = 0; i < *params->pNumEntries; ++i) { if (i != 0) { os << ", "; } + + ur::details::printPtr(os, + (*(params->pphAdapters))[i] + ); - ur::details::printPtr(os, - (*(params->pphMemList))[i]); } os << "}"; - } - - os << ", "; - os << ".pProperties = "; - - ur::details::printPtr(os, - *(params->ppProperties)); - - os << ", "; - os << ".numEventsInWaitList = "; - - os << *(params->pnumEventsInWaitList); - - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { - if (i != 0) { - os << ", "; - } - - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); } - os << "}"; - } - os << ", "; - os << ".phEvent = "; + + + os << ", "; + os << ".pNumAdapters = "; + + ur::details::printPtr(os, + *(params->ppNumAdapters) + ); - ur::details::printPtr(os, - *(params->pphEvent)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_bindless_images_unsampled_image_handle_destroy_exp_params_t type +/// @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_bindless_images_unsampled_image_handle_destroy_exp_params_t *params) { - - os << ".hContext = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_adapter_release_params_t *params) { + + + + os << ".hAdapter = "; + + ur::details::printPtr(os, + *(params->phAdapter) + ); - ur::details::printPtr(os, - *(params->phContext)); - os << ", "; - os << ".hDevice = "; + return os; +} - ur::details::printPtr(os, - *(params->phDevice)); - os << ", "; - os << ".hImage = "; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_adapter_retain_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_adapter_retain_params_t *params) { + + + + os << ".hAdapter = "; + + ur::details::printPtr(os, + *(params->phAdapter) + ); - ur::details::printPtr(os, reinterpret_cast( - *(params->phImage))); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_bindless_images_sampled_image_handle_destroy_exp_params_t type +/// @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_bindless_images_sampled_image_handle_destroy_exp_params_t *params) { - - os << ".hContext = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_adapter_get_last_error_params_t *params) { + + + + os << ".hAdapter = "; + + ur::details::printPtr(os, + *(params->phAdapter) + ); - ur::details::printPtr(os, - *(params->phContext)); - os << ", "; - os << ".hDevice = "; + + + os << ", "; + os << ".ppMessage = "; + + ur::details::printPtr(os, + *(params->pppMessage) + ); - ur::details::printPtr(os, - *(params->phDevice)); - os << ", "; - os << ".hImage = "; + + + os << ", "; + os << ".pError = "; + + ur::details::printPtr(os, + *(params->ppError) + ); - ur::details::printPtr(os, reinterpret_cast( - *(params->phImage))); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_bindless_images_image_allocate_exp_params_t type +/// @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_bindless_images_image_allocate_exp_params_t *params) { - - os << ".hContext = "; - - ur::details::printPtr(os, - *(params->phContext)); +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_adapter_get_info_params_t *params) { + + + + os << ".hAdapter = "; + + ur::details::printPtr(os, + *(params->phAdapter) + ); - os << ", "; - os << ".hDevice = "; - ur::details::printPtr(os, - *(params->phDevice)); + + + os << ", "; + os << ".propName = "; + + os << + *(params->ppropName) + ; - os << ", "; - os << ".pImageFormat = "; - ur::details::printPtr(os, - *(params->ppImageFormat)); + + + os << ", "; + os << ".propSize = "; + + os << + *(params->ppropSize) + ; - os << ", "; - os << ".pImageDesc = "; - ur::details::printPtr(os, - *(params->ppImageDesc)); + + + os << ", "; + os << ".pPropValue = "; + ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); - os << ", "; - os << ".phImageMem = "; + + + os << ", "; + os << ".pPropSizeRet = "; + + ur::details::printPtr(os, + *(params->ppPropSizeRet) + ); - ur::details::printPtr(os, - *(params->pphImageMem)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_bindless_images_image_free_exp_params_t type +/// @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_bindless_images_image_free_exp_params_t *params) { - - os << ".hContext = "; - - ur::details::printPtr(os, - *(params->phContext)); - - os << ", "; - os << ".hDevice = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_kernel_launch_params_t *params) { + + + + os << ".hQueue = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); + + + + + os << ", "; + os << ".hKernel = "; + + ur::details::printPtr(os, + *(params->phKernel) + ); + + + + + os << ", "; + os << ".workDim = "; + + os << + *(params->pworkDim) + ; + + + + + os << ", "; + os << ".pGlobalWorkOffset = "; + + ur::details::printPtr(os, + *(params->ppGlobalWorkOffset) + ); + + + + + os << ", "; + os << ".pGlobalWorkSize = "; + + ur::details::printPtr(os, + *(params->ppGlobalWorkSize) + ); + + + + + os << ", "; + os << ".pLocalWorkSize = "; + + ur::details::printPtr(os, + *(params->ppLocalWorkSize) + ); + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - ur::details::printPtr(os, - *(params->phDevice)); + } + os << "}"; + } - os << ", "; - os << ".hImageMem = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printPtr(os, reinterpret_cast( - *(params->phImageMem))); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_bindless_images_unsampled_image_create_exp_params_t type +/// @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_bindless_images_unsampled_image_create_exp_params_t *params) { +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_events_wait_params_t *params) { + + + + os << ".hQueue = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); + + } + os << "}"; + } + + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - os << ".hContext = "; - ur::details::printPtr(os, - *(params->phContext)); + return os; +} - os << ", "; - os << ".hDevice = "; - ur::details::printPtr(os, - *(params->phDevice)); +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); + + } + os << "}"; + } - os << ", "; - os << ".hImageMem = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printPtr(os, reinterpret_cast( - *(params->phImageMem))); - os << ", "; - os << ".pImageFormat = "; + return os; +} - ur::details::printPtr(os, - *(params->ppImageFormat)); - os << ", "; - os << ".pImageDesc = "; +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); + + + + + os << ", "; + os << ".hBuffer = "; + + ur::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 = "; + + ur::details::printPtr(os, + *(params->ppDst) + ); + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - ur::details::printPtr(os, - *(params->ppImageDesc)); + } + os << "}"; + } - os << ", "; - os << ".phImage = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printPtr(os, - *(params->pphImage)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_bindless_images_sampled_image_create_exp_params_t type +/// @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_bindless_images_sampled_image_create_exp_params_t *params) { +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_mem_buffer_write_params_t *params) { + + + + os << ".hQueue = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); + + + + + os << ", "; + os << ".hBuffer = "; + + ur::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 = "; + + ur::details::printPtr(os, + *(params->ppSrc) + ); + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); + + } + os << "}"; + } - os << ".hContext = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printPtr(os, - *(params->phContext)); - os << ", "; - os << ".hDevice = "; + return os; +} - ur::details::printPtr(os, - *(params->phDevice)); - os << ", "; - os << ".hImageMem = "; +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); + + + + + os << ", "; + os << ".hBuffer = "; + + ur::details::printPtr(os, + *(params->phBuffer) + ); + + + + + os << ", "; + os << ".blockingRead = "; + + os << + *(params->pblockingRead) + ; + + + + + os << ", "; + os << ".bufferOrigin = "; + + os << + *(params->pbufferOrigin) + ; + + + + + os << ", "; + os << ".hostOrigin = "; + + os << + *(params->phostOrigin) + ; + + + + + os << ", "; + os << ".region = "; + + os << + *(params->pregion) + ; + + + + + os << ", "; + os << ".bufferRowPitch = "; + + os << + *(params->pbufferRowPitch) + ; + + + + + os << ", "; + os << ".bufferSlicePitch = "; + + os << + *(params->pbufferSlicePitch) + ; + + + + + os << ", "; + os << ".hostRowPitch = "; + + os << + *(params->phostRowPitch) + ; + + + + + os << ", "; + os << ".hostSlicePitch = "; + + os << + *(params->phostSlicePitch) + ; + + + + + os << ", "; + os << ".pDst = "; + + ur::details::printPtr(os, + *(params->ppDst) + ); + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - ur::details::printPtr(os, reinterpret_cast( - *(params->phImageMem))); + } + os << "}"; + } - os << ", "; - os << ".pImageFormat = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printPtr(os, - *(params->ppImageFormat)); - os << ", "; - os << ".pImageDesc = "; + return os; +} - ur::details::printPtr(os, - *(params->ppImageDesc)); - os << ", "; - os << ".hSampler = "; +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); + + + + + os << ", "; + os << ".hBuffer = "; + + ur::details::printPtr(os, + *(params->phBuffer) + ); + + + + + os << ", "; + os << ".blockingWrite = "; + + os << + *(params->pblockingWrite) + ; + + + + + os << ", "; + os << ".bufferOrigin = "; + + os << + *(params->pbufferOrigin) + ; + + + + + os << ", "; + os << ".hostOrigin = "; + + os << + *(params->phostOrigin) + ; + + + + + os << ", "; + os << ".region = "; + + os << + *(params->pregion) + ; + + + + + os << ", "; + os << ".bufferRowPitch = "; + + os << + *(params->pbufferRowPitch) + ; + + + + + os << ", "; + os << ".bufferSlicePitch = "; + + os << + *(params->pbufferSlicePitch) + ; + + + + + os << ", "; + os << ".hostRowPitch = "; + + os << + *(params->phostRowPitch) + ; + + + + + os << ", "; + os << ".hostSlicePitch = "; + + os << + *(params->phostSlicePitch) + ; + + + + + os << ", "; + os << ".pSrc = "; + + ur::details::printPtr(os, + *(params->ppSrc) + ); + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - ur::details::printPtr(os, - *(params->phSampler)); + } + os << "}"; + } - os << ", "; - os << ".phImage = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printPtr(os, - *(params->pphImage)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_bindless_images_image_copy_exp_params_t type +/// @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_bindless_images_image_copy_exp_params_t *params) { - - os << ".hQueue = "; - - ur::details::printPtr(os, - *(params->phQueue)); - - os << ", "; - os << ".pSrc = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_mem_buffer_copy_params_t *params) { + + + + os << ".hQueue = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); + + + + + os << ", "; + os << ".hBufferSrc = "; + + ur::details::printPtr(os, + *(params->phBufferSrc) + ); + + + + + os << ", "; + os << ".hBufferDst = "; + + ur::details::printPtr(os, + *(params->phBufferDst) + ); + + + + + os << ", "; + os << ".srcOffset = "; + + os << + *(params->psrcOffset) + ; + + + + + os << ", "; + os << ".dstOffset = "; + + os << + *(params->pdstOffset) + ; + + + + + os << ", "; + os << ".size = "; + + os << + *(params->psize) + ; + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - ur::details::printPtr(os, - *(params->ppSrc)); + } + os << "}"; + } - os << ", "; - os << ".pDst = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printPtr(os, - *(params->ppDst)); - os << ", "; - os << ".pSrcImageDesc = "; + return os; +} - ur::details::printPtr(os, - *(params->ppSrcImageDesc)); - os << ", "; - os << ".pDstImageDesc = "; +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); + + + + + os << ", "; + os << ".hBufferSrc = "; + + ur::details::printPtr(os, + *(params->phBufferSrc) + ); + + + + + os << ", "; + os << ".hBufferDst = "; + + ur::details::printPtr(os, + *(params->phBufferDst) + ); + + + + + os << ", "; + os << ".srcOrigin = "; + + os << + *(params->psrcOrigin) + ; + + + + + os << ", "; + os << ".dstOrigin = "; + + os << + *(params->pdstOrigin) + ; + + + + + os << ", "; + os << ".region = "; + + os << + *(params->pregion) + ; + + + + + os << ", "; + os << ".srcRowPitch = "; + + os << + *(params->psrcRowPitch) + ; + + + + + os << ", "; + os << ".srcSlicePitch = "; + + os << + *(params->psrcSlicePitch) + ; + + + + + os << ", "; + os << ".dstRowPitch = "; + + os << + *(params->pdstRowPitch) + ; + + + + + os << ", "; + os << ".dstSlicePitch = "; + + os << + *(params->pdstSlicePitch) + ; + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - ur::details::printPtr(os, - *(params->ppDstImageDesc)); + } + os << "}"; + } - os << ", "; - os << ".pSrcImageFormat = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printPtr(os, - *(params->ppSrcImageFormat)); - os << ", "; - os << ".pDstImageFormat = "; + return os; +} - ur::details::printPtr(os, - *(params->ppDstImageFormat)); - os << ", "; - os << ".pCopyRegion = "; +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); + + + + + os << ", "; + os << ".hBuffer = "; + + ur::details::printPtr(os, + *(params->phBuffer) + ); + + + + + os << ", "; + os << ".pPattern = "; + + ur::details::printPtr(os, + *(params->ppPattern) + ); + + + + + os << ", "; + os << ".patternSize = "; + + os << + *(params->ppatternSize) + ; + + + + + os << ", "; + os << ".offset = "; + + os << + *(params->poffset) + ; + + + + + os << ", "; + os << ".size = "; + + os << + *(params->psize) + ; + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - ur::details::printPtr(os, - *(params->ppCopyRegion)); + } + os << "}"; + } - os << ", "; - os << ".imageCopyFlags = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printFlag(os, - *(params->pimageCopyFlags)); - os << ", "; - os << ".numEventsInWaitList = "; + return os; +} - os << *(params->pnumEventsInWaitList); - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); + + + + + os << ", "; + os << ".hImage = "; + + ur::details::printPtr(os, + *(params->phImage) + ); + + + + + os << ", "; + os << ".blockingRead = "; + + os << + *(params->pblockingRead) + ; + + + + + os << ", "; + os << ".origin = "; + + os << + *(params->porigin) + ; + + + + + os << ", "; + os << ".region = "; + + os << + *(params->pregion) + ; + + + + + os << ", "; + os << ".rowPitch = "; + + os << + *(params->prowPitch) + ; + + + + + os << ", "; + os << ".slicePitch = "; + + os << + *(params->pslicePitch) + ; + + + + + os << ", "; + os << ".pDst = "; + + ur::details::printPtr(os, + *(params->ppDst) + ); + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { os << " {"; for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { if (i != 0) { os << ", "; } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); } os << "}"; - } + } - os << ", "; - os << ".phEvent = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printPtr(os, - *(params->pphEvent)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_bindless_images_image_get_info_exp_params_t type +/// @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_bindless_images_image_get_info_exp_params_t *params) { - - os << ".hContext = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_mem_image_write_params_t *params) { + + + + os << ".hQueue = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); + + + + + os << ", "; + os << ".hImage = "; + + ur::details::printPtr(os, + *(params->phImage) + ); + + + + + os << ", "; + os << ".blockingWrite = "; + + os << + *(params->pblockingWrite) + ; + + + + + os << ", "; + os << ".origin = "; + + os << + *(params->porigin) + ; + + + + + os << ", "; + os << ".region = "; + + os << + *(params->pregion) + ; + + + + + os << ", "; + os << ".rowPitch = "; + + os << + *(params->prowPitch) + ; + + + + + os << ", "; + os << ".slicePitch = "; + + os << + *(params->pslicePitch) + ; + + + + + os << ", "; + os << ".pSrc = "; + + ur::details::printPtr(os, + *(params->ppSrc) + ); + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - ur::details::printPtr(os, - *(params->phContext)); + } + os << "}"; + } - os << ", "; - os << ".hImageMem = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printPtr(os, reinterpret_cast( - *(params->phImageMem))); - os << ", "; - os << ".propName = "; + return os; +} - os << *(params->ppropName); - os << ", "; - os << ".pPropValue = "; +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); + + + + + os << ", "; + os << ".hImageSrc = "; + + ur::details::printPtr(os, + *(params->phImageSrc) + ); + + + + + os << ", "; + os << ".hImageDst = "; + + ur::details::printPtr(os, + *(params->phImageDst) + ); + + + + + os << ", "; + os << ".srcOrigin = "; + + os << + *(params->psrcOrigin) + ; + + + + + os << ", "; + os << ".dstOrigin = "; + + os << + *(params->pdstOrigin) + ; + + + + + os << ", "; + os << ".region = "; + + os << + *(params->pregion) + ; + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - ur::details::printPtr(os, - *(params->ppPropValue)); + } + os << "}"; + } - os << ", "; - os << ".pPropSizeRet = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printPtr(os, - *(params->ppPropSizeRet)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_bindless_images_mipmap_get_level_exp_params_t type +/// @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_bindless_images_mipmap_get_level_exp_params_t *params) { +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_mem_buffer_map_params_t *params) { + + + + os << ".hQueue = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); + + + + + os << ", "; + os << ".hBuffer = "; + + ur::details::printPtr(os, + *(params->phBuffer) + ); + + + + + os << ", "; + os << ".blockingMap = "; + + os << + *(params->pblockingMap) + ; + + + + + os << ", "; + os << ".mapFlags = "; + + ur::details::printFlag(os, + *(params->pmapFlags) + ); + + + + + os << ", "; + os << ".offset = "; + + os << + *(params->poffset) + ; + + + + + os << ", "; + os << ".size = "; + + os << + *(params->psize) + ; + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); + + } + os << "}"; + } - os << ".hContext = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printPtr(os, - *(params->phContext)); - os << ", "; - os << ".hDevice = "; + + + os << ", "; + os << ".ppRetMap = "; + + ur::details::printPtr(os, + *(params->pppRetMap) + ); - ur::details::printPtr(os, - *(params->phDevice)); - os << ", "; - os << ".hImageMem = "; + return os; +} - ur::details::printPtr(os, reinterpret_cast( - *(params->phImageMem))); - os << ", "; - os << ".mipmapLevel = "; +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); + + + + + os << ", "; + os << ".hMem = "; + + ur::details::printPtr(os, + *(params->phMem) + ); + + + + + os << ", "; + os << ".pMappedPtr = "; + + ur::details::printPtr(os, + *(params->ppMappedPtr) + ); + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - os << *(params->pmipmapLevel); + } + os << "}"; + } - os << ", "; - os << ".phImageMem = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printPtr(os, - *(params->pphImageMem)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_bindless_images_mipmap_free_exp_params_t type +/// @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_bindless_images_mipmap_free_exp_params_t *params) { - - os << ".hContext = "; - - ur::details::printPtr(os, - *(params->phContext)); - - os << ", "; - os << ".hDevice = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_usm_fill_params_t *params) { + + + + os << ".hQueue = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); + + + + + os << ", "; + os << ".pMem = "; + + ur::details::printPtr(os, + *(params->ppMem) + ); + + + + + os << ", "; + os << ".patternSize = "; + + os << + *(params->ppatternSize) + ; + + + + + os << ", "; + os << ".pPattern = "; + + ur::details::printPtr(os, + *(params->ppPattern) + ); + + + + + os << ", "; + os << ".size = "; + + os << + *(params->psize) + ; + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - ur::details::printPtr(os, - *(params->phDevice)); + } + os << "}"; + } - os << ", "; - os << ".hMem = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printPtr(os, reinterpret_cast( - *(params->phMem))); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_bindless_images_import_external_memory_exp_params_t type +/// @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_bindless_images_import_external_memory_exp_params_t *params) { - - os << ".hContext = "; - - ur::details::printPtr(os, - *(params->phContext)); - - os << ", "; - os << ".hDevice = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_usm_memcpy_params_t *params) { + + + + os << ".hQueue = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); + + + + + os << ", "; + os << ".blocking = "; + + os << + *(params->pblocking) + ; + + + + + os << ", "; + os << ".pDst = "; + + ur::details::printPtr(os, + *(params->ppDst) + ); + + + + + os << ", "; + os << ".pSrc = "; + + ur::details::printPtr(os, + *(params->ppSrc) + ); + + + + + os << ", "; + os << ".size = "; + + os << + *(params->psize) + ; + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - ur::details::printPtr(os, - *(params->phDevice)); + } + os << "}"; + } - os << ", "; - os << ".size = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - os << *(params->psize); - os << ", "; - os << ".memHandleType = "; + return os; +} - os << *(params->pmemHandleType); - os << ", "; - os << ".pExternalMemDesc = "; +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); + + + + + os << ", "; + os << ".pMem = "; + + ur::details::printPtr(os, + *(params->ppMem) + ); + + + + + os << ", "; + os << ".size = "; + + os << + *(params->psize) + ; + + + + + os << ", "; + os << ".flags = "; + + ur::details::printFlag(os, + *(params->pflags) + ); + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - ur::details::printPtr(os, - *(params->ppExternalMemDesc)); + } + os << "}"; + } - os << ", "; - os << ".phExternalMem = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printPtr(os, - *(params->pphExternalMem)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_bindless_images_map_external_array_exp_params_t type +/// @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_bindless_images_map_external_array_exp_params_t *params) { - - os << ".hContext = "; - - ur::details::printPtr(os, - *(params->phContext)); - - os << ", "; - os << ".hDevice = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_usm_advise_params_t *params) { + + + + os << ".hQueue = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); - ur::details::printPtr(os, - *(params->phDevice)); - os << ", "; - os << ".pImageFormat = "; + + + os << ", "; + os << ".pMem = "; + + ur::details::printPtr(os, + *(params->ppMem) + ); - ur::details::printPtr(os, - *(params->ppImageFormat)); - os << ", "; - os << ".pImageDesc = "; + + + os << ", "; + os << ".size = "; + + os << + *(params->psize) + ; - ur::details::printPtr(os, - *(params->ppImageDesc)); - os << ", "; - os << ".hExternalMem = "; + + + os << ", "; + os << ".advice = "; + + ur::details::printFlag(os, + *(params->padvice) + ); - ur::details::printPtr(os, - *(params->phExternalMem)); - os << ", "; - os << ".phImageMem = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printPtr(os, - *(params->pphImageMem)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_bindless_images_map_external_linear_memory_exp_params_t type +/// @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_bindless_images_map_external_linear_memory_exp_params_t *params) { - - os << ".hContext = "; - - ur::details::printPtr(os, - *(params->phContext)); - - os << ", "; - os << ".hDevice = "; - - ur::details::printPtr(os, - *(params->phDevice)); - - os << ", "; - os << ".offset = "; - - os << *(params->poffset); - - os << ", "; - os << ".size = "; - - os << *(params->psize); - - os << ", "; - os << ".hExternalMem = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_usm_fill_2d_params_t *params) { + + + + os << ".hQueue = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); + + + + + os << ", "; + os << ".pMem = "; + + ur::details::printPtr(os, + *(params->ppMem) + ); + + + + + os << ", "; + os << ".pitch = "; + + os << + *(params->ppitch) + ; + + + + + os << ", "; + os << ".patternSize = "; + + os << + *(params->ppatternSize) + ; + + + + + os << ", "; + os << ".pPattern = "; + + ur::details::printPtr(os, + *(params->ppPattern) + ); + + + + + os << ", "; + os << ".width = "; + + os << + *(params->pwidth) + ; + + + + + os << ", "; + os << ".height = "; + + os << + *(params->pheight) + ; + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - ur::details::printPtr(os, - *(params->phExternalMem)); + } + os << "}"; + } - os << ", "; - os << ".ppRetMem = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printPtr(os, - *(params->pppRetMem)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_bindless_images_release_external_memory_exp_params_t type +/// @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_bindless_images_release_external_memory_exp_params_t *params) { - - os << ".hContext = "; - - ur::details::printPtr(os, - *(params->phContext)); - - os << ", "; - os << ".hDevice = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_usm_memcpy_2d_params_t *params) { + + + + os << ".hQueue = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); + + + + + os << ", "; + os << ".blocking = "; + + os << + *(params->pblocking) + ; + + + + + os << ", "; + os << ".pDst = "; + + ur::details::printPtr(os, + *(params->ppDst) + ); + + + + + os << ", "; + os << ".dstPitch = "; + + os << + *(params->pdstPitch) + ; + + + + + os << ", "; + os << ".pSrc = "; + + ur::details::printPtr(os, + *(params->ppSrc) + ); + + + + + os << ", "; + os << ".srcPitch = "; + + os << + *(params->psrcPitch) + ; + + + + + os << ", "; + os << ".width = "; + + os << + *(params->pwidth) + ; + + + + + os << ", "; + os << ".height = "; + + os << + *(params->pheight) + ; + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - ur::details::printPtr(os, - *(params->phDevice)); + } + os << "}"; + } - os << ", "; - os << ".hExternalMem = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printPtr(os, - *(params->phExternalMem)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_bindless_images_import_external_semaphore_exp_params_t type +/// @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_bindless_images_import_external_semaphore_exp_params_t *params) { - - os << ".hContext = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_device_global_variable_write_params_t *params) { + + + + os << ".hQueue = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); + + + + + os << ", "; + os << ".hProgram = "; + + ur::details::printPtr(os, + *(params->phProgram) + ); + + + + + os << ", "; + os << ".name = "; + + ur::details::printPtr(os, + *(params->pname) + ); + + + + + os << ", "; + os << ".blockingWrite = "; + + os << + *(params->pblockingWrite) + ; + + + + + os << ", "; + os << ".count = "; + + os << + *(params->pcount) + ; + + + + + os << ", "; + os << ".offset = "; + + os << + *(params->poffset) + ; + + + + + os << ", "; + os << ".pSrc = "; + + ur::details::printPtr(os, + *(params->ppSrc) + ); + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - ur::details::printPtr(os, - *(params->phContext)); + } + os << "}"; + } - os << ", "; - os << ".hDevice = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printPtr(os, - *(params->phDevice)); - os << ", "; - os << ".semHandleType = "; + return os; +} - os << *(params->psemHandleType); - os << ", "; - os << ".pExternalSemaphoreDesc = "; +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); + + + + + os << ", "; + os << ".hProgram = "; + + ur::details::printPtr(os, + *(params->phProgram) + ); + + + + + os << ", "; + os << ".name = "; + + ur::details::printPtr(os, + *(params->pname) + ); + + + + + os << ", "; + os << ".blockingRead = "; + + os << + *(params->pblockingRead) + ; + + + + + os << ", "; + os << ".count = "; + + os << + *(params->pcount) + ; + + + + + os << ", "; + os << ".offset = "; + + os << + *(params->poffset) + ; + + + + + os << ", "; + os << ".pDst = "; + + ur::details::printPtr(os, + *(params->ppDst) + ); + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - ur::details::printPtr(os, - *(params->ppExternalSemaphoreDesc)); + } + os << "}"; + } - os << ", "; - os << ".phExternalSemaphore = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printPtr(os, - *(params->pphExternalSemaphore)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_bindless_images_release_external_semaphore_exp_params_t type +/// @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_bindless_images_release_external_semaphore_exp_params_t *params) { - - os << ".hContext = "; - - ur::details::printPtr(os, - *(params->phContext)); - - os << ", "; - os << ".hDevice = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_read_host_pipe_params_t *params) { + + + + os << ".hQueue = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); + + + + + os << ", "; + os << ".hProgram = "; + + ur::details::printPtr(os, + *(params->phProgram) + ); + + + + + os << ", "; + os << ".pipe_symbol = "; + + ur::details::printPtr(os, + *(params->ppipe_symbol) + ); + + + + + os << ", "; + os << ".blocking = "; + + os << + *(params->pblocking) + ; + + + + + os << ", "; + os << ".pDst = "; + + ur::details::printPtr(os, + *(params->ppDst) + ); + + + + + os << ", "; + os << ".size = "; + + os << + *(params->psize) + ; + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - ur::details::printPtr(os, - *(params->phDevice)); + } + os << "}"; + } - os << ", "; - os << ".hExternalSemaphore = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printPtr(os, - *(params->phExternalSemaphore)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_bindless_images_wait_external_semaphore_exp_params_t type +/// @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_bindless_images_wait_external_semaphore_exp_params_t *params) { - - os << ".hQueue = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_write_host_pipe_params_t *params) { + + + + os << ".hQueue = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); + + + + + os << ", "; + os << ".hProgram = "; + + ur::details::printPtr(os, + *(params->phProgram) + ); + + + + + os << ", "; + os << ".pipe_symbol = "; + + ur::details::printPtr(os, + *(params->ppipe_symbol) + ); + + + + + os << ", "; + os << ".blocking = "; + + os << + *(params->pblocking) + ; + + + + + os << ", "; + os << ".pSrc = "; + + ur::details::printPtr(os, + *(params->ppSrc) + ); + + + + + os << ", "; + os << ".size = "; + + os << + *(params->psize) + ; + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - ur::details::printPtr(os, - *(params->phQueue)); + } + os << "}"; + } - os << ", "; - os << ".hSemaphore = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printPtr(os, - *(params->phSemaphore)); - os << ", "; - os << ".hasWaitValue = "; + return os; +} - os << *(params->phasWaitValue); - os << ", "; - os << ".waitValue = "; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_enqueue_kernel_launch_custom_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_kernel_launch_custom_exp_params_t *params) { + + + + os << ".hQueue = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); + + + + + os << ", "; + os << ".hKernel = "; + + ur::details::printPtr(os, + *(params->phKernel) + ); + + + + + os << ", "; + os << ".workDim = "; + + os << + *(params->pworkDim) + ; + + + + + os << ", "; + os << ".pGlobalWorkOffset = "; + + ur::details::printPtr(os, + *(params->ppGlobalWorkOffset) + ); + + + + + os << ", "; + os << ".pGlobalWorkSize = "; + + ur::details::printPtr(os, + *(params->ppGlobalWorkSize) + ); + + + + + os << ", "; + os << ".pLocalWorkSize = "; + + ur::details::printPtr(os, + *(params->ppLocalWorkSize) + ); + + + + + os << ", "; + os << ".numPropsInLaunchPropList = "; + + os << + *(params->pnumPropsInLaunchPropList) + ; + + + + + os << ", "; + os << ".launchPropList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->plaunchPropList))); + if (*(params->plaunchPropList) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumPropsInLaunchPropList; ++i) { + if (i != 0) { + os << ", "; + } + + os << + (*(params->plaunchPropList))[i] + ; - os << *(params->pwaitValue); + } + os << "}"; + } - os << ", "; - os << ".numEventsInWaitList = "; + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; - os << *(params->pnumEventsInWaitList); - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { os << " {"; for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { if (i != 0) { os << ", "; } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); } os << "}"; - } + } - os << ", "; - os << ".phEvent = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printPtr(os, - *(params->pphEvent)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_bindless_images_signal_external_semaphore_exp_params_t type +/// @brief Print operator for the ur_enqueue_events_wait_with_barrier_ext_params_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_bindless_images_signal_external_semaphore_exp_params_t *params) { - - os << ".hQueue = "; - - ur::details::printPtr(os, - *(params->phQueue)); - - os << ", "; - os << ".hSemaphore = "; - - ur::details::printPtr(os, - *(params->phSemaphore)); - - os << ", "; - os << ".hasSignalValue = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_events_wait_with_barrier_ext_params_t *params) { + + + + os << ".hQueue = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); + + + + + os << ", "; + os << ".pProperties = "; + + ur::details::printPtr(os, + *(params->ppProperties) + ); + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - os << *(params->phasSignalValue); + } + os << "}"; + } - os << ", "; - os << ".signalValue = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - os << *(params->psignalValue); - os << ", "; - os << ".numEventsInWaitList = "; + return os; +} - os << *(params->pnumEventsInWaitList); - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); + + + + + os << ", "; + os << ".hKernel = "; + + ur::details::printPtr(os, + *(params->phKernel) + ); + + + + + os << ", "; + os << ".workDim = "; + + os << + *(params->pworkDim) + ; + + + + + os << ", "; + os << ".pGlobalWorkOffset = "; + + ur::details::printPtr(os, + *(params->ppGlobalWorkOffset) + ); + + + + + os << ", "; + os << ".pGlobalWorkSize = "; + + ur::details::printPtr(os, + *(params->ppGlobalWorkSize) + ); + + + + + os << ", "; + os << ".pLocalWorkSize = "; + + ur::details::printPtr(os, + *(params->ppLocalWorkSize) + ); + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { os << " {"; for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { if (i != 0) { os << ", "; } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); } os << "}"; - } + } - os << ", "; - os << ".phEvent = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printPtr(os, - *(params->pphEvent)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_usm_host_alloc_params_t type +/// @brief Print operator for the ur_enqueue_timestamp_recording_exp_params_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_host_alloc_params_t *params) { +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_timestamp_recording_exp_params_t *params) { + + + + os << ".hQueue = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); + + + + + os << ", "; + os << ".blocking = "; + + os << + *(params->pblocking) + ; + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - os << ".hContext = "; + } + os << "}"; + } + + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printPtr(os, - *(params->phContext)); - os << ", "; - os << ".pUSMDesc = "; + return os; +} - ur::details::printPtr(os, - *(params->ppUSMDesc)); - os << ", "; - os << ".pool = "; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_enqueue_native_command_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_enqueue_native_command_exp_params_t *params) { + + + + os << ".hQueue = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); + + + + + os << ", "; + os << ".pfnNativeEnqueue = "; + + os << reinterpret_cast( + *(params->ppfnNativeEnqueue) + ); + + + + + os << ", "; + os << ".data = "; + + ur::details::printPtr(os, + *(params->pdata) + ); + + + + + os << ", "; + os << ".numMemsInMemList = "; + + os << + *(params->pnumMemsInMemList) + ; + + + + + os << ", "; + os << ".phMemList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphMemList))); + if (*(params->pphMemList) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumMemsInMemList; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphMemList))[i] + ); - ur::details::printPtr(os, - *(params->ppool)); + } + os << "}"; + } - os << ", "; - os << ".size = "; + + + os << ", "; + os << ".pProperties = "; + + ur::details::printPtr(os, + *(params->ppProperties) + ); + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - os << *(params->psize); + } + os << "}"; + } - os << ", "; - os << ".ppMem = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printPtr(os, - *(params->pppMem)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_usm_device_alloc_params_t type +/// @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_usm_device_alloc_params_t *params) { +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_bindless_images_unsampled_image_handle_destroy_exp_params_t *params) { + + + + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - os << ".hContext = "; - ur::details::printPtr(os, - *(params->phContext)); + + + os << ", "; + os << ".hDevice = "; + + ur::details::printPtr(os, + *(params->phDevice) + ); - os << ", "; - os << ".hDevice = "; - ur::details::printPtr(os, - *(params->phDevice)); + + + os << ", "; + os << ".hImage = "; + + ur::details::printPtr(os, reinterpret_cast( + *(params->phImage) + )); - os << ", "; - os << ".pUSMDesc = "; - ur::details::printPtr(os, - *(params->ppUSMDesc)); + return os; +} - os << ", "; - os << ".pool = "; - ur::details::printPtr(os, - *(params->ppool)); +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); + - os << ", "; - os << ".size = "; + + + os << ", "; + os << ".hDevice = "; + + ur::details::printPtr(os, + *(params->phDevice) + ); - os << *(params->psize); - os << ", "; - os << ".ppMem = "; + + + os << ", "; + os << ".hImage = "; + + ur::details::printPtr(os, reinterpret_cast( + *(params->phImage) + )); - ur::details::printPtr(os, - *(params->pppMem)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_usm_shared_alloc_params_t type +/// @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_usm_shared_alloc_params_t *params) { - - os << ".hContext = "; - - ur::details::printPtr(os, - *(params->phContext)); - - os << ", "; - os << ".hDevice = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_bindless_images_image_allocate_exp_params_t *params) { + + + + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - ur::details::printPtr(os, - *(params->phDevice)); - os << ", "; - os << ".pUSMDesc = "; + + + os << ", "; + os << ".hDevice = "; + + ur::details::printPtr(os, + *(params->phDevice) + ); - ur::details::printPtr(os, - *(params->ppUSMDesc)); - os << ", "; - os << ".pool = "; + + + os << ", "; + os << ".pImageFormat = "; + + ur::details::printPtr(os, + *(params->ppImageFormat) + ); - ur::details::printPtr(os, - *(params->ppool)); - os << ", "; - os << ".size = "; + + + os << ", "; + os << ".pImageDesc = "; + + ur::details::printPtr(os, + *(params->ppImageDesc) + ); - os << *(params->psize); - os << ", "; - os << ".ppMem = "; + + + os << ", "; + os << ".phImageMem = "; + + ur::details::printPtr(os, + *(params->pphImageMem) + ); - ur::details::printPtr(os, - *(params->pppMem)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_usm_free_params_t type +/// @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_usm_free_params_t *params) { +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_bindless_images_image_free_exp_params_t *params) { + + + + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); + - os << ".hContext = "; + + + os << ", "; + os << ".hDevice = "; + + ur::details::printPtr(os, + *(params->phDevice) + ); - ur::details::printPtr(os, - *(params->phContext)); - os << ", "; - os << ".pMem = "; + + + os << ", "; + os << ".hImageMem = "; + + ur::details::printPtr(os, reinterpret_cast( + *(params->phImageMem) + )); - ur::details::printPtr(os, - *(params->ppMem)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_usm_get_mem_alloc_info_params_t type +/// @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_usm_get_mem_alloc_info_params_t *params) { +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_bindless_images_unsampled_image_create_exp_params_t *params) { + + + + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - os << ".hContext = "; - ur::details::printPtr(os, - *(params->phContext)); + + + os << ", "; + os << ".hDevice = "; + + ur::details::printPtr(os, + *(params->phDevice) + ); - os << ", "; - os << ".pMem = "; - ur::details::printPtr(os, - *(params->ppMem)); + + + os << ", "; + os << ".hImageMem = "; + + ur::details::printPtr(os, reinterpret_cast( + *(params->phImageMem) + )); - os << ", "; - os << ".propName = "; - os << *(params->ppropName); + + + os << ", "; + os << ".pImageFormat = "; + + ur::details::printPtr(os, + *(params->ppImageFormat) + ); - os << ", "; - os << ".propSize = "; - os << *(params->ppropSize); + + + os << ", "; + os << ".pImageDesc = "; + + ur::details::printPtr(os, + *(params->ppImageDesc) + ); - os << ", "; - os << ".pPropValue = "; - ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); - os << ", "; - os << ".pPropSizeRet = "; + + + os << ", "; + os << ".phImage = "; + + ur::details::printPtr(os, + *(params->pphImage) + ); - ur::details::printPtr(os, - *(params->ppPropSizeRet)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_usm_pool_create_params_t type +/// @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_usm_pool_create_params_t *params) { +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_bindless_images_sampled_image_create_exp_params_t *params) { + + + + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - os << ".hContext = "; - ur::details::printPtr(os, - *(params->phContext)); + + + os << ", "; + os << ".hDevice = "; + + ur::details::printPtr(os, + *(params->phDevice) + ); - os << ", "; - os << ".pPoolDesc = "; - ur::details::printPtr(os, - *(params->ppPoolDesc)); + + + os << ", "; + os << ".hImageMem = "; + + ur::details::printPtr(os, reinterpret_cast( + *(params->phImageMem) + )); - os << ", "; - os << ".ppPool = "; - ur::details::printPtr(os, - *(params->pppPool)); + + + os << ", "; + os << ".pImageFormat = "; + + ur::details::printPtr(os, + *(params->ppImageFormat) + ); - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 << ", "; + os << ".pImageDesc = "; + + ur::details::printPtr(os, + *(params->ppImageDesc) + ); + - os << ".pPool = "; + + + os << ", "; + os << ".hSampler = "; + + ur::details::printPtr(os, + *(params->phSampler) + ); + + + + + os << ", "; + os << ".phImage = "; + + ur::details::printPtr(os, + *(params->pphImage) + ); - ur::details::printPtr(os, - *(params->ppPool)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_usm_pool_release_params_t type +/// @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_usm_pool_release_params_t *params) { +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_bindless_images_image_copy_exp_params_t *params) { + + + + os << ".hQueue = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); + + + + + os << ", "; + os << ".pSrc = "; + + ur::details::printPtr(os, + *(params->ppSrc) + ); + + + + + os << ", "; + os << ".pDst = "; + + ur::details::printPtr(os, + *(params->ppDst) + ); + + + + + os << ", "; + os << ".pSrcImageDesc = "; + + ur::details::printPtr(os, + *(params->ppSrcImageDesc) + ); + + + + + os << ", "; + os << ".pDstImageDesc = "; + + ur::details::printPtr(os, + *(params->ppDstImageDesc) + ); + + + + + os << ", "; + os << ".pSrcImageFormat = "; + + ur::details::printPtr(os, + *(params->ppSrcImageFormat) + ); + + + + + os << ", "; + os << ".pDstImageFormat = "; + + ur::details::printPtr(os, + *(params->ppDstImageFormat) + ); + + + + + os << ", "; + os << ".pCopyRegion = "; + + ur::details::printPtr(os, + *(params->ppCopyRegion) + ); + + + + + os << ", "; + os << ".imageCopyFlags = "; + + ur::details::printFlag(os, + *(params->pimageCopyFlags) + ); + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); + + } + os << "}"; + } - os << ".pPool = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printPtr(os, - *(params->ppPool)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_usm_pool_get_info_params_t type +/// @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_usm_pool_get_info_params_t *params) { +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_bindless_images_image_get_info_exp_params_t *params) { + + + + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - os << ".hPool = "; - ur::details::printPtr(os, - *(params->phPool)); + + + os << ", "; + os << ".hImageMem = "; + + ur::details::printPtr(os, reinterpret_cast( + *(params->phImageMem) + )); - os << ", "; - os << ".propName = "; - os << *(params->ppropName); + + + os << ", "; + os << ".propName = "; + + os << + *(params->ppropName) + ; - os << ", "; - os << ".propSize = "; - os << *(params->ppropSize); + + + os << ", "; + os << ".pPropValue = "; + + ur::details::printPtr(os, + *(params->ppPropValue) + ); - os << ", "; - os << ".pPropValue = "; - ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); - os << ", "; - os << ".pPropSizeRet = "; + + + os << ", "; + os << ".pPropSizeRet = "; + + ur::details::printPtr(os, + *(params->ppPropSizeRet) + ); - ur::details::printPtr(os, - *(params->ppPropSizeRet)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_usm_pitched_alloc_exp_params_t type +/// @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_usm_pitched_alloc_exp_params_t *params) { - - os << ".hContext = "; - - ur::details::printPtr(os, - *(params->phContext)); - - os << ", "; - os << ".hDevice = "; - - ur::details::printPtr(os, - *(params->phDevice)); - - os << ", "; - os << ".pUSMDesc = "; - - ur::details::printPtr(os, - *(params->ppUSMDesc)); - - os << ", "; - os << ".pool = "; - - ur::details::printPtr(os, - *(params->ppool)); - - os << ", "; - os << ".widthInBytes = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_bindless_images_mipmap_get_level_exp_params_t *params) { + + + + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - os << *(params->pwidthInBytes); - os << ", "; - os << ".height = "; + + + os << ", "; + os << ".hDevice = "; + + ur::details::printPtr(os, + *(params->phDevice) + ); - os << *(params->pheight); - os << ", "; - os << ".elementSizeBytes = "; + + + os << ", "; + os << ".hImageMem = "; + + ur::details::printPtr(os, reinterpret_cast( + *(params->phImageMem) + )); - os << *(params->pelementSizeBytes); - os << ", "; - os << ".ppMem = "; + + + os << ", "; + os << ".mipmapLevel = "; + + os << + *(params->pmipmapLevel) + ; - ur::details::printPtr(os, - *(params->pppMem)); - os << ", "; - os << ".pResultPitch = "; + + + os << ", "; + os << ".phImageMem = "; + + ur::details::printPtr(os, + *(params->pphImageMem) + ); - ur::details::printPtr(os, - *(params->ppResultPitch)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_usm_import_exp_params_t type +/// @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_usm_import_exp_params_t *params) { - - os << ".hContext = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_bindless_images_mipmap_free_exp_params_t *params) { + + + + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - ur::details::printPtr(os, - *(params->phContext)); - os << ", "; - os << ".pMem = "; + + + os << ", "; + os << ".hDevice = "; + + ur::details::printPtr(os, + *(params->phDevice) + ); - ur::details::printPtr(os, - *(params->ppMem)); - os << ", "; - os << ".size = "; + + + os << ", "; + os << ".hMem = "; + + ur::details::printPtr(os, reinterpret_cast( + *(params->phMem) + )); - os << *(params->psize); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_usm_release_exp_params_t type +/// @brief Print operator for the ur_bindless_images_import_external_memory_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 = "; - - ur::details::printPtr(os, - *(params->phContext)); - - os << ", "; - os << ".pMem = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_bindless_images_import_external_memory_exp_params_t *params) { + + + + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - ur::details::printPtr(os, - *(params->ppMem)); - return os; -} + + + os << ", "; + os << ".hDevice = "; + + ur::details::printPtr(os, + *(params->phDevice) + ); -/////////////////////////////////////////////////////////////////////////////// -/// @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 = "; + + + os << ", "; + os << ".size = "; + + os << + *(params->psize) + ; - ur::details::printPtr(os, - *(params->phContext)); - os << ", "; - os << ".hDevice = "; + + + os << ", "; + os << ".memHandleType = "; + + os << + *(params->pmemHandleType) + ; - ur::details::printPtr(os, - *(params->phDevice)); - os << ", "; - os << ".pCommandBufferDesc = "; + + + os << ", "; + os << ".pExternalMemDesc = "; + + ur::details::printPtr(os, + *(params->ppExternalMemDesc) + ); - ur::details::printPtr(os, - *(params->ppCommandBufferDesc)); - os << ", "; - os << ".phCommandBuffer = "; + + + os << ", "; + os << ".phExternalMem = "; + + ur::details::printPtr(os, + *(params->pphExternalMem) + ); - ur::details::printPtr(os, - *(params->pphCommandBuffer)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_command_buffer_retain_exp_params_t type +/// @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_command_buffer_retain_exp_params_t *params) { +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_bindless_images_map_external_array_exp_params_t *params) { + + + + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - os << ".hCommandBuffer = "; - ur::details::printPtr(os, - *(params->phCommandBuffer)); + + + os << ", "; + os << ".hDevice = "; + + ur::details::printPtr(os, + *(params->phDevice) + ); - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 << ", "; + os << ".pImageFormat = "; + + ur::details::printPtr(os, + *(params->ppImageFormat) + ); - os << ".hCommandBuffer = "; - ur::details::printPtr(os, - *(params->phCommandBuffer)); + + + os << ", "; + os << ".pImageDesc = "; + + ur::details::printPtr(os, + *(params->ppImageDesc) + ); - return os; -} -/////////////////////////////////////////////////////////////////////////////// -/// @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 << ".hExternalMem = "; + + ur::details::printPtr(os, + *(params->phExternalMem) + ); + - os << ".hCommandBuffer = "; + + + os << ", "; + os << ".phImageMem = "; + + ur::details::printPtr(os, + *(params->pphImageMem) + ); - ur::details::printPtr(os, - *(params->phCommandBuffer)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_command_buffer_append_kernel_launch_exp_params_t type +/// @brief Print operator for the ur_bindless_images_map_external_linear_memory_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) { +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_bindless_images_map_external_linear_memory_exp_params_t *params) { + + + + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - os << ".hCommandBuffer = "; - ur::details::printPtr(os, - *(params->phCommandBuffer)); + + + os << ", "; + os << ".hDevice = "; + + ur::details::printPtr(os, + *(params->phDevice) + ); - os << ", "; - os << ".hKernel = "; - ur::details::printPtr(os, - *(params->phKernel)); + + + os << ", "; + os << ".offset = "; + + os << + *(params->poffset) + ; - os << ", "; - os << ".workDim = "; - os << *(params->pworkDim); + + + os << ", "; + os << ".size = "; + + os << + *(params->psize) + ; - os << ", "; - os << ".pGlobalWorkOffset = "; - ur::details::printPtr(os, - *(params->ppGlobalWorkOffset)); + + + os << ", "; + os << ".hExternalMem = "; + + ur::details::printPtr(os, + *(params->phExternalMem) + ); - os << ", "; - os << ".pGlobalWorkSize = "; - ur::details::printPtr(os, - *(params->ppGlobalWorkSize)); + + + os << ", "; + os << ".ppRetMem = "; + + ur::details::printPtr(os, + *(params->pppRetMem) + ); - os << ", "; - os << ".pLocalWorkSize = "; - ur::details::printPtr(os, - *(params->ppLocalWorkSize)); + return os; +} - os << ", "; - os << ".numKernelAlternatives = "; - os << *(params->pnumKernelAlternatives); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_bindless_images_release_external_memory_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_bindless_images_release_external_memory_exp_params_t *params) { + + + + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - os << ", "; - os << ".phKernelAlternatives = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphKernelAlternatives))); - if (*(params->pphKernelAlternatives) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumKernelAlternatives; ++i) { - if (i != 0) { - os << ", "; - } - ur::details::printPtr(os, - (*(params->pphKernelAlternatives))[i]); - } - os << "}"; - } + + + os << ", "; + os << ".hDevice = "; + + ur::details::printPtr(os, + *(params->phDevice) + ); - os << ", "; - os << ".numSyncPointsInWaitList = "; - os << *(params->pnumSyncPointsInWaitList); + + + os << ", "; + os << ".hExternalMem = "; + + ur::details::printPtr(os, + *(params->phExternalMem) + ); - os << ", "; - os << ".pSyncPointWaitList = "; - ur::details::printPtr(os, - *(params->ppSyncPointWaitList)); + return os; +} - os << ", "; - os << ".numEventsInWaitList = "; - os << *(params->pnumEventsInWaitList); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_bindless_images_import_external_semaphore_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_bindless_images_import_external_semaphore_exp_params_t *params) { + + + + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { - if (i != 0) { - os << ", "; - } - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); - } - os << "}"; - } + + + os << ", "; + os << ".hDevice = "; + + ur::details::printPtr(os, + *(params->phDevice) + ); + - os << ", "; - os << ".pSyncPoint = "; + + + os << ", "; + os << ".semHandleType = "; + + os << + *(params->psemHandleType) + ; - ur::details::printPtr(os, - *(params->ppSyncPoint)); - os << ", "; - os << ".phEvent = "; + + + os << ", "; + os << ".pExternalSemaphoreDesc = "; + + ur::details::printPtr(os, + *(params->ppExternalSemaphoreDesc) + ); - ur::details::printPtr(os, - *(params->pphEvent)); - os << ", "; - os << ".phCommand = "; + + + os << ", "; + os << ".phExternalSemaphore = "; + + ur::details::printPtr(os, + *(params->pphExternalSemaphore) + ); - ur::details::printPtr(os, - *(params->pphCommand)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_command_buffer_append_usm_memcpy_exp_params_t type +/// @brief Print operator for the ur_bindless_images_release_external_semaphore_exp_params_t type /// @returns /// std::ostream & -inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_command_buffer_append_usm_memcpy_exp_params_t *params) { - - os << ".hCommandBuffer = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_bindless_images_release_external_semaphore_exp_params_t *params) { + + + + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - ur::details::printPtr(os, - *(params->phCommandBuffer)); - os << ", "; - os << ".pDst = "; + + + os << ", "; + os << ".hDevice = "; + + ur::details::printPtr(os, + *(params->phDevice) + ); - ur::details::printPtr(os, - *(params->ppDst)); - os << ", "; - os << ".pSrc = "; + + + os << ", "; + os << ".hExternalSemaphore = "; + + ur::details::printPtr(os, + *(params->phExternalSemaphore) + ); - ur::details::printPtr(os, - *(params->ppSrc)); - os << ", "; - os << ".size = "; + return os; +} - os << *(params->psize); - os << ", "; - os << ".numSyncPointsInWaitList = "; +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ".hQueue = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); + + + + + os << ", "; + os << ".hSemaphore = "; + + ur::details::printPtr(os, + *(params->phSemaphore) + ); + + + + + os << ", "; + os << ".hasWaitValue = "; + + os << + *(params->phasWaitValue) + ; + + + + + os << ", "; + os << ".waitValue = "; + + os << + *(params->pwaitValue) + ; + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - os << *(params->pnumSyncPointsInWaitList); + } + os << "}"; + } - os << ", "; - os << ".pSyncPointWaitList = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printPtr(os, - *(params->ppSyncPointWaitList)); - os << ", "; - os << ".numEventsInWaitList = "; + return os; +} - os << *(params->pnumEventsInWaitList); - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_bindless_images_signal_external_semaphore_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_bindless_images_signal_external_semaphore_exp_params_t *params) { + + + + os << ".hQueue = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); + + + + + os << ", "; + os << ".hSemaphore = "; + + ur::details::printPtr(os, + *(params->phSemaphore) + ); + + + + + os << ", "; + os << ".hasSignalValue = "; + + os << + *(params->phasSignalValue) + ; + + + + + os << ", "; + os << ".signalValue = "; + + os << + *(params->psignalValue) + ; + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { os << " {"; for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { if (i != 0) { os << ", "; } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); } os << "}"; - } - - os << ", "; - os << ".pSyncPoint = "; - - ur::details::printPtr(os, - *(params->ppSyncPoint)); - - os << ", "; - os << ".phEvent = "; - - ur::details::printPtr(os, - *(params->pphEvent)); + } - os << ", "; - os << ".phCommand = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printPtr(os, - *(params->pphCommand)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_command_buffer_append_usm_fill_exp_params_t type +/// @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_command_buffer_append_usm_fill_exp_params_t *params) { - - os << ".hCommandBuffer = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_host_alloc_params_t *params) { + + + + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - ur::details::printPtr(os, - *(params->phCommandBuffer)); - os << ", "; - os << ".pMemory = "; + + + os << ", "; + os << ".pUSMDesc = "; + + ur::details::printPtr(os, + *(params->ppUSMDesc) + ); - ur::details::printPtr(os, - *(params->ppMemory)); - os << ", "; - os << ".pPattern = "; + + + os << ", "; + os << ".pool = "; + + ur::details::printPtr(os, + *(params->ppool) + ); - ur::details::printPtr(os, - *(params->ppPattern)); - os << ", "; - os << ".patternSize = "; + + + os << ", "; + os << ".size = "; + + os << + *(params->psize) + ; - os << *(params->ppatternSize); - os << ", "; - os << ".size = "; + + + os << ", "; + os << ".ppMem = "; + + ur::details::printPtr(os, + *(params->pppMem) + ); - os << *(params->psize); - os << ", "; - os << ".numSyncPointsInWaitList = "; + return os; +} - os << *(params->pnumSyncPointsInWaitList); - os << ", "; - os << ".pSyncPointWaitList = "; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_usm_device_alloc_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_device_alloc_params_t *params) { + + + + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - ur::details::printPtr(os, - *(params->ppSyncPointWaitList)); - os << ", "; - os << ".numEventsInWaitList = "; + + + os << ", "; + os << ".hDevice = "; + + ur::details::printPtr(os, + *(params->phDevice) + ); - os << *(params->pnumEventsInWaitList); - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { - if (i != 0) { - os << ", "; - } + + + os << ", "; + os << ".pUSMDesc = "; + + ur::details::printPtr(os, + *(params->ppUSMDesc) + ); - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); - } - os << "}"; - } - os << ", "; - os << ".pSyncPoint = "; + + + os << ", "; + os << ".pool = "; + + ur::details::printPtr(os, + *(params->ppool) + ); - ur::details::printPtr(os, - *(params->ppSyncPoint)); - os << ", "; - os << ".phEvent = "; + + + os << ", "; + os << ".size = "; + + os << + *(params->psize) + ; - ur::details::printPtr(os, - *(params->pphEvent)); - os << ", "; - os << ".phCommand = "; + + + os << ", "; + os << ".ppMem = "; + + ur::details::printPtr(os, + *(params->pppMem) + ); - ur::details::printPtr(os, - *(params->pphCommand)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_command_buffer_append_mem_buffer_copy_exp_params_t type +/// @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_command_buffer_append_mem_buffer_copy_exp_params_t *params) { +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_shared_alloc_params_t *params) { + + + + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); + + + + + os << ", "; + os << ".hDevice = "; + + ur::details::printPtr(os, + *(params->phDevice) + ); + + + + + os << ", "; + os << ".pUSMDesc = "; + + ur::details::printPtr(os, + *(params->ppUSMDesc) + ); - os << ".hCommandBuffer = "; - ur::details::printPtr(os, - *(params->phCommandBuffer)); + + + os << ", "; + os << ".pool = "; + + ur::details::printPtr(os, + *(params->ppool) + ); - os << ", "; - os << ".hSrcMem = "; - ur::details::printPtr(os, - *(params->phSrcMem)); + + + os << ", "; + os << ".size = "; + + os << + *(params->psize) + ; - os << ", "; - os << ".hDstMem = "; - ur::details::printPtr(os, - *(params->phDstMem)); + + + os << ", "; + os << ".ppMem = "; + + ur::details::printPtr(os, + *(params->pppMem) + ); - os << ", "; - os << ".srcOffset = "; - os << *(params->psrcOffset); + return os; +} - os << ", "; - os << ".dstOffset = "; - os << *(params->pdstOffset); +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - os << ", "; - os << ".size = "; - os << *(params->psize); + + + os << ", "; + os << ".pMem = "; + + ur::details::printPtr(os, + *(params->ppMem) + ); - os << ", "; - os << ".numSyncPointsInWaitList = "; - os << *(params->pnumSyncPointsInWaitList); + return os; +} - os << ", "; - os << ".pSyncPointWaitList = "; - ur::details::printPtr(os, - *(params->ppSyncPointWaitList)); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_usm_get_mem_alloc_info_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_get_mem_alloc_info_params_t *params) { + + + + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - os << ", "; - os << ".numEventsInWaitList = "; - os << *(params->pnumEventsInWaitList); + + + os << ", "; + os << ".pMem = "; + + ur::details::printPtr(os, + *(params->ppMem) + ); - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { - if (i != 0) { - os << ", "; - } - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); - } - os << "}"; - } + + + os << ", "; + os << ".propName = "; + + os << + *(params->ppropName) + ; - os << ", "; - os << ".pSyncPoint = "; - ur::details::printPtr(os, - *(params->ppSyncPoint)); + + + os << ", "; + os << ".propSize = "; + + os << + *(params->ppropSize) + ; - os << ", "; - os << ".phEvent = "; - ur::details::printPtr(os, - *(params->pphEvent)); + + + os << ", "; + os << ".pPropValue = "; + ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); - os << ", "; - os << ".phCommand = "; + + + os << ", "; + os << ".pPropSizeRet = "; + + ur::details::printPtr(os, + *(params->ppPropSizeRet) + ); - ur::details::printPtr(os, - *(params->pphCommand)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_command_buffer_append_mem_buffer_write_exp_params_t type +/// @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_command_buffer_append_mem_buffer_write_exp_params_t *params) { +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_pool_create_params_t *params) { + + + + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - os << ".hCommandBuffer = "; - ur::details::printPtr(os, - *(params->phCommandBuffer)); + + + os << ", "; + os << ".pPoolDesc = "; + + ur::details::printPtr(os, + *(params->ppPoolDesc) + ); - os << ", "; - os << ".hBuffer = "; - ur::details::printPtr(os, - *(params->phBuffer)); + + + os << ", "; + os << ".ppPool = "; + + ur::details::printPtr(os, + *(params->pppPool) + ); - os << ", "; - os << ".offset = "; - os << *(params->poffset); + return os; +} - os << ", "; - os << ".size = "; - os << *(params->psize); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_usm_pool_retain_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_pool_retain_params_t *params) { + + + + os << ".pPool = "; + + ur::details::printPtr(os, + *(params->ppPool) + ); - os << ", "; - os << ".pSrc = "; - ur::details::printPtr(os, - *(params->ppSrc)); + return os; +} - os << ", "; - os << ".numSyncPointsInWaitList = "; - os << *(params->pnumSyncPointsInWaitList); +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ".pPool = "; + + ur::details::printPtr(os, + *(params->ppPool) + ); - os << ", "; - os << ".pSyncPointWaitList = "; - ur::details::printPtr(os, - *(params->ppSyncPointWaitList)); + return os; +} - os << ", "; - os << ".numEventsInWaitList = "; - os << *(params->pnumEventsInWaitList); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_usm_pool_get_info_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_pool_get_info_params_t *params) { + + + + os << ".hPool = "; + + ur::details::printPtr(os, + *(params->phPool) + ); - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { - if (i != 0) { - os << ", "; - } - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); - } - os << "}"; - } + + + os << ", "; + os << ".propName = "; + + os << + *(params->ppropName) + ; - os << ", "; - os << ".pSyncPoint = "; - ur::details::printPtr(os, - *(params->ppSyncPoint)); + + + os << ", "; + os << ".propSize = "; + + os << + *(params->ppropSize) + ; - os << ", "; - os << ".phEvent = "; - ur::details::printPtr(os, - *(params->pphEvent)); + + + os << ", "; + os << ".pPropValue = "; + ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); - os << ", "; - os << ".phCommand = "; + + + os << ", "; + os << ".pPropSizeRet = "; + + ur::details::printPtr(os, + *(params->ppPropSizeRet) + ); - ur::details::printPtr(os, - *(params->pphCommand)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_command_buffer_append_mem_buffer_read_exp_params_t type +/// @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_command_buffer_append_mem_buffer_read_exp_params_t *params) { +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_pitched_alloc_exp_params_t *params) { + + + + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - os << ".hCommandBuffer = "; - ur::details::printPtr(os, - *(params->phCommandBuffer)); + + + os << ", "; + os << ".hDevice = "; + + ur::details::printPtr(os, + *(params->phDevice) + ); - os << ", "; - os << ".hBuffer = "; - ur::details::printPtr(os, - *(params->phBuffer)); + + + os << ", "; + os << ".pUSMDesc = "; + + ur::details::printPtr(os, + *(params->ppUSMDesc) + ); - os << ", "; - os << ".offset = "; - os << *(params->poffset); + + + os << ", "; + os << ".pool = "; + + ur::details::printPtr(os, + *(params->ppool) + ); - os << ", "; - os << ".size = "; - os << *(params->psize); + + + os << ", "; + os << ".widthInBytes = "; + + os << + *(params->pwidthInBytes) + ; - os << ", "; - os << ".pDst = "; - ur::details::printPtr(os, - *(params->ppDst)); + + + os << ", "; + os << ".height = "; + + os << + *(params->pheight) + ; - os << ", "; - os << ".numSyncPointsInWaitList = "; - os << *(params->pnumSyncPointsInWaitList); + + + os << ", "; + os << ".elementSizeBytes = "; + + os << + *(params->pelementSizeBytes) + ; - os << ", "; - os << ".pSyncPointWaitList = "; - ur::details::printPtr(os, - *(params->ppSyncPointWaitList)); + + + os << ", "; + os << ".ppMem = "; + + ur::details::printPtr(os, + *(params->pppMem) + ); - os << ", "; - os << ".numEventsInWaitList = "; - os << *(params->pnumEventsInWaitList); + + + os << ", "; + os << ".pResultPitch = "; + + ur::details::printPtr(os, + *(params->ppResultPitch) + ); - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { - if (i != 0) { - os << ", "; - } - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); - } - os << "}"; - } + return os; +} + - os << ", "; - os << ".pSyncPoint = "; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_usm_import_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_import_exp_params_t *params) { + + + + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - ur::details::printPtr(os, - *(params->ppSyncPoint)); - os << ", "; - os << ".phEvent = "; + + + os << ", "; + os << ".pMem = "; + + ur::details::printPtr(os, + *(params->ppMem) + ); - ur::details::printPtr(os, - *(params->pphEvent)); - os << ", "; - os << ".phCommand = "; + + + os << ", "; + os << ".size = "; + + os << + *(params->psize) + ; - ur::details::printPtr(os, - *(params->pphCommand)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_command_buffer_append_mem_buffer_copy_rect_exp_params_t type +/// @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_command_buffer_append_mem_buffer_copy_rect_exp_params_t *params) { +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_release_exp_params_t *params) { + + + + os << ".hContext = "; + + ur::details::printPtr(os, + *(params->phContext) + ); + + + + + os << ", "; + os << ".pMem = "; + + ur::details::printPtr(os, + *(params->ppMem) + ); - os << ".hCommandBuffer = "; - ur::details::printPtr(os, - *(params->phCommandBuffer)); + return os; +} - os << ", "; - os << ".hSrcMem = "; - ur::details::printPtr(os, - *(params->phSrcMem)); +/////////////////////////////////////////////////////////////////////////////// +/// @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 = "; + + ur::details::printPtr(os, + *(params->phContext) + ); + - os << ", "; - os << ".hDstMem = "; + + + os << ", "; + os << ".hDevice = "; + + ur::details::printPtr(os, + *(params->phDevice) + ); - ur::details::printPtr(os, - *(params->phDstMem)); - os << ", "; - os << ".srcOrigin = "; + + + os << ", "; + os << ".pCommandBufferDesc = "; + + ur::details::printPtr(os, + *(params->ppCommandBufferDesc) + ); - os << *(params->psrcOrigin); - os << ", "; - os << ".dstOrigin = "; + + + os << ", "; + os << ".phCommandBuffer = "; + + ur::details::printPtr(os, + *(params->pphCommandBuffer) + ); - os << *(params->pdstOrigin); - os << ", "; - os << ".region = "; + return os; +} - os << *(params->pregion); - os << ", "; - os << ".srcRowPitch = "; +/////////////////////////////////////////////////////////////////////////////// +/// @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 << ".hCommandBuffer = "; + + ur::details::printPtr(os, + *(params->phCommandBuffer) + ); - os << *(params->psrcRowPitch); - os << ", "; - os << ".srcSlicePitch = "; + return os; +} - os << *(params->psrcSlicePitch); - os << ", "; - os << ".dstRowPitch = "; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_command_buffer_release_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_command_buffer_release_exp_params_t *params) { + + + + os << ".hCommandBuffer = "; + + ur::details::printPtr(os, + *(params->phCommandBuffer) + ); - os << *(params->pdstRowPitch); - os << ", "; - os << ".dstSlicePitch = "; + return os; +} - os << *(params->pdstSlicePitch); - os << ", "; - os << ".numSyncPointsInWaitList = "; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_command_buffer_finalize_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_command_buffer_finalize_exp_params_t *params) { + + + + os << ".hCommandBuffer = "; + + ur::details::printPtr(os, + *(params->phCommandBuffer) + ); - os << *(params->pnumSyncPointsInWaitList); - os << ", "; - os << ".pSyncPointWaitList = "; + return os; +} - ur::details::printPtr(os, - *(params->ppSyncPointWaitList)); - os << ", "; - os << ".numEventsInWaitList = "; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_command_buffer_append_kernel_launch_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_command_buffer_append_kernel_launch_exp_params_t *params) { + + + + os << ".hCommandBuffer = "; + + ur::details::printPtr(os, + *(params->phCommandBuffer) + ); + + + + + os << ", "; + os << ".hKernel = "; + + ur::details::printPtr(os, + *(params->phKernel) + ); + + + + + os << ", "; + os << ".workDim = "; + + os << + *(params->pworkDim) + ; + + + + + os << ", "; + os << ".pGlobalWorkOffset = "; + + ur::details::printPtr(os, + *(params->ppGlobalWorkOffset) + ); + + + + + os << ", "; + os << ".pGlobalWorkSize = "; + + ur::details::printPtr(os, + *(params->ppGlobalWorkSize) + ); + + + + + os << ", "; + os << ".pLocalWorkSize = "; + + ur::details::printPtr(os, + *(params->ppLocalWorkSize) + ); + + + + + os << ", "; + os << ".numKernelAlternatives = "; + + os << + *(params->pnumKernelAlternatives) + ; + + + + + os << ", "; + os << ".phKernelAlternatives = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphKernelAlternatives))); + if (*(params->pphKernelAlternatives) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumKernelAlternatives; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphKernelAlternatives))[i] + ); - os << *(params->pnumEventsInWaitList); + } + os << "}"; + } - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { + + + os << ", "; + os << ".numSyncPointsInWaitList = "; + + os << + *(params->pnumSyncPointsInWaitList) + ; + + + + + os << ", "; + os << ".pSyncPointWaitList = "; + + ur::details::printPtr(os, + *(params->ppSyncPointWaitList) + ); + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { os << " {"; for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { if (i != 0) { os << ", "; } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); } os << "}"; - } + } - os << ", "; - os << ".pSyncPoint = "; + + + os << ", "; + os << ".pSyncPoint = "; + + ur::details::printPtr(os, + *(params->ppSyncPoint) + ); - ur::details::printPtr(os, - *(params->ppSyncPoint)); - os << ", "; - os << ".phEvent = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printPtr(os, - *(params->pphEvent)); - os << ", "; - os << ".phCommand = "; + + + os << ", "; + os << ".phCommand = "; + + ur::details::printPtr(os, + *(params->pphCommand) + ); - ur::details::printPtr(os, - *(params->pphCommand)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_command_buffer_append_mem_buffer_write_rect_exp_params_t type +/// @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_mem_buffer_write_rect_exp_params_t *params) { - - os << ".hCommandBuffer = "; - - ur::details::printPtr(os, - *(params->phCommandBuffer)); - - os << ", "; - os << ".hBuffer = "; - - ur::details::printPtr(os, - *(params->phBuffer)); - - os << ", "; - os << ".bufferOffset = "; - - os << *(params->pbufferOffset); - - os << ", "; - os << ".hostOffset = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_command_buffer_append_usm_memcpy_exp_params_t *params) { + + + + os << ".hCommandBuffer = "; + + ur::details::printPtr(os, + *(params->phCommandBuffer) + ); + + + + + os << ", "; + os << ".pDst = "; + + ur::details::printPtr(os, + *(params->ppDst) + ); + + + + + os << ", "; + os << ".pSrc = "; + + ur::details::printPtr(os, + *(params->ppSrc) + ); + + + + + os << ", "; + os << ".size = "; + + os << + *(params->psize) + ; + + + + + os << ", "; + os << ".numSyncPointsInWaitList = "; + + os << + *(params->pnumSyncPointsInWaitList) + ; + + + + + os << ", "; + os << ".pSyncPointWaitList = "; + + ur::details::printPtr(os, + *(params->ppSyncPointWaitList) + ); + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - os << *(params->phostOffset); + } + os << "}"; + } - os << ", "; - os << ".region = "; + + + os << ", "; + os << ".pSyncPoint = "; + + ur::details::printPtr(os, + *(params->ppSyncPoint) + ); - os << *(params->pregion); - os << ", "; - os << ".bufferRowPitch = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - os << *(params->pbufferRowPitch); - os << ", "; - os << ".bufferSlicePitch = "; + + + os << ", "; + os << ".phCommand = "; + + ur::details::printPtr(os, + *(params->pphCommand) + ); - os << *(params->pbufferSlicePitch); - os << ", "; - os << ".hostRowPitch = "; + return os; +} - os << *(params->phostRowPitch); - os << ", "; - os << ".hostSlicePitch = "; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_command_buffer_append_usm_fill_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_command_buffer_append_usm_fill_exp_params_t *params) { + + + + os << ".hCommandBuffer = "; + + ur::details::printPtr(os, + *(params->phCommandBuffer) + ); + + + + + os << ", "; + os << ".pMemory = "; + + ur::details::printPtr(os, + *(params->ppMemory) + ); + + + + + os << ", "; + os << ".pPattern = "; + + ur::details::printPtr(os, + *(params->ppPattern) + ); + + + + + os << ", "; + os << ".patternSize = "; + + os << + *(params->ppatternSize) + ; + + + + + os << ", "; + os << ".size = "; + + os << + *(params->psize) + ; + + + + + os << ", "; + os << ".numSyncPointsInWaitList = "; + + os << + *(params->pnumSyncPointsInWaitList) + ; + + + + + os << ", "; + os << ".pSyncPointWaitList = "; + + ur::details::printPtr(os, + *(params->ppSyncPointWaitList) + ); + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - os << *(params->phostSlicePitch); + } + os << "}"; + } - os << ", "; - os << ".pSrc = "; + + + os << ", "; + os << ".pSyncPoint = "; + + ur::details::printPtr(os, + *(params->ppSyncPoint) + ); - ur::details::printPtr(os, - *(params->ppSrc)); - os << ", "; - os << ".numSyncPointsInWaitList = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - os << *(params->pnumSyncPointsInWaitList); - os << ", "; - os << ".pSyncPointWaitList = "; + + + os << ", "; + os << ".phCommand = "; + + ur::details::printPtr(os, + *(params->pphCommand) + ); - ur::details::printPtr(os, - *(params->ppSyncPointWaitList)); - os << ", "; - os << ".numEventsInWaitList = "; + return os; +} - os << *(params->pnumEventsInWaitList); - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_command_buffer_append_mem_buffer_copy_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_command_buffer_append_mem_buffer_copy_exp_params_t *params) { + + + + os << ".hCommandBuffer = "; + + ur::details::printPtr(os, + *(params->phCommandBuffer) + ); + + + + + os << ", "; + os << ".hSrcMem = "; + + ur::details::printPtr(os, + *(params->phSrcMem) + ); + + + + + os << ", "; + os << ".hDstMem = "; + + ur::details::printPtr(os, + *(params->phDstMem) + ); + + + + + os << ", "; + os << ".srcOffset = "; + + os << + *(params->psrcOffset) + ; + + + + + os << ", "; + os << ".dstOffset = "; + + os << + *(params->pdstOffset) + ; + + + + + os << ", "; + os << ".size = "; + + os << + *(params->psize) + ; + + + + + os << ", "; + os << ".numSyncPointsInWaitList = "; + + os << + *(params->pnumSyncPointsInWaitList) + ; + + + + + os << ", "; + os << ".pSyncPointWaitList = "; + + ur::details::printPtr(os, + *(params->ppSyncPointWaitList) + ); + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { os << " {"; for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { if (i != 0) { os << ", "; } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); } os << "}"; - } + } - os << ", "; - os << ".pSyncPoint = "; + + + os << ", "; + os << ".pSyncPoint = "; + + ur::details::printPtr(os, + *(params->ppSyncPoint) + ); - ur::details::printPtr(os, - *(params->ppSyncPoint)); - os << ", "; - os << ".phEvent = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printPtr(os, - *(params->pphEvent)); - os << ", "; - os << ".phCommand = "; + + + os << ", "; + os << ".phCommand = "; + + ur::details::printPtr(os, + *(params->pphCommand) + ); - ur::details::printPtr(os, - *(params->pphCommand)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_command_buffer_append_mem_buffer_read_rect_exp_params_t type +/// @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_read_rect_exp_params_t *params) { - - os << ".hCommandBuffer = "; - - ur::details::printPtr(os, - *(params->phCommandBuffer)); - - os << ", "; - os << ".hBuffer = "; - - ur::details::printPtr(os, - *(params->phBuffer)); - - os << ", "; - os << ".bufferOffset = "; - - os << *(params->pbufferOffset); - - os << ", "; - os << ".hostOffset = "; +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_command_buffer_append_mem_buffer_write_exp_params_t *params) { + + + + os << ".hCommandBuffer = "; + + ur::details::printPtr(os, + *(params->phCommandBuffer) + ); + + + + + os << ", "; + os << ".hBuffer = "; + + ur::details::printPtr(os, + *(params->phBuffer) + ); + + + + + os << ", "; + os << ".offset = "; + + os << + *(params->poffset) + ; + + + + + os << ", "; + os << ".size = "; + + os << + *(params->psize) + ; + + + + + os << ", "; + os << ".pSrc = "; + + ur::details::printPtr(os, + *(params->ppSrc) + ); + + + + + os << ", "; + os << ".numSyncPointsInWaitList = "; + + os << + *(params->pnumSyncPointsInWaitList) + ; + + + + + os << ", "; + os << ".pSyncPointWaitList = "; + + ur::details::printPtr(os, + *(params->ppSyncPointWaitList) + ); + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - os << *(params->phostOffset); + } + os << "}"; + } - os << ", "; - os << ".region = "; + + + os << ", "; + os << ".pSyncPoint = "; + + ur::details::printPtr(os, + *(params->ppSyncPoint) + ); - os << *(params->pregion); - os << ", "; - os << ".bufferRowPitch = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - os << *(params->pbufferRowPitch); - os << ", "; - os << ".bufferSlicePitch = "; + + + os << ", "; + os << ".phCommand = "; + + ur::details::printPtr(os, + *(params->pphCommand) + ); - os << *(params->pbufferSlicePitch); - os << ", "; - os << ".hostRowPitch = "; + return os; +} - os << *(params->phostRowPitch); - os << ", "; - os << ".hostSlicePitch = "; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_command_buffer_append_mem_buffer_read_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_command_buffer_append_mem_buffer_read_exp_params_t *params) { + + + + os << ".hCommandBuffer = "; + + ur::details::printPtr(os, + *(params->phCommandBuffer) + ); + + + + + os << ", "; + os << ".hBuffer = "; + + ur::details::printPtr(os, + *(params->phBuffer) + ); + + + + + os << ", "; + os << ".offset = "; + + os << + *(params->poffset) + ; + + + + + os << ", "; + os << ".size = "; + + os << + *(params->psize) + ; + + + + + os << ", "; + os << ".pDst = "; + + ur::details::printPtr(os, + *(params->ppDst) + ); + + + + + os << ", "; + os << ".numSyncPointsInWaitList = "; + + os << + *(params->pnumSyncPointsInWaitList) + ; + + + + + os << ", "; + os << ".pSyncPointWaitList = "; + + ur::details::printPtr(os, + *(params->ppSyncPointWaitList) + ); + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - os << *(params->phostSlicePitch); + } + os << "}"; + } - os << ", "; - os << ".pDst = "; + + + os << ", "; + os << ".pSyncPoint = "; + + ur::details::printPtr(os, + *(params->ppSyncPoint) + ); - ur::details::printPtr(os, - *(params->ppDst)); - os << ", "; - os << ".numSyncPointsInWaitList = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - os << *(params->pnumSyncPointsInWaitList); - os << ", "; - os << ".pSyncPointWaitList = "; + + + os << ", "; + os << ".phCommand = "; + + ur::details::printPtr(os, + *(params->pphCommand) + ); - ur::details::printPtr(os, - *(params->ppSyncPointWaitList)); - os << ", "; - os << ".numEventsInWaitList = "; + return os; +} - os << *(params->pnumEventsInWaitList); - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_command_buffer_append_mem_buffer_copy_rect_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_command_buffer_append_mem_buffer_copy_rect_exp_params_t *params) { + + + + os << ".hCommandBuffer = "; + + ur::details::printPtr(os, + *(params->phCommandBuffer) + ); + + + + + os << ", "; + os << ".hSrcMem = "; + + ur::details::printPtr(os, + *(params->phSrcMem) + ); + + + + + os << ", "; + os << ".hDstMem = "; + + ur::details::printPtr(os, + *(params->phDstMem) + ); + + + + + os << ", "; + os << ".srcOrigin = "; + + os << + *(params->psrcOrigin) + ; + + + + + os << ", "; + os << ".dstOrigin = "; + + os << + *(params->pdstOrigin) + ; + + + + + os << ", "; + os << ".region = "; + + os << + *(params->pregion) + ; + + + + + os << ", "; + os << ".srcRowPitch = "; + + os << + *(params->psrcRowPitch) + ; + + + + + os << ", "; + os << ".srcSlicePitch = "; + + os << + *(params->psrcSlicePitch) + ; + + + + + os << ", "; + os << ".dstRowPitch = "; + + os << + *(params->pdstRowPitch) + ; + + + + + os << ", "; + os << ".dstSlicePitch = "; + + os << + *(params->pdstSlicePitch) + ; + + + + + os << ", "; + os << ".numSyncPointsInWaitList = "; + + os << + *(params->pnumSyncPointsInWaitList) + ; + + + + + os << ", "; + os << ".pSyncPointWaitList = "; + + ur::details::printPtr(os, + *(params->ppSyncPointWaitList) + ); + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { os << " {"; for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { if (i != 0) { os << ", "; } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); } os << "}"; - } + } - os << ", "; - os << ".pSyncPoint = "; + + + os << ", "; + os << ".pSyncPoint = "; + + ur::details::printPtr(os, + *(params->ppSyncPoint) + ); - ur::details::printPtr(os, - *(params->ppSyncPoint)); - os << ", "; - os << ".phEvent = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printPtr(os, - *(params->pphEvent)); - os << ", "; - os << ".phCommand = "; + + + os << ", "; + os << ".phCommand = "; + + ur::details::printPtr(os, + *(params->pphCommand) + ); - ur::details::printPtr(os, - *(params->pphCommand)); return os; } + /////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_command_buffer_append_mem_buffer_fill_exp_params_t type +/// @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_fill_exp_params_t *params) { +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_command_buffer_append_mem_buffer_write_rect_exp_params_t *params) { + + + + os << ".hCommandBuffer = "; + + ur::details::printPtr(os, + *(params->phCommandBuffer) + ); + + + + + os << ", "; + os << ".hBuffer = "; + + ur::details::printPtr(os, + *(params->phBuffer) + ); + + + + + os << ", "; + os << ".bufferOffset = "; + + os << + *(params->pbufferOffset) + ; + + + + + os << ", "; + os << ".hostOffset = "; + + os << + *(params->phostOffset) + ; + + + + + os << ", "; + os << ".region = "; + + os << + *(params->pregion) + ; + + + + + os << ", "; + os << ".bufferRowPitch = "; + + os << + *(params->pbufferRowPitch) + ; + + + + + os << ", "; + os << ".bufferSlicePitch = "; + + os << + *(params->pbufferSlicePitch) + ; + + + + + os << ", "; + os << ".hostRowPitch = "; + + os << + *(params->phostRowPitch) + ; + + + + + os << ", "; + os << ".hostSlicePitch = "; + + os << + *(params->phostSlicePitch) + ; + + + + + os << ", "; + os << ".pSrc = "; + + ur::details::printPtr(os, + *(params->ppSrc) + ); + + + + + os << ", "; + os << ".numSyncPointsInWaitList = "; + + os << + *(params->pnumSyncPointsInWaitList) + ; + + + + + os << ", "; + os << ".pSyncPointWaitList = "; + + ur::details::printPtr(os, + *(params->ppSyncPointWaitList) + ); + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); + + } + os << "}"; + } - os << ".hCommandBuffer = "; + + + os << ", "; + os << ".pSyncPoint = "; + + ur::details::printPtr(os, + *(params->ppSyncPoint) + ); - ur::details::printPtr(os, - *(params->phCommandBuffer)); - os << ", "; - os << ".hBuffer = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printPtr(os, - *(params->phBuffer)); - os << ", "; - os << ".pPattern = "; + + + os << ", "; + os << ".phCommand = "; + + ur::details::printPtr(os, + *(params->pphCommand) + ); - ur::details::printPtr(os, - *(params->ppPattern)); - os << ", "; - os << ".patternSize = "; + return os; +} - os << *(params->ppatternSize); - os << ", "; - os << ".offset = "; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_command_buffer_append_mem_buffer_read_rect_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_command_buffer_append_mem_buffer_read_rect_exp_params_t *params) { + + + + os << ".hCommandBuffer = "; + + ur::details::printPtr(os, + *(params->phCommandBuffer) + ); + + + + + os << ", "; + os << ".hBuffer = "; + + ur::details::printPtr(os, + *(params->phBuffer) + ); + + + + + os << ", "; + os << ".bufferOffset = "; + + os << + *(params->pbufferOffset) + ; + + + + + os << ", "; + os << ".hostOffset = "; + + os << + *(params->phostOffset) + ; + + + + + os << ", "; + os << ".region = "; + + os << + *(params->pregion) + ; + + + + + os << ", "; + os << ".bufferRowPitch = "; + + os << + *(params->pbufferRowPitch) + ; + + + + + os << ", "; + os << ".bufferSlicePitch = "; + + os << + *(params->pbufferSlicePitch) + ; + + + + + os << ", "; + os << ".hostRowPitch = "; + + os << + *(params->phostRowPitch) + ; + + + + + os << ", "; + os << ".hostSlicePitch = "; + + os << + *(params->phostSlicePitch) + ; + + + + + os << ", "; + os << ".pDst = "; + + ur::details::printPtr(os, + *(params->ppDst) + ); + + + + + os << ", "; + os << ".numSyncPointsInWaitList = "; + + os << + *(params->pnumSyncPointsInWaitList) + ; + + + + + os << ", "; + os << ".pSyncPointWaitList = "; + + ur::details::printPtr(os, + *(params->ppSyncPointWaitList) + ); + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - os << *(params->poffset); + } + os << "}"; + } - os << ", "; - os << ".size = "; + + + os << ", "; + os << ".pSyncPoint = "; + + ur::details::printPtr(os, + *(params->ppSyncPoint) + ); - os << *(params->psize); - os << ", "; - os << ".numSyncPointsInWaitList = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - os << *(params->pnumSyncPointsInWaitList); - os << ", "; - os << ".pSyncPointWaitList = "; + + + os << ", "; + os << ".phCommand = "; + + ur::details::printPtr(os, + *(params->pphCommand) + ); - ur::details::printPtr(os, - *(params->ppSyncPointWaitList)); - os << ", "; - os << ".numEventsInWaitList = "; + return os; +} - os << *(params->pnumEventsInWaitList); - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_command_buffer_append_mem_buffer_fill_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_command_buffer_append_mem_buffer_fill_exp_params_t *params) { + + + + os << ".hCommandBuffer = "; + + ur::details::printPtr(os, + *(params->phCommandBuffer) + ); + + + + + os << ", "; + os << ".hBuffer = "; + + ur::details::printPtr(os, + *(params->phBuffer) + ); + + + + + os << ", "; + os << ".pPattern = "; + + ur::details::printPtr(os, + *(params->ppPattern) + ); + + + + + os << ", "; + os << ".patternSize = "; + + os << + *(params->ppatternSize) + ; + + + + + os << ", "; + os << ".offset = "; + + os << + *(params->poffset) + ; + + + + + os << ", "; + os << ".size = "; + + os << + *(params->psize) + ; + + + + + os << ", "; + os << ".numSyncPointsInWaitList = "; + + os << + *(params->pnumSyncPointsInWaitList) + ; + + + + + os << ", "; + os << ".pSyncPointWaitList = "; + + ur::details::printPtr(os, + *(params->ppSyncPointWaitList) + ); + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { os << " {"; for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { if (i != 0) { os << ", "; } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); } os << "}"; - } + } - os << ", "; - os << ".pSyncPoint = "; + + + os << ", "; + os << ".pSyncPoint = "; + + ur::details::printPtr(os, + *(params->ppSyncPoint) + ); - ur::details::printPtr(os, - *(params->ppSyncPoint)); - os << ", "; - os << ".phEvent = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printPtr(os, - *(params->pphEvent)); - os << ", "; - os << ".phCommand = "; + + + os << ", "; + os << ".phCommand = "; + + ur::details::printPtr(os, + *(params->pphCommand) + ); - ur::details::printPtr(os, - *(params->pphCommand)); return os; } + /////////////////////////////////////////////////////////////////////////////// /// @brief Print operator for the ur_command_buffer_append_usm_prefetch_exp_params_t type /// @returns /// std::ostream & inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_command_buffer_append_usm_prefetch_exp_params_t *params) { - - os << ".hCommandBuffer = "; - - ur::details::printPtr(os, - *(params->phCommandBuffer)); - - os << ", "; - os << ".pMemory = "; - - ur::details::printPtr(os, - *(params->ppMemory)); - - os << ", "; - os << ".size = "; - - os << *(params->psize); - - os << ", "; - os << ".flags = "; - - ur::details::printFlag(os, - *(params->pflags)); - - os << ", "; - os << ".numSyncPointsInWaitList = "; - - os << *(params->pnumSyncPointsInWaitList); - - os << ", "; - os << ".pSyncPointWaitList = "; - - ur::details::printPtr(os, - *(params->ppSyncPointWaitList)); - - os << ", "; - os << ".numEventsInWaitList = "; - - os << *(params->pnumEventsInWaitList); - - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { + + + + os << ".hCommandBuffer = "; + + ur::details::printPtr(os, + *(params->phCommandBuffer) + ); + + + + + os << ", "; + os << ".pMemory = "; + + ur::details::printPtr(os, + *(params->ppMemory) + ); + + + + + os << ", "; + os << ".size = "; + + os << + *(params->psize) + ; + + + + + os << ", "; + os << ".flags = "; + + ur::details::printFlag(os, + *(params->pflags) + ); + + + + + os << ", "; + os << ".numSyncPointsInWaitList = "; + + os << + *(params->pnumSyncPointsInWaitList) + ; + + + + + os << ", "; + os << ".pSyncPointWaitList = "; + + ur::details::printPtr(os, + *(params->ppSyncPointWaitList) + ); + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { os << " {"; for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { if (i != 0) { os << ", "; } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); } os << "}"; - } + } - os << ", "; - os << ".pSyncPoint = "; + + + os << ", "; + os << ".pSyncPoint = "; + + ur::details::printPtr(os, + *(params->ppSyncPoint) + ); - ur::details::printPtr(os, - *(params->ppSyncPoint)); - os << ", "; - os << ".phEvent = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printPtr(os, - *(params->pphEvent)); - os << ", "; - os << ".phCommand = "; + + + os << ", "; + os << ".phCommand = "; + + ur::details::printPtr(os, + *(params->pphCommand) + ); - ur::details::printPtr(os, - *(params->pphCommand)); return os; } + /////////////////////////////////////////////////////////////////////////////// /// @brief Print operator for the ur_command_buffer_append_usm_advise_exp_params_t type /// @returns /// std::ostream & inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_command_buffer_append_usm_advise_exp_params_t *params) { - - os << ".hCommandBuffer = "; - - ur::details::printPtr(os, - *(params->phCommandBuffer)); - - os << ", "; - os << ".pMemory = "; - - ur::details::printPtr(os, - *(params->ppMemory)); - - os << ", "; - os << ".size = "; - - os << *(params->psize); - - os << ", "; - os << ".advice = "; - - ur::details::printFlag(os, - *(params->padvice)); - - os << ", "; - os << ".numSyncPointsInWaitList = "; - - os << *(params->pnumSyncPointsInWaitList); - - os << ", "; - os << ".pSyncPointWaitList = "; - - ur::details::printPtr(os, - *(params->ppSyncPointWaitList)); - - os << ", "; - os << ".numEventsInWaitList = "; - - os << *(params->pnumEventsInWaitList); - - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { + + + + os << ".hCommandBuffer = "; + + ur::details::printPtr(os, + *(params->phCommandBuffer) + ); + + + + + os << ", "; + os << ".pMemory = "; + + ur::details::printPtr(os, + *(params->ppMemory) + ); + + + + + os << ", "; + os << ".size = "; + + os << + *(params->psize) + ; + + + + + os << ", "; + os << ".advice = "; + + ur::details::printFlag(os, + *(params->padvice) + ); + + + + + os << ", "; + os << ".numSyncPointsInWaitList = "; + + os << + *(params->pnumSyncPointsInWaitList) + ; + + + + + os << ", "; + os << ".pSyncPointWaitList = "; + + ur::details::printPtr(os, + *(params->ppSyncPointWaitList) + ); + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { os << " {"; for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { if (i != 0) { os << ", "; } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); } os << "}"; - } + } - os << ", "; - os << ".pSyncPoint = "; + + + os << ", "; + os << ".pSyncPoint = "; + + ur::details::printPtr(os, + *(params->ppSyncPoint) + ); - ur::details::printPtr(os, - *(params->ppSyncPoint)); - os << ", "; - os << ".phEvent = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printPtr(os, - *(params->pphEvent)); - os << ", "; - os << ".phCommand = "; + + + os << ", "; + os << ".phCommand = "; + + ur::details::printPtr(os, + *(params->pphCommand) + ); - ur::details::printPtr(os, - *(params->pphCommand)); return os; } + /////////////////////////////////////////////////////////////////////////////// /// @brief Print operator for the ur_command_buffer_enqueue_exp_params_t type /// @returns /// std::ostream & inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_command_buffer_enqueue_exp_params_t *params) { - - os << ".hCommandBuffer = "; - - ur::details::printPtr(os, - *(params->phCommandBuffer)); - - os << ", "; - os << ".hQueue = "; - - ur::details::printPtr(os, - *(params->phQueue)); - - os << ", "; - os << ".numEventsInWaitList = "; - - os << *(params->pnumEventsInWaitList); - - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { + + + + os << ".hCommandBuffer = "; + + ur::details::printPtr(os, + *(params->phCommandBuffer) + ); + + + + + os << ", "; + os << ".hQueue = "; + + ur::details::printPtr(os, + *(params->phQueue) + ); + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { os << " {"; for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { if (i != 0) { os << ", "; } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); } os << "}"; - } + } - os << ", "; - os << ".phEvent = "; + + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, + *(params->pphEvent) + ); - ur::details::printPtr(os, - *(params->pphEvent)); return os; } + /////////////////////////////////////////////////////////////////////////////// /// @brief Print operator for the ur_command_buffer_retain_command_exp_params_t type /// @returns /// std::ostream & inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_command_buffer_retain_command_exp_params_t *params) { + + + + os << ".hCommand = "; + + ur::details::printPtr(os, + *(params->phCommand) + ); - os << ".hCommand = "; - - ur::details::printPtr(os, - *(params->phCommand)); return os; } + /////////////////////////////////////////////////////////////////////////////// /// @brief Print operator for the ur_command_buffer_release_command_exp_params_t type /// @returns /// std::ostream & inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_command_buffer_release_command_exp_params_t *params) { + + + + os << ".hCommand = "; + + ur::details::printPtr(os, + *(params->phCommand) + ); - os << ".hCommand = "; - - ur::details::printPtr(os, - *(params->phCommand)); return os; } + /////////////////////////////////////////////////////////////////////////////// /// @brief Print operator for the ur_command_buffer_update_kernel_launch_exp_params_t type /// @returns /// std::ostream & inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_command_buffer_update_kernel_launch_exp_params_t *params) { + + + + os << ".hCommand = "; + + ur::details::printPtr(os, + *(params->phCommand) + ); - os << ".hCommand = "; - - ur::details::printPtr(os, - *(params->phCommand)); - os << ", "; - os << ".pUpdateKernelLaunch = "; + + + os << ", "; + os << ".pUpdateKernelLaunch = "; + + ur::details::printPtr(os, + *(params->ppUpdateKernelLaunch) + ); - ur::details::printPtr(os, - *(params->ppUpdateKernelLaunch)); return os; } + /////////////////////////////////////////////////////////////////////////////// /// @brief Print operator for the ur_command_buffer_update_signal_event_exp_params_t type /// @returns /// std::ostream & inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_command_buffer_update_signal_event_exp_params_t *params) { + + + + os << ".hCommand = "; + + ur::details::printPtr(os, + *(params->phCommand) + ); - os << ".hCommand = "; - - ur::details::printPtr(os, - *(params->phCommand)); - os << ", "; - os << ".phSignalEvent = "; + + + os << ", "; + os << ".phSignalEvent = "; + + ur::details::printPtr(os, + *(params->pphSignalEvent) + ); - ur::details::printPtr(os, - *(params->pphSignalEvent)); return os; } + /////////////////////////////////////////////////////////////////////////////// /// @brief Print operator for the ur_command_buffer_update_wait_events_exp_params_t type /// @returns /// std::ostream & inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_command_buffer_update_wait_events_exp_params_t *params) { - - os << ".hCommand = "; - - ur::details::printPtr(os, - *(params->phCommand)); - - os << ", "; - os << ".numEventsInWaitList = "; - - os << *(params->pnumEventsInWaitList); - - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { + + + + os << ".hCommand = "; + + ur::details::printPtr(os, + *(params->phCommand) + ); + + + + + os << ", "; + os << ".numEventsInWaitList = "; + + os << + *(params->pnumEventsInWaitList) + ; + + + + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { os << " {"; for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { if (i != 0) { os << ", "; } + + ur::details::printPtr(os, + (*(params->pphEventWaitList))[i] + ); - ur::details::printPtr(os, - (*(params->pphEventWaitList))[i]); } os << "}"; - } + } return os; } + /////////////////////////////////////////////////////////////////////////////// /// @brief Print operator for the ur_command_buffer_get_info_exp_params_t type /// @returns /// std::ostream & inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_command_buffer_get_info_exp_params_t *params) { + + + + os << ".hCommandBuffer = "; + + ur::details::printPtr(os, + *(params->phCommandBuffer) + ); - os << ".hCommandBuffer = "; - - ur::details::printPtr(os, - *(params->phCommandBuffer)); - os << ", "; - os << ".propName = "; + + + os << ", "; + os << ".propName = "; + + os << + *(params->ppropName) + ; - os << *(params->ppropName); - os << ", "; - os << ".propSize = "; + + + os << ", "; + os << ".propSize = "; + + os << + *(params->ppropSize) + ; - os << *(params->ppropSize); - os << ", "; - os << ".pPropValue = "; - ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); + + + os << ", "; + os << ".pPropValue = "; + ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); - os << ", "; - os << ".pPropSizeRet = "; + + + os << ", "; + os << ".pPropSizeRet = "; + + ur::details::printPtr(os, + *(params->ppPropSizeRet) + ); - ur::details::printPtr(os, - *(params->ppPropSizeRet)); return os; } + /////////////////////////////////////////////////////////////////////////////// /// @brief Print operator for the ur_command_buffer_command_get_info_exp_params_t type /// @returns /// std::ostream & inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_command_buffer_command_get_info_exp_params_t *params) { + + + + os << ".hCommand = "; + + ur::details::printPtr(os, + *(params->phCommand) + ); - os << ".hCommand = "; - - ur::details::printPtr(os, - *(params->phCommand)); - os << ", "; - os << ".propName = "; + + + os << ", "; + os << ".propName = "; + + os << + *(params->ppropName) + ; - os << *(params->ppropName); - os << ", "; - os << ".propSize = "; + + + os << ", "; + os << ".propSize = "; + + os << + *(params->ppropSize) + ; - os << *(params->ppropSize); - os << ", "; - os << ".pPropValue = "; - ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); + + + os << ", "; + os << ".pPropValue = "; + ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); - os << ", "; - os << ".pPropSizeRet = "; + + + os << ", "; + os << ".pPropSizeRet = "; + + ur::details::printPtr(os, + *(params->ppPropSizeRet) + ); - ur::details::printPtr(os, - *(params->ppPropSizeRet)); return os; } + /////////////////////////////////////////////////////////////////////////////// /// @brief Print operator for the ur_tensor_map_encode_im_2_col_exp_params_t type /// @returns /// std::ostream & inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_tensor_map_encode_im_2_col_exp_params_t *params) { + + + + os << ".hDevice = "; + + ur::details::printPtr(os, + *(params->phDevice) + ); + + + + + os << ", "; + os << ".TensorMapType = "; + + ur::details::printFlag(os, + *(params->pTensorMapType) + ); + + + + + os << ", "; + os << ".TensorRank = "; + + os << + *(params->pTensorRank) + ; + + + + + os << ", "; + os << ".GlobalAddress = "; + + ur::details::printPtr(os, + *(params->pGlobalAddress) + ); + + + + + os << ", "; + os << ".GlobalDim = "; + + ur::details::printPtr(os, + *(params->pGlobalDim) + ); + + + + + os << ", "; + os << ".GlobalStrides = "; + + ur::details::printPtr(os, + *(params->pGlobalStrides) + ); + + + + + os << ", "; + os << ".PixelBoxLowerCorner = "; + + ur::details::printPtr(os, + *(params->pPixelBoxLowerCorner) + ); + + + + + os << ", "; + os << ".PixelBoxUpperCorner = "; + + ur::details::printPtr(os, + *(params->pPixelBoxUpperCorner) + ); + + + + + os << ", "; + os << ".ChannelsPerPixel = "; + + os << + *(params->pChannelsPerPixel) + ; + + + + + os << ", "; + os << ".PixelsPerColumn = "; + + os << + *(params->pPixelsPerColumn) + ; + + + + + os << ", "; + os << ".ElementStrides = "; + + ur::details::printPtr(os, + *(params->pElementStrides) + ); + + + + + os << ", "; + os << ".Interleave = "; + + ur::details::printFlag(os, + *(params->pInterleave) + ); + + + + + os << ", "; + os << ".Swizzle = "; + + ur::details::printFlag(os, + *(params->pSwizzle) + ); + + + + + os << ", "; + os << ".L2Promotion = "; + + ur::details::printFlag(os, + *(params->pL2Promotion) + ); - os << ".hDevice = "; - - ur::details::printPtr(os, - *(params->phDevice)); - - os << ", "; - os << ".TensorMapType = "; - - ur::details::printFlag(os, - *(params->pTensorMapType)); - - os << ", "; - os << ".TensorRank = "; - - os << *(params->pTensorRank); - - os << ", "; - os << ".GlobalAddress = "; - - ur::details::printPtr(os, - *(params->pGlobalAddress)); - - os << ", "; - os << ".GlobalDim = "; - - ur::details::printPtr(os, - *(params->pGlobalDim)); - - os << ", "; - os << ".GlobalStrides = "; - - ur::details::printPtr(os, - *(params->pGlobalStrides)); - - os << ", "; - os << ".PixelBoxLowerCorner = "; - - ur::details::printPtr(os, - *(params->pPixelBoxLowerCorner)); - - os << ", "; - os << ".PixelBoxUpperCorner = "; - - ur::details::printPtr(os, - *(params->pPixelBoxUpperCorner)); - - os << ", "; - os << ".ChannelsPerPixel = "; - - os << *(params->pChannelsPerPixel); - - os << ", "; - os << ".PixelsPerColumn = "; - - os << *(params->pPixelsPerColumn); - - os << ", "; - os << ".ElementStrides = "; - - ur::details::printPtr(os, - *(params->pElementStrides)); - - os << ", "; - os << ".Interleave = "; - - ur::details::printFlag(os, - *(params->pInterleave)); - - os << ", "; - os << ".Swizzle = "; - - ur::details::printFlag(os, - *(params->pSwizzle)); - - os << ", "; - os << ".L2Promotion = "; - - ur::details::printFlag(os, - *(params->pL2Promotion)); - - os << ", "; - os << ".OobFill = "; - - ur::details::printFlag(os, - *(params->pOobFill)); - os << ", "; - os << ".hTensorMap = "; + + + os << ", "; + os << ".OobFill = "; + + ur::details::printFlag(os, + *(params->pOobFill) + ); + + + + + os << ", "; + os << ".hTensorMap = "; + + ur::details::printPtr(os, + *(params->phTensorMap) + ); - ur::details::printPtr(os, - *(params->phTensorMap)); return os; } + /////////////////////////////////////////////////////////////////////////////// /// @brief Print operator for the ur_tensor_map_encode_tiled_exp_params_t type /// @returns /// std::ostream & inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_tensor_map_encode_tiled_exp_params_t *params) { + + + + os << ".hDevice = "; + + ur::details::printPtr(os, + *(params->phDevice) + ); + + + + + os << ", "; + os << ".TensorMapType = "; + + ur::details::printFlag(os, + *(params->pTensorMapType) + ); + + + + + os << ", "; + os << ".TensorRank = "; + + os << + *(params->pTensorRank) + ; + + + + + os << ", "; + os << ".GlobalAddress = "; + + ur::details::printPtr(os, + *(params->pGlobalAddress) + ); + + + + + os << ", "; + os << ".GlobalDim = "; + + ur::details::printPtr(os, + *(params->pGlobalDim) + ); + + + + + os << ", "; + os << ".GlobalStrides = "; + + ur::details::printPtr(os, + *(params->pGlobalStrides) + ); + + + + + os << ", "; + os << ".BoxDim = "; + + ur::details::printPtr(os, + *(params->pBoxDim) + ); + + + + + os << ", "; + os << ".ElementStrides = "; + + ur::details::printPtr(os, + *(params->pElementStrides) + ); + + + + + os << ", "; + os << ".Interleave = "; + + ur::details::printFlag(os, + *(params->pInterleave) + ); + + + + + os << ", "; + os << ".Swizzle = "; + + ur::details::printFlag(os, + *(params->pSwizzle) + ); + + + + + os << ", "; + os << ".L2Promotion = "; + + ur::details::printFlag(os, + *(params->pL2Promotion) + ); - os << ".hDevice = "; - - ur::details::printPtr(os, - *(params->phDevice)); - - os << ", "; - os << ".TensorMapType = "; - - ur::details::printFlag(os, - *(params->pTensorMapType)); - - os << ", "; - os << ".TensorRank = "; - - os << *(params->pTensorRank); - - os << ", "; - os << ".GlobalAddress = "; - - ur::details::printPtr(os, - *(params->pGlobalAddress)); - - os << ", "; - os << ".GlobalDim = "; - - ur::details::printPtr(os, - *(params->pGlobalDim)); - - os << ", "; - os << ".GlobalStrides = "; - - ur::details::printPtr(os, - *(params->pGlobalStrides)); - - os << ", "; - os << ".BoxDim = "; - - ur::details::printPtr(os, - *(params->pBoxDim)); - - os << ", "; - os << ".ElementStrides = "; - - ur::details::printPtr(os, - *(params->pElementStrides)); - os << ", "; - os << ".Interleave = "; + + + os << ", "; + os << ".OobFill = "; + + ur::details::printFlag(os, + *(params->pOobFill) + ); + + + + + os << ", "; + os << ".hTensorMap = "; + + ur::details::printPtr(os, + *(params->phTensorMap) + ); - ur::details::printFlag(os, - *(params->pInterleave)); - - os << ", "; - os << ".Swizzle = "; - - ur::details::printFlag(os, - *(params->pSwizzle)); - - os << ", "; - os << ".L2Promotion = "; - - ur::details::printFlag(os, - *(params->pL2Promotion)); - - os << ", "; - os << ".OobFill = "; - - ur::details::printFlag(os, - *(params->pOobFill)); - - os << ", "; - os << ".hTensorMap = "; - - ur::details::printPtr(os, - *(params->phTensorMap)); return os; } + /////////////////////////////////////////////////////////////////////////////// /// @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 = "; + + ur::details::printPtr(os, + *(params->pcommandDevice) + ); - os << ".commandDevice = "; - - ur::details::printPtr(os, - *(params->pcommandDevice)); - os << ", "; - os << ".peerDevice = "; + + + os << ", "; + os << ".peerDevice = "; + + ur::details::printPtr(os, + *(params->ppeerDevice) + ); - ur::details::printPtr(os, - *(params->ppeerDevice)); return os; } + /////////////////////////////////////////////////////////////////////////////// /// @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 = "; + + ur::details::printPtr(os, + *(params->pcommandDevice) + ); - os << ".commandDevice = "; - - ur::details::printPtr(os, - *(params->pcommandDevice)); - os << ", "; - os << ".peerDevice = "; + + + os << ", "; + os << ".peerDevice = "; + + ur::details::printPtr(os, + *(params->ppeerDevice) + ); - ur::details::printPtr(os, - *(params->ppeerDevice)); return os; } + /////////////////////////////////////////////////////////////////////////////// /// @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 = "; + + ur::details::printPtr(os, + *(params->pcommandDevice) + ); - os << ".commandDevice = "; - - ur::details::printPtr(os, - *(params->pcommandDevice)); - os << ", "; - os << ".peerDevice = "; + + + os << ", "; + os << ".peerDevice = "; + + ur::details::printPtr(os, + *(params->ppeerDevice) + ); - ur::details::printPtr(os, - *(params->ppeerDevice)); - os << ", "; - os << ".propName = "; + + + os << ", "; + os << ".propName = "; + + os << + *(params->ppropName) + ; - os << *(params->ppropName); - os << ", "; - os << ".propSize = "; + + + os << ", "; + os << ".propSize = "; + + os << + *(params->ppropSize) + ; - os << *(params->ppropSize); - os << ", "; - os << ".pPropValue = "; - ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); + + + os << ", "; + os << ".pPropValue = "; + ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); - os << ", "; - os << ".pPropSizeRet = "; + + + os << ", "; + os << ".pPropSizeRet = "; + + ur::details::printPtr(os, + *(params->ppPropSizeRet) + ); - ur::details::printPtr(os, - *(params->ppPropSizeRet)); return os; } + /////////////////////////////////////////////////////////////////////////////// /// @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 = "; + + ur::details::printFlag(os, + *(params->pdevice_flags) + ); - os << ".device_flags = "; - - ur::details::printFlag(os, - *(params->pdevice_flags)); - os << ", "; - os << ".hLoaderConfig = "; + + + os << ", "; + os << ".hLoaderConfig = "; + + ur::details::printPtr(os, + *(params->phLoaderConfig) + ); - ur::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 = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - os << ".hContext = "; - - ur::details::printPtr(os, - *(params->phContext)); - os << ", "; - os << ".hDevice = "; + + + os << ", "; + os << ".hDevice = "; + + ur::details::printPtr(os, + *(params->phDevice) + ); - ur::details::printPtr(os, - *(params->phDevice)); - os << ", "; - os << ".propName = "; + + + os << ", "; + os << ".propName = "; + + os << + *(params->ppropName) + ; - os << *(params->ppropName); - os << ", "; - os << ".propSize = "; + + + os << ", "; + os << ".propSize = "; + + os << + *(params->ppropSize) + ; - os << *(params->ppropSize); - os << ", "; - os << ".pPropValue = "; - ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); + + + os << ", "; + os << ".pPropValue = "; + ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); - os << ", "; - os << ".pPropSizeRet = "; + + + os << ", "; + os << ".pPropSizeRet = "; + + ur::details::printPtr(os, + *(params->ppPropSizeRet) + ); - ur::details::printPtr(os, - *(params->ppPropSizeRet)); return os; } + /////////////////////////////////////////////////////////////////////////////// /// @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 = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - os << ".hContext = "; - - ur::details::printPtr(os, - *(params->phContext)); - os << ", "; - os << ".pStart = "; + + + os << ", "; + os << ".pStart = "; + + ur::details::printPtr(os, + *(params->ppStart) + ); - ur::details::printPtr(os, - *(params->ppStart)); - os << ", "; - os << ".size = "; + + + os << ", "; + os << ".size = "; + + os << + *(params->psize) + ; - os << *(params->psize); - os << ", "; - os << ".ppStart = "; + + + os << ", "; + os << ".ppStart = "; + + ur::details::printPtr(os, + *(params->pppStart) + ); - ur::details::printPtr(os, - *(params->pppStart)); return os; } + /////////////////////////////////////////////////////////////////////////////// /// @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 = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - os << ".hContext = "; - - ur::details::printPtr(os, - *(params->phContext)); - os << ", "; - os << ".pStart = "; + + + os << ", "; + os << ".pStart = "; + + ur::details::printPtr(os, + *(params->ppStart) + ); - ur::details::printPtr(os, - *(params->ppStart)); - os << ", "; - os << ".size = "; + + + os << ", "; + os << ".size = "; + + os << + *(params->psize) + ; - os << *(params->psize); return os; } + /////////////////////////////////////////////////////////////////////////////// /// @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 = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - os << ".hContext = "; - - ur::details::printPtr(os, - *(params->phContext)); - os << ", "; - os << ".pStart = "; + + + os << ", "; + os << ".pStart = "; + + ur::details::printPtr(os, + *(params->ppStart) + ); - ur::details::printPtr(os, - *(params->ppStart)); - os << ", "; - os << ".size = "; + + + os << ", "; + os << ".size = "; + + os << + *(params->psize) + ; - os << *(params->psize); - os << ", "; - os << ".hPhysicalMem = "; + + + os << ", "; + os << ".hPhysicalMem = "; + + ur::details::printPtr(os, + *(params->phPhysicalMem) + ); - ur::details::printPtr(os, - *(params->phPhysicalMem)); - os << ", "; - os << ".offset = "; + + + os << ", "; + os << ".offset = "; + + os << + *(params->poffset) + ; - os << *(params->poffset); - os << ", "; - os << ".flags = "; + + + os << ", "; + os << ".flags = "; + + ur::details::printFlag(os, + *(params->pflags) + ); - ur::details::printFlag(os, - *(params->pflags)); return os; } + /////////////////////////////////////////////////////////////////////////////// /// @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 = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - os << ".hContext = "; - - ur::details::printPtr(os, - *(params->phContext)); - os << ", "; - os << ".pStart = "; + + + os << ", "; + os << ".pStart = "; + + ur::details::printPtr(os, + *(params->ppStart) + ); - ur::details::printPtr(os, - *(params->ppStart)); - os << ", "; - os << ".size = "; + + + os << ", "; + os << ".size = "; + + os << + *(params->psize) + ; - os << *(params->psize); return os; } + /////////////////////////////////////////////////////////////////////////////// /// @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 = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - os << ".hContext = "; - - ur::details::printPtr(os, - *(params->phContext)); - os << ", "; - os << ".pStart = "; + + + os << ", "; + os << ".pStart = "; + + ur::details::printPtr(os, + *(params->ppStart) + ); - ur::details::printPtr(os, - *(params->ppStart)); - os << ", "; - os << ".size = "; + + + os << ", "; + os << ".size = "; + + os << + *(params->psize) + ; - os << *(params->psize); - os << ", "; - os << ".flags = "; + + + os << ", "; + os << ".flags = "; + + ur::details::printFlag(os, + *(params->pflags) + ); - ur::details::printFlag(os, - *(params->pflags)); return os; } + /////////////////////////////////////////////////////////////////////////////// /// @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 = "; + + ur::details::printPtr(os, + *(params->phContext) + ); - os << ".hContext = "; - - ur::details::printPtr(os, - *(params->phContext)); - os << ", "; - os << ".pStart = "; + + + os << ", "; + os << ".pStart = "; + + ur::details::printPtr(os, + *(params->ppStart) + ); - ur::details::printPtr(os, - *(params->ppStart)); - os << ", "; - os << ".size = "; + + + os << ", "; + os << ".size = "; + + os << + *(params->psize) + ; - os << *(params->psize); - os << ", "; - os << ".propName = "; + + + os << ", "; + os << ".propName = "; + + os << + *(params->ppropName) + ; - os << *(params->ppropName); - os << ", "; - os << ".propSize = "; + + + os << ", "; + os << ".propSize = "; + + os << + *(params->ppropSize) + ; - os << *(params->ppropSize); - os << ", "; - os << ".pPropValue = "; - ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); + + + os << ", "; + os << ".pPropValue = "; + ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); - os << ", "; - os << ".pPropSizeRet = "; + + + os << ", "; + os << ".pPropSizeRet = "; + + ur::details::printPtr(os, + *(params->ppPropSizeRet) + ); - ur::details::printPtr(os, - *(params->ppPropSizeRet)); return os; } + /////////////////////////////////////////////////////////////////////////////// /// @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 = "; - - ur::details::printPtr(os, - *(params->phPlatform)); - - os << ", "; - os << ".DeviceType = "; - - os << *(params->pDeviceType); - - os << ", "; - os << ".NumEntries = "; - - os << *(params->pNumEntries); - - os << ", "; - os << ".phDevices = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphDevices))); - if (*(params->pphDevices) != NULL) { + + + + os << ".hPlatform = "; + + ur::details::printPtr(os, + *(params->phPlatform) + ); + + + + + os << ", "; + os << ".DeviceType = "; + + os << + *(params->pDeviceType) + ; + + + + + os << ", "; + os << ".NumEntries = "; + + os << + *(params->pNumEntries) + ; + + + + + os << ", "; + os << ".phDevices = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphDevices))); + if (*(params->pphDevices) != NULL) { os << " {"; for (size_t i = 0; i < *params->pNumEntries; ++i) { if (i != 0) { os << ", "; } + + ur::details::printPtr(os, + (*(params->pphDevices))[i] + ); - ur::details::printPtr(os, - (*(params->pphDevices))[i]); } os << "}"; - } + } - os << ", "; - os << ".pNumDevices = "; + + + os << ", "; + os << ".pNumDevices = "; + + ur::details::printPtr(os, + *(params->ppNumDevices) + ); - ur::details::printPtr(os, - *(params->ppNumDevices)); return os; } + /////////////////////////////////////////////////////////////////////////////// /// @brief Print operator for the ur_device_get_selected_params_t type /// @returns /// std::ostream & inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_device_get_selected_params_t *params) { - - os << ".hPlatform = "; - - ur::details::printPtr(os, - *(params->phPlatform)); - - os << ", "; - os << ".DeviceType = "; - - os << *(params->pDeviceType); - - os << ", "; - os << ".NumEntries = "; - - os << *(params->pNumEntries); - - os << ", "; - os << ".phDevices = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphDevices))); - if (*(params->pphDevices) != NULL) { + + + + os << ".hPlatform = "; + + ur::details::printPtr(os, + *(params->phPlatform) + ); + + + + + os << ", "; + os << ".DeviceType = "; + + os << + *(params->pDeviceType) + ; + + + + + os << ", "; + os << ".NumEntries = "; + + os << + *(params->pNumEntries) + ; + + + + + os << ", "; + os << ".phDevices = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphDevices))); + if (*(params->pphDevices) != NULL) { os << " {"; for (size_t i = 0; i < *params->pNumEntries; ++i) { if (i != 0) { os << ", "; } + + ur::details::printPtr(os, + (*(params->pphDevices))[i] + ); - ur::details::printPtr(os, - (*(params->pphDevices))[i]); } os << "}"; - } + } - os << ", "; - os << ".pNumDevices = "; + + + os << ", "; + os << ".pNumDevices = "; + + ur::details::printPtr(os, + *(params->ppNumDevices) + ); - ur::details::printPtr(os, - *(params->ppNumDevices)); return os; } + /////////////////////////////////////////////////////////////////////////////// /// @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 = "; + + ur::details::printPtr(os, + *(params->phDevice) + ); - os << ".hDevice = "; - - ur::details::printPtr(os, - *(params->phDevice)); - os << ", "; - os << ".propName = "; + + + os << ", "; + os << ".propName = "; + + os << + *(params->ppropName) + ; - os << *(params->ppropName); - os << ", "; - os << ".propSize = "; + + + os << ", "; + os << ".propSize = "; + + os << + *(params->ppropSize) + ; - os << *(params->ppropSize); - os << ", "; - os << ".pPropValue = "; - ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); + + + os << ", "; + os << ".pPropValue = "; + ur::details::printTagged(os, *(params->ppPropValue), *(params->ppropName), *(params->ppropSize)); - os << ", "; - os << ".pPropSizeRet = "; + + + os << ", "; + os << ".pPropSizeRet = "; + + ur::details::printPtr(os, + *(params->ppPropSizeRet) + ); - ur::details::printPtr(os, - *(params->ppPropSizeRet)); return os; } + /////////////////////////////////////////////////////////////////////////////// /// @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 = "; + + ur::details::printPtr(os, + *(params->phDevice) + ); - os << ".hDevice = "; - - ur::details::printPtr(os, - *(params->phDevice)); return os; } + /////////////////////////////////////////////////////////////////////////////// /// @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 = "; + + ur::details::printPtr(os, + *(params->phDevice) + ); - os << ".hDevice = "; - - ur::details::printPtr(os, - *(params->phDevice)); return os; } + /////////////////////////////////////////////////////////////////////////////// /// @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 = "; - - ur::details::printPtr(os, - *(params->phDevice)); - - os << ", "; - os << ".pProperties = "; - - ur::details::printPtr(os, - *(params->ppProperties)); - - os << ", "; - os << ".NumDevices = "; - - os << *(params->pNumDevices); - - os << ", "; - os << ".phSubDevices = "; - ur::details::printPtr(os, reinterpret_cast(*(params->pphSubDevices))); - if (*(params->pphSubDevices) != NULL) { + + + + os << ".hDevice = "; + + ur::details::printPtr(os, + *(params->phDevice) + ); + + + + + os << ", "; + os << ".pProperties = "; + + ur::details::printPtr(os, + *(params->ppProperties) + ); + + + + + os << ", "; + os << ".NumDevices = "; + + os << + *(params->pNumDevices) + ; + + + + + os << ", "; + os << ".phSubDevices = "; + ur::details::printPtr(os, reinterpret_cast(*(params->pphSubDevices))); + if (*(params->pphSubDevices) != NULL) { os << " {"; for (size_t i = 0; i < *params->pNumDevices; ++i) { if (i != 0) { os << ", "; } + + ur::details::printPtr(os, + (*(params->pphSubDevices))[i] + ); - ur::details::printPtr(os, - (*(params->pphSubDevices))[i]); } os << "}"; - } + } - os << ", "; - os << ".pNumDevicesRet = "; + + + os << ", "; + os << ".pNumDevicesRet = "; + + ur::details::printPtr(os, + *(params->ppNumDevicesRet) + ); - ur::details::printPtr(os, - *(params->ppNumDevicesRet)); return os; } + /////////////////////////////////////////////////////////////////////////////// /// @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 = "; + + ur::details::printPtr(os, + *(params->phDevice) + ); - os << ".hDevice = "; - - ur::details::printPtr(os, - *(params->phDevice)); - os << ", "; - os << ".pBinaries = "; + + + os << ", "; + os << ".pBinaries = "; + + ur::details::printPtr(os, + *(params->ppBinaries) + ); - ur::details::printPtr(os, - *(params->ppBinaries)); - os << ", "; - os << ".NumBinaries = "; + + + os << ", "; + os << ".NumBinaries = "; + + os << + *(params->pNumBinaries) + ; - os << *(params->pNumBinaries); - os << ", "; - os << ".pSelectedBinary = "; + + + os << ", "; + os << ".pSelectedBinary = "; + + ur::details::printPtr(os, + *(params->ppSelectedBinary) + ); - ur::details::printPtr(os, - *(params->ppSelectedBinary)); return os; } + /////////////////////////////////////////////////////////////////////////////// /// @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 = "; + + ur::details::printPtr(os, + *(params->phDevice) + ); - os << ".hDevice = "; - - ur::details::printPtr(os, - *(params->phDevice)); - os << ", "; - os << ".phNativeDevice = "; + + + os << ", "; + os << ".phNativeDevice = "; + + ur::details::printPtr(os, + *(params->pphNativeDevice) + ); - ur::details::printPtr(os, - *(params->pphNativeDevice)); return os; } + /////////////////////////////////////////////////////////////////////////////// /// @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 = "; + + ur::details::printPtr(os, reinterpret_cast( + *(params->phNativeDevice) + )); - os << ".hNativeDevice = "; - - ur::details::printPtr(os, reinterpret_cast( - *(params->phNativeDevice))); - os << ", "; - os << ".hAdapter = "; + + + os << ", "; + os << ".hAdapter = "; + + ur::details::printPtr(os, + *(params->phAdapter) + ); - ur::details::printPtr(os, - *(params->phAdapter)); - os << ", "; - os << ".pProperties = "; + + + os << ", "; + os << ".pProperties = "; + + ur::details::printPtr(os, + *(params->ppProperties) + ); - ur::details::printPtr(os, - *(params->ppProperties)); - os << ", "; - os << ".phDevice = "; + + + os << ", "; + os << ".phDevice = "; + + ur::details::printPtr(os, + *(params->pphDevice) + ); - ur::details::printPtr(os, - *(params->pphDevice)); return os; } + /////////////////////////////////////////////////////////////////////////////// /// @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 = "; + + ur::details::printPtr(os, + *(params->phDevice) + ); - os << ".hDevice = "; - - ur::details::printPtr(os, - *(params->phDevice)); - os << ", "; - os << ".pDeviceTimestamp = "; + + + os << ", "; + os << ".pDeviceTimestamp = "; + + ur::details::printPtr(os, + *(params->ppDeviceTimestamp) + ); - ur::details::printPtr(os, - *(params->ppDeviceTimestamp)); - os << ", "; - os << ".pHostTimestamp = "; + + + os << ", "; + os << ".pHostTimestamp = "; + + ur::details::printPtr(os, + *(params->ppHostTimestamp) + ); - ur::details::printPtr(os, - *(params->ppHostTimestamp)); return os; } + inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const ur_bool_t value) { os << (value ? "true" : "false"); return os; @@ -19347,8 +26026,7 @@ inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const ur_bool namespace ur::details { /////////////////////////////////////////////////////////////////////////////// // @brief Print pointer value -template -inline ur_result_t printPtr(std::ostream &os, const T *ptr) { +template inline ur_result_t printPtr(std::ostream &os, const T *ptr) { if (ptr == nullptr) { os << "nullptr"; } else if constexpr (std::is_pointer_v) { @@ -19357,7 +26035,7 @@ inline ur_result_t printPtr(std::ostream &os, const T *ptr) { os << ")"; } else if constexpr (std::is_void_v || is_handle_v) { os << (const void *)ptr; - } else if constexpr (std::is_same_v, char>) { + } else if constexpr (std::is_same_v, char>) { os << (const void *)(ptr) << " ("; os << ptr; os << ")"; @@ -19384,615 +26062,614 @@ inline ur_result_t UR_APICALL printFunctionParams(std::ostream &os, ur_function_ return UR_RESULT_ERROR_INVALID_NULL_POINTER; } - switch (function) { - case UR_FUNCTION_LOADER_CONFIG_CREATE: { - os << (const struct ur_loader_config_create_params_t *)params; - } break; - case UR_FUNCTION_LOADER_CONFIG_RETAIN: { - os << (const struct ur_loader_config_retain_params_t *)params; - } break; - case UR_FUNCTION_LOADER_CONFIG_RELEASE: { - os << (const struct ur_loader_config_release_params_t *)params; - } break; - case UR_FUNCTION_LOADER_CONFIG_GET_INFO: { - os << (const struct ur_loader_config_get_info_params_t *)params; - } break; - case UR_FUNCTION_LOADER_CONFIG_ENABLE_LAYER: { - os << (const struct ur_loader_config_enable_layer_params_t *)params; - } break; - case UR_FUNCTION_LOADER_CONFIG_SET_CODE_LOCATION_CALLBACK: { - os << (const struct ur_loader_config_set_code_location_callback_params_t *)params; - } break; - case UR_FUNCTION_LOADER_CONFIG_SET_MOCKING_ENABLED: { - os << (const struct ur_loader_config_set_mocking_enabled_params_t *)params; - } break; - case UR_FUNCTION_PLATFORM_GET: { - os << (const struct ur_platform_get_params_t *)params; - } break; - case UR_FUNCTION_PLATFORM_GET_INFO: { - os << (const struct ur_platform_get_info_params_t *)params; - } break; - case UR_FUNCTION_PLATFORM_GET_NATIVE_HANDLE: { - os << (const struct ur_platform_get_native_handle_params_t *)params; - } break; - case UR_FUNCTION_PLATFORM_CREATE_WITH_NATIVE_HANDLE: { - os << (const struct ur_platform_create_with_native_handle_params_t *)params; - } break; - case UR_FUNCTION_PLATFORM_GET_API_VERSION: { - os << (const struct ur_platform_get_api_version_params_t *)params; - } break; - case UR_FUNCTION_PLATFORM_GET_BACKEND_OPTION: { - os << (const struct ur_platform_get_backend_option_params_t *)params; - } break; - case UR_FUNCTION_CONTEXT_CREATE: { - os << (const struct ur_context_create_params_t *)params; - } break; - case UR_FUNCTION_CONTEXT_RETAIN: { - os << (const struct ur_context_retain_params_t *)params; - } break; - case UR_FUNCTION_CONTEXT_RELEASE: { - os << (const struct ur_context_release_params_t *)params; - } break; - case UR_FUNCTION_CONTEXT_GET_INFO: { - os << (const struct ur_context_get_info_params_t *)params; - } break; - case UR_FUNCTION_CONTEXT_GET_NATIVE_HANDLE: { - 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; - } break; - case UR_FUNCTION_CONTEXT_SET_EXTENDED_DELETER: { - os << (const struct ur_context_set_extended_deleter_params_t *)params; - } break; - case UR_FUNCTION_EVENT_GET_INFO: { - os << (const struct ur_event_get_info_params_t *)params; - } break; - case UR_FUNCTION_EVENT_GET_PROFILING_INFO: { - os << (const struct ur_event_get_profiling_info_params_t *)params; - } break; - case UR_FUNCTION_EVENT_WAIT: { - os << (const struct ur_event_wait_params_t *)params; - } break; - case UR_FUNCTION_EVENT_RETAIN: { - os << (const struct ur_event_retain_params_t *)params; - } break; - case UR_FUNCTION_EVENT_RELEASE: { - os << (const struct ur_event_release_params_t *)params; - } break; - case UR_FUNCTION_EVENT_GET_NATIVE_HANDLE: { - 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; - } 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_BUILD_EXP: { - os << (const struct ur_program_build_exp_params_t *)params; - } break; - case UR_FUNCTION_PROGRAM_COMPILE: { - os << (const struct ur_program_compile_params_t *)params; - } break; - case UR_FUNCTION_PROGRAM_COMPILE_EXP: { - os << (const struct ur_program_compile_exp_params_t *)params; - } break; - case UR_FUNCTION_PROGRAM_LINK: { - os << (const struct ur_program_link_params_t *)params; - } break; - case UR_FUNCTION_PROGRAM_LINK_EXP: { - os << (const struct ur_program_link_exp_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_GLOBAL_VARIABLE_POINTER: { - os << (const struct ur_program_get_global_variable_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; - case UR_FUNCTION_KERNEL_GET_INFO: { - os << (const struct ur_kernel_get_info_params_t *)params; - } break; - case UR_FUNCTION_KERNEL_GET_GROUP_INFO: { - os << (const struct ur_kernel_get_group_info_params_t *)params; - } break; - case UR_FUNCTION_KERNEL_GET_SUB_GROUP_INFO: { - os << (const struct ur_kernel_get_sub_group_info_params_t *)params; - } break; - case UR_FUNCTION_KERNEL_RETAIN: { - os << (const struct ur_kernel_retain_params_t *)params; - } break; - case UR_FUNCTION_KERNEL_RELEASE: { - os << (const struct ur_kernel_release_params_t *)params; - } break; - case UR_FUNCTION_KERNEL_GET_NATIVE_HANDLE: { - 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; - } break; - case UR_FUNCTION_KERNEL_GET_SUGGESTED_LOCAL_WORK_SIZE: { - os << (const struct ur_kernel_get_suggested_local_work_size_params_t *)params; - } break; - case UR_FUNCTION_KERNEL_SET_ARG_VALUE: { - os << (const struct ur_kernel_set_arg_value_params_t *)params; - } break; - case UR_FUNCTION_KERNEL_SET_ARG_LOCAL: { - os << (const struct ur_kernel_set_arg_local_params_t *)params; - } break; - case UR_FUNCTION_KERNEL_SET_ARG_POINTER: { - os << (const struct ur_kernel_set_arg_pointer_params_t *)params; - } break; - case UR_FUNCTION_KERNEL_SET_EXEC_INFO: { - os << (const struct ur_kernel_set_exec_info_params_t *)params; - } break; - case UR_FUNCTION_KERNEL_SET_ARG_SAMPLER: { - os << (const struct ur_kernel_set_arg_sampler_params_t *)params; - } break; - case UR_FUNCTION_KERNEL_SET_ARG_MEM_OBJ: { - 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; - } break; - case UR_FUNCTION_KERNEL_SUGGEST_MAX_COOPERATIVE_GROUP_COUNT_EXP: { - os << (const struct ur_kernel_suggest_max_cooperative_group_count_exp_params_t *)params; - } break; - case UR_FUNCTION_QUEUE_GET_INFO: { - os << (const struct ur_queue_get_info_params_t *)params; - } break; - case UR_FUNCTION_QUEUE_CREATE: { - os << (const struct ur_queue_create_params_t *)params; - } break; - case UR_FUNCTION_QUEUE_RETAIN: { - os << (const struct ur_queue_retain_params_t *)params; - } break; - case UR_FUNCTION_QUEUE_RELEASE: { - os << (const struct ur_queue_release_params_t *)params; - } break; - case UR_FUNCTION_QUEUE_GET_NATIVE_HANDLE: { - 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; - } break; - case UR_FUNCTION_QUEUE_FINISH: { - os << (const struct ur_queue_finish_params_t *)params; - } break; - 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; - } break; - case UR_FUNCTION_SAMPLER_RETAIN: { - os << (const struct ur_sampler_retain_params_t *)params; - } break; - case UR_FUNCTION_SAMPLER_RELEASE: { - os << (const struct ur_sampler_release_params_t *)params; - } break; - case UR_FUNCTION_SAMPLER_GET_INFO: { - os << (const struct ur_sampler_get_info_params_t *)params; - } break; - case UR_FUNCTION_SAMPLER_GET_NATIVE_HANDLE: { - os << (const struct ur_sampler_get_native_handle_params_t *)params; - } break; - 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; - } break; - case UR_FUNCTION_MEM_BUFFER_CREATE: { - os << (const struct ur_mem_buffer_create_params_t *)params; - } break; - case UR_FUNCTION_MEM_RETAIN: { - os << (const struct ur_mem_retain_params_t *)params; - } break; - case UR_FUNCTION_MEM_RELEASE: { - os << (const struct ur_mem_release_params_t *)params; - } break; - case UR_FUNCTION_MEM_BUFFER_PARTITION: { - os << (const struct ur_mem_buffer_partition_params_t *)params; - } break; - case UR_FUNCTION_MEM_GET_NATIVE_HANDLE: { - 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; - } break; - case UR_FUNCTION_MEM_IMAGE_CREATE_WITH_NATIVE_HANDLE: { - 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; - } break; - case UR_FUNCTION_MEM_IMAGE_GET_INFO: { - os << (const struct ur_mem_image_get_info_params_t *)params; - } break; - case UR_FUNCTION_PHYSICAL_MEM_CREATE: { - os << (const struct ur_physical_mem_create_params_t *)params; - } break; - case UR_FUNCTION_PHYSICAL_MEM_RETAIN: { - os << (const struct ur_physical_mem_retain_params_t *)params; - } break; - case UR_FUNCTION_PHYSICAL_MEM_RELEASE: { - os << (const struct ur_physical_mem_release_params_t *)params; - } break; - 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_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_KERNEL_LAUNCH_CUSTOM_EXP: { - os << (const struct ur_enqueue_kernel_launch_custom_exp_params_t *)params; - } break; - case UR_FUNCTION_ENQUEUE_EVENTS_WAIT_WITH_BARRIER_EXT: { - os << (const struct ur_enqueue_events_wait_with_barrier_ext_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_ENQUEUE_TIMESTAMP_RECORDING_EXP: { - os << (const struct ur_enqueue_timestamp_recording_exp_params_t *)params; - } break; - case UR_FUNCTION_ENQUEUE_NATIVE_COMMAND_EXP: { - os << (const struct ur_enqueue_native_command_exp_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_EXTERNAL_MEMORY_EXP: { - os << (const struct ur_bindless_images_import_external_memory_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_MAP_EXTERNAL_LINEAR_MEMORY_EXP: { - os << (const struct ur_bindless_images_map_external_linear_memory_exp_params_t *)params; - } break; - case UR_FUNCTION_BINDLESS_IMAGES_RELEASE_EXTERNAL_MEMORY_EXP: { - os << (const struct ur_bindless_images_release_external_memory_exp_params_t *)params; - } break; - case UR_FUNCTION_BINDLESS_IMAGES_IMPORT_EXTERNAL_SEMAPHORE_EXP: { - os << (const struct ur_bindless_images_import_external_semaphore_exp_params_t *)params; - } break; - case UR_FUNCTION_BINDLESS_IMAGES_RELEASE_EXTERNAL_SEMAPHORE_EXP: { - os << (const struct ur_bindless_images_release_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; - } break; - case UR_FUNCTION_USM_DEVICE_ALLOC: { - os << (const struct ur_usm_device_alloc_params_t *)params; - } break; - case UR_FUNCTION_USM_SHARED_ALLOC: { - os << (const struct ur_usm_shared_alloc_params_t *)params; - } break; - case UR_FUNCTION_USM_FREE: { - os << (const struct ur_usm_free_params_t *)params; - } break; - case UR_FUNCTION_USM_GET_MEM_ALLOC_INFO: { - os << (const struct ur_usm_get_mem_alloc_info_params_t *)params; - } break; - case UR_FUNCTION_USM_POOL_CREATE: { - os << (const struct ur_usm_pool_create_params_t *)params; - } break; - case UR_FUNCTION_USM_POOL_RETAIN: { - os << (const struct ur_usm_pool_retain_params_t *)params; - } break; - case UR_FUNCTION_USM_POOL_RELEASE: { - os << (const struct ur_usm_pool_release_params_t *)params; - } break; - case UR_FUNCTION_USM_POOL_GET_INFO: { - os << (const struct ur_usm_pool_get_info_params_t *)params; - } break; - case UR_FUNCTION_USM_PITCHED_ALLOC_EXP: { - os << (const struct ur_usm_pitched_alloc_exp_params_t *)params; - } break; - case UR_FUNCTION_USM_IMPORT_EXP: { - os << (const struct ur_usm_import_exp_params_t *)params; - } break; - 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_COMMAND_BUFFER_RETAIN_COMMAND_EXP: { - os << (const struct ur_command_buffer_retain_command_exp_params_t *)params; - } break; - case UR_FUNCTION_COMMAND_BUFFER_RELEASE_COMMAND_EXP: { - os << (const struct ur_command_buffer_release_command_exp_params_t *)params; - } break; - case UR_FUNCTION_COMMAND_BUFFER_UPDATE_KERNEL_LAUNCH_EXP: { - os << (const struct ur_command_buffer_update_kernel_launch_exp_params_t *)params; - } break; - case UR_FUNCTION_COMMAND_BUFFER_UPDATE_SIGNAL_EVENT_EXP: { - os << (const struct ur_command_buffer_update_signal_event_exp_params_t *)params; - } break; - case UR_FUNCTION_COMMAND_BUFFER_UPDATE_WAIT_EVENTS_EXP: { - os << (const struct ur_command_buffer_update_wait_events_exp_params_t *)params; - } break; - case UR_FUNCTION_COMMAND_BUFFER_GET_INFO_EXP: { - os << (const struct ur_command_buffer_get_info_exp_params_t *)params; - } break; - case UR_FUNCTION_COMMAND_BUFFER_COMMAND_GET_INFO_EXP: { - os << (const struct ur_command_buffer_command_get_info_exp_params_t *)params; - } break; - case UR_FUNCTION_TENSOR_MAP_ENCODE_IM_2_COL_EXP: { - os << (const struct ur_tensor_map_encode_im_2_col_exp_params_t *)params; - } break; - case UR_FUNCTION_TENSOR_MAP_ENCODE_TILED_EXP: { - os << (const struct ur_tensor_map_encode_tiled_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; - } 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; - } 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; - } break; - case UR_FUNCTION_VIRTUAL_MEM_RESERVE: { - os << (const struct ur_virtual_mem_reserve_params_t *)params; - } break; - case UR_FUNCTION_VIRTUAL_MEM_FREE: { - os << (const struct ur_virtual_mem_free_params_t *)params; - } break; - case UR_FUNCTION_VIRTUAL_MEM_MAP: { - os << (const struct ur_virtual_mem_map_params_t *)params; - } break; - case UR_FUNCTION_VIRTUAL_MEM_UNMAP: { - os << (const struct ur_virtual_mem_unmap_params_t *)params; - } break; - case UR_FUNCTION_VIRTUAL_MEM_SET_ACCESS: { - os << (const struct ur_virtual_mem_set_access_params_t *)params; - } break; - case UR_FUNCTION_VIRTUAL_MEM_GET_INFO: { - os << (const struct ur_virtual_mem_get_info_params_t *)params; - } break; - case UR_FUNCTION_DEVICE_GET: { - os << (const struct ur_device_get_params_t *)params; - } break; - case UR_FUNCTION_DEVICE_GET_SELECTED: { - os << (const struct ur_device_get_selected_params_t *)params; - } break; - case UR_FUNCTION_DEVICE_GET_INFO: { - os << (const struct ur_device_get_info_params_t *)params; - } break; - case UR_FUNCTION_DEVICE_RETAIN: { - os << (const struct ur_device_retain_params_t *)params; - } break; - case UR_FUNCTION_DEVICE_RELEASE: { - os << (const struct ur_device_release_params_t *)params; - } break; - case UR_FUNCTION_DEVICE_PARTITION: { - os << (const struct ur_device_partition_params_t *)params; - } break; - case UR_FUNCTION_DEVICE_SELECT_BINARY: { - os << (const struct ur_device_select_binary_params_t *)params; - } break; - case UR_FUNCTION_DEVICE_GET_NATIVE_HANDLE: { - 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; - } break; - case UR_FUNCTION_DEVICE_GET_GLOBAL_TIMESTAMPS: { - os << (const struct ur_device_get_global_timestamps_params_t *)params; - } break; - default: - return UR_RESULT_ERROR_INVALID_ENUMERATION; + switch(function) { + case UR_FUNCTION_LOADER_CONFIG_CREATE: { + os << (const struct ur_loader_config_create_params_t *)params; + } break; + case UR_FUNCTION_LOADER_CONFIG_RETAIN: { + os << (const struct ur_loader_config_retain_params_t *)params; + } break; + case UR_FUNCTION_LOADER_CONFIG_RELEASE: { + os << (const struct ur_loader_config_release_params_t *)params; + } break; + case UR_FUNCTION_LOADER_CONFIG_GET_INFO: { + os << (const struct ur_loader_config_get_info_params_t *)params; + } break; + case UR_FUNCTION_LOADER_CONFIG_ENABLE_LAYER: { + os << (const struct ur_loader_config_enable_layer_params_t *)params; + } break; + case UR_FUNCTION_LOADER_CONFIG_SET_CODE_LOCATION_CALLBACK: { + os << (const struct ur_loader_config_set_code_location_callback_params_t *)params; + } break; + case UR_FUNCTION_LOADER_CONFIG_SET_MOCKING_ENABLED: { + os << (const struct ur_loader_config_set_mocking_enabled_params_t *)params; + } break; + case UR_FUNCTION_PLATFORM_GET: { + os << (const struct ur_platform_get_params_t *)params; + } break; + case UR_FUNCTION_PLATFORM_GET_INFO: { + os << (const struct ur_platform_get_info_params_t *)params; + } break; + case UR_FUNCTION_PLATFORM_GET_NATIVE_HANDLE: { + os << (const struct ur_platform_get_native_handle_params_t *)params; + } break; + case UR_FUNCTION_PLATFORM_CREATE_WITH_NATIVE_HANDLE: { + os << (const struct ur_platform_create_with_native_handle_params_t *)params; + } break; + case UR_FUNCTION_PLATFORM_GET_API_VERSION: { + os << (const struct ur_platform_get_api_version_params_t *)params; + } break; + case UR_FUNCTION_PLATFORM_GET_BACKEND_OPTION: { + os << (const struct ur_platform_get_backend_option_params_t *)params; + } break; + case UR_FUNCTION_CONTEXT_CREATE: { + os << (const struct ur_context_create_params_t *)params; + } break; + case UR_FUNCTION_CONTEXT_RETAIN: { + os << (const struct ur_context_retain_params_t *)params; + } break; + case UR_FUNCTION_CONTEXT_RELEASE: { + os << (const struct ur_context_release_params_t *)params; + } break; + case UR_FUNCTION_CONTEXT_GET_INFO: { + os << (const struct ur_context_get_info_params_t *)params; + } break; + case UR_FUNCTION_CONTEXT_GET_NATIVE_HANDLE: { + 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; + } break; + case UR_FUNCTION_CONTEXT_SET_EXTENDED_DELETER: { + os << (const struct ur_context_set_extended_deleter_params_t *)params; + } break; + case UR_FUNCTION_EVENT_GET_INFO: { + os << (const struct ur_event_get_info_params_t *)params; + } break; + case UR_FUNCTION_EVENT_GET_PROFILING_INFO: { + os << (const struct ur_event_get_profiling_info_params_t *)params; + } break; + case UR_FUNCTION_EVENT_WAIT: { + os << (const struct ur_event_wait_params_t *)params; + } break; + case UR_FUNCTION_EVENT_RETAIN: { + os << (const struct ur_event_retain_params_t *)params; + } break; + case UR_FUNCTION_EVENT_RELEASE: { + os << (const struct ur_event_release_params_t *)params; + } break; + case UR_FUNCTION_EVENT_GET_NATIVE_HANDLE: { + 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; + } 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_BUILD_EXP: { + os << (const struct ur_program_build_exp_params_t *)params; + } break; + case UR_FUNCTION_PROGRAM_COMPILE: { + os << (const struct ur_program_compile_params_t *)params; + } break; + case UR_FUNCTION_PROGRAM_COMPILE_EXP: { + os << (const struct ur_program_compile_exp_params_t *)params; + } break; + case UR_FUNCTION_PROGRAM_LINK: { + os << (const struct ur_program_link_params_t *)params; + } break; + case UR_FUNCTION_PROGRAM_LINK_EXP: { + os << (const struct ur_program_link_exp_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_GLOBAL_VARIABLE_POINTER: { + os << (const struct ur_program_get_global_variable_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; + case UR_FUNCTION_KERNEL_GET_INFO: { + os << (const struct ur_kernel_get_info_params_t *)params; + } break; + case UR_FUNCTION_KERNEL_GET_GROUP_INFO: { + os << (const struct ur_kernel_get_group_info_params_t *)params; + } break; + case UR_FUNCTION_KERNEL_GET_SUB_GROUP_INFO: { + os << (const struct ur_kernel_get_sub_group_info_params_t *)params; + } break; + case UR_FUNCTION_KERNEL_RETAIN: { + os << (const struct ur_kernel_retain_params_t *)params; + } break; + case UR_FUNCTION_KERNEL_RELEASE: { + os << (const struct ur_kernel_release_params_t *)params; + } break; + case UR_FUNCTION_KERNEL_GET_NATIVE_HANDLE: { + 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; + } break; + case UR_FUNCTION_KERNEL_GET_SUGGESTED_LOCAL_WORK_SIZE: { + os << (const struct ur_kernel_get_suggested_local_work_size_params_t *)params; + } break; + case UR_FUNCTION_KERNEL_SET_ARG_VALUE: { + os << (const struct ur_kernel_set_arg_value_params_t *)params; + } break; + case UR_FUNCTION_KERNEL_SET_ARG_LOCAL: { + os << (const struct ur_kernel_set_arg_local_params_t *)params; + } break; + case UR_FUNCTION_KERNEL_SET_ARG_POINTER: { + os << (const struct ur_kernel_set_arg_pointer_params_t *)params; + } break; + case UR_FUNCTION_KERNEL_SET_EXEC_INFO: { + os << (const struct ur_kernel_set_exec_info_params_t *)params; + } break; + case UR_FUNCTION_KERNEL_SET_ARG_SAMPLER: { + os << (const struct ur_kernel_set_arg_sampler_params_t *)params; + } break; + case UR_FUNCTION_KERNEL_SET_ARG_MEM_OBJ: { + 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; + } break; + case UR_FUNCTION_KERNEL_SUGGEST_MAX_COOPERATIVE_GROUP_COUNT_EXP: { + os << (const struct ur_kernel_suggest_max_cooperative_group_count_exp_params_t *)params; + } break; + case UR_FUNCTION_QUEUE_GET_INFO: { + os << (const struct ur_queue_get_info_params_t *)params; + } break; + case UR_FUNCTION_QUEUE_CREATE: { + os << (const struct ur_queue_create_params_t *)params; + } break; + case UR_FUNCTION_QUEUE_RETAIN: { + os << (const struct ur_queue_retain_params_t *)params; + } break; + case UR_FUNCTION_QUEUE_RELEASE: { + os << (const struct ur_queue_release_params_t *)params; + } break; + case UR_FUNCTION_QUEUE_GET_NATIVE_HANDLE: { + 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; + } break; + case UR_FUNCTION_QUEUE_FINISH: { + os << (const struct ur_queue_finish_params_t *)params; + } break; + 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; + } break; + case UR_FUNCTION_SAMPLER_RETAIN: { + os << (const struct ur_sampler_retain_params_t *)params; + } break; + case UR_FUNCTION_SAMPLER_RELEASE: { + os << (const struct ur_sampler_release_params_t *)params; + } break; + case UR_FUNCTION_SAMPLER_GET_INFO: { + os << (const struct ur_sampler_get_info_params_t *)params; + } break; + case UR_FUNCTION_SAMPLER_GET_NATIVE_HANDLE: { + os << (const struct ur_sampler_get_native_handle_params_t *)params; + } break; + 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; + } break; + case UR_FUNCTION_MEM_BUFFER_CREATE: { + os << (const struct ur_mem_buffer_create_params_t *)params; + } break; + case UR_FUNCTION_MEM_RETAIN: { + os << (const struct ur_mem_retain_params_t *)params; + } break; + case UR_FUNCTION_MEM_RELEASE: { + os << (const struct ur_mem_release_params_t *)params; + } break; + case UR_FUNCTION_MEM_BUFFER_PARTITION: { + os << (const struct ur_mem_buffer_partition_params_t *)params; + } break; + case UR_FUNCTION_MEM_GET_NATIVE_HANDLE: { + 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; + } break; + case UR_FUNCTION_MEM_IMAGE_CREATE_WITH_NATIVE_HANDLE: { + 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; + } break; + case UR_FUNCTION_MEM_IMAGE_GET_INFO: { + os << (const struct ur_mem_image_get_info_params_t *)params; + } break; + case UR_FUNCTION_PHYSICAL_MEM_CREATE: { + os << (const struct ur_physical_mem_create_params_t *)params; + } break; + case UR_FUNCTION_PHYSICAL_MEM_RETAIN: { + os << (const struct ur_physical_mem_retain_params_t *)params; + } break; + case UR_FUNCTION_PHYSICAL_MEM_RELEASE: { + os << (const struct ur_physical_mem_release_params_t *)params; + } break; + 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_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_KERNEL_LAUNCH_CUSTOM_EXP: { + os << (const struct ur_enqueue_kernel_launch_custom_exp_params_t *)params; + } break; + case UR_FUNCTION_ENQUEUE_EVENTS_WAIT_WITH_BARRIER_EXT: { + os << (const struct ur_enqueue_events_wait_with_barrier_ext_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_ENQUEUE_TIMESTAMP_RECORDING_EXP: { + os << (const struct ur_enqueue_timestamp_recording_exp_params_t *)params; + } break; + case UR_FUNCTION_ENQUEUE_NATIVE_COMMAND_EXP: { + os << (const struct ur_enqueue_native_command_exp_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_EXTERNAL_MEMORY_EXP: { + os << (const struct ur_bindless_images_import_external_memory_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_MAP_EXTERNAL_LINEAR_MEMORY_EXP: { + os << (const struct ur_bindless_images_map_external_linear_memory_exp_params_t *)params; + } break; + case UR_FUNCTION_BINDLESS_IMAGES_RELEASE_EXTERNAL_MEMORY_EXP: { + os << (const struct ur_bindless_images_release_external_memory_exp_params_t *)params; + } break; + case UR_FUNCTION_BINDLESS_IMAGES_IMPORT_EXTERNAL_SEMAPHORE_EXP: { + os << (const struct ur_bindless_images_import_external_semaphore_exp_params_t *)params; + } break; + case UR_FUNCTION_BINDLESS_IMAGES_RELEASE_EXTERNAL_SEMAPHORE_EXP: { + os << (const struct ur_bindless_images_release_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; + } break; + case UR_FUNCTION_USM_DEVICE_ALLOC: { + os << (const struct ur_usm_device_alloc_params_t *)params; + } break; + case UR_FUNCTION_USM_SHARED_ALLOC: { + os << (const struct ur_usm_shared_alloc_params_t *)params; + } break; + case UR_FUNCTION_USM_FREE: { + os << (const struct ur_usm_free_params_t *)params; + } break; + case UR_FUNCTION_USM_GET_MEM_ALLOC_INFO: { + os << (const struct ur_usm_get_mem_alloc_info_params_t *)params; + } break; + case UR_FUNCTION_USM_POOL_CREATE: { + os << (const struct ur_usm_pool_create_params_t *)params; + } break; + case UR_FUNCTION_USM_POOL_RETAIN: { + os << (const struct ur_usm_pool_retain_params_t *)params; + } break; + case UR_FUNCTION_USM_POOL_RELEASE: { + os << (const struct ur_usm_pool_release_params_t *)params; + } break; + case UR_FUNCTION_USM_POOL_GET_INFO: { + os << (const struct ur_usm_pool_get_info_params_t *)params; + } break; + case UR_FUNCTION_USM_PITCHED_ALLOC_EXP: { + os << (const struct ur_usm_pitched_alloc_exp_params_t *)params; + } break; + case UR_FUNCTION_USM_IMPORT_EXP: { + os << (const struct ur_usm_import_exp_params_t *)params; + } break; + 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_COMMAND_BUFFER_RETAIN_COMMAND_EXP: { + os << (const struct ur_command_buffer_retain_command_exp_params_t *)params; + } break; + case UR_FUNCTION_COMMAND_BUFFER_RELEASE_COMMAND_EXP: { + os << (const struct ur_command_buffer_release_command_exp_params_t *)params; + } break; + case UR_FUNCTION_COMMAND_BUFFER_UPDATE_KERNEL_LAUNCH_EXP: { + os << (const struct ur_command_buffer_update_kernel_launch_exp_params_t *)params; + } break; + case UR_FUNCTION_COMMAND_BUFFER_UPDATE_SIGNAL_EVENT_EXP: { + os << (const struct ur_command_buffer_update_signal_event_exp_params_t *)params; + } break; + case UR_FUNCTION_COMMAND_BUFFER_UPDATE_WAIT_EVENTS_EXP: { + os << (const struct ur_command_buffer_update_wait_events_exp_params_t *)params; + } break; + case UR_FUNCTION_COMMAND_BUFFER_GET_INFO_EXP: { + os << (const struct ur_command_buffer_get_info_exp_params_t *)params; + } break; + case UR_FUNCTION_COMMAND_BUFFER_COMMAND_GET_INFO_EXP: { + os << (const struct ur_command_buffer_command_get_info_exp_params_t *)params; + } break; + case UR_FUNCTION_TENSOR_MAP_ENCODE_IM_2_COL_EXP: { + os << (const struct ur_tensor_map_encode_im_2_col_exp_params_t *)params; + } break; + case UR_FUNCTION_TENSOR_MAP_ENCODE_TILED_EXP: { + os << (const struct ur_tensor_map_encode_tiled_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; + } 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; + } 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; + } break; + case UR_FUNCTION_VIRTUAL_MEM_RESERVE: { + os << (const struct ur_virtual_mem_reserve_params_t *)params; + } break; + case UR_FUNCTION_VIRTUAL_MEM_FREE: { + os << (const struct ur_virtual_mem_free_params_t *)params; + } break; + case UR_FUNCTION_VIRTUAL_MEM_MAP: { + os << (const struct ur_virtual_mem_map_params_t *)params; + } break; + case UR_FUNCTION_VIRTUAL_MEM_UNMAP: { + os << (const struct ur_virtual_mem_unmap_params_t *)params; + } break; + case UR_FUNCTION_VIRTUAL_MEM_SET_ACCESS: { + os << (const struct ur_virtual_mem_set_access_params_t *)params; + } break; + case UR_FUNCTION_VIRTUAL_MEM_GET_INFO: { + os << (const struct ur_virtual_mem_get_info_params_t *)params; + } break; + case UR_FUNCTION_DEVICE_GET: { + os << (const struct ur_device_get_params_t *)params; + } break; + case UR_FUNCTION_DEVICE_GET_SELECTED: { + os << (const struct ur_device_get_selected_params_t *)params; + } break; + case UR_FUNCTION_DEVICE_GET_INFO: { + os << (const struct ur_device_get_info_params_t *)params; + } break; + case UR_FUNCTION_DEVICE_RETAIN: { + os << (const struct ur_device_retain_params_t *)params; + } break; + case UR_FUNCTION_DEVICE_RELEASE: { + os << (const struct ur_device_release_params_t *)params; + } break; + case UR_FUNCTION_DEVICE_PARTITION: { + os << (const struct ur_device_partition_params_t *)params; + } break; + case UR_FUNCTION_DEVICE_SELECT_BINARY: { + os << (const struct ur_device_select_binary_params_t *)params; + } break; + case UR_FUNCTION_DEVICE_GET_NATIVE_HANDLE: { + 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; + } break; + case UR_FUNCTION_DEVICE_GET_GLOBAL_TIMESTAMPS: { + os << (const struct ur_device_get_global_timestamps_params_t *)params; + } break; + default: return UR_RESULT_ERROR_INVALID_ENUMERATION; } return UR_RESULT_SUCCESS; } diff --git a/scripts/core/EXP-BINDLESS-IMAGES.rst b/scripts/core/EXP-BINDLESS-IMAGES.rst index c2b3d1114e..ac4dd06947 100644 --- a/scripts/core/EXP-BINDLESS-IMAGES.rst +++ b/scripts/core/EXP-BINDLESS-IMAGES.rst @@ -90,15 +90,15 @@ Enums * ${X}_DEVICE_INFO_EXTERNAL_SEMAPHORE_IMPORT_SUPPORT_EXP * ${X}_DEVICE_INFO_CUBEMAP_SUPPORT_EXP * ${X}_DEVICE_INFO_CUBEMAP_SEAMLESS_FILTERING_SUPPORT_EXP - * ${X}_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_USM_EXP - * ${X}_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_EXP - * ${X}_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_USM_EXP - * ${X}_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_EXP - * ${X}_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_3D_EXP + * ${X}_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_USM_SUPPORT_EXP + * ${X}_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_SUPPORT_EXP + * ${X}_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_USM_SUPPORT_EXP + * ${X}_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_SUPPORT_EXP + * ${X}_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_3D_SUPPORT_EXP * ${X}_DEVICE_INFO_IMAGE_ARRAY_SUPPORT_EXP - * ${X}_DEVICE_INFO_BINDLESS_UNIQUE_ADDRESSING_PER_DIM_EXP - * ${X}_DEVICE_INFO_BINDLESS_SAMPLE_1D_USM_EXP - * ${X}_DEVICE_INFO_BINDLESS_SAMPLE_2D_USM_EXP + * ${X}_DEVICE_INFO_BINDLESS_UNIQUE_ADDRESSING_PER_DIM_SUPPORT_EXP + * ${X}_DEVICE_INFO_BINDLESS_SAMPLE_1D_USM_SUPPORT_EXP + * ${X}_DEVICE_INFO_BINDLESS_SAMPLE_2D_USM_SUPPORT_EXP * ${x}_command_t * ${X}_COMMAND_EXTERNAL_SEMAPHORE_WAIT_EXP diff --git a/scripts/core/EXP-LOW-POWER-EVENTS.rst b/scripts/core/EXP-LOW-POWER-EVENTS.rst index 43f2032527..c4e8273545 100644 --- a/scripts/core/EXP-LOW-POWER-EVENTS.rst +++ b/scripts/core/EXP-LOW-POWER-EVENTS.rst @@ -47,7 +47,7 @@ Enums ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * ${x}_device_info_t - * ${X}_DEVICE_INFO_LOW_POWER_EVENTS_EXP + * ${X}_DEVICE_INFO_LOW_POWER_EVENTS_SUPPORT_EXP * ${x}_queue_flags_t * ${X}_QUEUE_FLAG_LOW_POWER_EVENTS_EXP * ${x}_exp_enqueue_ext_flags_t @@ -78,7 +78,7 @@ Support -------------------------------------------------------------------------------- Adapters which support this experimental feature *must* return true for the new -``${X}_DEVICE_INFO_LOW_POWER_EVENTS_EXP`` device info query. +``${X}_DEVICE_INFO_LOW_POWER_EVENTS_SUPPORT_EXP`` device info query. Contributors diff --git a/scripts/core/device.yml b/scripts/core/device.yml index c430ff0b36..26238f1e29 100644 --- a/scripts/core/device.yml +++ b/scripts/core/device.yml @@ -253,7 +253,7 @@ etors: desc: "[uint32_t] address bits" - name: MAX_MEM_ALLOC_SIZE desc: "[uint64_t] max memory allocation size" - - name: IMAGE_SUPPORTED + - name: IMAGE_SUPPORT desc: "[$x_bool_t] images are supported" - name: MAX_READ_IMAGE_ARGS desc: "[uint32_t] max number of image objects arguments of a kernel declared with the read_only qualifier" @@ -359,7 +359,7 @@ etors: [$x_device_affinity_domain_flags_t] Returns a bit-field of the supported affinity domains for partitioning. If the device does not support any affinity domains, then 0 will be returned. - name: PARTITION_TYPE - desc: "[$x_device_partition_property_t[]] return an array of $x_device_partition_property_t for properties specified in $xDevicePartition" + desc: "[$x_device_partition_property_t[]] returns an array of properties specified in $xDevicePartition" - name: MAX_NUM_SUB_GROUPS desc: "[uint32_t] max number of sub groups" - name: SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS @@ -425,7 +425,7 @@ etors: desc: "[$x_bool_t] return true if Async Barrier is supported" - name: MEM_CHANNEL_SUPPORT desc: "[$x_bool_t] return true if specifying memory channels is supported" - - name: HOST_PIPE_READ_WRITE_SUPPORTED + - name: HOST_PIPE_READ_WRITE_SUPPORT desc: "[$x_bool_t] Return true if the device supports enqueueing commands to read and write pipes from the host." - name: MAX_REGISTERS_PER_WORK_GROUP desc: "[uint32_t] The maximum number of registers available per block." diff --git a/scripts/core/exp-bindless-images.yml b/scripts/core/exp-bindless-images.yml index 5648c56333..2c30ac0e78 100644 --- a/scripts/core/exp-bindless-images.yml +++ b/scripts/core/exp-bindless-images.yml @@ -86,33 +86,33 @@ etors: - name: CUBEMAP_SEAMLESS_FILTERING_SUPPORT_EXP value: "0x2011" desc: "[$x_bool_t] returns true if the device supports sampling cubemapped images across face boundaries" - - name: BINDLESS_SAMPLED_IMAGE_FETCH_1D_USM_EXP + - name: BINDLESS_SAMPLED_IMAGE_FETCH_1D_USM_SUPPORT_EXP value: "0x2012" - desc: "[$x_bool_t] returns true if the device is capable of fetching USM backed 1D sampled image data." - - name: BINDLESS_SAMPLED_IMAGE_FETCH_1D_EXP + desc: "[$x_bool_t] returns true if the device supports fetching USM backed 1D sampled image data." + - name: BINDLESS_SAMPLED_IMAGE_FETCH_1D_SUPPORT_EXP value: "0x2013" - desc: "[$x_bool_t] returns true if the device is capable of fetching non-USM backed 1D sampled image data." - - name: BINDLESS_SAMPLED_IMAGE_FETCH_2D_USM_EXP + desc: "[$x_bool_t] returns true if the device supports fetching non-USM backed 1D sampled image data." + - name: BINDLESS_SAMPLED_IMAGE_FETCH_2D_USM_SUPPORT_EXP value: "0x2014" - desc: "[$x_bool_t] returns true if the device is capable of fetching USM backed 2D sampled image data." - - name: BINDLESS_SAMPLED_IMAGE_FETCH_2D_EXP + desc: "[$x_bool_t] returns true if the device supports fetching USM backed 2D sampled image data." + - name: BINDLESS_SAMPLED_IMAGE_FETCH_2D_SUPPORT_EXP value: "0x2015" - desc: "[$x_bool_t] returns true if the device is capable of fetching non-USM backed 2D sampled image data." - - name: BINDLESS_SAMPLED_IMAGE_FETCH_3D_EXP + desc: "[$x_bool_t] returns true if the device supports fetching non-USM backed 2D sampled image data." + - name: BINDLESS_SAMPLED_IMAGE_FETCH_3D_SUPPORT_EXP value: "0x2017" - desc: "[$x_bool_t] returns true if the device is capable of fetching non-USM backed 3D sampled image data." + desc: "[$x_bool_t] returns true if the device supports fetching non-USM backed 3D sampled image data." - name: IMAGE_ARRAY_SUPPORT_EXP value: "0x2019" desc: "[$x_bool_t] returns true if the device supports allocating and accessing image array resources." - - name: BINDLESS_UNIQUE_ADDRESSING_PER_DIM_EXP + - name: BINDLESS_UNIQUE_ADDRESSING_PER_DIM_SUPPORT_EXP value: "0x201A" desc: "[$x_bool_t] returns true if the device supports unique addressing per dimension." - - name: BINDLESS_SAMPLE_1D_USM_EXP + - name: BINDLESS_SAMPLE_1D_USM_SUPPORT_EXP value: "0x201B" - desc: "[$x_bool_t] returns true if the device is capable of sampling USM backed 1D sampled image data." - - name: BINDLESS_SAMPLE_2D_USM_EXP + desc: "[$x_bool_t] returns true if the device supports sampling USM backed 1D sampled image data." + - name: BINDLESS_SAMPLE_2D_USM_SUPPORT_EXP value: "0x201C" - desc: "[$x_bool_t] returns true if the device is capable of sampling USM backed 2D sampled image data." + desc: "[$x_bool_t] returns true if the device supports sampling USM backed 2D sampled image data." --- #-------------------------------------------------------------------------- type: enum extend: true diff --git a/scripts/core/exp-launch-properties.yml b/scripts/core/exp-launch-properties.yml index ca28421815..378dfd95e2 100644 --- a/scripts/core/exp-launch-properties.yml +++ b/scripts/core/exp-launch-properties.yml @@ -144,6 +144,6 @@ typed_etors: true desc: "Extension enums to $x_device_info_t to support arch specific launch properties." name: $x_device_info_t etors: - - name: CLUSTER_LAUNCH_EXP + - name: CLUSTER_LAUNCH_SUPPORT_EXP value: "0x1111" desc: "[$x_bool_t] return true if enqueue Cluster Launch is supported" diff --git a/scripts/core/exp-low-power-events.yml b/scripts/core/exp-low-power-events.yml index f116eaf73a..f9ce931bd0 100644 --- a/scripts/core/exp-low-power-events.yml +++ b/scripts/core/exp-low-power-events.yml @@ -19,7 +19,7 @@ typed_etors: true desc: "Extension enums to $x_device_info_t to support low-power events." name: $x_device_info_t etors: - - name: LOW_POWER_EVENTS_EXP + - name: LOW_POWER_EVENTS_SUPPORT_EXP value: "0x2021" desc: "[$x_bool_t] returns true if the device supports low-power events." diff --git a/scripts/core/exp-usm-p2p.yml b/scripts/core/exp-usm-p2p.yml index f3ba303c34..5add865ba6 100644 --- a/scripts/core/exp-usm-p2p.yml +++ b/scripts/core/exp-usm-p2p.yml @@ -23,9 +23,9 @@ class: $xUsmP2P name: $x_exp_peer_info_t typed_etors: True etors: - - name: UR_PEER_ACCESS_SUPPORTED + - name: UR_PEER_ACCESS_SUPPORT desc: "[int] 1 if P2P access is supported otherwise P2P access is not supported." - - name: UR_PEER_ATOMICS_SUPPORTED + - name: UR_PEER_ATOMICS_SUPPORT desc: "[int] 1 if atomic operations are supported over the P2P link, otherwise such operations are not supported." --- #-------------------------------------------------------------------------- type: function diff --git a/source/adapters/cuda/device.cpp b/source/adapters/cuda/device.cpp index 25b4cc7348..8dbcfa7a5d 100644 --- a/source/adapters/cuda/device.cpp +++ b/source/adapters/cuda/device.cpp @@ -282,7 +282,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, case UR_DEVICE_INFO_MAX_MEM_ALLOC_SIZE: { return ReturnValue(uint64_t{hDevice->getMaxAllocSize()}); } - case UR_DEVICE_INFO_IMAGE_SUPPORTED: { + case UR_DEVICE_INFO_IMAGE_SUPPORT: { bool Enabled = false; if (std::getenv("SYCL_PI_CUDA_ENABLE_IMAGE_SUPPORT") != nullptr || @@ -910,23 +910,23 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, // CUDA supports cubemap seamless filtering. return ReturnValue(static_cast(true)); } - case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_USM_EXP: { + case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_USM_SUPPORT_EXP: { // CUDA does support fetching 1D USM sampled image data. return ReturnValue(static_cast(true)); } - case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_EXP: { + case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_SUPPORT_EXP: { // CUDA does not support fetching 1D non-USM sampled image data. return ReturnValue(static_cast(false)); } - case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_USM_EXP: { + case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_USM_SUPPORT_EXP: { // CUDA does support fetching 2D USM sampled image data. return ReturnValue(static_cast(true)); } - case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_EXP: { + case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_SUPPORT_EXP: { // CUDA does support fetching 2D non-USM sampled image data. return ReturnValue(static_cast(true)); } - case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_3D_EXP: { + case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_3D_SUPPORT_EXP: { // CUDA does support fetching 3D non-USM sampled image data. return ReturnValue(static_cast(true)); } @@ -934,15 +934,15 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, // CUDA does support image arrays return ReturnValue(static_cast(true)); } - case UR_DEVICE_INFO_BINDLESS_UNIQUE_ADDRESSING_PER_DIM_EXP: { + case UR_DEVICE_INFO_BINDLESS_UNIQUE_ADDRESSING_PER_DIM_SUPPORT_EXP: { // CUDA does support unique addressing per dimension return ReturnValue(static_cast(true)); } - case UR_DEVICE_INFO_BINDLESS_SAMPLE_1D_USM_EXP: { + case UR_DEVICE_INFO_BINDLESS_SAMPLE_1D_USM_SUPPORT_EXP: { // CUDA does not support sampling 1D USM sampled image data. return ReturnValue(static_cast(false)); } - case UR_DEVICE_INFO_BINDLESS_SAMPLE_2D_USM_EXP: { + case UR_DEVICE_INFO_BINDLESS_SAMPLE_2D_USM_SUPPORT_EXP: { // CUDA does support sampling 1D USM sampled image data. return ReturnValue(static_cast(true)); } @@ -1068,7 +1068,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, case UR_DEVICE_INFO_KERNEL_SET_SPECIALIZATION_CONSTANTS: return ReturnValue(static_cast(false)); // TODO: Investigate if this information is available on CUDA. - case UR_DEVICE_INFO_HOST_PIPE_READ_WRITE_SUPPORTED: + case UR_DEVICE_INFO_HOST_PIPE_READ_WRITE_SUPPORT: return ReturnValue(static_cast(false)); case UR_DEVICE_INFO_VIRTUAL_MEMORY_SUPPORT: return ReturnValue(static_cast(true)); @@ -1109,7 +1109,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR) >= 9; return ReturnValue(static_cast(Value)); } - case UR_DEVICE_INFO_LOW_POWER_EVENTS_EXP: + case UR_DEVICE_INFO_LOW_POWER_EVENTS_SUPPORT_EXP: return ReturnValue(false); default: break; diff --git a/source/adapters/hip/device.cpp b/source/adapters/hip/device.cpp index 89fb05a562..2c458b3109 100644 --- a/source/adapters/hip/device.cpp +++ b/source/adapters/hip/device.cpp @@ -223,7 +223,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, return ReturnValue(uint64_t{MaxAlloc}); } - case UR_DEVICE_INFO_IMAGE_SUPPORTED: { + case UR_DEVICE_INFO_IMAGE_SUPPORT: { bool Enabled = false; if (std::getenv("UR_HIP_ENABLE_IMAGE_SUPPORT") != nullptr) { @@ -887,7 +887,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, return ReturnValue(AddressBuffer, strnlen(AddressBuffer, AddressBufferSize - 1) + 1); } - case UR_DEVICE_INFO_HOST_PIPE_READ_WRITE_SUPPORTED: + case UR_DEVICE_INFO_HOST_PIPE_READ_WRITE_SUPPORT: return ReturnValue(ur_bool_t{false}); case UR_DEVICE_INFO_VIRTUAL_MEMORY_SUPPORT: return ReturnValue(ur_bool_t{false}); @@ -951,7 +951,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, } case UR_DEVICE_INFO_COMMAND_BUFFER_EVENT_SUPPORT_EXP: return ReturnValue(false); - case UR_DEVICE_INFO_LOW_POWER_EVENTS_EXP: { + case UR_DEVICE_INFO_LOW_POWER_EVENTS_SUPPORT_EXP: { return ReturnValue(false); } default: diff --git a/source/adapters/level_zero/device.cpp b/source/adapters/level_zero/device.cpp index b7422fe2cc..ec49129745 100644 --- a/source/adapters/level_zero/device.cpp +++ b/source/adapters/level_zero/device.cpp @@ -369,7 +369,7 @@ ur_result_t urDeviceGetInfo( case UR_DEVICE_INFO_LOCAL_MEM_SIZE: return ReturnValue( uint64_t{Device->ZeDeviceComputeProperties->maxSharedLocalMemory}); - case UR_DEVICE_INFO_IMAGE_SUPPORTED: + case UR_DEVICE_INFO_IMAGE_SUPPORT: return ReturnValue(Device->ZeDeviceImageProperties->maxImageDims1D > 0); case UR_DEVICE_INFO_HOST_UNIFIED_MEMORY: return ReturnValue( @@ -485,7 +485,7 @@ ur_result_t urDeviceGetInfo( case UR_DEVICE_INFO_BUILT_IN_KERNELS: // TODO: To find out correct value return ReturnValue(""); - case UR_DEVICE_INFO_LOW_POWER_EVENTS_EXP: + case UR_DEVICE_INFO_LOW_POWER_EVENTS_SUPPORT_EXP: return ReturnValue(static_cast(true)); case UR_DEVICE_INFO_QUEUE_PROPERTIES: return ReturnValue( @@ -1115,23 +1115,23 @@ ur_result_t urDeviceGetInfo( // L0 does not support cubemap seamless filtering. return ReturnValue(false); } - case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_USM_EXP: { + case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_USM_SUPPORT_EXP: { // L0 does not support fetching 1D USM sampled image data. return ReturnValue(false); } - case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_EXP: { + case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_SUPPORT_EXP: { // L0 does not not support fetching 1D non-USM sampled image data. return ReturnValue(false); } - case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_USM_EXP: { + case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_USM_SUPPORT_EXP: { // L0 does not support fetching 2D USM sampled image data. return ReturnValue(false); } - case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_EXP: { + case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_SUPPORT_EXP: { // L0 does not support fetching 2D non-USM sampled image data. return ReturnValue(false); } - case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_3D_EXP: { + case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_3D_SUPPORT_EXP: { // L0 does not support fetching 3D non-USM sampled image data. return ReturnValue(false); } @@ -1139,15 +1139,15 @@ ur_result_t urDeviceGetInfo( // L0 does not support image arrays return ReturnValue(false); } - case UR_DEVICE_INFO_BINDLESS_UNIQUE_ADDRESSING_PER_DIM_EXP: { + case UR_DEVICE_INFO_BINDLESS_UNIQUE_ADDRESSING_PER_DIM_SUPPORT_EXP: { // L0 does not support unique addressing per dimension return ReturnValue(false); } - case UR_DEVICE_INFO_BINDLESS_SAMPLE_1D_USM_EXP: { + case UR_DEVICE_INFO_BINDLESS_SAMPLE_1D_USM_SUPPORT_EXP: { // L0 does not support sampling 1D USM sampled image data. return ReturnValue(false); } - case UR_DEVICE_INFO_BINDLESS_SAMPLE_2D_USM_EXP: { + case UR_DEVICE_INFO_BINDLESS_SAMPLE_2D_USM_SUPPORT_EXP: { // L0 does not support sampling 1D USM sampled image data. return ReturnValue(false); } diff --git a/source/adapters/native_cpu/device.cpp b/source/adapters/native_cpu/device.cpp index 69c8bfc784..755cf63f46 100644 --- a/source/adapters/native_cpu/device.cpp +++ b/source/adapters/native_cpu/device.cpp @@ -134,7 +134,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, return ReturnValue(hDevice->Platform); case UR_DEVICE_INFO_NAME: return ReturnValue("SYCL Native CPU"); - case UR_DEVICE_INFO_IMAGE_SUPPORTED: + case UR_DEVICE_INFO_IMAGE_SUPPORT: return ReturnValue(bool{false}); case UR_DEVICE_INFO_DRIVER_VERSION: return ReturnValue("0.0.0"); @@ -420,7 +420,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, case UR_DEVICE_INFO_USM_POOL_SUPPORT: return ReturnValue(false); - case UR_DEVICE_INFO_LOW_POWER_EVENTS_EXP: + case UR_DEVICE_INFO_LOW_POWER_EVENTS_SUPPORT_EXP: return ReturnValue(false); default: DIE_NO_IMPLEMENTATION; diff --git a/source/adapters/opencl/device.cpp b/source/adapters/opencl/device.cpp index b33d637a84..2ab52dab89 100644 --- a/source/adapters/opencl/device.cpp +++ b/source/adapters/opencl/device.cpp @@ -150,186 +150,6 @@ mapCLDeviceFpConfigToUR(cl_device_fp_config CLValue) { return URValue; } -static cl_int mapURDeviceInfoToCL(ur_device_info_t URPropName) { - - switch (static_cast(URPropName)) { - case UR_DEVICE_INFO_TYPE: - return CL_DEVICE_TYPE; - case UR_DEVICE_INFO_PARENT_DEVICE: - return CL_DEVICE_PARENT_DEVICE; - case UR_DEVICE_INFO_PLATFORM: - return CL_DEVICE_PLATFORM; - case UR_DEVICE_INFO_VENDOR_ID: - return CL_DEVICE_VENDOR_ID; - case UR_DEVICE_INFO_EXTENSIONS: - return CL_DEVICE_EXTENSIONS; - case UR_DEVICE_INFO_NAME: - return CL_DEVICE_NAME; - case UR_DEVICE_INFO_COMPILER_AVAILABLE: - return CL_DEVICE_COMPILER_AVAILABLE; - case UR_DEVICE_INFO_LINKER_AVAILABLE: - return CL_DEVICE_LINKER_AVAILABLE; - case UR_DEVICE_INFO_MAX_COMPUTE_UNITS: - return CL_DEVICE_MAX_COMPUTE_UNITS; - case UR_DEVICE_INFO_MAX_WORK_ITEM_DIMENSIONS: - return CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS; - case UR_DEVICE_INFO_MAX_WORK_GROUP_SIZE: - return CL_DEVICE_MAX_WORK_GROUP_SIZE; - case UR_DEVICE_INFO_MAX_WORK_ITEM_SIZES: - return CL_DEVICE_MAX_WORK_ITEM_SIZES; - case UR_DEVICE_INFO_MAX_CLOCK_FREQUENCY: - return CL_DEVICE_MAX_CLOCK_FREQUENCY; - case UR_DEVICE_INFO_ADDRESS_BITS: - return CL_DEVICE_ADDRESS_BITS; - case UR_DEVICE_INFO_MAX_MEM_ALLOC_SIZE: - return CL_DEVICE_MAX_MEM_ALLOC_SIZE; - case UR_DEVICE_INFO_GLOBAL_MEM_SIZE: - return CL_DEVICE_GLOBAL_MEM_SIZE; - case UR_DEVICE_INFO_LOCAL_MEM_SIZE: - return CL_DEVICE_LOCAL_MEM_SIZE; - case UR_DEVICE_INFO_IMAGE_SUPPORTED: - return CL_DEVICE_IMAGE_SUPPORT; - case UR_DEVICE_INFO_HOST_UNIFIED_MEMORY: - return CL_DEVICE_HOST_UNIFIED_MEMORY; - case UR_DEVICE_INFO_AVAILABLE: - return CL_DEVICE_AVAILABLE; - case UR_DEVICE_INFO_VENDOR: - return CL_DEVICE_VENDOR; - case UR_DEVICE_INFO_DRIVER_VERSION: - return CL_DRIVER_VERSION; - case UR_DEVICE_INFO_VERSION: - return CL_DEVICE_VERSION; - case UR_DEVICE_INFO_PARTITION_MAX_SUB_DEVICES: - return CL_DEVICE_PARTITION_MAX_SUB_DEVICES; - case UR_DEVICE_INFO_REFERENCE_COUNT: - return CL_DEVICE_REFERENCE_COUNT; - case UR_DEVICE_INFO_SUPPORTED_PARTITIONS: - return CL_DEVICE_PARTITION_PROPERTIES; - case UR_DEVICE_INFO_PARTITION_AFFINITY_DOMAIN: - return CL_DEVICE_PARTITION_AFFINITY_DOMAIN; - case UR_DEVICE_INFO_PARTITION_TYPE: - return CL_DEVICE_PARTITION_TYPE; - case UR_EXT_DEVICE_INFO_OPENCL_C_VERSION: - return CL_DEVICE_OPENCL_C_VERSION; - case UR_DEVICE_INFO_PREFERRED_INTEROP_USER_SYNC: - return CL_DEVICE_PREFERRED_INTEROP_USER_SYNC; - case UR_DEVICE_INFO_PRINTF_BUFFER_SIZE: - return CL_DEVICE_PRINTF_BUFFER_SIZE; - case UR_DEVICE_INFO_PROFILE: - return CL_DEVICE_PROFILE; - case UR_DEVICE_INFO_BUILT_IN_KERNELS: - return CL_DEVICE_BUILT_IN_KERNELS; - case UR_DEVICE_INFO_QUEUE_PROPERTIES: - return CL_DEVICE_QUEUE_PROPERTIES; - case UR_DEVICE_INFO_QUEUE_ON_HOST_PROPERTIES: - return CL_DEVICE_QUEUE_ON_HOST_PROPERTIES; - case UR_DEVICE_INFO_QUEUE_ON_DEVICE_PROPERTIES: - return CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES; - case UR_DEVICE_INFO_EXECUTION_CAPABILITIES: - return CL_DEVICE_EXECUTION_CAPABILITIES; - case UR_DEVICE_INFO_ENDIAN_LITTLE: - return CL_DEVICE_ENDIAN_LITTLE; - case UR_DEVICE_INFO_ERROR_CORRECTION_SUPPORT: - return CL_DEVICE_ERROR_CORRECTION_SUPPORT; - case UR_DEVICE_INFO_PROFILING_TIMER_RESOLUTION: - return CL_DEVICE_PROFILING_TIMER_RESOLUTION; - case UR_DEVICE_INFO_LOCAL_MEM_TYPE: - return CL_DEVICE_LOCAL_MEM_TYPE; - case UR_DEVICE_INFO_MAX_CONSTANT_ARGS: - return CL_DEVICE_MAX_CONSTANT_ARGS; - case UR_DEVICE_INFO_MAX_CONSTANT_BUFFER_SIZE: - return CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE; - case UR_DEVICE_INFO_GLOBAL_MEM_CACHE_TYPE: - return CL_DEVICE_GLOBAL_MEM_CACHE_TYPE; - case UR_DEVICE_INFO_GLOBAL_MEM_CACHELINE_SIZE: - return CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE; - case UR_DEVICE_INFO_GLOBAL_MEM_CACHE_SIZE: - return CL_DEVICE_GLOBAL_MEM_CACHE_SIZE; - case UR_DEVICE_INFO_MAX_PARAMETER_SIZE: - return CL_DEVICE_MAX_PARAMETER_SIZE; - case UR_DEVICE_INFO_MEM_BASE_ADDR_ALIGN: - return CL_DEVICE_MEM_BASE_ADDR_ALIGN; - case UR_DEVICE_INFO_MAX_SAMPLERS: - return CL_DEVICE_MAX_SAMPLERS; - case UR_DEVICE_INFO_MAX_READ_IMAGE_ARGS: - return CL_DEVICE_MAX_READ_IMAGE_ARGS; - case UR_DEVICE_INFO_MAX_WRITE_IMAGE_ARGS: - return CL_DEVICE_MAX_WRITE_IMAGE_ARGS; - case UR_DEVICE_INFO_MAX_READ_WRITE_IMAGE_ARGS: - return CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS; - case UR_DEVICE_INFO_SINGLE_FP_CONFIG: - return CL_DEVICE_SINGLE_FP_CONFIG; - case UR_DEVICE_INFO_HALF_FP_CONFIG: - return CL_DEVICE_HALF_FP_CONFIG; - case UR_DEVICE_INFO_DOUBLE_FP_CONFIG: - return CL_DEVICE_DOUBLE_FP_CONFIG; - case UR_DEVICE_INFO_IMAGE2D_MAX_WIDTH: - return CL_DEVICE_IMAGE2D_MAX_WIDTH; - case UR_DEVICE_INFO_IMAGE2D_MAX_HEIGHT: - return CL_DEVICE_IMAGE2D_MAX_HEIGHT; - case UR_DEVICE_INFO_IMAGE3D_MAX_WIDTH: - return CL_DEVICE_IMAGE3D_MAX_WIDTH; - case UR_DEVICE_INFO_IMAGE3D_MAX_HEIGHT: - return CL_DEVICE_IMAGE3D_MAX_HEIGHT; - case UR_DEVICE_INFO_IMAGE3D_MAX_DEPTH: - return CL_DEVICE_IMAGE3D_MAX_DEPTH; - case UR_DEVICE_INFO_IMAGE_MAX_BUFFER_SIZE: - return CL_DEVICE_IMAGE_MAX_BUFFER_SIZE; - case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_CHAR: - return CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR; - case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_CHAR: - return CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR; - case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_SHORT: - return CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT; - case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_SHORT: - return CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT; - case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_INT: - return CL_DEVICE_NATIVE_VECTOR_WIDTH_INT; - case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_INT: - return CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT; - case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG: - return CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG; - case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG: - return CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG; - case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_FLOAT: - return CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT; - case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_FLOAT: - return CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT; - case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_DOUBLE: - return CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE; - case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_DOUBLE: - return CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE; - case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_HALF: - return CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF; - case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_HALF: - return CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF; - case UR_DEVICE_INFO_MAX_NUM_SUB_GROUPS: - return CL_DEVICE_MAX_NUM_SUB_GROUPS; - case UR_DEVICE_INFO_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS: - return CL_DEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS; - case UR_DEVICE_INFO_SUB_GROUP_SIZES_INTEL: - return CL_DEVICE_SUB_GROUP_SIZES_INTEL; - case UR_DEVICE_INFO_IL_VERSION: - return CL_DEVICE_IL_VERSION; - case UR_DEVICE_INFO_IMAGE_MAX_ARRAY_SIZE: - return CL_DEVICE_IMAGE_MAX_ARRAY_SIZE; - case UR_DEVICE_INFO_USM_HOST_SUPPORT: - return CL_DEVICE_HOST_MEM_CAPABILITIES_INTEL; - case UR_DEVICE_INFO_USM_DEVICE_SUPPORT: - return CL_DEVICE_DEVICE_MEM_CAPABILITIES_INTEL; - case UR_DEVICE_INFO_USM_SINGLE_SHARED_SUPPORT: - return CL_DEVICE_SINGLE_DEVICE_SHARED_MEM_CAPABILITIES_INTEL; - case UR_DEVICE_INFO_USM_CROSS_SHARED_SUPPORT: - return CL_DEVICE_CROSS_DEVICE_SHARED_MEM_CAPABILITIES_INTEL; - case UR_DEVICE_INFO_USM_SYSTEM_SHARED_SUPPORT: - return CL_DEVICE_SHARED_SYSTEM_MEM_CAPABILITIES_INTEL; - case UR_DEVICE_INFO_IP_VERSION: - return CL_DEVICE_IP_VERSION_INTEL; - default: - return -1; - } -} - UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, ur_device_info_t propName, size_t propSize, @@ -338,7 +158,22 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, UrReturnHelper ReturnValue(propSize, pPropValue, pPropSizeRet); - const cl_device_info CLPropName = mapURDeviceInfoToCL(propName); + /* We can just use the OpenCL outputs because the sizes of OpenCL types + * are the same as UR. + * | CL | UR | Size | + * | char[] | char[] | 8 | + * | cl_uint | uint32_t | 4 | + * | cl_ulong | uint64_t | 8 | + * | size_t | size_t | 8 | + * | cl_platform_id | ur_platform_handle_t | 8 | + * | cl_device_id | ur_device_handle_t | 8 | + * + * These other types are equivalent: + * | cl_device_fp_config | ur_device_fp_capability_flags_t | + * | cl_bitfield / enum | ur_flags_t | + * | cl_bool | ur_bool_t | + * | cl_device_atomic_capabilities | ur_memory_order_capability_flags_t | + */ /* TODO UR: Casting to uint32_t to silence warnings due to some values not * being part of the enum. Can be removed once all UR_EXT enums are promoted @@ -347,7 +182,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, case UR_DEVICE_INFO_TYPE: { cl_device_type CLType; CL_RETURN_ON_FAILURE( - clGetDeviceInfo(cl_adapter::cast(hDevice), CLPropName, + clGetDeviceInfo(cl_adapter::cast(hDevice), CL_DEVICE_TYPE, sizeof(cl_device_type), &CLType, nullptr)); /* TODO UR: If the device is an Accelerator (FPGA, VPU, etc.), there is not @@ -393,15 +228,17 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, return ReturnValue(Results.c_str(), Results.size() + 1); } case UR_DEVICE_INFO_SUPPORTED_PARTITIONS: { + const cl_device_info info_name = CL_DEVICE_PARTITION_PROPERTIES; + size_t CLSize; CL_RETURN_ON_FAILURE( - clGetDeviceInfo(cl_adapter::cast(hDevice), CLPropName, 0, + clGetDeviceInfo(cl_adapter::cast(hDevice), info_name, 0, nullptr, &CLSize)); const size_t NProperties = CLSize / sizeof(cl_device_partition_property); std::vector CLValue(NProperties); CL_RETURN_ON_FAILURE( - clGetDeviceInfo(cl_adapter::cast(hDevice), CLPropName, + clGetDeviceInfo(cl_adapter::cast(hDevice), info_name, CLSize, CLValue.data(), nullptr)); /* The OpenCL implementation returns a value of 0 if no properties are @@ -421,10 +258,11 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, return ReturnValue(URValue.data(), URValue.size()); } case UR_DEVICE_INFO_PARTITION_TYPE: { + const cl_device_info info_name = CL_DEVICE_PARTITION_TYPE; size_t CLSize; CL_RETURN_ON_FAILURE( - clGetDeviceInfo(cl_adapter::cast(hDevice), CLPropName, 0, + clGetDeviceInfo(cl_adapter::cast(hDevice), info_name, 0, nullptr, &CLSize)); const size_t NProperties = CLSize / sizeof(cl_device_partition_property); @@ -440,7 +278,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, auto CLValue = reinterpret_cast(alloca(CLSize)); CL_RETURN_ON_FAILURE( - clGetDeviceInfo(cl_adapter::cast(hDevice), CLPropName, + clGetDeviceInfo(cl_adapter::cast(hDevice), info_name, CLSize, CLValue, nullptr)); std::vector URValue(NProperties - 1); @@ -517,25 +355,37 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, return ReturnValue(1u); } } - case UR_DEVICE_INFO_SINGLE_FP_CONFIG: - case UR_DEVICE_INFO_HALF_FP_CONFIG: - case UR_DEVICE_INFO_DOUBLE_FP_CONFIG: { - /* CL type: cl_device_fp_config - * UR type: ur_device_fp_capability_flags_t */ - if (propName == UR_DEVICE_INFO_HALF_FP_CONFIG) { - bool Supported; - UR_RETURN_ON_FAILURE(cl_adapter::checkDeviceExtensions( - cl_adapter::cast(hDevice), {"cl_khr_fp16"}, Supported)); - - if (!Supported) { - return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION; - } + case UR_DEVICE_INFO_SINGLE_FP_CONFIG: { + cl_device_fp_config CLValue; + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_SINGLE_FP_CONFIG, + sizeof(cl_device_fp_config), &CLValue, nullptr)); + + return ReturnValue(mapCLDeviceFpConfigToUR(CLValue)); + } + case UR_DEVICE_INFO_HALF_FP_CONFIG: { + bool Supported; + UR_RETURN_ON_FAILURE(cl_adapter::checkDeviceExtensions( + cl_adapter::cast(hDevice), {"cl_khr_fp16"}, Supported)); + + if (!Supported) { + // If we don't support the extension then our capabilities are 0. + ur_device_fp_capability_flags_t halfCapabilities = 0; + return ReturnValue(halfCapabilities); } cl_device_fp_config CLValue; - CL_RETURN_ON_FAILURE( - clGetDeviceInfo(cl_adapter::cast(hDevice), CLPropName, - sizeof(cl_device_fp_config), &CLValue, nullptr)); + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_HALF_FP_CONFIG, + sizeof(cl_device_fp_config), &CLValue, nullptr)); + + return ReturnValue(mapCLDeviceFpConfigToUR(CLValue)); + } + case UR_DEVICE_INFO_DOUBLE_FP_CONFIG: { + cl_device_fp_config CLValue; + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_DOUBLE_FP_CONFIG, + sizeof(cl_device_fp_config), &CLValue, nullptr)); return ReturnValue(mapCLDeviceFpConfigToUR(CLValue)); } @@ -586,8 +436,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, UR_MEMORY_ORDER_CAPABILITY_FLAG_ACQ_REL | UR_MEMORY_ORDER_CAPABILITY_FLAG_SEQ_CST; } - /* cl_device_atomic_capabilities is uint64_t and - * ur_memory_order_capability_flags_t is uint32_t */ + return ReturnValue( static_cast(URCapabilities)); } @@ -642,8 +491,6 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, } } - /* cl_device_atomic_capabilities is uint64_t and - * ur_memory_scope_capability_flags_t is uint32_t */ return ReturnValue( static_cast(URCapabilities)); } @@ -690,8 +537,6 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, } } - /* cl_device_atomic_capabilities is uint64_t and - * ur_memory_order_capability_flags_t is uint32_t */ return ReturnValue( static_cast(URCapabilities)); } @@ -761,8 +606,6 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, } } - /* cl_device_atomic_capabilities is uint64_t and - * ur_memory_scope_capability_flags_t is uint32_t */ return ReturnValue( static_cast(URCapabilities)); } @@ -826,7 +669,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, case UR_DEVICE_INFO_ENQUEUE_NATIVE_COMMAND_SUPPORT_EXP: { return ReturnValue(false); } - case UR_DEVICE_INFO_HOST_PIPE_READ_WRITE_SUPPORTED: { + case UR_DEVICE_INFO_HOST_PIPE_READ_WRITE_SUPPORT: { bool Supported = false; UR_RETURN_ON_FAILURE(cl_adapter::checkDeviceExtensions( cl_adapter::cast(hDevice), @@ -840,33 +683,132 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, {"cl_intel_global_variable_access"}, Supported)); return ReturnValue(Supported); } - case UR_DEVICE_INFO_QUEUE_PROPERTIES: - case UR_DEVICE_INFO_QUEUE_ON_DEVICE_PROPERTIES: - case UR_DEVICE_INFO_QUEUE_ON_HOST_PROPERTIES: - case UR_DEVICE_INFO_GLOBAL_MEM_CACHE_TYPE: - case UR_DEVICE_INFO_LOCAL_MEM_TYPE: - case UR_DEVICE_INFO_EXECUTION_CAPABILITIES: - case UR_DEVICE_INFO_PARTITION_AFFINITY_DOMAIN: { - /* CL type: cl_bitfield / enum - * UR type: ur_flags_t (uint32_t) */ + case UR_DEVICE_INFO_QUEUE_PROPERTIES: { + cl_bitfield CLValue = 0; + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_QUEUE_PROPERTIES, + sizeof(cl_bitfield), &CLValue, nullptr)); + + return ReturnValue(static_cast(CLValue)); + } + case UR_DEVICE_INFO_QUEUE_ON_DEVICE_PROPERTIES: { + cl_bitfield CLValue = 0; + CL_RETURN_ON_FAILURE( + clGetDeviceInfo(cl_adapter::cast(hDevice), + CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES, + sizeof(cl_bitfield), &CLValue, nullptr)); + + return ReturnValue(static_cast(CLValue)); + } + case UR_DEVICE_INFO_QUEUE_ON_HOST_PROPERTIES: { + cl_bitfield CLValue = 0; + CL_RETURN_ON_FAILURE( + clGetDeviceInfo(cl_adapter::cast(hDevice), + CL_DEVICE_QUEUE_ON_HOST_PROPERTIES, sizeof(cl_bitfield), + &CLValue, nullptr)); + + return ReturnValue(static_cast(CLValue)); + } + case UR_DEVICE_INFO_GLOBAL_MEM_CACHE_TYPE: { + cl_bitfield CLValue = 0; + CL_RETURN_ON_FAILURE( + clGetDeviceInfo(cl_adapter::cast(hDevice), + CL_DEVICE_GLOBAL_MEM_CACHE_TYPE, sizeof(cl_bitfield), + &CLValue, nullptr)); + + return ReturnValue(static_cast(CLValue)); + } + case UR_DEVICE_INFO_LOCAL_MEM_TYPE: { + cl_bitfield CLValue = 0; + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_LOCAL_MEM_TYPE, + sizeof(cl_bitfield), &CLValue, nullptr)); + + return ReturnValue(static_cast(CLValue)); + } + case UR_DEVICE_INFO_EXECUTION_CAPABILITIES: { + cl_bitfield CLValue = 0; + CL_RETURN_ON_FAILURE( + clGetDeviceInfo(cl_adapter::cast(hDevice), + CL_DEVICE_EXECUTION_CAPABILITIES, sizeof(cl_bitfield), + &CLValue, nullptr)); + return ReturnValue(static_cast(CLValue)); + } + case UR_DEVICE_INFO_PARTITION_AFFINITY_DOMAIN: { cl_bitfield CLValue = 0; CL_RETURN_ON_FAILURE( - clGetDeviceInfo(cl_adapter::cast(hDevice), CLPropName, + clGetDeviceInfo(cl_adapter::cast(hDevice), + CL_DEVICE_PARTITION_AFFINITY_DOMAIN, sizeof(cl_bitfield), &CLValue, nullptr)); - /* We can just static_cast the output because OpenCL and UR bitfields - * map 1 to 1 for these properties. cl_bitfield is uint64_t and ur_flags_t - * types are uint32_t */ return ReturnValue(static_cast(CLValue)); } - case UR_DEVICE_INFO_USM_HOST_SUPPORT: - case UR_DEVICE_INFO_USM_DEVICE_SUPPORT: - case UR_DEVICE_INFO_USM_SINGLE_SHARED_SUPPORT: - case UR_DEVICE_INFO_USM_CROSS_SHARED_SUPPORT: + case UR_DEVICE_INFO_USM_HOST_SUPPORT: { + bool Supported = false; + UR_RETURN_ON_FAILURE(cl_adapter::checkDeviceExtensions( + cl_adapter::cast(hDevice), + {"cl_intel_unified_shared_memory"}, Supported)); + if (Supported) { + cl_bitfield CLValue = 0; + CL_RETURN_ON_FAILURE( + clGetDeviceInfo(cl_adapter::cast(hDevice), + CL_DEVICE_HOST_MEM_CAPABILITIES_INTEL, + sizeof(cl_bitfield), &CLValue, nullptr)); + return ReturnValue(static_cast(CLValue)); + } else { + return ReturnValue(0); + } + } + case UR_DEVICE_INFO_USM_DEVICE_SUPPORT: { + bool Supported = false; + UR_RETURN_ON_FAILURE(cl_adapter::checkDeviceExtensions( + cl_adapter::cast(hDevice), + {"cl_intel_unified_shared_memory"}, Supported)); + if (Supported) { + cl_bitfield CLValue = 0; + CL_RETURN_ON_FAILURE( + clGetDeviceInfo(cl_adapter::cast(hDevice), + CL_DEVICE_DEVICE_MEM_CAPABILITIES_INTEL, + sizeof(cl_bitfield), &CLValue, nullptr)); + return ReturnValue(static_cast(CLValue)); + } else { + return ReturnValue(0); + } + } + case UR_DEVICE_INFO_USM_SINGLE_SHARED_SUPPORT: { + bool Supported = false; + UR_RETURN_ON_FAILURE(cl_adapter::checkDeviceExtensions( + cl_adapter::cast(hDevice), + {"cl_intel_unified_shared_memory"}, Supported)); + if (Supported) { + cl_bitfield CLValue = 0; + CL_RETURN_ON_FAILURE( + clGetDeviceInfo(cl_adapter::cast(hDevice), + CL_DEVICE_SINGLE_DEVICE_SHARED_MEM_CAPABILITIES_INTEL, + sizeof(cl_bitfield), &CLValue, nullptr)); + return ReturnValue(static_cast(CLValue)); + } else { + return ReturnValue(0); + } + } + case UR_DEVICE_INFO_USM_CROSS_SHARED_SUPPORT: { + bool Supported = false; + UR_RETURN_ON_FAILURE(cl_adapter::checkDeviceExtensions( + cl_adapter::cast(hDevice), + {"cl_intel_unified_shared_memory"}, Supported)); + if (Supported) { + cl_bitfield CLValue = 0; + CL_RETURN_ON_FAILURE( + clGetDeviceInfo(cl_adapter::cast(hDevice), + CL_DEVICE_CROSS_DEVICE_SHARED_MEM_CAPABILITIES_INTEL, + sizeof(cl_bitfield), &CLValue, nullptr)); + return ReturnValue(static_cast(CLValue)); + } else { + return ReturnValue(0); + } + } case UR_DEVICE_INFO_USM_SYSTEM_SHARED_SUPPORT: { - /* CL type: cl_bitfield / enum - * UR type: ur_flags_t (uint32_t) */ bool Supported = false; UR_RETURN_ON_FAILURE(cl_adapter::checkDeviceExtensions( cl_adapter::cast(hDevice), @@ -874,36 +816,81 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, if (Supported) { cl_bitfield CLValue = 0; CL_RETURN_ON_FAILURE( - clGetDeviceInfo(cl_adapter::cast(hDevice), CLPropName, + clGetDeviceInfo(cl_adapter::cast(hDevice), + CL_DEVICE_SHARED_SYSTEM_MEM_CAPABILITIES_INTEL, sizeof(cl_bitfield), &CLValue, nullptr)); return ReturnValue(static_cast(CLValue)); } else { return ReturnValue(0); } } - case UR_DEVICE_INFO_IMAGE_SUPPORTED: - case UR_DEVICE_INFO_ERROR_CORRECTION_SUPPORT: - case UR_DEVICE_INFO_HOST_UNIFIED_MEMORY: - case UR_DEVICE_INFO_ENDIAN_LITTLE: - case UR_DEVICE_INFO_AVAILABLE: - case UR_DEVICE_INFO_COMPILER_AVAILABLE: - case UR_DEVICE_INFO_LINKER_AVAILABLE: - case UR_DEVICE_INFO_PREFERRED_INTEROP_USER_SYNC: { - /* CL type: cl_bool - * UR type: ur_bool_t */ + case UR_DEVICE_INFO_IMAGE_SUPPORT: { + cl_bool CLValue; + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_IMAGE_SUPPORT, + sizeof(cl_bool), &CLValue, nullptr)); + return ReturnValue(static_cast(CLValue)); + } + case UR_DEVICE_INFO_ERROR_CORRECTION_SUPPORT: { cl_bool CLValue; CL_RETURN_ON_FAILURE( - clGetDeviceInfo(cl_adapter::cast(hDevice), CLPropName, - sizeof(cl_bool), &CLValue, nullptr)); + clGetDeviceInfo(cl_adapter::cast(hDevice), + CL_DEVICE_ERROR_CORRECTION_SUPPORT, sizeof(cl_bool), + &CLValue, nullptr)); - /* cl_bool is uint32_t and ur_bool_t is bool */ return ReturnValue(static_cast(CLValue)); } - case UR_DEVICE_INFO_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS: { - /* CL type: cl_bool - * UR type: ur_bool_t */ + case UR_DEVICE_INFO_HOST_UNIFIED_MEMORY: { + cl_bool CLValue; + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_HOST_UNIFIED_MEMORY, + sizeof(cl_bool), &CLValue, nullptr)); + + return ReturnValue(static_cast(CLValue)); + } + case UR_DEVICE_INFO_ENDIAN_LITTLE: { + cl_bool CLValue; + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_ENDIAN_LITTLE, + sizeof(cl_bool), &CLValue, nullptr)); + + return ReturnValue(static_cast(CLValue)); + } + case UR_DEVICE_INFO_AVAILABLE: { + cl_bool CLValue; + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_AVAILABLE, + sizeof(cl_bool), &CLValue, nullptr)); + + return ReturnValue(static_cast(CLValue)); + } + case UR_DEVICE_INFO_COMPILER_AVAILABLE: { + cl_bool CLValue; + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_COMPILER_AVAILABLE, + sizeof(cl_bool), &CLValue, nullptr)); + + return ReturnValue(static_cast(CLValue)); + } + case UR_DEVICE_INFO_LINKER_AVAILABLE: { + cl_bool CLValue; + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_LINKER_AVAILABLE, + sizeof(cl_bool), &CLValue, nullptr)); + return ReturnValue(static_cast(CLValue)); + } + case UR_DEVICE_INFO_PREFERRED_INTEROP_USER_SYNC: { + cl_bool CLValue; + CL_RETURN_ON_FAILURE( + clGetDeviceInfo(cl_adapter::cast(hDevice), + CL_DEVICE_PREFERRED_INTEROP_USER_SYNC, sizeof(cl_bool), + &CLValue, nullptr)); + + return ReturnValue(static_cast(CLValue)); + } + case UR_DEVICE_INFO_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS: { oclv::OpenCLVersion DevVer; CL_RETURN_ON_FAILURE(cl_adapter::getDeviceVersion( cl_adapter::cast(hDevice), DevVer)); @@ -912,87 +899,421 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, if (DevVer >= oclv::V2_1) { cl_bool CLValue; CL_RETURN_ON_FAILURE( - clGetDeviceInfo(cl_adapter::cast(hDevice), CLPropName, + clGetDeviceInfo(cl_adapter::cast(hDevice), + CL_DEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS, sizeof(cl_bool), &CLValue, nullptr)); - /* cl_bool is uint32_t and ur_bool_t is bool */ return ReturnValue(static_cast(CLValue)); } else { return ReturnValue(false); } } - case UR_DEVICE_INFO_VENDOR_ID: - case UR_DEVICE_INFO_MAX_COMPUTE_UNITS: - case UR_DEVICE_INFO_MAX_WORK_ITEM_DIMENSIONS: - case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_CHAR: - case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_SHORT: - case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_INT: - case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG: - case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_FLOAT: - case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_DOUBLE: - case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_HALF: - case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_CHAR: - case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_SHORT: - case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_INT: - case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG: - case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_FLOAT: - case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_DOUBLE: - case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_HALF: - case UR_DEVICE_INFO_MAX_CLOCK_FREQUENCY: - case UR_DEVICE_INFO_ADDRESS_BITS: - case UR_DEVICE_INFO_MAX_READ_IMAGE_ARGS: - case UR_DEVICE_INFO_MAX_WRITE_IMAGE_ARGS: - case UR_DEVICE_INFO_MAX_READ_WRITE_IMAGE_ARGS: - case UR_DEVICE_INFO_MEM_BASE_ADDR_ALIGN: - case UR_DEVICE_INFO_MAX_SAMPLERS: - case UR_DEVICE_INFO_GLOBAL_MEM_CACHELINE_SIZE: - case UR_DEVICE_INFO_MAX_CONSTANT_ARGS: - case UR_DEVICE_INFO_REFERENCE_COUNT: - case UR_DEVICE_INFO_PARTITION_MAX_SUB_DEVICES: - case UR_DEVICE_INFO_MAX_MEM_ALLOC_SIZE: - case UR_DEVICE_INFO_GLOBAL_MEM_CACHE_SIZE: - case UR_DEVICE_INFO_GLOBAL_MEM_SIZE: - case UR_DEVICE_INFO_MAX_CONSTANT_BUFFER_SIZE: - case UR_DEVICE_INFO_LOCAL_MEM_SIZE: - case UR_DEVICE_INFO_MAX_WORK_GROUP_SIZE: - case UR_DEVICE_INFO_IMAGE2D_MAX_WIDTH: - case UR_DEVICE_INFO_IMAGE2D_MAX_HEIGHT: - case UR_DEVICE_INFO_IMAGE3D_MAX_WIDTH: - case UR_DEVICE_INFO_IMAGE3D_MAX_HEIGHT: - case UR_DEVICE_INFO_IMAGE3D_MAX_DEPTH: - case UR_DEVICE_INFO_IMAGE_MAX_BUFFER_SIZE: - case UR_DEVICE_INFO_IMAGE_MAX_ARRAY_SIZE: - case UR_DEVICE_INFO_MAX_PARAMETER_SIZE: - case UR_DEVICE_INFO_PROFILING_TIMER_RESOLUTION: - case UR_DEVICE_INFO_PRINTF_BUFFER_SIZE: - case UR_DEVICE_INFO_PLATFORM: - case UR_DEVICE_INFO_PARENT_DEVICE: - case UR_DEVICE_INFO_IL_VERSION: - case UR_DEVICE_INFO_NAME: - case UR_DEVICE_INFO_VENDOR: - case UR_DEVICE_INFO_DRIVER_VERSION: - case UR_DEVICE_INFO_PROFILE: - case UR_DEVICE_INFO_VERSION: - case UR_EXT_DEVICE_INFO_OPENCL_C_VERSION: - case UR_DEVICE_INFO_BUILT_IN_KERNELS: - case UR_DEVICE_INFO_MAX_WORK_ITEM_SIZES: { - /* We can just use the OpenCL outputs because the sizes of OpenCL types - * are the same as UR. - * | CL | UR | Size | - * | char[] | char[] | 8 | - * | cl_uint | uint32_t | 4 | - * | cl_ulong | uint64_t | 8 | - * | size_t | size_t | 8 | - * | cl_platform_id | ur_platform_handle_t | 8 | - * | ur_device_handle_t | cl_device_id | 8 | - */ + case UR_DEVICE_INFO_VENDOR_ID: { + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_VENDOR_ID, propSize, + pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_MAX_COMPUTE_UNITS: { + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_MAX_COMPUTE_UNITS, + propSize, pPropValue, pPropSizeRet)); + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_MAX_WORK_ITEM_DIMENSIONS: { + CL_RETURN_ON_FAILURE( + clGetDeviceInfo(cl_adapter::cast(hDevice), + CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS, propSize, + pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_CHAR: { + CL_RETURN_ON_FAILURE( + clGetDeviceInfo(cl_adapter::cast(hDevice), + CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR, propSize, + pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_SHORT: { CL_RETURN_ON_FAILURE( - clGetDeviceInfo(cl_adapter::cast(hDevice), CLPropName, + clGetDeviceInfo(cl_adapter::cast(hDevice), + CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT, propSize, + pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_INT: { + CL_RETURN_ON_FAILURE( + clGetDeviceInfo(cl_adapter::cast(hDevice), + CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT, propSize, + pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG: { + CL_RETURN_ON_FAILURE( + clGetDeviceInfo(cl_adapter::cast(hDevice), + CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG, propSize, + pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_FLOAT: { + CL_RETURN_ON_FAILURE( + clGetDeviceInfo(cl_adapter::cast(hDevice), + CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT, propSize, + pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_DOUBLE: { + CL_RETURN_ON_FAILURE( + clGetDeviceInfo(cl_adapter::cast(hDevice), + CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE, propSize, + pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_HALF: { + CL_RETURN_ON_FAILURE( + clGetDeviceInfo(cl_adapter::cast(hDevice), + CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF, propSize, + pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_CHAR: { + CL_RETURN_ON_FAILURE( + clGetDeviceInfo(cl_adapter::cast(hDevice), + CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR, propSize, + pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_SHORT: { + CL_RETURN_ON_FAILURE( + clGetDeviceInfo(cl_adapter::cast(hDevice), + CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT, propSize, + pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_INT: { + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), + CL_DEVICE_NATIVE_VECTOR_WIDTH_INT, propSize, pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG: { + CL_RETURN_ON_FAILURE( + clGetDeviceInfo(cl_adapter::cast(hDevice), + CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG, propSize, + pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_FLOAT: { + CL_RETURN_ON_FAILURE( + clGetDeviceInfo(cl_adapter::cast(hDevice), + CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT, propSize, + pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_DOUBLE: { + CL_RETURN_ON_FAILURE( + clGetDeviceInfo(cl_adapter::cast(hDevice), + CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE, propSize, + pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_HALF: { + CL_RETURN_ON_FAILURE( + clGetDeviceInfo(cl_adapter::cast(hDevice), + CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF, propSize, + pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_MAX_CLOCK_FREQUENCY: { + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_MAX_CLOCK_FREQUENCY, + propSize, pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_ADDRESS_BITS: { + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_ADDRESS_BITS, + propSize, pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_MAX_READ_IMAGE_ARGS: { + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_MAX_READ_IMAGE_ARGS, + propSize, pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_MAX_WRITE_IMAGE_ARGS: { + CL_RETURN_ON_FAILURE( + clGetDeviceInfo(cl_adapter::cast(hDevice), + CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS, propSize, + pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_MAX_READ_WRITE_IMAGE_ARGS: { + + CL_RETURN_ON_FAILURE( + clGetDeviceInfo(cl_adapter::cast(hDevice), + CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS, propSize, + pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_MEM_BASE_ADDR_ALIGN: { + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_MEM_BASE_ADDR_ALIGN, + propSize, pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_MAX_SAMPLERS: { + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_MAX_SAMPLERS, + propSize, pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_GLOBAL_MEM_CACHELINE_SIZE: { + CL_RETURN_ON_FAILURE( + clGetDeviceInfo(cl_adapter::cast(hDevice), + CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE, propSize, + pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_MAX_CONSTANT_ARGS: { + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_MAX_CONSTANT_ARGS, + propSize, pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_REFERENCE_COUNT: { + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_REFERENCE_COUNT, + propSize, pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_PARTITION_MAX_SUB_DEVICES: { + CL_RETURN_ON_FAILURE( + clGetDeviceInfo(cl_adapter::cast(hDevice), + CL_DEVICE_PARTITION_MAX_SUB_DEVICES, propSize, + pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_MAX_MEM_ALLOC_SIZE: { + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_MAX_MEM_ALLOC_SIZE, + propSize, pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_GLOBAL_MEM_CACHE_SIZE: { + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), + CL_DEVICE_GLOBAL_MEM_CACHE_SIZE, propSize, pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_GLOBAL_MEM_SIZE: { + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_GLOBAL_MEM_SIZE, + propSize, pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_MAX_CONSTANT_BUFFER_SIZE: { + CL_RETURN_ON_FAILURE( + clGetDeviceInfo(cl_adapter::cast(hDevice), + CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE, propSize, + pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_LOCAL_MEM_SIZE: { + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_LOCAL_MEM_SIZE, + propSize, pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_MAX_WORK_GROUP_SIZE: { + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_MAX_WORK_GROUP_SIZE, + propSize, pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_IMAGE2D_MAX_WIDTH: { + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_IMAGE2D_MAX_WIDTH, + propSize, pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_IMAGE2D_MAX_HEIGHT: { + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_IMAGE2D_MAX_HEIGHT, + propSize, pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_IMAGE3D_MAX_WIDTH: { + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_IMAGE3D_MAX_WIDTH, + propSize, pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_IMAGE3D_MAX_HEIGHT: { + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_IMAGE3D_MAX_HEIGHT, + propSize, pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_IMAGE3D_MAX_DEPTH: { + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_IMAGE3D_MAX_DEPTH, + propSize, pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_IMAGE_MAX_BUFFER_SIZE: { + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), + CL_DEVICE_IMAGE_MAX_BUFFER_SIZE, propSize, pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_IMAGE_MAX_ARRAY_SIZE: { + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_IMAGE_MAX_ARRAY_SIZE, + propSize, pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_MAX_PARAMETER_SIZE: { + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_MAX_PARAMETER_SIZE, + propSize, pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_PROFILING_TIMER_RESOLUTION: { + CL_RETURN_ON_FAILURE( + clGetDeviceInfo(cl_adapter::cast(hDevice), + CL_DEVICE_PROFILING_TIMER_RESOLUTION, propSize, + pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_PRINTF_BUFFER_SIZE: { + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_PRINTF_BUFFER_SIZE, + propSize, pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_PLATFORM: { + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_PLATFORM, propSize, + pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_PARENT_DEVICE: { + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_PARENT_DEVICE, + propSize, pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_IL_VERSION: { + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_IL_VERSION, propSize, + pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_NAME: { + CL_RETURN_ON_FAILURE( + clGetDeviceInfo(cl_adapter::cast(hDevice), CL_DEVICE_NAME, propSize, pPropValue, pPropSizeRet)); return UR_RESULT_SUCCESS; } + case UR_DEVICE_INFO_VENDOR: { + CL_RETURN_ON_FAILURE( + clGetDeviceInfo(cl_adapter::cast(hDevice), + CL_DEVICE_VENDOR, propSize, pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_DRIVER_VERSION: { + CL_RETURN_ON_FAILURE( + clGetDeviceInfo(cl_adapter::cast(hDevice), + CL_DRIVER_VERSION, propSize, pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_PROFILE: { + CL_RETURN_ON_FAILURE( + clGetDeviceInfo(cl_adapter::cast(hDevice), + CL_DEVICE_PROFILE, propSize, pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_VERSION: { + CL_RETURN_ON_FAILURE( + clGetDeviceInfo(cl_adapter::cast(hDevice), + CL_DEVICE_VERSION, propSize, pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_EXT_DEVICE_INFO_OPENCL_C_VERSION: { + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_OPENCL_C_VERSION, + propSize, pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_BUILT_IN_KERNELS: { + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_BUILT_IN_KERNELS, + propSize, pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } + case UR_DEVICE_INFO_MAX_WORK_ITEM_SIZES: { + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_MAX_WORK_ITEM_SIZES, + propSize, pPropValue, pPropSizeRet)); + + return UR_RESULT_SUCCESS; + } case UR_DEVICE_INFO_IP_VERSION: { bool Supported; UR_RETURN_ON_FAILURE(cl_adapter::checkDeviceExtensions( @@ -1001,9 +1322,9 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, if (!Supported) { return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION; } - CL_RETURN_ON_FAILURE( - clGetDeviceInfo(cl_adapter::cast(hDevice), CLPropName, - propSize, pPropValue, pPropSizeRet)); + CL_RETURN_ON_FAILURE(clGetDeviceInfo( + cl_adapter::cast(hDevice), CL_DEVICE_IP_VERSION_INTEL, + propSize, pPropValue, pPropSizeRet)); return UR_RESULT_SUCCESS; } @@ -1020,14 +1341,16 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, aThreadIsItsOwnSubGroup.size()); } + const cl_device_info info_name = CL_DEVICE_SUB_GROUP_SIZES_INTEL; + // Have to convert size_t to uint32_t size_t SubGroupSizesSize = 0; CL_RETURN_ON_FAILURE( - clGetDeviceInfo(cl_adapter::cast(hDevice), CLPropName, 0, + clGetDeviceInfo(cl_adapter::cast(hDevice), info_name, 0, nullptr, &SubGroupSizesSize)); std::vector SubGroupSizes(SubGroupSizesSize / sizeof(size_t)); CL_RETURN_ON_FAILURE( - clGetDeviceInfo(cl_adapter::cast(hDevice), CLPropName, + clGetDeviceInfo(cl_adapter::cast(hDevice), info_name, SubGroupSizesSize, SubGroupSizes.data(), nullptr)); return ReturnValue.template operator()(SubGroupSizes.data(), SubGroupSizes.size()); @@ -1093,8 +1416,9 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, case UR_DEVICE_INFO_GLOBAL_MEM_FREE: case UR_DEVICE_INFO_MEMORY_CLOCK_RATE: case UR_DEVICE_INFO_MEMORY_BUS_WIDTH: - case UR_DEVICE_INFO_ASYNC_BARRIER: return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION; + case UR_DEVICE_INFO_ASYNC_BARRIER: + return ReturnValue(false); case UR_DEVICE_INFO_2D_BLOCK_ARRAY_CAPABILITIES_EXP: { bool Is2DBlockIOSupported = false; if (cl_adapter::checkDeviceExtensions( @@ -1131,8 +1455,56 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, } case UR_DEVICE_INFO_COMMAND_BUFFER_EVENT_SUPPORT_EXP: return ReturnValue(false); - case UR_DEVICE_INFO_LOW_POWER_EVENTS_EXP: + case UR_DEVICE_INFO_LOW_POWER_EVENTS_SUPPORT_EXP: + return ReturnValue(false); + case UR_DEVICE_INFO_CLUSTER_LAUNCH_SUPPORT_EXP: + return ReturnValue(false); + case UR_DEVICE_INFO_BINDLESS_IMAGES_SUPPORT_EXP: + return ReturnValue(false); + case UR_DEVICE_INFO_BINDLESS_IMAGES_SHARED_USM_SUPPORT_EXP: + return ReturnValue(false); + case UR_DEVICE_INFO_BINDLESS_IMAGES_1D_USM_SUPPORT_EXP: + return ReturnValue(false); + case UR_DEVICE_INFO_BINDLESS_IMAGES_2D_USM_SUPPORT_EXP: + return ReturnValue(false); + case UR_DEVICE_INFO_MIPMAP_SUPPORT_EXP: + return ReturnValue(false); + case UR_DEVICE_INFO_MIPMAP_ANISOTROPY_SUPPORT_EXP: + return ReturnValue(false); + case UR_DEVICE_INFO_MIPMAP_LEVEL_REFERENCE_SUPPORT_EXP: + return ReturnValue(false); + case UR_DEVICE_INFO_EXTERNAL_MEMORY_IMPORT_SUPPORT_EXP: return ReturnValue(false); + case UR_DEVICE_INFO_EXTERNAL_SEMAPHORE_IMPORT_SUPPORT_EXP: + return ReturnValue(false); + case UR_DEVICE_INFO_CUBEMAP_SUPPORT_EXP: + return ReturnValue(false); + case UR_DEVICE_INFO_CUBEMAP_SEAMLESS_FILTERING_SUPPORT_EXP: + return ReturnValue(false); + case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_USM_SUPPORT_EXP: + return ReturnValue(false); + case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_SUPPORT_EXP: + return ReturnValue(false); + case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_USM_SUPPORT_EXP: + return ReturnValue(false); + case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_SUPPORT_EXP: + return ReturnValue(false); + case UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_3D_SUPPORT_EXP: + return ReturnValue(false); + case UR_DEVICE_INFO_IMAGE_ARRAY_SUPPORT_EXP: + return ReturnValue(false); + case UR_DEVICE_INFO_BINDLESS_UNIQUE_ADDRESSING_PER_DIM_SUPPORT_EXP: + return ReturnValue(false); + case UR_DEVICE_INFO_BINDLESS_SAMPLE_1D_USM_SUPPORT_EXP: + return ReturnValue(false); + case UR_DEVICE_INFO_BINDLESS_SAMPLE_2D_USM_SUPPORT_EXP: + return ReturnValue(false); + case UR_DEVICE_INFO_IMAGE_PITCH_ALIGN_EXP: + case UR_DEVICE_INFO_MAX_IMAGE_LINEAR_WIDTH_EXP: + case UR_DEVICE_INFO_MAX_IMAGE_LINEAR_HEIGHT_EXP: + case UR_DEVICE_INFO_MAX_IMAGE_LINEAR_PITCH_EXP: + case UR_DEVICE_INFO_MIPMAP_MAX_ANISOTROPY_EXP: + return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION; default: { return UR_RESULT_ERROR_INVALID_ENUMERATION; } diff --git a/source/loader/layers/validation/ur_valddi.cpp b/source/loader/layers/validation/ur_valddi.cpp index b29618ae7a..fea9d133fc 100644 --- a/source/loader/layers/validation/ur_valddi.cpp +++ b/source/loader/layers/validation/ur_valddi.cpp @@ -10133,7 +10133,7 @@ __urdlllocal ur_result_t UR_APICALL urUsmP2PPeerAccessGetInfoExp( return UR_RESULT_ERROR_INVALID_NULL_POINTER; } - if (UR_EXP_PEER_INFO_UR_PEER_ATOMICS_SUPPORTED < propName) { + if (UR_EXP_PEER_INFO_UR_PEER_ATOMICS_SUPPORT < propName) { return UR_RESULT_ERROR_INVALID_ENUMERATION; } diff --git a/source/ur_api.cpp b/source/ur_api.cpp index 3925d5d160..bb0146f92d 100644 --- a/source/ur_api.cpp +++ b/source/ur_api.cpp @@ -14,7 +14,7 @@ /////////////////////////////////////////////////////////////////////////////// /// @brief Create a loader config object. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -22,23 +22,24 @@ /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER /// + `NULL == phLoaderConfig` -ur_result_t UR_APICALL urLoaderConfigCreate( - ur_loader_config_handle_t * - phLoaderConfig ///< [out] Pointer to handle of loader config object created. -) { +ur_result_t UR_APICALL +urLoaderConfigCreate( + ur_loader_config_handle_t* phLoaderConfig ///< [out] Pointer to handle of loader config object created. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Get a reference to the loader config object. -/// +/// /// @details /// - Get a reference to the loader config handle. Increment its reference /// count /// - The application may call this function from simultaneous threads. /// - The implementation of this function should be lock-free. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -46,23 +47,24 @@ ur_result_t UR_APICALL urLoaderConfigCreate( /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE /// + `NULL == hLoaderConfig` -ur_result_t UR_APICALL urLoaderConfigRetain( - ur_loader_config_handle_t - hLoaderConfig ///< [in][retain] loader config handle to retain -) { +ur_result_t UR_APICALL +urLoaderConfigRetain( + ur_loader_config_handle_t hLoaderConfig ///< [in][retain] loader config handle to retain + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Release config handle. -/// +/// /// @details /// - Decrement reference count and destroy the config handle if reference /// count becomes zero. /// - The application may call this function from simultaneous threads. /// - The implementation of this function should be lock-free. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -70,21 +72,22 @@ ur_result_t UR_APICALL urLoaderConfigRetain( /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE /// + `NULL == hLoaderConfig` -ur_result_t UR_APICALL urLoaderConfigRelease( - ur_loader_config_handle_t - hLoaderConfig ///< [in][release] config handle to release -) { +ur_result_t UR_APICALL +urLoaderConfigRelease( + ur_loader_config_handle_t hLoaderConfig ///< [in][release] config handle to release + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Retrieves various information about the loader. -/// +/// /// @details /// - The application may call this function from simultaneous threads. /// - The implementation of this function should be lock-free. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -105,28 +108,27 @@ ur_result_t UR_APICALL urLoaderConfigRelease( /// - ::UR_RESULT_ERROR_INVALID_DEVICE /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY -ur_result_t UR_APICALL urLoaderConfigGetInfo( - ur_loader_config_handle_t - hLoaderConfig, ///< [in] handle of the loader config object - ur_loader_config_info_t propName, ///< [in] type of the info to retrieve - size_t propSize, ///< [in] the number of bytes pointed to by pPropValue. - void * - pPropValue, ///< [out][optional][typename(propName, propSize)] array of bytes holding - ///< the info. - ///< If propSize is not equal to or greater than the real number of bytes - ///< needed to return the info - ///< then the ::UR_RESULT_ERROR_INVALID_SIZE error is returned and - ///< pPropValue is not used. - size_t * - pPropSizeRet ///< [out][optional] pointer to the actual size in bytes of the queried propName. -) { +ur_result_t UR_APICALL +urLoaderConfigGetInfo( + ur_loader_config_handle_t hLoaderConfig, ///< [in] handle of the loader config object + ur_loader_config_info_t propName, ///< [in] type of the info to retrieve + size_t propSize, ///< [in] the number of bytes pointed to by pPropValue. + void* pPropValue, ///< [out][optional][typename(propName, propSize)] array of bytes holding + ///< the info. + ///< If propSize is not equal to or greater than the real number of bytes + ///< needed to return the info + ///< then the ::UR_RESULT_ERROR_INVALID_SIZE error is returned and + ///< pPropValue is not used. + size_t* pPropSizeRet ///< [out][optional] pointer to the actual size in bytes of the queried propName. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Enable a layer for the specified loader config. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -138,13 +140,13 @@ ur_result_t UR_APICALL urLoaderConfigGetInfo( /// + `NULL == pLayerName` /// - ::UR_RESULT_ERROR_LAYER_NOT_PRESENT /// + If layer specified with `pLayerName` can't be found by the loader. -ur_result_t UR_APICALL urLoaderConfigEnableLayer( - ur_loader_config_handle_t - hLoaderConfig, ///< [in] Handle to config object the layer will be enabled for. - const char * - pLayerName ///< [in] Null terminated string containing the name of the layer to - ///< enable. Empty if none are enabled. -) { +ur_result_t UR_APICALL +urLoaderConfigEnableLayer( + ur_loader_config_handle_t hLoaderConfig, ///< [in] Handle to config object the layer will be enabled for. + const char* pLayerName ///< [in] Null terminated string containing the name of the layer to + ///< enable. Empty if none are enabled. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -152,14 +154,14 @@ ur_result_t UR_APICALL urLoaderConfigEnableLayer( /////////////////////////////////////////////////////////////////////////////// /// @brief Set a function callback for use by the loader to retrieve code /// location information. -/// +/// /// @details /// - The code location callback is optional and provides additional /// information to the tracing layer about the entry point of the current /// execution flow. /// - This functionality can be used to match traced unified runtime /// function calls with higher-level user calls. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -169,28 +171,27 @@ ur_result_t UR_APICALL urLoaderConfigEnableLayer( /// + `NULL == hLoaderConfig` /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER /// + `NULL == pfnCodeloc` -ur_result_t UR_APICALL urLoaderConfigSetCodeLocationCallback( - ur_loader_config_handle_t - hLoaderConfig, ///< [in] Handle to config object the layer will be enabled for. - ur_code_location_callback_t - pfnCodeloc, ///< [in] Function pointer to code location callback. - void * - pUserData ///< [in][out][optional] pointer to data to be passed to callback. -) { +ur_result_t UR_APICALL +urLoaderConfigSetCodeLocationCallback( + ur_loader_config_handle_t hLoaderConfig, ///< [in] Handle to config object the layer will be enabled for. + ur_code_location_callback_t pfnCodeloc, ///< [in] Function pointer to code location callback. + void* pUserData ///< [in][out][optional] pointer to data to be passed to callback. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief The only adapter reported with mock enabled will be the mock adapter. -/// +/// /// @details /// - The mock adapter will default to returning ::UR_RESULT_SUCCESS for all /// entry points. It will also create and correctly reference count dummy /// handles where appropriate. Its behaviour can be modified by linking /// the mock library and using the object accessed via /// mock::getCallbacks(). -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -198,19 +199,19 @@ ur_result_t UR_APICALL urLoaderConfigSetCodeLocationCallback( /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE /// + `NULL == hLoaderConfig` -ur_result_t UR_APICALL urLoaderConfigSetMockingEnabled( - ur_loader_config_handle_t - hLoaderConfig, ///< [in] Handle to config object mocking will be enabled for. - ur_bool_t - enable ///< [in] Handle to config object the layer will be enabled for. -) { +ur_result_t UR_APICALL +urLoaderConfigSetMockingEnabled( + ur_loader_config_handle_t hLoaderConfig, ///< [in] Handle to config object mocking will be enabled for. + ur_bool_t enable ///< [in] Handle to config object the layer will be enabled for. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Initialize the 'oneAPI' loader -/// +/// /// @details /// - The application must call this function before calling any other /// function. @@ -224,7 +225,7 @@ ur_result_t UR_APICALL urLoaderConfigSetMockingEnabled( /// - The application may call this function from simultaneous threads. /// - The implementation of this function must be thread-safe for scenarios /// where multiple libraries may initialize the loader simultaneously. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -233,33 +234,38 @@ ur_result_t UR_APICALL urLoaderConfigSetMockingEnabled( /// - ::UR_RESULT_ERROR_INVALID_ENUMERATION /// + `::UR_DEVICE_INIT_FLAGS_MASK & device_flags` /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY -ur_result_t UR_APICALL urLoaderInit( - ur_device_init_flags_t device_flags, ///< [in] device initialization flags. - ///< must be 0 (default) or a combination of ::ur_device_init_flag_t. - ur_loader_config_handle_t - hLoaderConfig ///< [in][optional] Handle of loader config handle. -) { +ur_result_t UR_APICALL +urLoaderInit( + ur_device_init_flags_t device_flags, ///< [in] device initialization flags. + ///< must be 0 (default) or a combination of ::ur_device_init_flag_t. + ur_loader_config_handle_t hLoaderConfig ///< [in][optional] Handle of loader config handle. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Tear down the 'oneAPI' loader and release all its resources -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED /// - ::UR_RESULT_ERROR_DEVICE_LOST /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY -ur_result_t UR_APICALL urLoaderTearDown(void) { +ur_result_t UR_APICALL +urLoaderTearDown( + void + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Retrieves all available adapters -/// +/// /// @details /// - Adapter implementations must return exactly one adapter handle from /// this entry point. @@ -271,7 +277,7 @@ ur_result_t UR_APICALL urLoaderTearDown(void) { /// first reference to them is taken. /// - An application may call this entry point multiple times to acquire /// multiple references to the adapter handle(s). -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -279,32 +285,31 @@ ur_result_t UR_APICALL urLoaderTearDown(void) { /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC /// - ::UR_RESULT_ERROR_INVALID_SIZE /// + `NumEntries == 0 && phAdapters != NULL` -ur_result_t UR_APICALL urAdapterGet( - uint32_t - NumEntries, ///< [in] the number of adapters to be added to phAdapters. - ///< If phAdapters is not NULL, then NumEntries should be greater than - ///< zero, otherwise ::UR_RESULT_ERROR_INVALID_SIZE, - ///< will be returned. - ur_adapter_handle_t * - phAdapters, ///< [out][optional][range(0, NumEntries)] array of handle of adapters. - ///< If NumEntries is less than the number of adapters available, then - ///< ::urAdapterGet shall only retrieve that number of adapters. - uint32_t * - pNumAdapters ///< [out][optional] returns the total number of adapters available. -) { +ur_result_t UR_APICALL +urAdapterGet( + uint32_t NumEntries, ///< [in] the number of adapters to be added to phAdapters. + ///< If phAdapters is not NULL, then NumEntries should be greater than + ///< zero, otherwise ::UR_RESULT_ERROR_INVALID_SIZE, + ///< will be returned. + ur_adapter_handle_t* phAdapters, ///< [out][optional][range(0, NumEntries)] array of handle of adapters. + ///< If NumEntries is less than the number of adapters available, then + ///< ::urAdapterGet shall only retrieve that number of adapters. + uint32_t* pNumAdapters ///< [out][optional] returns the total number of adapters available. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Releases the adapter handle reference indicating end of its usage -/// +/// /// @details /// - When the reference count of the adapter reaches zero, the adapter may /// perform adapter-specififc resource teardown. Resources must be left in /// a state where it safe for the adapter to be subsequently reinitialized /// with ::urAdapterGet -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -312,19 +317,21 @@ ur_result_t UR_APICALL urAdapterGet( /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE /// + `NULL == hAdapter` -ur_result_t UR_APICALL urAdapterRelease( - ur_adapter_handle_t hAdapter ///< [in][release] Adapter handle to release -) { +ur_result_t UR_APICALL +urAdapterRelease( + ur_adapter_handle_t hAdapter ///< [in][release] Adapter handle to release + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Get a reference to the adapter handle. -/// +/// /// @details /// - Get a reference to the adapter handle. Increment its reference count -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -332,37 +339,39 @@ ur_result_t UR_APICALL urAdapterRelease( /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE /// + `NULL == hAdapter` -ur_result_t UR_APICALL urAdapterRetain( - ur_adapter_handle_t hAdapter ///< [in][retain] Adapter handle to retain -) { +ur_result_t UR_APICALL +urAdapterRetain( + ur_adapter_handle_t hAdapter ///< [in][retain] Adapter handle to retain + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Get the last adapter specific error. -/// +/// /// @details /// To be used after another entry-point has returned /// ::UR_RESULT_ERROR_ADAPTER_SPECIFIC in order to retrieve a message describing /// the circumstances of the underlying driver error and the error code /// returned by the failed driver entry-point. -/// +/// /// * Implementations *must* store the message and error code in thread-local /// storage prior to returning ::UR_RESULT_ERROR_ADAPTER_SPECIFIC. -/// +/// /// * The message and error code storage is will only be valid if a previously /// called entry-point returned ::UR_RESULT_ERROR_ADAPTER_SPECIFIC. -/// +/// /// * The memory pointed to by the C string returned in `ppMessage` is owned by /// the adapter and *must* be null terminated. -/// +/// /// * The application *may* call this function from simultaneous threads. -/// +/// /// * The implementation of this function *should* be lock-free. -/// +/// /// Example usage: -/// +/// /// ```cpp /// if (::urQueueCreate(hContext, hDevice, nullptr, &hQueue) == /// ::UR_RESULT_ERROR_ADAPTER_SPECIFIC) { @@ -371,7 +380,7 @@ ur_result_t UR_APICALL urAdapterRetain( /// ::urAdapterGetLastError(hAdapter, &pMessage, &error); /// } /// ``` -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -382,26 +391,26 @@ ur_result_t UR_APICALL urAdapterRetain( /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER /// + `NULL == ppMessage` /// + `NULL == pError` -ur_result_t UR_APICALL urAdapterGetLastError( - ur_adapter_handle_t hAdapter, ///< [in] handle of the adapter instance - const char ** - ppMessage, ///< [out] pointer to a C string where the adapter specific error message - ///< will be stored. - int32_t * - pError ///< [out] pointer to an integer where the adapter specific error code will - ///< be stored. -) { +ur_result_t UR_APICALL +urAdapterGetLastError( + ur_adapter_handle_t hAdapter, ///< [in] handle of the adapter instance + const char** ppMessage, ///< [out] pointer to a C string where the adapter specific error message + ///< will be stored. + int32_t* pError ///< [out] pointer to an integer where the adapter specific error code will + ///< be stored. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Retrieves information about the adapter -/// +/// /// @details /// - The application may call this function from simultaneous threads. /// - The implementation of this function should be lock-free. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -421,36 +430,36 @@ ur_result_t UR_APICALL urAdapterGetLastError( /// + `pPropValue == NULL && pPropSizeRet == NULL` /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY -ur_result_t UR_APICALL urAdapterGetInfo( - ur_adapter_handle_t hAdapter, ///< [in] handle of the adapter - ur_adapter_info_t propName, ///< [in] type of the info to retrieve - size_t propSize, ///< [in] the number of bytes pointed to by pPropValue. - void * - pPropValue, ///< [out][optional][typename(propName, propSize)] array of bytes holding - ///< the info. - ///< If Size is not equal to or greater to the real number of bytes needed - ///< to return the info then the ::UR_RESULT_ERROR_INVALID_SIZE error is - ///< returned and pPropValue is not used. - size_t * - pPropSizeRet ///< [out][optional] pointer to the actual number of bytes being queried by pPropValue. -) { +ur_result_t UR_APICALL +urAdapterGetInfo( + ur_adapter_handle_t hAdapter, ///< [in] handle of the adapter + ur_adapter_info_t propName, ///< [in] type of the info to retrieve + size_t propSize, ///< [in] the number of bytes pointed to by pPropValue. + void* pPropValue, ///< [out][optional][typename(propName, propSize)] array of bytes holding + ///< the info. + ///< If Size is not equal to or greater to the real number of bytes needed + ///< to return the info then the ::UR_RESULT_ERROR_INVALID_SIZE error is + ///< returned and pPropValue is not used. + size_t* pPropSizeRet ///< [out][optional] pointer to the actual number of bytes being queried by pPropValue. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Retrieves all available platforms for the given adapters -/// +/// /// @details /// - Multiple calls to this function will return identical platforms /// handles, in the same order. /// - The application may call this function from simultaneous threads, the /// implementation must be thread-safe -/// +/// /// @remarks /// _Analogues_ /// - **clGetPlatformIDs** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -462,37 +471,35 @@ ur_result_t UR_APICALL urAdapterGetInfo( /// + `NumEntries == 0 && phPlatforms != NULL` /// - ::UR_RESULT_ERROR_INVALID_VALUE /// + `pNumPlatforms == NULL && phPlatforms == NULL` -ur_result_t UR_APICALL urPlatformGet( - ur_adapter_handle_t * - phAdapters, ///< [in][range(0, NumAdapters)] array of adapters to query for platforms. - uint32_t NumAdapters, ///< [in] number of adapters pointed to by phAdapters - uint32_t - NumEntries, ///< [in] the number of platforms to be added to phPlatforms. - ///< If phPlatforms is not NULL, then NumEntries should be greater than - ///< zero, otherwise ::UR_RESULT_ERROR_INVALID_SIZE, - ///< will be returned. - ur_platform_handle_t * - phPlatforms, ///< [out][optional][range(0, NumEntries)] array of handle of platforms. - ///< If NumEntries is less than the number of platforms available, then - ///< ::urPlatformGet shall only retrieve that number of platforms. - uint32_t * - pNumPlatforms ///< [out][optional] returns the total number of platforms available. -) { +ur_result_t UR_APICALL +urPlatformGet( + ur_adapter_handle_t* phAdapters, ///< [in][range(0, NumAdapters)] array of adapters to query for platforms. + uint32_t NumAdapters, ///< [in] number of adapters pointed to by phAdapters + uint32_t NumEntries, ///< [in] the number of platforms to be added to phPlatforms. + ///< If phPlatforms is not NULL, then NumEntries should be greater than + ///< zero, otherwise ::UR_RESULT_ERROR_INVALID_SIZE, + ///< will be returned. + ur_platform_handle_t* phPlatforms, ///< [out][optional][range(0, NumEntries)] array of handle of platforms. + ///< If NumEntries is less than the number of platforms available, then + ///< ::urPlatformGet shall only retrieve that number of platforms. + uint32_t* pNumPlatforms ///< [out][optional] returns the total number of platforms available. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Retrieves various information about platform -/// +/// /// @details /// - The application may call this function from simultaneous threads. /// - The implementation of this function should be lock-free. -/// +/// /// @remarks /// _Analogues_ /// - **clGetPlatformInfo** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -513,30 +520,30 @@ ur_result_t UR_APICALL urPlatformGet( /// - ::UR_RESULT_ERROR_INVALID_PLATFORM /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY -ur_result_t UR_APICALL urPlatformGetInfo( - ur_platform_handle_t hPlatform, ///< [in] handle of the platform - ur_platform_info_t propName, ///< [in] type of the info to retrieve - size_t propSize, ///< [in] the number of bytes pointed to by pPlatformInfo. - void * - pPropValue, ///< [out][optional][typename(propName, propSize)] array of bytes holding - ///< the info. - ///< If Size is not equal to or greater to the real number of bytes needed - ///< to return the info then the ::UR_RESULT_ERROR_INVALID_SIZE error is - ///< returned and pPlatformInfo is not used. - size_t * - pPropSizeRet ///< [out][optional] pointer to the actual number of bytes being queried by pPlatformInfo. -) { +ur_result_t UR_APICALL +urPlatformGetInfo( + ur_platform_handle_t hPlatform, ///< [in] handle of the platform + ur_platform_info_t propName, ///< [in] type of the info to retrieve + size_t propSize, ///< [in] the number of bytes pointed to by pPlatformInfo. + void* pPropValue, ///< [out][optional][typename(propName, propSize)] array of bytes holding + ///< the info. + ///< If Size is not equal to or greater to the real number of bytes needed + ///< to return the info then the ::UR_RESULT_ERROR_INVALID_SIZE error is + ///< returned and pPlatformInfo is not used. + size_t* pPropSizeRet ///< [out][optional] pointer to the actual number of bytes being queried by pPlatformInfo. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Returns the API version supported by the specified platform -/// +/// /// @details /// - The application may call this function from simultaneous threads. /// - The implementation of this function should be lock-free. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -546,17 +553,19 @@ ur_result_t UR_APICALL urPlatformGetInfo( /// + `NULL == hPlatform` /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER /// + `NULL == pVersion` -ur_result_t UR_APICALL urPlatformGetApiVersion( - ur_platform_handle_t hPlatform, ///< [in] handle of the platform - ur_api_version_t *pVersion ///< [out] api version -) { +ur_result_t UR_APICALL +urPlatformGetApiVersion( + ur_platform_handle_t hPlatform, ///< [in] handle of the platform + ur_api_version_t* pVersion ///< [out] api version + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Return platform native platform handle. -/// +/// /// @details /// - Retrieved native handle can be used for direct interaction with the /// native platform driver. @@ -565,7 +574,7 @@ ur_result_t UR_APICALL urPlatformGetApiVersion( /// - The application may call this function from simultaneous threads for /// the same context. /// - The implementation of this function should be thread-safe. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -577,24 +586,25 @@ ur_result_t UR_APICALL urPlatformGetApiVersion( /// + `NULL == phNativePlatform` /// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE /// + If the adapter has no underlying equivalent handle. -ur_result_t UR_APICALL urPlatformGetNativeHandle( - ur_platform_handle_t hPlatform, ///< [in] handle of the platform. - ur_native_handle_t * - phNativePlatform ///< [out] a pointer to the native handle of the platform. -) { +ur_result_t UR_APICALL +urPlatformGetNativeHandle( + ur_platform_handle_t hPlatform, ///< [in] handle of the platform. + ur_native_handle_t* phNativePlatform ///< [out] a pointer to the native handle of the platform. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Create runtime platform object from native platform handle. -/// +/// /// @details /// - Creates runtime platform handle from native driver platform handle. /// - The application may call this function from simultaneous threads for /// the same context. /// - The implementation of this function should be thread-safe. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -606,16 +616,14 @@ ur_result_t UR_APICALL urPlatformGetNativeHandle( /// + `NULL == phPlatform` /// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE /// + If the adapter has no underlying equivalent handle. -ur_result_t UR_APICALL urPlatformCreateWithNativeHandle( - ur_native_handle_t - hNativePlatform, ///< [in][nocheck] the native handle of the platform. - ur_adapter_handle_t - hAdapter, ///< [in] handle of the adapter associated with the native backend. - const ur_platform_native_properties_t * - pProperties, ///< [in][optional] pointer to native platform properties struct. - ur_platform_handle_t * - phPlatform ///< [out] pointer to the handle of the platform object created. -) { +ur_result_t UR_APICALL +urPlatformCreateWithNativeHandle( + ur_native_handle_t hNativePlatform, ///< [in][nocheck] the native handle of the platform. + ur_adapter_handle_t hAdapter, ///< [in] handle of the adapter associated with the native backend. + const ur_platform_native_properties_t* pProperties, ///< [in][optional] pointer to native platform properties struct. + ur_platform_handle_t* phPlatform ///< [out] pointer to the handle of the platform object created. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -623,7 +631,7 @@ ur_result_t UR_APICALL urPlatformCreateWithNativeHandle( /////////////////////////////////////////////////////////////////////////////// /// @brief Get the platform specific compiler backend option from a generic /// frontend option. -/// +/// /// @details /// - The string returned via the ppPlatformOption is a NULL terminated C /// style string. @@ -632,7 +640,7 @@ ur_result_t UR_APICALL urPlatformCreateWithNativeHandle( /// the adapter. /// - The application may call this function from simultaneous threads. /// - The implementation of this function should be lock-free. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -645,21 +653,21 @@ ur_result_t UR_APICALL urPlatformCreateWithNativeHandle( /// + `NULL == ppPlatformOption` /// - ::UR_RESULT_ERROR_INVALID_VALUE /// + If `pFrontendOption` is not a valid frontend option. -ur_result_t UR_APICALL urPlatformGetBackendOption( - ur_platform_handle_t hPlatform, ///< [in] handle of the platform instance. - const char - *pFrontendOption, ///< [in] string containing the frontend option. - const char ** - ppPlatformOption ///< [out] returns the correct platform specific compiler option based on - ///< the frontend option. -) { +ur_result_t UR_APICALL +urPlatformGetBackendOption( + ur_platform_handle_t hPlatform, ///< [in] handle of the platform instance. + const char* pFrontendOption, ///< [in] string containing the frontend option. + const char** ppPlatformOption ///< [out] returns the correct platform specific compiler option based on + ///< the frontend option. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Retrieves devices within a platform -/// +/// /// @details /// - Multiple calls to this function will return identical device handles, /// in the same order. @@ -670,11 +678,11 @@ ur_result_t UR_APICALL urPlatformGetBackendOption( /// with a subsequent call to ::urDeviceRelease. /// - The application may call this function from simultaneous threads, the /// implementation must be thread-safe -/// +/// /// @remarks /// _Analogues_ /// - **clGetDeviceIDs** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -689,28 +697,28 @@ ur_result_t UR_APICALL urPlatformGetBackendOption( /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER /// + `NumEntries > 0 && phDevices == NULL` /// - ::UR_RESULT_ERROR_INVALID_VALUE -ur_result_t UR_APICALL urDeviceGet( - ur_platform_handle_t hPlatform, ///< [in] handle of the platform instance - ur_device_type_t DeviceType, ///< [in] the type of the devices. - uint32_t - NumEntries, ///< [in] the number of devices to be added to phDevices. - ///< If phDevices is not NULL, then NumEntries should be greater than zero. - ///< Otherwise ::UR_RESULT_ERROR_INVALID_SIZE - ///< will be returned. - ur_device_handle_t * - phDevices, ///< [out][optional][range(0, NumEntries)] array of handle of devices. - ///< If NumEntries is less than the number of devices available, then - ///< platform shall only retrieve that number of devices. - uint32_t *pNumDevices ///< [out][optional] pointer to the number of devices. - ///< pNumDevices will be updated with the total number of devices available. -) { +ur_result_t UR_APICALL +urDeviceGet( + ur_platform_handle_t hPlatform, ///< [in] handle of the platform instance + ur_device_type_t DeviceType, ///< [in] the type of the devices. + uint32_t NumEntries, ///< [in] the number of devices to be added to phDevices. + ///< If phDevices is not NULL, then NumEntries should be greater than zero. + ///< Otherwise ::UR_RESULT_ERROR_INVALID_SIZE + ///< will be returned. + ur_device_handle_t* phDevices, ///< [out][optional][range(0, NumEntries)] array of handle of devices. + ///< If NumEntries is less than the number of devices available, then + ///< platform shall only retrieve that number of devices. + uint32_t* pNumDevices ///< [out][optional] pointer to the number of devices. + ///< pNumDevices will be updated with the total number of devices available. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Retrieves devices within a platform selected by ONEAPI_DEVICE_SELECTOR -/// +/// /// @details /// - Multiple calls to this function will return identical device handles, /// in the same order. @@ -721,7 +729,7 @@ ur_result_t UR_APICALL urDeviceGet( /// with a subsequent call to ::urDeviceRelease. /// - The application may call this function from simultaneous threads, the /// implementation must be thread-safe. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -732,37 +740,37 @@ ur_result_t UR_APICALL urDeviceGet( /// - ::UR_RESULT_ERROR_INVALID_ENUMERATION /// + `::UR_DEVICE_TYPE_VPU < DeviceType` /// - ::UR_RESULT_ERROR_INVALID_VALUE -ur_result_t UR_APICALL urDeviceGetSelected( - ur_platform_handle_t hPlatform, ///< [in] handle of the platform instance - ur_device_type_t DeviceType, ///< [in] the type of the devices. - uint32_t - NumEntries, ///< [in] the number of devices to be added to phDevices. - ///< If phDevices in not NULL then NumEntries should be greater than zero, - ///< otherwise ::UR_RESULT_ERROR_INVALID_VALUE, - ///< will be returned. - ur_device_handle_t * - phDevices, ///< [out][optional][range(0, NumEntries)] array of handle of devices. - ///< If NumEntries is less than the number of devices available, then only - ///< that number of devices will be retrieved. - uint32_t *pNumDevices ///< [out][optional] pointer to the number of devices. - ///< pNumDevices will be updated with the total number of selected devices - ///< available for the given platform. -) { +ur_result_t UR_APICALL +urDeviceGetSelected( + ur_platform_handle_t hPlatform, ///< [in] handle of the platform instance + ur_device_type_t DeviceType, ///< [in] the type of the devices. + uint32_t NumEntries, ///< [in] the number of devices to be added to phDevices. + ///< If phDevices in not NULL then NumEntries should be greater than zero, + ///< otherwise ::UR_RESULT_ERROR_INVALID_VALUE, + ///< will be returned. + ur_device_handle_t* phDevices, ///< [out][optional][range(0, NumEntries)] array of handle of devices. + ///< If NumEntries is less than the number of devices available, then only + ///< that number of devices will be retrieved. + uint32_t* pNumDevices ///< [out][optional] pointer to the number of devices. + ///< pNumDevices will be updated with the total number of selected devices + ///< available for the given platform. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Retrieves various information about device -/// +/// /// @details /// - The application may call this function from simultaneous threads. /// - The implementation of this function should be lock-free. -/// +/// /// @remarks /// _Analogues_ /// - **clGetDeviceInfo** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -783,20 +791,20 @@ ur_result_t UR_APICALL urDeviceGetSelected( /// - ::UR_RESULT_ERROR_INVALID_DEVICE /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY -ur_result_t UR_APICALL urDeviceGetInfo( - ur_device_handle_t hDevice, ///< [in] handle of the device instance - ur_device_info_t propName, ///< [in] type of the info to retrieve - size_t propSize, ///< [in] the number of bytes pointed to by pPropValue. - void * - pPropValue, ///< [out][optional][typename(propName, propSize)] array of bytes holding - ///< the info. - ///< If propSize is not equal to or greater than the real number of bytes - ///< needed to return the info - ///< then the ::UR_RESULT_ERROR_INVALID_SIZE error is returned and - ///< pPropValue is not used. - size_t * - pPropSizeRet ///< [out][optional] pointer to the actual size in bytes of the queried propName. -) { +ur_result_t UR_APICALL +urDeviceGetInfo( + ur_device_handle_t hDevice, ///< [in] handle of the device instance + ur_device_info_t propName, ///< [in] type of the info to retrieve + size_t propSize, ///< [in] the number of bytes pointed to by pPropValue. + void* pPropValue, ///< [out][optional][typename(propName, propSize)] array of bytes holding + ///< the info. + ///< If propSize is not equal to or greater than the real number of bytes + ///< needed to return the info + ///< then the ::UR_RESULT_ERROR_INVALID_SIZE error is returned and + ///< pPropValue is not used. + size_t* pPropSizeRet ///< [out][optional] pointer to the actual size in bytes of the queried propName. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -804,7 +812,7 @@ ur_result_t UR_APICALL urDeviceGetInfo( /////////////////////////////////////////////////////////////////////////////// /// @brief Makes a reference of the device handle indicating it's in use until /// paired ::urDeviceRelease is called -/// +/// /// @details /// - Increments the device reference count if `hDevice` is a valid /// sub-device created by a call to `urDevicePartition`. If `hDevice` is a @@ -815,11 +823,11 @@ ur_result_t UR_APICALL urDeviceGetInfo( /// - The application may call this function from simultaneous threads for /// the same device. /// - The implementation of this function should be thread-safe. -/// +/// /// @remarks /// _Analogues_ /// - **clRetainDevice** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -827,17 +835,18 @@ ur_result_t UR_APICALL urDeviceGetInfo( /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE /// + `NULL == hDevice` -ur_result_t UR_APICALL urDeviceRetain( - ur_device_handle_t - hDevice ///< [in][retain] handle of the device to get a reference of. -) { +ur_result_t UR_APICALL +urDeviceRetain( + ur_device_handle_t hDevice ///< [in][retain] handle of the device to get a reference of. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Releases the device handle reference indicating end of its usage -/// +/// /// @details /// - Decrements the device reference count if `hDevice` is a valid /// sub-device created by a call to `urDevicePartition`. If `hDevice` is a @@ -846,11 +855,11 @@ ur_result_t UR_APICALL urDeviceRetain( /// - The application may call this function from simultaneous threads for /// the same device. /// - The implementation of this function should be thread-safe. -/// +/// /// @remarks /// _Analogues_ /// - **clReleaseDevice** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -858,17 +867,18 @@ ur_result_t UR_APICALL urDeviceRetain( /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE /// + `NULL == hDevice` -ur_result_t UR_APICALL urDeviceRelease( - ur_device_handle_t - hDevice ///< [in][release] handle of the device to release. -) { +ur_result_t UR_APICALL +urDeviceRelease( + ur_device_handle_t hDevice ///< [in][release] handle of the device to release. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Partition the device into sub-devices -/// +/// /// @details /// - Repeated calls to this function with the same inputs will produce the /// same output in the same order. @@ -877,11 +887,11 @@ ur_result_t UR_APICALL urDeviceRelease( /// - The application may call this function from simultaneous threads for /// the same device. /// - The implementation of this function should be thread-safe. -/// +/// /// @remarks /// _Analogues_ /// - **clCreateSubDevices** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -894,19 +904,18 @@ ur_result_t UR_APICALL urDeviceRelease( /// + `NULL == pProperties->pProperties` /// - ::UR_RESULT_ERROR_DEVICE_PARTITION_FAILED /// - ::UR_RESULT_ERROR_INVALID_DEVICE_PARTITION_COUNT -ur_result_t UR_APICALL urDevicePartition( - ur_device_handle_t hDevice, ///< [in] handle of the device to partition. - const ur_device_partition_properties_t - *pProperties, ///< [in] Device partition properties. - uint32_t NumDevices, ///< [in] the number of sub-devices. - ur_device_handle_t * - phSubDevices, ///< [out][optional][range(0, NumDevices)] array of handle of devices. - ///< If NumDevices is less than the number of sub-devices available, then - ///< the function shall only retrieve that number of sub-devices. - uint32_t * - pNumDevicesRet ///< [out][optional] pointer to the number of sub-devices the device can be - ///< partitioned into according to the partitioning property. -) { +ur_result_t UR_APICALL +urDevicePartition( + ur_device_handle_t hDevice, ///< [in] handle of the device to partition. + const ur_device_partition_properties_t* pProperties,///< [in] Device partition properties. + uint32_t NumDevices, ///< [in] the number of sub-devices. + ur_device_handle_t* phSubDevices, ///< [out][optional][range(0, NumDevices)] array of handle of devices. + ///< If NumDevices is less than the number of sub-devices available, then + ///< the function shall only retrieve that number of sub-devices. + uint32_t* pNumDevicesRet ///< [out][optional] pointer to the number of sub-devices the device can be + ///< partitioned into according to the partitioning property. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -914,7 +923,7 @@ ur_result_t UR_APICALL urDevicePartition( /////////////////////////////////////////////////////////////////////////////// /// @brief Selects the most appropriate device binary based on runtime /// information and the IR characteristics. -/// +/// /// @details /// - The input binaries are various AOT images, and possibly an IL binary /// for JIT compilation. @@ -924,7 +933,7 @@ ur_result_t UR_APICALL urDevicePartition( /// - The application may call this function from simultaneous threads for /// the same device. /// - The implementation of this function should be thread-safe. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -937,25 +946,24 @@ ur_result_t UR_APICALL urDevicePartition( /// + `NULL == pSelectedBinary` /// - ::UR_RESULT_ERROR_INVALID_SIZE /// + `NumBinaries == 0` -ur_result_t UR_APICALL urDeviceSelectBinary( - ur_device_handle_t - hDevice, ///< [in] handle of the device to select binary for. - const ur_device_binary_t - *pBinaries, ///< [in] the array of binaries to select from. - uint32_t NumBinaries, ///< [in] the number of binaries passed in ppBinaries. - ///< Must greater than or equal to zero otherwise - ///< ::UR_RESULT_ERROR_INVALID_VALUE is returned. - uint32_t * - pSelectedBinary ///< [out] the index of the selected binary in the input array of binaries. - ///< If a suitable binary was not found the function returns ::UR_RESULT_ERROR_INVALID_BINARY. -) { +ur_result_t UR_APICALL +urDeviceSelectBinary( + ur_device_handle_t hDevice, ///< [in] handle of the device to select binary for. + const ur_device_binary_t* pBinaries, ///< [in] the array of binaries to select from. + uint32_t NumBinaries, ///< [in] the number of binaries passed in ppBinaries. + ///< Must greater than or equal to zero otherwise + ///< ::UR_RESULT_ERROR_INVALID_VALUE is returned. + uint32_t* pSelectedBinary ///< [out] the index of the selected binary in the input array of binaries. + ///< If a suitable binary was not found the function returns ::UR_RESULT_ERROR_INVALID_BINARY. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Return platform native device handle. -/// +/// /// @details /// - Retrieved native handle can be used for direct interaction with the /// native platform driver. @@ -964,7 +972,7 @@ ur_result_t UR_APICALL urDeviceSelectBinary( /// - The application may call this function from simultaneous threads for /// the same context. /// - The implementation of this function should be thread-safe. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -976,24 +984,25 @@ ur_result_t UR_APICALL urDeviceSelectBinary( /// + `NULL == phNativeDevice` /// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE /// + If the adapter has no underlying equivalent handle. -ur_result_t UR_APICALL urDeviceGetNativeHandle( - ur_device_handle_t hDevice, ///< [in] handle of the device. - ur_native_handle_t - *phNativeDevice ///< [out] a pointer to the native handle of the device. -) { +ur_result_t UR_APICALL +urDeviceGetNativeHandle( + ur_device_handle_t hDevice, ///< [in] handle of the device. + ur_native_handle_t* phNativeDevice ///< [out] a pointer to the native handle of the device. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Create runtime device object from native device handle. -/// +/// /// @details /// - Creates runtime device handle from native driver device handle. /// - The application may call this function from simultaneous threads for /// the same context. /// - The implementation of this function should be thread-safe. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -1005,32 +1014,30 @@ ur_result_t UR_APICALL urDeviceGetNativeHandle( /// + `NULL == phDevice` /// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE /// + If the adapter has no underlying equivalent handle. -ur_result_t UR_APICALL urDeviceCreateWithNativeHandle( - ur_native_handle_t - hNativeDevice, ///< [in][nocheck] the native handle of the device. - ur_adapter_handle_t - hAdapter, ///< [in] handle of the adapter to which `hNativeDevice` belongs - const ur_device_native_properties_t * - pProperties, ///< [in][optional] pointer to native device properties struct. - ur_device_handle_t - *phDevice ///< [out] pointer to the handle of the device object created. -) { +ur_result_t UR_APICALL +urDeviceCreateWithNativeHandle( + ur_native_handle_t hNativeDevice, ///< [in][nocheck] the native handle of the device. + ur_adapter_handle_t hAdapter, ///< [in] handle of the adapter to which `hNativeDevice` belongs + const ur_device_native_properties_t* pProperties, ///< [in][optional] pointer to native device properties struct. + ur_device_handle_t* phDevice ///< [out] pointer to the handle of the device object created. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Returns synchronized Host and Device global timestamps. -/// +/// /// @details /// - The application may call this function from simultaneous threads for /// the same context. /// - The implementation of this function should be thread-safe. -/// +/// /// @remarks /// _Analogues_ /// - **clGetDeviceAndHostTimer** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -1038,22 +1045,22 @@ ur_result_t UR_APICALL urDeviceCreateWithNativeHandle( /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE /// + `NULL == hDevice` -ur_result_t UR_APICALL urDeviceGetGlobalTimestamps( - ur_device_handle_t hDevice, ///< [in] handle of the device instance - uint64_t * - pDeviceTimestamp, ///< [out][optional] pointer to the Device's global timestamp that - ///< correlates with the Host's global timestamp value - uint64_t * - pHostTimestamp ///< [out][optional] pointer to the Host's global timestamp that - ///< correlates with the Device's global timestamp value -) { +ur_result_t UR_APICALL +urDeviceGetGlobalTimestamps( + ur_device_handle_t hDevice, ///< [in] handle of the device instance + uint64_t* pDeviceTimestamp, ///< [out][optional] pointer to the Device's global timestamp that + ///< correlates with the Host's global timestamp value + uint64_t* pHostTimestamp ///< [out][optional] pointer to the Host's global timestamp that + ///< correlates with the Device's global timestamp value + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Creates a context with the given devices. -/// +/// /// @details /// - All devices should be from the same platform. /// - Context is used for resource sharing between all the devices @@ -1064,11 +1071,11 @@ ur_result_t UR_APICALL urDeviceGetGlobalTimestamps( /// subsequent call to ::urContextRelease. /// - The application may call this function from simultaneous threads. /// - The implementation of this function must be thread-safe. -/// +/// /// @remarks /// _Analogues_ /// - **clCreateContext** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -1081,15 +1088,14 @@ ur_result_t UR_APICALL urDeviceGetGlobalTimestamps( /// + `NULL != pProperties && ::UR_CONTEXT_FLAGS_MASK & pProperties->flags` /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -ur_result_t UR_APICALL urContextCreate( - uint32_t DeviceCount, ///< [in] the number of devices given in phDevices - const ur_device_handle_t - *phDevices, ///< [in][range(0, DeviceCount)] array of handle of devices. - const ur_context_properties_t * - pProperties, ///< [in][optional] pointer to context creation properties. - ur_context_handle_t - *phContext ///< [out] pointer to handle of context object created -) { +ur_result_t UR_APICALL +urContextCreate( + uint32_t DeviceCount, ///< [in] the number of devices given in phDevices + const ur_device_handle_t* phDevices, ///< [in][range(0, DeviceCount)] array of handle of devices. + const ur_context_properties_t* pProperties, ///< [in][optional] pointer to context creation properties. + ur_context_handle_t* phContext ///< [out] pointer to handle of context object created + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -1097,18 +1103,18 @@ ur_result_t UR_APICALL urContextCreate( /////////////////////////////////////////////////////////////////////////////// /// @brief Makes a reference of the context handle indicating it's in use until /// paired ::urContextRelease is called -/// +/// /// @details /// - It is not valid to use a context handle, which has all of its /// references released. /// - The application may call this function from simultaneous threads for /// the same device. /// - The implementation of this function should be thread-safe. -/// +/// /// @remarks /// _Analogues_ /// - **clRetainContext** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -1116,26 +1122,27 @@ ur_result_t UR_APICALL urContextCreate( /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE /// + `NULL == hContext` -ur_result_t UR_APICALL urContextRetain( - ur_context_handle_t - hContext ///< [in][retain] handle of the context to get a reference of. -) { +ur_result_t UR_APICALL +urContextRetain( + ur_context_handle_t hContext ///< [in][retain] handle of the context to get a reference of. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Releases the context handle reference indicating end of its usage -/// +/// /// @details /// - The application may call this function from simultaneous threads for /// the same context. /// - The implementation of this function should be thread-safe. -/// +/// /// @remarks /// _Analogues_ /// - **clReleaseContext** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -1143,25 +1150,26 @@ ur_result_t UR_APICALL urContextRetain( /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE /// + `NULL == hContext` -ur_result_t UR_APICALL urContextRelease( - ur_context_handle_t - hContext ///< [in][release] handle of the context to release. -) { +ur_result_t UR_APICALL +urContextRelease( + ur_context_handle_t hContext ///< [in][release] handle of the context to release. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Retrieves various information about context -/// +/// /// @details /// - The application may call this function from simultaneous threads. /// - The implementation of this function should be lock-free. -/// +/// /// @remarks /// _Analogues_ /// - **clGetContextInfo** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -1182,28 +1190,27 @@ ur_result_t UR_APICALL urContextRelease( /// - ::UR_RESULT_ERROR_INVALID_CONTEXT /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY -ur_result_t UR_APICALL urContextGetInfo( - ur_context_handle_t hContext, ///< [in] handle of the context - ur_context_info_t propName, ///< [in] type of the info to retrieve - size_t - propSize, ///< [in] the number of bytes of memory pointed to by pPropValue. - void * - pPropValue, ///< [out][optional][typename(propName, propSize)] array of bytes holding - ///< the info. - ///< if propSize is not equal to or greater than the real number of bytes - ///< needed to return - ///< the info then the ::UR_RESULT_ERROR_INVALID_SIZE error is returned and - ///< pPropValue is not used. - size_t * - pPropSizeRet ///< [out][optional] pointer to the actual size in bytes of the queried propName. -) { +ur_result_t UR_APICALL +urContextGetInfo( + ur_context_handle_t hContext, ///< [in] handle of the context + ur_context_info_t propName, ///< [in] type of the info to retrieve + size_t propSize, ///< [in] the number of bytes of memory pointed to by pPropValue. + void* pPropValue, ///< [out][optional][typename(propName, propSize)] array of bytes holding + ///< the info. + ///< if propSize is not equal to or greater than the real number of bytes + ///< needed to return + ///< the info then the ::UR_RESULT_ERROR_INVALID_SIZE error is returned and + ///< pPropValue is not used. + size_t* pPropSizeRet ///< [out][optional] pointer to the actual size in bytes of the queried propName. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Return platform native context handle. -/// +/// /// @details /// - Retrieved native handle can be used for direct interaction with the /// native platform driver. @@ -1212,7 +1219,7 @@ ur_result_t UR_APICALL urContextGetInfo( /// - The application may call this function from simultaneous threads for /// the same context. /// - The implementation of this function should be thread-safe. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -1224,24 +1231,25 @@ ur_result_t UR_APICALL urContextGetInfo( /// + `NULL == phNativeContext` /// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE /// + If the adapter has no underlying equivalent handle. -ur_result_t UR_APICALL urContextGetNativeHandle( - ur_context_handle_t hContext, ///< [in] handle of the context. - ur_native_handle_t * - phNativeContext ///< [out] a pointer to the native handle of the context. -) { +ur_result_t UR_APICALL +urContextGetNativeHandle( + ur_context_handle_t hContext, ///< [in] handle of the context. + ur_native_handle_t* phNativeContext ///< [out] a pointer to the native handle of the context. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Create runtime context object from native context handle. -/// +/// /// @details /// - Creates runtime context handle from native driver context handle. /// - The application may call this function from simultaneous threads for /// the same context. /// - The implementation of this function should be thread-safe. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -1253,27 +1261,24 @@ ur_result_t UR_APICALL urContextGetNativeHandle( /// + `NULL == phContext` /// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE /// + If the adapter has no underlying equivalent handle. -ur_result_t UR_APICALL urContextCreateWithNativeHandle( - ur_native_handle_t - hNativeContext, ///< [in][nocheck] the native handle of the context. - ur_adapter_handle_t - hAdapter, ///< [in] handle of the adapter that owns the native handle - uint32_t numDevices, ///< [in] number of devices associated with the context - const ur_device_handle_t * - phDevices, ///< [in][optional][range(0, numDevices)] list of devices associated with - ///< the context - const ur_context_native_properties_t * - pProperties, ///< [in][optional] pointer to native context properties struct - ur_context_handle_t * - phContext ///< [out] pointer to the handle of the context object created. -) { +ur_result_t UR_APICALL +urContextCreateWithNativeHandle( + ur_native_handle_t hNativeContext, ///< [in][nocheck] the native handle of the context. + ur_adapter_handle_t hAdapter, ///< [in] handle of the adapter that owns the native handle + uint32_t numDevices, ///< [in] number of devices associated with the context + const ur_device_handle_t* phDevices, ///< [in][optional][range(0, numDevices)] list of devices associated with + ///< the context + const ur_context_native_properties_t* pProperties, ///< [in][optional] pointer to native context properties struct + ur_context_handle_t* phContext ///< [out] pointer to the handle of the context object created. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Call extended deleter function as callback. -/// +/// /// @details /// - Calls extended deleter, a user-defined callback to delete context on /// some platforms. @@ -1283,7 +1288,7 @@ ur_result_t UR_APICALL urContextCreateWithNativeHandle( /// - The application may call this function from simultaneous threads for /// the same context. /// - The implementation of this function should be thread-safe. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -1293,20 +1298,20 @@ ur_result_t UR_APICALL urContextCreateWithNativeHandle( /// + `NULL == hContext` /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER /// + `NULL == pfnDeleter` -ur_result_t UR_APICALL urContextSetExtendedDeleter( - ur_context_handle_t hContext, ///< [in] handle of the context. - ur_context_extended_deleter_t - pfnDeleter, ///< [in] Function pointer to extended deleter. - void * - pUserData ///< [in][out][optional] pointer to data to be passed to callback. -) { +ur_result_t UR_APICALL +urContextSetExtendedDeleter( + ur_context_handle_t hContext, ///< [in] handle of the context. + ur_context_extended_deleter_t pfnDeleter, ///< [in] Function pointer to extended deleter. + void* pUserData ///< [in][out][optional] pointer to data to be passed to callback. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Create an image object -/// +/// /// @details /// - The primary ::ur_image_format_t that must be supported by all the /// adapters are {UR_IMAGE_CHANNEL_ORDER_RGBA, UR_IMAGE_CHANNEL_TYPE_UNORM_INT8}, @@ -1321,11 +1326,11 @@ ur_result_t UR_APICALL urContextSetExtendedDeleter( /// {UR_IMAGE_CHANNEL_ORDER_RGBA, UR_IMAGE_CHANNEL_TYPE_UNSIGNED_INT32}, /// {UR_IMAGE_CHANNEL_ORDER_RGBA, UR_IMAGE_CHANNEL_TYPE_HALF_FLOAT}, /// {UR_IMAGE_CHANNEL_ORDER_RGBA, UR_IMAGE_CHANNEL_TYPE_FLOAT}. -/// +/// /// @remarks /// _Analogues_ /// - **clCreateImage** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -1356,30 +1361,31 @@ ur_result_t UR_APICALL urContextSetExtendedDeleter( /// - ::UR_RESULT_ERROR_UNSUPPORTED_IMAGE_FORMAT /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urMemImageCreate( - ur_context_handle_t hContext, ///< [in] handle of the context object - ur_mem_flags_t flags, ///< [in] allocation and usage information flags - const ur_image_format_t - *pImageFormat, ///< [in] pointer to image format specification - const ur_image_desc_t *pImageDesc, ///< [in] pointer to image description - void *pHost, ///< [in][optional] pointer to the buffer data - ur_mem_handle_t *phMem ///< [out] pointer to handle of image object created -) { +ur_result_t UR_APICALL +urMemImageCreate( + ur_context_handle_t hContext, ///< [in] handle of the context object + ur_mem_flags_t flags, ///< [in] allocation and usage information flags + const ur_image_format_t* pImageFormat, ///< [in] pointer to image format specification + const ur_image_desc_t* pImageDesc, ///< [in] pointer to image description + void* pHost, ///< [in][optional] pointer to the buffer data + ur_mem_handle_t* phMem ///< [out] pointer to handle of image object created + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Create a memory buffer -/// +/// /// @details /// - See also ::ur_buffer_channel_properties_t. /// - See also ::ur_buffer_alloc_location_properties_t. -/// +/// /// @remarks /// _Analogues_ /// - **clCreateBuffer** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -1401,15 +1407,15 @@ ur_result_t UR_APICALL urMemImageCreate( /// + `pProperties != NULL && pProperties->pHost != NULL && (flags & (UR_MEM_FLAG_USE_HOST_POINTER | UR_MEM_FLAG_ALLOC_COPY_HOST_POINTER)) == 0` /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urMemBufferCreate( - ur_context_handle_t hContext, ///< [in] handle of the context object - ur_mem_flags_t flags, ///< [in] allocation and usage information flags - size_t size, ///< [in] size in bytes of the memory object to be allocated - const ur_buffer_properties_t - *pProperties, ///< [in][optional] pointer to buffer creation properties - ur_mem_handle_t - *phBuffer ///< [out] pointer to handle of the memory buffer created -) { +ur_result_t UR_APICALL +urMemBufferCreate( + ur_context_handle_t hContext, ///< [in] handle of the context object + ur_mem_flags_t flags, ///< [in] allocation and usage information flags + size_t size, ///< [in] size in bytes of the memory object to be allocated + const ur_buffer_properties_t* pProperties, ///< [in][optional] pointer to buffer creation properties + ur_mem_handle_t* phBuffer ///< [out] pointer to handle of the memory buffer created + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -1417,15 +1423,15 @@ ur_result_t UR_APICALL urMemBufferCreate( /////////////////////////////////////////////////////////////////////////////// /// @brief Get a reference the memory object. Increment the memory object's /// reference count -/// +/// /// @details /// - Useful in library function to retain access to the memory object after /// the caller released the object -/// +/// /// @remarks /// _Analogues_ /// - **clRetainMemoryObject** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -1436,10 +1442,11 @@ ur_result_t UR_APICALL urMemBufferCreate( /// - ::UR_RESULT_ERROR_INVALID_MEM_OBJECT /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urMemRetain( - ur_mem_handle_t - hMem ///< [in][retain] handle of the memory object to get access -) { +ur_result_t UR_APICALL +urMemRetain( + ur_mem_handle_t hMem ///< [in][retain] handle of the memory object to get access + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -1447,11 +1454,11 @@ ur_result_t UR_APICALL urMemRetain( /////////////////////////////////////////////////////////////////////////////// /// @brief Decrement the memory object's reference count and delete the object if /// the reference count becomes zero. -/// +/// /// @remarks /// _Analogues_ /// - **clReleaseMemoryObject** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -1461,21 +1468,22 @@ ur_result_t UR_APICALL urMemRetain( /// + `NULL == hMem` /// - ::UR_RESULT_ERROR_INVALID_MEM_OBJECT /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY -ur_result_t UR_APICALL urMemRelease( - ur_mem_handle_t - hMem ///< [in][release] handle of the memory object to release -) { +ur_result_t UR_APICALL +urMemRelease( + ur_mem_handle_t hMem ///< [in][release] handle of the memory object to release + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Create a sub buffer representing a region in an existing buffer -/// +/// /// @remarks /// _Analogues_ /// - **clCreateSubBuffer** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -1498,23 +1506,22 @@ ur_result_t UR_APICALL urMemRelease( /// - ::UR_RESULT_ERROR_INVALID_HOST_PTR /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urMemBufferPartition( - ur_mem_handle_t - hBuffer, ///< [in] handle of the buffer object to allocate from - ur_mem_flags_t flags, ///< [in] allocation and usage information flags - ur_buffer_create_type_t bufferCreateType, ///< [in] buffer creation type - const ur_buffer_region_t - *pRegion, ///< [in] pointer to buffer create region information - ur_mem_handle_t - *phMem ///< [out] pointer to the handle of sub buffer created -) { +ur_result_t UR_APICALL +urMemBufferPartition( + ur_mem_handle_t hBuffer, ///< [in] handle of the buffer object to allocate from + ur_mem_flags_t flags, ///< [in] allocation and usage information flags + ur_buffer_create_type_t bufferCreateType, ///< [in] buffer creation type + const ur_buffer_region_t* pRegion, ///< [in] pointer to buffer create region information + ur_mem_handle_t* phMem ///< [out] pointer to the handle of sub buffer created + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Return platform native mem handle. -/// +/// /// @details /// - Retrieved native handle can be used for direct interaction with the /// native platform driver. @@ -1525,7 +1532,7 @@ ur_result_t UR_APICALL urMemBufferPartition( /// - The implementation of this function should be thread-safe. /// - The implementation may require a valid device handle to return the /// native mem handle -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -1538,26 +1545,26 @@ ur_result_t UR_APICALL urMemBufferPartition( /// + `NULL == phNativeMem` /// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE /// + If the adapter has no underlying equivalent handle. -ur_result_t UR_APICALL urMemGetNativeHandle( - ur_mem_handle_t hMem, ///< [in] handle of the mem. - ur_device_handle_t - hDevice, ///< [in][optional] handle of the device that the native handle will be - ///< resident on. - ur_native_handle_t - *phNativeMem ///< [out] a pointer to the native handle of the mem. -) { +ur_result_t UR_APICALL +urMemGetNativeHandle( + ur_mem_handle_t hMem, ///< [in] handle of the mem. + ur_device_handle_t hDevice, ///< [in][optional] handle of the device that the native handle will be + ///< resident on. + ur_native_handle_t* phNativeMem ///< [out] a pointer to the native handle of the mem. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Create runtime buffer memory object from native memory handle. -/// +/// /// @details /// - The application may call this function from simultaneous threads for /// the same context. /// - The implementation of this function should be thread-safe. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -1569,27 +1576,26 @@ ur_result_t UR_APICALL urMemGetNativeHandle( /// + `NULL == phMem` /// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE /// + If the adapter has no underlying equivalent handle. -ur_result_t UR_APICALL urMemBufferCreateWithNativeHandle( - ur_native_handle_t - hNativeMem, ///< [in][nocheck] the native handle to the memory. - ur_context_handle_t hContext, ///< [in] handle of the context object. - const ur_mem_native_properties_t * - pProperties, ///< [in][optional] pointer to native memory creation properties. - ur_mem_handle_t - *phMem ///< [out] pointer to handle of buffer memory object created. -) { +ur_result_t UR_APICALL +urMemBufferCreateWithNativeHandle( + ur_native_handle_t hNativeMem, ///< [in][nocheck] the native handle to the memory. + ur_context_handle_t hContext, ///< [in] handle of the context object. + const ur_mem_native_properties_t* pProperties, ///< [in][optional] pointer to native memory creation properties. + ur_mem_handle_t* phMem ///< [out] pointer to handle of buffer memory object created. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Create runtime image memory object from native memory handle. -/// +/// /// @details /// - The application may call this function from simultaneous threads for /// the same context. /// - The implementation of this function should be thread-safe. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -1603,32 +1609,30 @@ ur_result_t UR_APICALL urMemBufferCreateWithNativeHandle( /// + `NULL == phMem` /// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE /// + If the adapter has no underlying equivalent handle. -ur_result_t UR_APICALL urMemImageCreateWithNativeHandle( - ur_native_handle_t - hNativeMem, ///< [in][nocheck] the native handle to the memory. - ur_context_handle_t hContext, ///< [in] handle of the context object. - const ur_image_format_t - *pImageFormat, ///< [in] pointer to image format specification. - const ur_image_desc_t *pImageDesc, ///< [in] pointer to image description. - const ur_mem_native_properties_t * - pProperties, ///< [in][optional] pointer to native memory creation properties. - ur_mem_handle_t - *phMem ///< [out] pointer to handle of image memory object created. -) { +ur_result_t UR_APICALL +urMemImageCreateWithNativeHandle( + ur_native_handle_t hNativeMem, ///< [in][nocheck] the native handle to the memory. + ur_context_handle_t hContext, ///< [in] handle of the context object. + const ur_image_format_t* pImageFormat, ///< [in] pointer to image format specification. + const ur_image_desc_t* pImageDesc, ///< [in] pointer to image description. + const ur_mem_native_properties_t* pProperties, ///< [in][optional] pointer to native memory creation properties. + ur_mem_handle_t* phMem ///< [out] pointer to handle of image memory object created. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Retrieve information about a memory object. -/// +/// /// @details /// - Query information that is common to all memory objects. -/// +/// /// @remarks /// _Analogues_ /// - **clGetMemObjectInfo** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -1649,35 +1653,33 @@ ur_result_t UR_APICALL urMemImageCreateWithNativeHandle( /// - ::UR_RESULT_ERROR_INVALID_MEM_OBJECT /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY -ur_result_t UR_APICALL urMemGetInfo( - ur_mem_handle_t - hMemory, ///< [in] handle to the memory object being queried. - ur_mem_info_t propName, ///< [in] type of the info to retrieve. - size_t - propSize, ///< [in] the number of bytes of memory pointed to by pPropValue. - void * - pPropValue, ///< [out][optional][typename(propName, propSize)] array of bytes holding - ///< the info. - ///< If propSize is less than the real number of bytes needed to return - ///< the info then the ::UR_RESULT_ERROR_INVALID_SIZE error is returned and - ///< pPropValue is not used. - size_t * - pPropSizeRet ///< [out][optional] pointer to the actual size in bytes of the queried propName. -) { +ur_result_t UR_APICALL +urMemGetInfo( + ur_mem_handle_t hMemory, ///< [in] handle to the memory object being queried. + ur_mem_info_t propName, ///< [in] type of the info to retrieve. + size_t propSize, ///< [in] the number of bytes of memory pointed to by pPropValue. + void* pPropValue, ///< [out][optional][typename(propName, propSize)] array of bytes holding + ///< the info. + ///< If propSize is less than the real number of bytes needed to return + ///< the info then the ::UR_RESULT_ERROR_INVALID_SIZE error is returned and + ///< pPropValue is not used. + size_t* pPropSizeRet ///< [out][optional] pointer to the actual size in bytes of the queried propName. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Retrieve information about an image object. -/// +/// /// @details /// - Query information specific to an image object. -/// +/// /// @remarks /// _Analogues_ /// - **clGetImageInfo** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -1698,37 +1700,36 @@ ur_result_t UR_APICALL urMemGetInfo( /// - ::UR_RESULT_ERROR_INVALID_MEM_OBJECT /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY -ur_result_t UR_APICALL urMemImageGetInfo( - ur_mem_handle_t hMemory, ///< [in] handle to the image object being queried. - ur_image_info_t propName, ///< [in] type of image info to retrieve. - size_t - propSize, ///< [in] the number of bytes of memory pointer to by pPropValue. - void * - pPropValue, ///< [out][optional][typename(propName, propSize)] array of bytes holding - ///< the info. - ///< If propSize is less than the real number of bytes needed to return - ///< the info then the ::UR_RESULT_ERROR_INVALID_SIZE error is returned and - ///< pPropValue is not used. - size_t * - pPropSizeRet ///< [out][optional] pointer to the actual size in bytes of the queried propName. -) { +ur_result_t UR_APICALL +urMemImageGetInfo( + ur_mem_handle_t hMemory, ///< [in] handle to the image object being queried. + ur_image_info_t propName, ///< [in] type of image info to retrieve. + size_t propSize, ///< [in] the number of bytes of memory pointer to by pPropValue. + void* pPropValue, ///< [out][optional][typename(propName, propSize)] array of bytes holding + ///< the info. + ///< If propSize is less than the real number of bytes needed to return + ///< the info then the ::UR_RESULT_ERROR_INVALID_SIZE error is returned and + ///< pPropValue is not used. + size_t* pPropSizeRet ///< [out][optional] pointer to the actual size in bytes of the queried propName. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Create a sampler object in a context -/// +/// /// @details /// - The props parameter specifies a list of sampler property names and /// their corresponding values. /// - The list is terminated with 0. If the list is NULL, default values /// will be used. -/// +/// /// @remarks /// _Analogues_ /// - **clCreateSamplerWithProperties** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -1747,12 +1748,13 @@ ur_result_t UR_APICALL urMemImageGetInfo( /// - ::UR_RESULT_ERROR_INVALID_OPERATION /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urSamplerCreate( - ur_context_handle_t hContext, ///< [in] handle of the context object - const ur_sampler_desc_t *pDesc, ///< [in] pointer to the sampler description - ur_sampler_handle_t - *phSampler ///< [out] pointer to handle of sampler object created -) { +ur_result_t UR_APICALL +urSamplerCreate( + ur_context_handle_t hContext, ///< [in] handle of the context object + const ur_sampler_desc_t* pDesc, ///< [in] pointer to the sampler description + ur_sampler_handle_t* phSampler ///< [out] pointer to handle of sampler object created + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -1760,11 +1762,11 @@ ur_result_t UR_APICALL urSamplerCreate( /////////////////////////////////////////////////////////////////////////////// /// @brief Get a reference to the sampler object handle. Increment its reference /// count -/// +/// /// @remarks /// _Analogues_ /// - **clRetainSampler** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -1775,10 +1777,11 @@ ur_result_t UR_APICALL urSamplerCreate( /// - ::UR_RESULT_ERROR_INVALID_SAMPLER /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urSamplerRetain( - ur_sampler_handle_t - hSampler ///< [in][retain] handle of the sampler object to get access -) { +ur_result_t UR_APICALL +urSamplerRetain( + ur_sampler_handle_t hSampler ///< [in][retain] handle of the sampler object to get access + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -1786,11 +1789,11 @@ ur_result_t UR_APICALL urSamplerRetain( /////////////////////////////////////////////////////////////////////////////// /// @brief Decrement the sampler's reference count and delete the sampler if the /// reference count becomes zero. -/// +/// /// @remarks /// _Analogues_ /// - **clReleaseSampler** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -1801,21 +1804,22 @@ ur_result_t UR_APICALL urSamplerRetain( /// - ::UR_RESULT_ERROR_INVALID_SAMPLER /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urSamplerRelease( - ur_sampler_handle_t - hSampler ///< [in][release] handle of the sampler object to release -) { +ur_result_t UR_APICALL +urSamplerRelease( + ur_sampler_handle_t hSampler ///< [in][release] handle of the sampler object to release + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Query information about a sampler object -/// +/// /// @remarks /// _Analogues_ /// - **clGetSamplerInfo** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -1836,24 +1840,23 @@ ur_result_t UR_APICALL urSamplerRelease( /// - ::UR_RESULT_ERROR_INVALID_SAMPLER /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urSamplerGetInfo( - ur_sampler_handle_t hSampler, ///< [in] handle of the sampler object - ur_sampler_info_t propName, ///< [in] name of the sampler property to query - size_t - propSize, ///< [in] size in bytes of the sampler property value provided - void * - pPropValue, ///< [out][typename(propName, propSize)][optional] value of the sampler - ///< property - size_t * - pPropSizeRet ///< [out][optional] size in bytes returned in sampler property value -) { +ur_result_t UR_APICALL +urSamplerGetInfo( + ur_sampler_handle_t hSampler, ///< [in] handle of the sampler object + ur_sampler_info_t propName, ///< [in] name of the sampler property to query + size_t propSize, ///< [in] size in bytes of the sampler property value provided + void* pPropValue, ///< [out][typename(propName, propSize)][optional] value of the sampler + ///< property + size_t* pPropSizeRet ///< [out][optional] size in bytes returned in sampler property value + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Return sampler native sampler handle. -/// +/// /// @details /// - Retrieved native handle can be used for direct interaction with the /// native platform driver. @@ -1862,7 +1865,7 @@ ur_result_t UR_APICALL urSamplerGetInfo( /// - The application may call this function from simultaneous threads for /// the same context. /// - The implementation of this function should be thread-safe. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -1874,24 +1877,25 @@ ur_result_t UR_APICALL urSamplerGetInfo( /// + `NULL == phNativeSampler` /// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE /// + If the adapter has no underlying equivalent handle. -ur_result_t UR_APICALL urSamplerGetNativeHandle( - ur_sampler_handle_t hSampler, ///< [in] handle of the sampler. - ur_native_handle_t * - phNativeSampler ///< [out] a pointer to the native handle of the sampler. -) { +ur_result_t UR_APICALL +urSamplerGetNativeHandle( + ur_sampler_handle_t hSampler, ///< [in] handle of the sampler. + ur_native_handle_t* phNativeSampler ///< [out] a pointer to the native handle of the sampler. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Create runtime sampler object from native sampler handle. -/// +/// /// @details /// - Creates runtime sampler handle from native driver sampler handle. /// - The application may call this function from simultaneous threads for /// the same context. /// - The implementation of this function should be thread-safe. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -1903,22 +1907,21 @@ ur_result_t UR_APICALL urSamplerGetNativeHandle( /// + `NULL == phSampler` /// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE /// + If the adapter has no underlying equivalent handle. -ur_result_t UR_APICALL urSamplerCreateWithNativeHandle( - ur_native_handle_t - hNativeSampler, ///< [in][nocheck] the native handle of the sampler. - ur_context_handle_t hContext, ///< [in] handle of the context object - const ur_sampler_native_properties_t * - pProperties, ///< [in][optional] pointer to native sampler properties struct. - ur_sampler_handle_t * - phSampler ///< [out] pointer to the handle of the sampler object created. -) { +ur_result_t UR_APICALL +urSamplerCreateWithNativeHandle( + ur_native_handle_t hNativeSampler, ///< [in][nocheck] the native handle of the sampler. + ur_context_handle_t hContext, ///< [in] handle of the context object + const ur_sampler_native_properties_t* pProperties, ///< [in][optional] pointer to native sampler properties struct. + ur_sampler_handle_t* phSampler ///< [out] pointer to the handle of the sampler object created. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief USM allocate host memory -/// +/// /// @details /// - If pUSMDesc is not NULL and pUSMDesc->pool is not NULL the allocation /// will be served from a specified memory pool. @@ -1929,7 +1932,7 @@ ur_result_t UR_APICALL urSamplerCreateWithNativeHandle( /// allocation. /// - See also ::ur_usm_host_desc_t. /// - See also ::ur_usm_alloc_location_desc_t. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -1954,23 +1957,22 @@ ur_result_t UR_APICALL urSamplerCreateWithNativeHandle( /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES /// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE /// + If any device associated with `hContext` reports `false` for ::UR_DEVICE_INFO_USM_POOL_SUPPORT -ur_result_t UR_APICALL urUSMHostAlloc( - ur_context_handle_t hContext, ///< [in] handle of the context object - const ur_usm_desc_t - *pUSMDesc, ///< [in][optional] USM memory allocation descriptor - ur_usm_pool_handle_t - pool, ///< [in][optional] Pointer to a pool created using urUSMPoolCreate - size_t - size, ///< [in] minimum size in bytes of the USM memory object to be allocated - void **ppMem ///< [out] pointer to USM host memory object -) { +ur_result_t UR_APICALL +urUSMHostAlloc( + ur_context_handle_t hContext, ///< [in] handle of the context object + const ur_usm_desc_t* pUSMDesc, ///< [in][optional] USM memory allocation descriptor + ur_usm_pool_handle_t pool, ///< [in][optional] Pointer to a pool created using urUSMPoolCreate + size_t size, ///< [in] minimum size in bytes of the USM memory object to be allocated + void** ppMem ///< [out] pointer to USM host memory object + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief USM allocate device memory -/// +/// /// @details /// - If pUSMDesc is not NULL and pUSMDesc->pool is not NULL the allocation /// will be served from a specified memory pool. @@ -1981,7 +1983,7 @@ ur_result_t UR_APICALL urUSMHostAlloc( /// allocation. /// - See also ::ur_usm_device_desc_t. /// - See also ::ur_usm_alloc_location_desc_t. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -2007,24 +2009,23 @@ ur_result_t UR_APICALL urUSMHostAlloc( /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES /// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE /// + If any device associated with `hContext` reports `false` for ::UR_DEVICE_INFO_USM_POOL_SUPPORT -ur_result_t UR_APICALL urUSMDeviceAlloc( - ur_context_handle_t hContext, ///< [in] handle of the context object - ur_device_handle_t hDevice, ///< [in] handle of the device object - const ur_usm_desc_t - *pUSMDesc, ///< [in][optional] USM memory allocation descriptor - ur_usm_pool_handle_t - pool, ///< [in][optional] Pointer to a pool created using urUSMPoolCreate - size_t - size, ///< [in] minimum size in bytes of the USM memory object to be allocated - void **ppMem ///< [out] pointer to USM device memory object -) { +ur_result_t UR_APICALL +urUSMDeviceAlloc( + ur_context_handle_t hContext, ///< [in] handle of the context object + ur_device_handle_t hDevice, ///< [in] handle of the device object + const ur_usm_desc_t* pUSMDesc, ///< [in][optional] USM memory allocation descriptor + ur_usm_pool_handle_t pool, ///< [in][optional] Pointer to a pool created using urUSMPoolCreate + size_t size, ///< [in] minimum size in bytes of the USM memory object to be allocated + void** ppMem ///< [out] pointer to USM device memory object + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief USM allocate shared memory -/// +/// /// @details /// - If pUSMDesc is not NULL and pUSMDesc->pool is not NULL the allocation /// will be served from a specified memory pool. @@ -2036,7 +2037,7 @@ ur_result_t UR_APICALL urUSMDeviceAlloc( /// - See also ::ur_usm_host_desc_t. /// - See also ::ur_usm_device_desc_t. /// - See also ::ur_usm_alloc_location_desc_t. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -2062,29 +2063,28 @@ ur_result_t UR_APICALL urUSMDeviceAlloc( /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES /// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE /// + If any device associated with `hContext` reports `false` for ::UR_DEVICE_INFO_USM_POOL_SUPPORT -ur_result_t UR_APICALL urUSMSharedAlloc( - ur_context_handle_t hContext, ///< [in] handle of the context object - ur_device_handle_t hDevice, ///< [in] handle of the device object - const ur_usm_desc_t * - pUSMDesc, ///< [in][optional] Pointer to USM memory allocation descriptor. - ur_usm_pool_handle_t - pool, ///< [in][optional] Pointer to a pool created using urUSMPoolCreate - size_t - size, ///< [in] minimum size in bytes of the USM memory object to be allocated - void **ppMem ///< [out] pointer to USM shared memory object -) { +ur_result_t UR_APICALL +urUSMSharedAlloc( + ur_context_handle_t hContext, ///< [in] handle of the context object + ur_device_handle_t hDevice, ///< [in] handle of the device object + const ur_usm_desc_t* pUSMDesc, ///< [in][optional] Pointer to USM memory allocation descriptor. + ur_usm_pool_handle_t pool, ///< [in][optional] Pointer to a pool created using urUSMPoolCreate + size_t size, ///< [in] minimum size in bytes of the USM memory object to be allocated + void** ppMem ///< [out] pointer to USM shared memory object + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Free the USM memory object -/// +/// /// @details /// - Note that implementations are required to wait for previously enqueued /// commands that may be accessing `pMem` to finish before freeing the /// memory. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -2096,17 +2096,19 @@ ur_result_t UR_APICALL urUSMSharedAlloc( /// + `NULL == pMem` /// - ::UR_RESULT_ERROR_INVALID_MEM_OBJECT /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY -ur_result_t UR_APICALL urUSMFree( - ur_context_handle_t hContext, ///< [in] handle of the context object - void *pMem ///< [in] pointer to USM memory object -) { +ur_result_t UR_APICALL +urUSMFree( + ur_context_handle_t hContext, ///< [in] handle of the context object + void* pMem ///< [in] pointer to USM memory object + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Get USM memory object allocation information -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -2122,31 +2124,29 @@ ur_result_t UR_APICALL urUSMFree( /// - ::UR_RESULT_ERROR_INVALID_VALUE /// - ::UR_RESULT_ERROR_INVALID_MEM_OBJECT /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY -ur_result_t UR_APICALL urUSMGetMemAllocInfo( - ur_context_handle_t hContext, ///< [in] handle of the context object - const void *pMem, ///< [in] pointer to USM memory object - ur_usm_alloc_info_t - propName, ///< [in] the name of the USM allocation property to query - size_t - propSize, ///< [in] size in bytes of the USM allocation property value - void * - pPropValue, ///< [out][optional][typename(propName, propSize)] value of the USM - ///< allocation property - size_t * - pPropSizeRet ///< [out][optional] bytes returned in USM allocation property -) { +ur_result_t UR_APICALL +urUSMGetMemAllocInfo( + ur_context_handle_t hContext, ///< [in] handle of the context object + const void* pMem, ///< [in] pointer to USM memory object + ur_usm_alloc_info_t propName, ///< [in] the name of the USM allocation property to query + size_t propSize, ///< [in] size in bytes of the USM allocation property value + void* pPropValue, ///< [out][optional][typename(propName, propSize)] value of the USM + ///< allocation property + size_t* pPropSizeRet ///< [out][optional] bytes returned in USM allocation property + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Create USM memory pool with desired properties. -/// +/// /// @details /// - UR can create multiple instances of the pool depending on allocation /// requests. /// - See also ::ur_usm_pool_limits_desc_t. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -2163,20 +2163,21 @@ ur_result_t UR_APICALL urUSMGetMemAllocInfo( /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE /// + If any device associated with `hContext` reports `false` for ::UR_DEVICE_INFO_USM_POOL_SUPPORT -ur_result_t UR_APICALL urUSMPoolCreate( - ur_context_handle_t hContext, ///< [in] handle of the context object - ur_usm_pool_desc_t * - pPoolDesc, ///< [in] pointer to USM pool descriptor. Can be chained with - ///< ::ur_usm_pool_limits_desc_t - ur_usm_pool_handle_t *ppPool ///< [out] pointer to USM memory pool -) { +ur_result_t UR_APICALL +urUSMPoolCreate( + ur_context_handle_t hContext, ///< [in] handle of the context object + ur_usm_pool_desc_t* pPoolDesc, ///< [in] pointer to USM pool descriptor. Can be chained with + ///< ::ur_usm_pool_limits_desc_t + ur_usm_pool_handle_t* ppPool ///< [out] pointer to USM memory pool + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Get a reference to the pool handle. Increment its reference count -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -2185,9 +2186,11 @@ ur_result_t UR_APICALL urUSMPoolCreate( /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE /// + `NULL == pPool` /// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE -ur_result_t UR_APICALL urUSMPoolRetain( - ur_usm_pool_handle_t pPool ///< [in][retain] pointer to USM memory pool -) { +ur_result_t UR_APICALL +urUSMPoolRetain( + ur_usm_pool_handle_t pPool ///< [in][retain] pointer to USM memory pool + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -2195,13 +2198,13 @@ ur_result_t UR_APICALL urUSMPoolRetain( /////////////////////////////////////////////////////////////////////////////// /// @brief Decrement the pool's reference count and delete the pool if the /// reference count becomes zero. -/// +/// /// @details /// - All allocation belonging to the pool must be freed prior to the the /// reference count becoming zero. /// - If the pool is deleted, this function returns all its reserved memory /// to the driver. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -2210,16 +2213,18 @@ ur_result_t UR_APICALL urUSMPoolRetain( /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE /// + `NULL == pPool` /// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE -ur_result_t UR_APICALL urUSMPoolRelease( - ur_usm_pool_handle_t pPool ///< [in][release] pointer to USM memory pool -) { +ur_result_t UR_APICALL +urUSMPoolRelease( + ur_usm_pool_handle_t pPool ///< [in][release] pointer to USM memory pool + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Query information about a USM memory pool -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -2240,16 +2245,16 @@ ur_result_t UR_APICALL urUSMPoolRelease( /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES /// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE -ur_result_t UR_APICALL urUSMPoolGetInfo( - ur_usm_pool_handle_t hPool, ///< [in] handle of the USM memory pool - ur_usm_pool_info_t propName, ///< [in] name of the pool property to query - size_t propSize, ///< [in] size in bytes of the pool property value provided - void * - pPropValue, ///< [out][optional][typename(propName, propSize)] value of the pool - ///< property - size_t * - pPropSizeRet ///< [out][optional] size in bytes returned in pool property value -) { +ur_result_t UR_APICALL +urUSMPoolGetInfo( + ur_usm_pool_handle_t hPool, ///< [in] handle of the USM memory pool + ur_usm_pool_info_t propName, ///< [in] name of the pool property to query + size_t propSize, ///< [in] size in bytes of the pool property value provided + void* pPropValue, ///< [out][optional][typename(propName, propSize)] value of the pool + ///< property + size_t* pPropSizeRet ///< [out][optional] size in bytes returned in pool property value + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -2257,7 +2262,7 @@ ur_result_t UR_APICALL urUSMPoolGetInfo( /////////////////////////////////////////////////////////////////////////////// /// @brief Get information about the minimum and recommended granularity of /// physical and virtual memory. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -2279,30 +2284,27 @@ ur_result_t UR_APICALL urUSMPoolGetInfo( /// - ::UR_RESULT_ERROR_INVALID_CONTEXT /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY -ur_result_t UR_APICALL urVirtualMemGranularityGetInfo( - ur_context_handle_t hContext, ///< [in] handle of the context object. - ur_device_handle_t - hDevice, ///< [in][optional] is the device to get the granularity from, if the - ///< device is null then the granularity is suitable for all devices in context. - ur_virtual_mem_granularity_info_t - propName, ///< [in] type of the info to query. - size_t - propSize, ///< [in] size in bytes of the memory pointed to by pPropValue. - void * - pPropValue, ///< [out][optional][typename(propName, propSize)] array of bytes holding - ///< the info. If propSize is less than the real number of bytes needed to - ///< return the info then the ::UR_RESULT_ERROR_INVALID_SIZE error is - ///< returned and pPropValue is not used. - size_t * - pPropSizeRet ///< [out][optional] pointer to the actual size in bytes of the queried propName." -) { +ur_result_t UR_APICALL +urVirtualMemGranularityGetInfo( + ur_context_handle_t hContext, ///< [in] handle of the context object. + ur_device_handle_t hDevice, ///< [in][optional] is the device to get the granularity from, if the + ///< device is null then the granularity is suitable for all devices in context. + ur_virtual_mem_granularity_info_t propName, ///< [in] type of the info to query. + size_t propSize, ///< [in] size in bytes of the memory pointed to by pPropValue. + void* pPropValue, ///< [out][optional][typename(propName, propSize)] array of bytes holding + ///< the info. If propSize is less than the real number of bytes needed to + ///< return the info then the ::UR_RESULT_ERROR_INVALID_SIZE error is + ///< returned and pPropValue is not used. + size_t* pPropSizeRet ///< [out][optional] pointer to the actual size in bytes of the queried propName." + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Reserve a virtual memory range. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -2312,25 +2314,24 @@ ur_result_t UR_APICALL urVirtualMemGranularityGetInfo( /// + `NULL == hContext` /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER /// + `NULL == ppStart` -ur_result_t UR_APICALL urVirtualMemReserve( - ur_context_handle_t hContext, ///< [in] handle of the context object. - const void * - pStart, ///< [in][optional] pointer to the start of the virtual memory region to - ///< reserve, specifying a null value causes the implementation to select a - ///< start address. - size_t - size, ///< [in] size in bytes of the virtual address range to reserve. - void ** - ppStart ///< [out] pointer to the returned address at the start of reserved virtual - ///< memory range. -) { +ur_result_t UR_APICALL +urVirtualMemReserve( + ur_context_handle_t hContext, ///< [in] handle of the context object. + const void* pStart, ///< [in][optional] pointer to the start of the virtual memory region to + ///< reserve, specifying a null value causes the implementation to select a + ///< start address. + size_t size, ///< [in] size in bytes of the virtual address range to reserve. + void** ppStart ///< [out] pointer to the returned address at the start of reserved virtual + ///< memory range. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Free a virtual memory range. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -2340,19 +2341,20 @@ ur_result_t UR_APICALL urVirtualMemReserve( /// + `NULL == hContext` /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER /// + `NULL == pStart` -ur_result_t UR_APICALL urVirtualMemFree( - ur_context_handle_t hContext, ///< [in] handle of the context object. - const void * - pStart, ///< [in] pointer to the start of the virtual memory range to free. - size_t size ///< [in] size in bytes of the virtual memory range to free. -) { +ur_result_t UR_APICALL +urVirtualMemFree( + ur_context_handle_t hContext, ///< [in] handle of the context object. + const void* pStart, ///< [in] pointer to the start of the virtual memory range to free. + size_t size ///< [in] size in bytes of the virtual memory range to free. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Map a virtual memory range to a physical memory handle. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -2365,29 +2367,27 @@ ur_result_t UR_APICALL urVirtualMemFree( /// + `NULL == pStart` /// - ::UR_RESULT_ERROR_INVALID_ENUMERATION /// + `::UR_VIRTUAL_MEM_ACCESS_FLAGS_MASK & flags` -ur_result_t UR_APICALL urVirtualMemMap( - ur_context_handle_t hContext, ///< [in] handle to the context object. - const void - *pStart, ///< [in] pointer to the start of the virtual memory range. - size_t size, ///< [in] size in bytes of the virtual memory range to map. - ur_physical_mem_handle_t - hPhysicalMem, ///< [in] handle of the physical memory to map pStart to. - size_t - offset, ///< [in] offset in bytes into the physical memory to map pStart to. - ur_virtual_mem_access_flags_t - flags ///< [in] access flags for the physical memory mapping. -) { +ur_result_t UR_APICALL +urVirtualMemMap( + ur_context_handle_t hContext, ///< [in] handle to the context object. + const void* pStart, ///< [in] pointer to the start of the virtual memory range. + size_t size, ///< [in] size in bytes of the virtual memory range to map. + ur_physical_mem_handle_t hPhysicalMem, ///< [in] handle of the physical memory to map pStart to. + size_t offset, ///< [in] offset in bytes into the physical memory to map pStart to. + ur_virtual_mem_access_flags_t flags ///< [in] access flags for the physical memory mapping. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Unmap a virtual memory range previously mapped in a context. -/// +/// /// @details /// - After a call to this function, the virtual memory range is left in a /// state ready to be remapped. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -2397,19 +2397,20 @@ ur_result_t UR_APICALL urVirtualMemMap( /// + `NULL == hContext` /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER /// + `NULL == pStart` -ur_result_t UR_APICALL urVirtualMemUnmap( - ur_context_handle_t hContext, ///< [in] handle to the context object. - const void * - pStart, ///< [in] pointer to the start of the mapped virtual memory range - size_t size ///< [in] size in bytes of the virtual memory range. -) { +ur_result_t UR_APICALL +urVirtualMemUnmap( + ur_context_handle_t hContext, ///< [in] handle to the context object. + const void* pStart, ///< [in] pointer to the start of the mapped virtual memory range + size_t size ///< [in] size in bytes of the virtual memory range. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Set the access mode of a mapped virtual memory range. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -2421,21 +2422,21 @@ ur_result_t UR_APICALL urVirtualMemUnmap( /// + `NULL == pStart` /// - ::UR_RESULT_ERROR_INVALID_ENUMERATION /// + `::UR_VIRTUAL_MEM_ACCESS_FLAGS_MASK & flags` -ur_result_t UR_APICALL urVirtualMemSetAccess( - ur_context_handle_t hContext, ///< [in] handle to the context object. - const void - *pStart, ///< [in] pointer to the start of the virtual memory range. - size_t size, ///< [in] size in bytes of the virtual memory range. - ur_virtual_mem_access_flags_t - flags ///< [in] access flags to set for the mapped virtual memory range. -) { +ur_result_t UR_APICALL +urVirtualMemSetAccess( + ur_context_handle_t hContext, ///< [in] handle to the context object. + const void* pStart, ///< [in] pointer to the start of the virtual memory range. + size_t size, ///< [in] size in bytes of the virtual memory range. + ur_virtual_mem_access_flags_t flags ///< [in] access flags to set for the mapped virtual memory range. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Get information about a mapped virtual memory range. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -2447,29 +2448,27 @@ ur_result_t UR_APICALL urVirtualMemSetAccess( /// + `NULL == pStart` /// - ::UR_RESULT_ERROR_INVALID_ENUMERATION /// + `::UR_VIRTUAL_MEM_INFO_ACCESS_MODE < propName` -ur_result_t UR_APICALL urVirtualMemGetInfo( - ur_context_handle_t hContext, ///< [in] handle to the context object. - const void - *pStart, ///< [in] pointer to the start of the virtual memory range. - size_t size, ///< [in] size in bytes of the virtual memory range. - ur_virtual_mem_info_t propName, ///< [in] type of the info to query. - size_t - propSize, ///< [in] size in bytes of the memory pointed to by pPropValue. - void * - pPropValue, ///< [out][optional][typename(propName, propSize)] array of bytes holding - ///< the info. If propSize is less than the real number of bytes needed to - ///< return the info then the ::UR_RESULT_ERROR_INVALID_SIZE error is - ///< returned and pPropValue is not used. - size_t * - pPropSizeRet ///< [out][optional] pointer to the actual size in bytes of the queried propName." -) { +ur_result_t UR_APICALL +urVirtualMemGetInfo( + ur_context_handle_t hContext, ///< [in] handle to the context object. + const void* pStart, ///< [in] pointer to the start of the virtual memory range. + size_t size, ///< [in] size in bytes of the virtual memory range. + ur_virtual_mem_info_t propName, ///< [in] type of the info to query. + size_t propSize, ///< [in] size in bytes of the memory pointed to by pPropValue. + void* pPropValue, ///< [out][optional][typename(propName, propSize)] array of bytes holding + ///< the info. If propSize is less than the real number of bytes needed to + ///< return the info then the ::UR_RESULT_ERROR_INVALID_SIZE error is + ///< returned and pPropValue is not used. + size_t* pPropSizeRet ///< [out][optional] pointer to the actual size in bytes of the queried propName." + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Create a physical memory handle that virtual memory can be mapped to. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -2484,24 +2483,23 @@ ur_result_t UR_APICALL urVirtualMemGetInfo( /// + `NULL == phPhysicalMem` /// - ::UR_RESULT_ERROR_INVALID_SIZE /// + If size is not a multiple of ::UR_VIRTUAL_MEM_GRANULARITY_INFO_MINIMUM. -ur_result_t UR_APICALL urPhysicalMemCreate( - ur_context_handle_t hContext, ///< [in] handle of the context object. - ur_device_handle_t hDevice, ///< [in] handle of the device object. - size_t - size, ///< [in] size in bytes of physical memory to allocate, must be a multiple - ///< of ::UR_VIRTUAL_MEM_GRANULARITY_INFO_MINIMUM. - const ur_physical_mem_properties_t * - pProperties, ///< [in][optional] pointer to physical memory creation properties. - ur_physical_mem_handle_t * - phPhysicalMem ///< [out] pointer to handle of physical memory object created. -) { +ur_result_t UR_APICALL +urPhysicalMemCreate( + ur_context_handle_t hContext, ///< [in] handle of the context object. + ur_device_handle_t hDevice, ///< [in] handle of the device object. + size_t size, ///< [in] size in bytes of physical memory to allocate, must be a multiple + ///< of ::UR_VIRTUAL_MEM_GRANULARITY_INFO_MINIMUM. + const ur_physical_mem_properties_t* pProperties,///< [in][optional] pointer to physical memory creation properties. + ur_physical_mem_handle_t* phPhysicalMem ///< [out] pointer to handle of physical memory object created. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Retain a physical memory handle, increment its reference count. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -2509,17 +2507,18 @@ ur_result_t UR_APICALL urPhysicalMemCreate( /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE /// + `NULL == hPhysicalMem` -ur_result_t UR_APICALL urPhysicalMemRetain( - ur_physical_mem_handle_t - hPhysicalMem ///< [in][retain] handle of the physical memory object to retain. -) { +ur_result_t UR_APICALL +urPhysicalMemRetain( + ur_physical_mem_handle_t hPhysicalMem ///< [in][retain] handle of the physical memory object to retain. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Release a physical memory handle, decrement its reference count. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -2527,26 +2526,27 @@ ur_result_t UR_APICALL urPhysicalMemRetain( /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE /// + `NULL == hPhysicalMem` -ur_result_t UR_APICALL urPhysicalMemRelease( - ur_physical_mem_handle_t - hPhysicalMem ///< [in][release] handle of the physical memory object to release. -) { +ur_result_t UR_APICALL +urPhysicalMemRelease( + ur_physical_mem_handle_t hPhysicalMem ///< [in][release] handle of the physical memory object to release. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Create a program object from input intermediate language. -/// +/// /// @details /// - The application may call this function from simultaneous threads. /// - The adapter may (but is not required to) perform validation of the /// provided module during this call. -/// +/// /// @remarks /// _Analogues_ /// - **clCreateProgramWithIL** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -2565,15 +2565,15 @@ ur_result_t UR_APICALL urPhysicalMemRelease( /// + If `pIL` is not a valid IL binary for devices in `hContext`. /// - ::UR_RESULT_ERROR_COMPILER_NOT_AVAILABLE /// + If devices in `hContext` don't have the capability to compile an IL binary at runtime. -ur_result_t UR_APICALL urProgramCreateWithIL( - ur_context_handle_t hContext, ///< [in] handle of the context instance - const void *pIL, ///< [in] pointer to IL binary. - size_t length, ///< [in] length of `pIL` in bytes. - const ur_program_properties_t * - pProperties, ///< [in][optional] pointer to program creation properties. - ur_program_handle_t - *phProgram ///< [out] pointer to handle of program object created. -) { +ur_result_t UR_APICALL +urProgramCreateWithIL( + ur_context_handle_t hContext, ///< [in] handle of the context instance + const void* pIL, ///< [in] pointer to IL binary. + size_t length, ///< [in] length of `pIL` in bytes. + const ur_program_properties_t* pProperties, ///< [in][optional] pointer to program creation properties. + ur_program_handle_t* phProgram ///< [out] pointer to handle of program object created. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -2581,7 +2581,7 @@ ur_result_t UR_APICALL urProgramCreateWithIL( /////////////////////////////////////////////////////////////////////////////// /// @brief Create a program object from native binaries for the specified /// devices. -/// +/// /// @details /// - The application may call this function from simultaneous threads. /// - Following a successful call to this entry point, `phProgram` will @@ -2592,11 +2592,11 @@ ur_result_t UR_APICALL urProgramCreateWithIL( /// context. /// - The adapter may (but is not required to) perform validation of the /// provided modules during this call. -/// +/// /// @remarks /// _Analogues_ /// - **clCreateProgramWithBinary** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -2615,23 +2615,20 @@ ur_result_t UR_APICALL urProgramCreateWithIL( /// + `numDevices == 0` /// - ::UR_RESULT_ERROR_INVALID_NATIVE_BINARY /// + If any binary in `ppBinaries` isn't a valid binary for the corresponding device in `phDevices.` -ur_result_t UR_APICALL urProgramCreateWithBinary( - ur_context_handle_t hContext, ///< [in] handle of the context instance - uint32_t numDevices, ///< [in] number of devices - ur_device_handle_t * - phDevices, ///< [in][range(0, numDevices)] a pointer to a list of device handles. The - ///< binaries are loaded for devices specified in this list. - size_t * - pLengths, ///< [in][range(0, numDevices)] array of sizes of program binaries - ///< specified by `pBinaries` (in bytes). - const uint8_t ** - ppBinaries, ///< [in][range(0, numDevices)] pointer to program binaries to be loaded - ///< for devices specified by `phDevices`. - const ur_program_properties_t * - pProperties, ///< [in][optional] pointer to program creation properties. - ur_program_handle_t - *phProgram ///< [out] pointer to handle of Program object created. -) { +ur_result_t UR_APICALL +urProgramCreateWithBinary( + ur_context_handle_t hContext, ///< [in] handle of the context instance + uint32_t numDevices, ///< [in] number of devices + ur_device_handle_t* phDevices, ///< [in][range(0, numDevices)] a pointer to a list of device handles. The + ///< binaries are loaded for devices specified in this list. + size_t* pLengths, ///< [in][range(0, numDevices)] array of sizes of program binaries + ///< specified by `pBinaries` (in bytes). + const uint8_t** ppBinaries, ///< [in][range(0, numDevices)] pointer to program binaries to be loaded + ///< for devices specified by `phDevices`. + const ur_program_properties_t* pProperties, ///< [in][optional] pointer to program creation properties. + ur_program_handle_t* phProgram ///< [out] pointer to handle of Program object created. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -2639,17 +2636,17 @@ ur_result_t UR_APICALL urProgramCreateWithBinary( /////////////////////////////////////////////////////////////////////////////// /// @brief Produces an executable program from one program, negates need for the /// linking step. -/// +/// /// @details /// - The application may call this function from simultaneous threads. /// - Following a successful call to this entry point, the program passed /// will contain a binary of the ::UR_PROGRAM_BINARY_TYPE_EXECUTABLE type /// for each device in `hContext`. -/// +/// /// @remarks /// _Analogues_ /// - **clBuildProgram** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -2662,29 +2659,30 @@ ur_result_t UR_APICALL urProgramCreateWithBinary( /// + If `hProgram` isn't a valid program object. /// - ::UR_RESULT_ERROR_PROGRAM_BUILD_FAILURE /// + If an error occurred when building `hProgram`. -ur_result_t UR_APICALL urProgramBuild( - ur_context_handle_t hContext, ///< [in] handle of the context instance. - ur_program_handle_t hProgram, ///< [in] Handle of the program to build. - const char * - pOptions ///< [in][optional] pointer to build options null-terminated string. -) { +ur_result_t UR_APICALL +urProgramBuild( + ur_context_handle_t hContext, ///< [in] handle of the context instance. + ur_program_handle_t hProgram, ///< [in] Handle of the program to build. + const char* pOptions ///< [in][optional] pointer to build options null-terminated string. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Produces an executable program from one or more programs. -/// +/// /// @details /// - The application may call this function from simultaneous threads. /// - Following a successful call to this entry point `hProgram` will /// contain a binary of the ::UR_PROGRAM_BINARY_TYPE_COMPILED_OBJECT type /// for each device in `hContext`. -/// +/// /// @remarks /// _Analogues_ /// - **clCompileProgram** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -2697,20 +2695,20 @@ ur_result_t UR_APICALL urProgramBuild( /// + If `hProgram` isn't a valid program object. /// - ::UR_RESULT_ERROR_PROGRAM_BUILD_FAILURE /// + If an error occurred while compiling `hProgram`. -ur_result_t UR_APICALL urProgramCompile( - ur_context_handle_t hContext, ///< [in] handle of the context instance. - ur_program_handle_t - hProgram, ///< [in][out] handle of the program to compile. - const char * - pOptions ///< [in][optional] pointer to build options null-terminated string. -) { +ur_result_t UR_APICALL +urProgramCompile( + ur_context_handle_t hContext, ///< [in] handle of the context instance. + ur_program_handle_t hProgram, ///< [in][out] handle of the program to compile. + const char* pOptions ///< [in][optional] pointer to build options null-terminated string. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Produces an executable program from one or more programs. -/// +/// /// @details /// - The application may call this function from simultaneous threads. /// - Following a successful call to this entry point the program returned @@ -2722,11 +2720,11 @@ ur_result_t UR_APICALL urProgramCompile( /// use the build log of this program (accessible via /// ::urProgramGetBuildInfo) to provide an error log for the linking /// failure. -/// +/// /// @remarks /// _Analogues_ /// - **clLinkProgram** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -2743,33 +2741,32 @@ ur_result_t UR_APICALL urProgramCompile( /// + `count == 0` /// - ::UR_RESULT_ERROR_PROGRAM_LINK_FAILURE /// + If an error occurred while linking `phPrograms`. -ur_result_t UR_APICALL urProgramLink( - ur_context_handle_t hContext, ///< [in] handle of the context instance. - uint32_t count, ///< [in] number of program handles in `phPrograms`. - const ur_program_handle_t * - phPrograms, ///< [in][range(0, count)] pointer to array of program handles. - const char * - pOptions, ///< [in][optional] pointer to linker options null-terminated string. - ur_program_handle_t - *phProgram ///< [out] pointer to handle of program object created. -) { +ur_result_t UR_APICALL +urProgramLink( + ur_context_handle_t hContext, ///< [in] handle of the context instance. + uint32_t count, ///< [in] number of program handles in `phPrograms`. + const ur_program_handle_t* phPrograms, ///< [in][range(0, count)] pointer to array of program handles. + const char* pOptions, ///< [in][optional] pointer to linker options null-terminated string. + ur_program_handle_t* phProgram ///< [out] pointer to handle of program object created. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Get a reference to the Program object. -/// +/// /// @details /// - Get a reference to the Program object handle. Increment its reference /// count /// - The application may call this function from simultaneous threads. /// - The implementation of this function should be lock-free. -/// +/// /// @remarks /// _Analogues_ /// - **clRetainProgram** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -2777,27 +2774,28 @@ ur_result_t UR_APICALL urProgramLink( /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE /// + `NULL == hProgram` -ur_result_t UR_APICALL urProgramRetain( - ur_program_handle_t - hProgram ///< [in][retain] handle for the Program to retain -) { +ur_result_t UR_APICALL +urProgramRetain( + ur_program_handle_t hProgram ///< [in][retain] handle for the Program to retain + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Release Program. -/// +/// /// @details /// - Decrement reference count and destroy the Program if reference count /// becomes zero. /// - The application may call this function from simultaneous threads. /// - The implementation of this function should be lock-free. -/// +/// /// @remarks /// _Analogues_ /// - **clReleaseProgram** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -2805,17 +2803,18 @@ ur_result_t UR_APICALL urProgramRetain( /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE /// + `NULL == hProgram` -ur_result_t UR_APICALL urProgramRelease( - ur_program_handle_t - hProgram ///< [in][release] handle for the Program to release -) { +ur_result_t UR_APICALL +urProgramRelease( + ur_program_handle_t hProgram ///< [in][release] handle for the Program to release + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Retrieves a device function pointer to a user-defined function. -/// +/// /// @details /// - Retrieves a pointer to the functions with the given name and defined /// in the given program. @@ -2824,11 +2823,11 @@ ur_result_t UR_APICALL urProgramRelease( /// - The application may call this function from simultaneous threads for /// the same device. /// - The implementation of this function should be thread-safe. -/// +/// /// @remarks /// _Analogues_ /// - **clGetDeviceFunctionPointerINTEL** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -2844,35 +2843,33 @@ ur_result_t UR_APICALL urProgramRelease( /// + If `pFunctionName` couldn't be found in `hProgram`. /// - ::UR_RESULT_ERROR_FUNCTION_ADDRESS_NOT_AVAILABLE /// + If `pFunctionName` could be located, but its address couldn't be retrieved. -ur_result_t UR_APICALL urProgramGetFunctionPointer( - ur_device_handle_t - hDevice, ///< [in] handle of the device to retrieve pointer for. - ur_program_handle_t - hProgram, ///< [in] handle of the program to search for function in. - ///< The program must already be built to the specified device, or - ///< otherwise ::UR_RESULT_ERROR_INVALID_PROGRAM_EXECUTABLE is returned. - const char * - pFunctionName, ///< [in] A null-terminates string denoting the mangled function name. - void ** - ppFunctionPointer ///< [out] Returns the pointer to the function if it is found in the program. -) { +ur_result_t UR_APICALL +urProgramGetFunctionPointer( + ur_device_handle_t hDevice, ///< [in] handle of the device to retrieve pointer for. + ur_program_handle_t hProgram, ///< [in] handle of the program to search for function in. + ///< The program must already be built to the specified device, or + ///< otherwise ::UR_RESULT_ERROR_INVALID_PROGRAM_EXECUTABLE is returned. + const char* pFunctionName, ///< [in] A null-terminates string denoting the mangled function name. + void** ppFunctionPointer ///< [out] Returns the pointer to the function if it is found in the program. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Retrieves a pointer to a device global variable. -/// +/// /// @details /// - Retrieves a pointer to a device global variable. /// - The application may call this function from simultaneous threads for /// the same device. /// - The implementation of this function should be thread-safe. -/// +/// /// @remarks /// _Analogues_ /// - **clGetDeviceGlobalVariablePointerINTEL** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -2886,30 +2883,27 @@ ur_result_t UR_APICALL urProgramGetFunctionPointer( /// + `NULL == ppGlobalVariablePointerRet` /// - ::UR_RESULT_ERROR_INVALID_VALUE /// + `name` is not a valid variable in the program. -ur_result_t UR_APICALL urProgramGetGlobalVariablePointer( - ur_device_handle_t - hDevice, ///< [in] handle of the device to retrieve the pointer for. - ur_program_handle_t - hProgram, ///< [in] handle of the program where the global variable is. - const char * - pGlobalVariableName, ///< [in] mangled name of the global variable to retrieve the pointer for. - size_t * - pGlobalVariableSizeRet, ///< [out][optional] Returns the size of the global variable if it is found - ///< in the program. - void ** - ppGlobalVariablePointerRet ///< [out] Returns the pointer to the global variable if it is found in the program. -) { +ur_result_t UR_APICALL +urProgramGetGlobalVariablePointer( + ur_device_handle_t hDevice, ///< [in] handle of the device to retrieve the pointer for. + ur_program_handle_t hProgram, ///< [in] handle of the program where the global variable is. + const char* pGlobalVariableName, ///< [in] mangled name of the global variable to retrieve the pointer for. + size_t* pGlobalVariableSizeRet, ///< [out][optional] Returns the size of the global variable if it is found + ///< in the program. + void** ppGlobalVariablePointerRet ///< [out] Returns the pointer to the global variable if it is found in the program. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Query information about a Program object -/// +/// /// @remarks /// _Analogues_ /// - **clGetProgramInfo** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -2930,31 +2924,31 @@ ur_result_t UR_APICALL urProgramGetGlobalVariablePointer( /// - ::UR_RESULT_ERROR_INVALID_PROGRAM /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY -ur_result_t UR_APICALL urProgramGetInfo( - ur_program_handle_t hProgram, ///< [in] handle of the Program object - ur_program_info_t propName, ///< [in] name of the Program property to query - size_t propSize, ///< [in] the size of the Program property. - void * - pPropValue, ///< [in,out][optional][typename(propName, propSize)] array of bytes of - ///< holding the program info property. - ///< If propSize is not equal to or greater than the real number of bytes - ///< needed to return - ///< the info then the ::UR_RESULT_ERROR_INVALID_SIZE error is returned and - ///< pPropValue is not used. - size_t * - pPropSizeRet ///< [out][optional] pointer to the actual size in bytes of the queried propName. -) { +ur_result_t UR_APICALL +urProgramGetInfo( + ur_program_handle_t hProgram, ///< [in] handle of the Program object + ur_program_info_t propName, ///< [in] name of the Program property to query + size_t propSize, ///< [in] the size of the Program property. + void* pPropValue, ///< [in,out][optional][typename(propName, propSize)] array of bytes of + ///< holding the program info property. + ///< If propSize is not equal to or greater than the real number of bytes + ///< needed to return + ///< the info then the ::UR_RESULT_ERROR_INVALID_SIZE error is returned and + ///< pPropValue is not used. + size_t* pPropSizeRet ///< [out][optional] pointer to the actual size in bytes of the queried propName. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Query build information about a Program object for a Device -/// +/// /// @remarks /// _Analogues_ /// - **clGetProgramBuildInfo** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -2965,29 +2959,28 @@ ur_result_t UR_APICALL urProgramGetInfo( /// + `NULL == hDevice` /// - ::UR_RESULT_ERROR_INVALID_ENUMERATION /// + `::UR_PROGRAM_BUILD_INFO_BINARY_TYPE < propName` -ur_result_t UR_APICALL urProgramGetBuildInfo( - ur_program_handle_t hProgram, ///< [in] handle of the Program object - ur_device_handle_t hDevice, ///< [in] handle of the Device object - ur_program_build_info_t - propName, ///< [in] name of the Program build info to query - size_t propSize, ///< [in] size of the Program build info property. - void * - pPropValue, ///< [in,out][optional][typename(propName, propSize)] value of the Program - ///< build property. - ///< If propSize is not equal to or greater than the real number of bytes - ///< needed to return the info then the ::UR_RESULT_ERROR_INVALID_SIZE - ///< error is returned and pPropValue is not used. - size_t * - pPropSizeRet ///< [out][optional] pointer to the actual size in bytes of data being - ///< queried by propName. -) { +ur_result_t UR_APICALL +urProgramGetBuildInfo( + ur_program_handle_t hProgram, ///< [in] handle of the Program object + ur_device_handle_t hDevice, ///< [in] handle of the Device object + ur_program_build_info_t propName, ///< [in] name of the Program build info to query + size_t propSize, ///< [in] size of the Program build info property. + void* pPropValue, ///< [in,out][optional][typename(propName, propSize)] value of the Program + ///< build property. + ///< If propSize is not equal to or greater than the real number of bytes + ///< needed to return the info then the ::UR_RESULT_ERROR_INVALID_SIZE + ///< error is returned and pPropValue is not used. + size_t* pPropSizeRet ///< [out][optional] pointer to the actual size in bytes of data being + ///< queried by propName. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Set an array of specialization constants on a Program. -/// +/// /// @details /// - The application may call this function from simultaneous threads for /// the same device. @@ -2996,7 +2989,7 @@ ur_result_t UR_APICALL urProgramGetBuildInfo( /// entry point. /// - Any spec constants set with this entry point will apply only to /// subsequent calls to ::urProgramBuild or ::urProgramCompile. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -3013,20 +3006,21 @@ ur_result_t UR_APICALL urProgramGetBuildInfo( /// + A pSpecConstant entry contains a nullptr pValue. /// - ::UR_RESULT_ERROR_INVALID_SPEC_ID /// + Any id specified in a pSpecConstant entry is not a valid specialization constant identifier. -ur_result_t UR_APICALL urProgramSetSpecializationConstants( - ur_program_handle_t hProgram, ///< [in] handle of the Program object - uint32_t count, ///< [in] the number of elements in the pSpecConstants array - const ur_specialization_constant_info_t * - pSpecConstants ///< [in][range(0, count)] array of specialization constant value - ///< descriptions -) { +ur_result_t UR_APICALL +urProgramSetSpecializationConstants( + ur_program_handle_t hProgram, ///< [in] handle of the Program object + uint32_t count, ///< [in] the number of elements in the pSpecConstants array + const ur_specialization_constant_info_t* pSpecConstants ///< [in][range(0, count)] array of specialization constant value + ///< descriptions + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Return program native program handle. -/// +/// /// @details /// - Retrieved native handle can be used for direct interaction with the /// native platform driver. @@ -3035,7 +3029,7 @@ ur_result_t UR_APICALL urProgramSetSpecializationConstants( /// - The application may call this function from simultaneous threads for /// the same context. /// - The implementation of this function should be thread-safe. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -3047,24 +3041,25 @@ ur_result_t UR_APICALL urProgramSetSpecializationConstants( /// + `NULL == phNativeProgram` /// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE /// + If the adapter has no underlying equivalent handle. -ur_result_t UR_APICALL urProgramGetNativeHandle( - ur_program_handle_t hProgram, ///< [in] handle of the program. - ur_native_handle_t * - phNativeProgram ///< [out] a pointer to the native handle of the program. -) { +ur_result_t UR_APICALL +urProgramGetNativeHandle( + ur_program_handle_t hProgram, ///< [in] handle of the program. + ur_native_handle_t* phNativeProgram ///< [out] a pointer to the native handle of the program. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Create runtime program object from native program handle. -/// +/// /// @details /// - Creates runtime program handle from native driver program handle. /// - The application may call this function from simultaneous threads for /// the same context. /// - The implementation of this function should be thread-safe. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -3076,26 +3071,25 @@ ur_result_t UR_APICALL urProgramGetNativeHandle( /// + `NULL == phProgram` /// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE /// + If the adapter has no underlying equivalent handle. -ur_result_t UR_APICALL urProgramCreateWithNativeHandle( - ur_native_handle_t - hNativeProgram, ///< [in][nocheck] the native handle of the program. - ur_context_handle_t hContext, ///< [in] handle of the context instance - const ur_program_native_properties_t * - pProperties, ///< [in][optional] pointer to native program properties struct. - ur_program_handle_t * - phProgram ///< [out] pointer to the handle of the program object created. -) { +ur_result_t UR_APICALL +urProgramCreateWithNativeHandle( + ur_native_handle_t hNativeProgram, ///< [in][nocheck] the native handle of the program. + ur_context_handle_t hContext, ///< [in] handle of the context instance + const ur_program_native_properties_t* pProperties, ///< [in][optional] pointer to native program properties struct. + ur_program_handle_t* phProgram ///< [out] pointer to the handle of the program object created. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Create kernel object from a program. -/// +/// /// @details /// - The application may call this function from simultaneous threads. /// - The implementation of this function should be lock-free. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -3108,24 +3102,25 @@ ur_result_t UR_APICALL urProgramCreateWithNativeHandle( /// + `NULL == phKernel` /// - ::UR_RESULT_ERROR_INVALID_KERNEL_NAME /// + If `pKernelName` wasn't found in `hProgram`. -ur_result_t UR_APICALL urKernelCreate( - ur_program_handle_t hProgram, ///< [in] handle of the program instance - const char *pKernelName, ///< [in] pointer to null-terminated string. - ur_kernel_handle_t - *phKernel ///< [out] pointer to handle of kernel object created. -) { +ur_result_t UR_APICALL +urKernelCreate( + ur_program_handle_t hProgram, ///< [in] handle of the program instance + const char* pKernelName, ///< [in] pointer to null-terminated string. + ur_kernel_handle_t* phKernel ///< [out] pointer to handle of kernel object created. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Set kernel argument to a value. -/// +/// /// @details /// - The application may call this function from simultaneous threads with /// the same kernel handle. /// - The implementation of this function should be lock-free. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -3137,28 +3132,28 @@ ur_result_t UR_APICALL urKernelCreate( /// + `NULL == pArgValue` /// - ::UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX /// - ::UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_SIZE -ur_result_t UR_APICALL urKernelSetArgValue( - ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object - uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] - size_t argSize, ///< [in] size of argument type - const ur_kernel_arg_value_properties_t - *pProperties, ///< [in][optional] pointer to value properties. - const void - *pArgValue ///< [in] argument value represented as matching arg type. - ///< The data pointed to will be copied and therefore can be reused on return. -) { +ur_result_t UR_APICALL +urKernelSetArgValue( + ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object + uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] + size_t argSize, ///< [in] size of argument type + const ur_kernel_arg_value_properties_t* pProperties,///< [in][optional] pointer to value properties. + const void* pArgValue ///< [in] argument value represented as matching arg type. + ///< The data pointed to will be copied and therefore can be reused on return. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Set kernel argument to a local buffer. -/// +/// /// @details /// - The application may call this function from simultaneous threads with /// the same kernel handle. /// - The implementation of this function should be lock-free. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -3168,25 +3163,25 @@ ur_result_t UR_APICALL urKernelSetArgValue( /// + `NULL == hKernel` /// - ::UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX /// - ::UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_SIZE -ur_result_t UR_APICALL urKernelSetArgLocal( - ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object - uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] - size_t - argSize, ///< [in] size of the local buffer to be allocated by the runtime - const ur_kernel_arg_local_properties_t - *pProperties ///< [in][optional] pointer to local buffer properties. -) { +ur_result_t UR_APICALL +urKernelSetArgLocal( + ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object + uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] + size_t argSize, ///< [in] size of the local buffer to be allocated by the runtime + const ur_kernel_arg_local_properties_t* pProperties ///< [in][optional] pointer to local buffer properties. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Query information about a Kernel object -/// +/// /// @remarks /// _Analogues_ /// - **clGetKernelInfo** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -3207,32 +3202,32 @@ ur_result_t UR_APICALL urKernelSetArgLocal( /// - ::UR_RESULT_ERROR_INVALID_KERNEL /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY -ur_result_t UR_APICALL urKernelGetInfo( - ur_kernel_handle_t hKernel, ///< [in] handle of the Kernel object - ur_kernel_info_t propName, ///< [in] name of the Kernel property to query - size_t propSize, ///< [in] the size of the Kernel property value. - void * - pPropValue, ///< [in,out][optional][typename(propName, propSize)] array of bytes - ///< holding the kernel info property. - ///< If propSize is not equal to or greater than the real number of bytes - ///< needed to return - ///< the info then the ::UR_RESULT_ERROR_INVALID_SIZE error is returned and - ///< pPropValue is not used. - size_t * - pPropSizeRet ///< [out][optional] pointer to the actual size in bytes of data being - ///< queried by propName. -) { +ur_result_t UR_APICALL +urKernelGetInfo( + ur_kernel_handle_t hKernel, ///< [in] handle of the Kernel object + ur_kernel_info_t propName, ///< [in] name of the Kernel property to query + size_t propSize, ///< [in] the size of the Kernel property value. + void* pPropValue, ///< [in,out][optional][typename(propName, propSize)] array of bytes + ///< holding the kernel info property. + ///< If propSize is not equal to or greater than the real number of bytes + ///< needed to return + ///< the info then the ::UR_RESULT_ERROR_INVALID_SIZE error is returned and + ///< pPropValue is not used. + size_t* pPropSizeRet ///< [out][optional] pointer to the actual size in bytes of data being + ///< queried by propName. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Query work Group information about a Kernel object -/// +/// /// @remarks /// _Analogues_ /// - **clGetKernelWorkGroupInfo** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -3243,26 +3238,25 @@ ur_result_t UR_APICALL urKernelGetInfo( /// + `NULL == hDevice` /// - ::UR_RESULT_ERROR_INVALID_ENUMERATION /// + `::UR_KERNEL_GROUP_INFO_COMPILE_MAX_LINEAR_WORK_GROUP_SIZE < propName` -ur_result_t UR_APICALL urKernelGetGroupInfo( - ur_kernel_handle_t hKernel, ///< [in] handle of the Kernel object - ur_device_handle_t hDevice, ///< [in] handle of the Device object - ur_kernel_group_info_t - propName, ///< [in] name of the work Group property to query - size_t propSize, ///< [in] size of the Kernel Work Group property value - void * - pPropValue, ///< [in,out][optional][typename(propName, propSize)] value of the Kernel - ///< Work Group property. - size_t * - pPropSizeRet ///< [out][optional] pointer to the actual size in bytes of data being - ///< queried by propName. -) { +ur_result_t UR_APICALL +urKernelGetGroupInfo( + ur_kernel_handle_t hKernel, ///< [in] handle of the Kernel object + ur_device_handle_t hDevice, ///< [in] handle of the Device object + ur_kernel_group_info_t propName, ///< [in] name of the work Group property to query + size_t propSize, ///< [in] size of the Kernel Work Group property value + void* pPropValue, ///< [in,out][optional][typename(propName, propSize)] value of the Kernel + ///< Work Group property. + size_t* pPropSizeRet ///< [out][optional] pointer to the actual size in bytes of data being + ///< queried by propName. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Query SubGroup information about a Kernel object -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -3273,36 +3267,35 @@ ur_result_t UR_APICALL urKernelGetGroupInfo( /// + `NULL == hDevice` /// - ::UR_RESULT_ERROR_INVALID_ENUMERATION /// + `::UR_KERNEL_SUB_GROUP_INFO_SUB_GROUP_SIZE_INTEL < propName` -ur_result_t UR_APICALL urKernelGetSubGroupInfo( - ur_kernel_handle_t hKernel, ///< [in] handle of the Kernel object - ur_device_handle_t hDevice, ///< [in] handle of the Device object - ur_kernel_sub_group_info_t - propName, ///< [in] name of the SubGroup property to query - size_t propSize, ///< [in] size of the Kernel SubGroup property value - void * - pPropValue, ///< [in,out][optional][typename(propName, propSize)] value of the Kernel - ///< SubGroup property. - size_t * - pPropSizeRet ///< [out][optional] pointer to the actual size in bytes of data being - ///< queried by propName. -) { +ur_result_t UR_APICALL +urKernelGetSubGroupInfo( + ur_kernel_handle_t hKernel, ///< [in] handle of the Kernel object + ur_device_handle_t hDevice, ///< [in] handle of the Device object + ur_kernel_sub_group_info_t propName, ///< [in] name of the SubGroup property to query + size_t propSize, ///< [in] size of the Kernel SubGroup property value + void* pPropValue, ///< [in,out][optional][typename(propName, propSize)] value of the Kernel + ///< SubGroup property. + size_t* pPropSizeRet ///< [out][optional] pointer to the actual size in bytes of data being + ///< queried by propName. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Get a reference to the Kernel object. -/// +/// /// @details /// - Get a reference to the Kernel object handle. Increment its reference /// count /// - The application may call this function from simultaneous threads. /// - The implementation of this function should be lock-free. -/// +/// /// @remarks /// _Analogues_ /// - **clRetainKernel** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -3310,26 +3303,28 @@ ur_result_t UR_APICALL urKernelGetSubGroupInfo( /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE /// + `NULL == hKernel` -ur_result_t UR_APICALL urKernelRetain( - ur_kernel_handle_t hKernel ///< [in][retain] handle for the Kernel to retain -) { +ur_result_t UR_APICALL +urKernelRetain( + ur_kernel_handle_t hKernel ///< [in][retain] handle for the Kernel to retain + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Release Kernel. -/// +/// /// @details /// - Decrement reference count and destroy the Kernel if reference count /// becomes zero. /// - The application may call this function from simultaneous threads. /// - The implementation of this function should be lock-free. -/// +/// /// @remarks /// _Analogues_ /// - **clReleaseKernel** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -3337,26 +3332,27 @@ ur_result_t UR_APICALL urKernelRetain( /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE /// + `NULL == hKernel` -ur_result_t UR_APICALL urKernelRelease( - ur_kernel_handle_t - hKernel ///< [in][release] handle for the Kernel to release -) { +ur_result_t UR_APICALL +urKernelRelease( + ur_kernel_handle_t hKernel ///< [in][release] handle for the Kernel to release + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Set a USM pointer as the argument value of a Kernel. -/// +/// /// @details /// - The application may call this function from simultaneous threads with /// the same kernel handle. /// - The implementation of this function should be lock-free. -/// +/// /// @remarks /// _Analogues_ /// - **clSetKernelArgSVMPointer** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -3366,31 +3362,31 @@ ur_result_t UR_APICALL urKernelRelease( /// + `NULL == hKernel` /// - ::UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX /// - ::UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_SIZE -ur_result_t UR_APICALL urKernelSetArgPointer( - ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object - uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] - const ur_kernel_arg_pointer_properties_t - *pProperties, ///< [in][optional] pointer to USM pointer properties. - const void * - pArgValue ///< [in][optional] Pointer obtained by USM allocation or virtual memory - ///< mapping operation. If null then argument value is considered null. -) { +ur_result_t UR_APICALL +urKernelSetArgPointer( + ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object + uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] + const ur_kernel_arg_pointer_properties_t* pProperties, ///< [in][optional] pointer to USM pointer properties. + const void* pArgValue ///< [in][optional] Pointer obtained by USM allocation or virtual memory + ///< mapping operation. If null then argument value is considered null. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Set additional Kernel execution attributes. -/// +/// /// @details /// - The application must **not** call this function from simultaneous /// threads with the same kernel handle. /// - The implementation of this function should be lock-free. -/// +/// /// @remarks /// _Analogues_ /// - **clSetKernelExecInfo** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -3402,28 +3398,28 @@ ur_result_t UR_APICALL urKernelSetArgPointer( /// + `::UR_KERNEL_EXEC_INFO_CACHE_CONFIG < propName` /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER /// + `NULL == pPropValue` -ur_result_t UR_APICALL urKernelSetExecInfo( - ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object - ur_kernel_exec_info_t propName, ///< [in] name of the execution attribute - size_t propSize, ///< [in] size in byte the attribute value - const ur_kernel_exec_info_properties_t - *pProperties, ///< [in][optional] pointer to execution info properties. - const void * - pPropValue ///< [in][typename(propName, propSize)] pointer to memory location holding - ///< the property value. -) { +ur_result_t UR_APICALL +urKernelSetExecInfo( + ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object + ur_kernel_exec_info_t propName, ///< [in] name of the execution attribute + size_t propSize, ///< [in] size in byte the attribute value + const ur_kernel_exec_info_properties_t* pProperties,///< [in][optional] pointer to execution info properties. + const void* pPropValue ///< [in][typename(propName, propSize)] pointer to memory location holding + ///< the property value. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Set a Sampler object as the argument value of a Kernel. -/// +/// /// @details /// - The application may call this function from simultaneous threads with /// the same kernel handle. /// - The implementation of this function should be lock-free. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -3433,25 +3429,26 @@ ur_result_t UR_APICALL urKernelSetExecInfo( /// + `NULL == hKernel` /// + `NULL == hArgValue` /// - ::UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX -ur_result_t UR_APICALL urKernelSetArgSampler( - ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object - uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] - const ur_kernel_arg_sampler_properties_t - *pProperties, ///< [in][optional] pointer to sampler properties. - ur_sampler_handle_t hArgValue ///< [in] handle of Sampler object. -) { +ur_result_t UR_APICALL +urKernelSetArgSampler( + ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object + uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] + const ur_kernel_arg_sampler_properties_t* pProperties, ///< [in][optional] pointer to sampler properties. + ur_sampler_handle_t hArgValue ///< [in] handle of Sampler object. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Set a Memory object as the argument value of a Kernel. -/// +/// /// @details /// - The application may call this function from simultaneous threads with /// the same kernel handle. /// - The implementation of this function should be lock-free. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -3462,20 +3459,21 @@ ur_result_t UR_APICALL urKernelSetArgSampler( /// - ::UR_RESULT_ERROR_INVALID_ENUMERATION /// + `NULL != pProperties && ::UR_MEM_FLAGS_MASK & pProperties->memoryAccess` /// - ::UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX -ur_result_t UR_APICALL urKernelSetArgMemObj( - ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object - uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] - const ur_kernel_arg_mem_obj_properties_t - *pProperties, ///< [in][optional] pointer to Memory object properties. - ur_mem_handle_t hArgValue ///< [in][optional] handle of Memory object. -) { +ur_result_t UR_APICALL +urKernelSetArgMemObj( + ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object + uint32_t argIndex, ///< [in] argument index in range [0, num args - 1] + const ur_kernel_arg_mem_obj_properties_t* pProperties, ///< [in][optional] pointer to Memory object properties. + ur_mem_handle_t hArgValue ///< [in][optional] handle of Memory object. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Set an array of specialization constants on a Kernel. -/// +/// /// @details /// - This entry point is optional, the application should query for support /// with device query ::UR_DEVICE_INFO_KERNEL_SET_SPECIALIZATION_CONSTANTS @@ -3489,7 +3487,7 @@ ur_result_t UR_APICALL urKernelSetArgMemObj( /// - The application may call this function from simultaneous threads for /// the same device. /// - The implementation of this function should be thread-safe. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -3508,19 +3506,20 @@ ur_result_t UR_APICALL urKernelSetArgMemObj( /// + A pSpecConstant entry contains a nullptr pValue. /// - ::UR_RESULT_ERROR_INVALID_SPEC_ID /// + Any id specified in a pSpecConstant entry is not a valid specialization constant identifier. -ur_result_t UR_APICALL urKernelSetSpecializationConstants( - ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object - uint32_t count, ///< [in] the number of elements in the pSpecConstants array - const ur_specialization_constant_info_t * - pSpecConstants ///< [in] array of specialization constant value descriptions -) { +ur_result_t UR_APICALL +urKernelSetSpecializationConstants( + ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object + uint32_t count, ///< [in] the number of elements in the pSpecConstants array + const ur_specialization_constant_info_t* pSpecConstants ///< [in] array of specialization constant value descriptions + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Return platform native kernel handle. -/// +/// /// @details /// - Retrieved native handle can be used for direct interaction with the /// native platform driver. @@ -3529,7 +3528,7 @@ ur_result_t UR_APICALL urKernelSetSpecializationConstants( /// - The application may call this function from simultaneous threads for /// the same context. /// - The implementation of this function should be thread-safe. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -3541,18 +3540,19 @@ ur_result_t UR_APICALL urKernelSetSpecializationConstants( /// + `NULL == phNativeKernel` /// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE /// + If the adapter has no underlying equivalent handle. -ur_result_t UR_APICALL urKernelGetNativeHandle( - ur_kernel_handle_t hKernel, ///< [in] handle of the kernel. - ur_native_handle_t - *phNativeKernel ///< [out] a pointer to the native handle of the kernel. -) { +ur_result_t UR_APICALL +urKernelGetNativeHandle( + ur_kernel_handle_t hKernel, ///< [in] handle of the kernel. + ur_native_handle_t* phNativeKernel ///< [out] a pointer to the native handle of the kernel. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Create runtime kernel object from native kernel handle. -/// +/// /// @details /// - Creates runtime kernel handle from native driver kernel handle. /// - The application may call this function from simultaneous threads for @@ -3560,7 +3560,7 @@ ur_result_t UR_APICALL urKernelGetNativeHandle( /// - The implementation of this function should be thread-safe. /// - The implementation may require a valid program handle to return the /// native kernel handle -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -3573,30 +3573,28 @@ ur_result_t UR_APICALL urKernelGetNativeHandle( /// + `NULL == phKernel` /// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE /// + If the adapter has no underlying equivalent handle. -ur_result_t UR_APICALL urKernelCreateWithNativeHandle( - ur_native_handle_t - hNativeKernel, ///< [in][nocheck] the native handle of the kernel. - ur_context_handle_t hContext, ///< [in] handle of the context object - ur_program_handle_t - hProgram, ///< [in][optional] handle of the program associated with the kernel - const ur_kernel_native_properties_t * - pProperties, ///< [in][optional] pointer to native kernel properties struct - ur_kernel_handle_t - *phKernel ///< [out] pointer to the handle of the kernel object created. -) { +ur_result_t UR_APICALL +urKernelCreateWithNativeHandle( + ur_native_handle_t hNativeKernel, ///< [in][nocheck] the native handle of the kernel. + ur_context_handle_t hContext, ///< [in] handle of the context object + ur_program_handle_t hProgram, ///< [in][optional] handle of the program associated with the kernel + const ur_kernel_native_properties_t* pProperties, ///< [in][optional] pointer to native kernel properties struct + ur_kernel_handle_t* phKernel ///< [out] pointer to the handle of the kernel object created. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Get the suggested local work size for a kernel. -/// +/// /// @details /// - Query a suggested local work size for a kernel given a global size for /// each dimension. /// - The application may call this function from simultaneous threads for /// the same context. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -3610,34 +3608,32 @@ ur_result_t UR_APICALL urKernelCreateWithNativeHandle( /// + `NULL == pGlobalWorkSize` /// + `NULL == pSuggestedLocalWorkSize` /// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE -ur_result_t UR_APICALL urKernelGetSuggestedLocalWorkSize( - ur_kernel_handle_t hKernel, ///< [in] handle of the kernel - ur_queue_handle_t hQueue, ///< [in] handle of the queue object - uint32_t - numWorkDim, ///< [in] number of dimensions, from 1 to 3, to specify the global - ///< and work-group work-items - const size_t * - pGlobalWorkOffset, ///< [in] pointer to an array of numWorkDim unsigned values that specify - ///< the offset used to calculate the global ID of a work-item - const size_t * - pGlobalWorkSize, ///< [in] pointer to an array of numWorkDim unsigned values that specify - ///< the number of global work-items in workDim that will execute the - ///< kernel function - size_t * - pSuggestedLocalWorkSize ///< [out] pointer to an array of numWorkDim unsigned values that specify - ///< suggested local work size that will contain the result of the query -) { +ur_result_t UR_APICALL +urKernelGetSuggestedLocalWorkSize( + ur_kernel_handle_t hKernel, ///< [in] handle of the kernel + ur_queue_handle_t hQueue, ///< [in] handle of the queue object + uint32_t numWorkDim, ///< [in] number of dimensions, from 1 to 3, to specify the global + ///< and work-group work-items + const size_t* pGlobalWorkOffset, ///< [in] pointer to an array of numWorkDim unsigned values that specify + ///< the offset used to calculate the global ID of a work-item + const size_t* pGlobalWorkSize, ///< [in] pointer to an array of numWorkDim unsigned values that specify + ///< the number of global work-items in workDim that will execute the + ///< kernel function + size_t* pSuggestedLocalWorkSize ///< [out] pointer to an array of numWorkDim unsigned values that specify + ///< suggested local work size that will contain the result of the query + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Query information about a command queue -/// +/// /// @remarks /// _Analogues_ /// - **clGetCommandQueueInfo** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -3658,31 +3654,30 @@ ur_result_t UR_APICALL urKernelGetSuggestedLocalWorkSize( /// - ::UR_RESULT_ERROR_INVALID_QUEUE - "If `hQueue` isn't a valid queue handle or if `propName` isn't supported by `hQueue`." /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urQueueGetInfo( - ur_queue_handle_t hQueue, ///< [in] handle of the queue object - ur_queue_info_t propName, ///< [in] name of the queue property to query - size_t - propSize, ///< [in] size in bytes of the queue property value provided - void * - pPropValue, ///< [out][optional][typename(propName, propSize)] value of the queue - ///< property - size_t * - pPropSizeRet ///< [out][optional] size in bytes returned in queue property value -) { +ur_result_t UR_APICALL +urQueueGetInfo( + ur_queue_handle_t hQueue, ///< [in] handle of the queue object + ur_queue_info_t propName, ///< [in] name of the queue property to query + size_t propSize, ///< [in] size in bytes of the queue property value provided + void* pPropValue, ///< [out][optional][typename(propName, propSize)] value of the queue + ///< property + size_t* pPropSizeRet ///< [out][optional] size in bytes returned in queue property value + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Create a command queue for a device in a context -/// +/// /// @details /// - See also ::ur_queue_index_properties_t. -/// +/// /// @remarks /// _Analogues_ /// - **clCreateCommandQueueWithProperties** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -3702,14 +3697,14 @@ ur_result_t UR_APICALL urQueueGetInfo( /// + `pProperties != NULL && pProperties->flags & UR_QUEUE_FLAG_SUBMISSION_BATCHED && pProperties->flags & UR_QUEUE_FLAG_SUBMISSION_IMMEDIATE` /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urQueueCreate( - ur_context_handle_t hContext, ///< [in] handle of the context object - ur_device_handle_t hDevice, ///< [in] handle of the device object - const ur_queue_properties_t - *pProperties, ///< [in][optional] pointer to queue creation properties. - ur_queue_handle_t - *phQueue ///< [out] pointer to handle of queue object created -) { +ur_result_t UR_APICALL +urQueueCreate( + ur_context_handle_t hContext, ///< [in] handle of the context object + ur_device_handle_t hDevice, ///< [in] handle of the device object + const ur_queue_properties_t* pProperties, ///< [in][optional] pointer to queue creation properties. + ur_queue_handle_t* phQueue ///< [out] pointer to handle of queue object created + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -3717,15 +3712,15 @@ ur_result_t UR_APICALL urQueueCreate( /////////////////////////////////////////////////////////////////////////////// /// @brief Get a reference to the command queue handle. Increment the command /// queue's reference count -/// +/// /// @details /// - Useful in library function to retain access to the command queue after /// the caller released the queue. -/// +/// /// @remarks /// _Analogues_ /// - **clRetainCommandQueue** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -3736,10 +3731,11 @@ ur_result_t UR_APICALL urQueueCreate( /// - ::UR_RESULT_ERROR_INVALID_QUEUE /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urQueueRetain( - ur_queue_handle_t - hQueue ///< [in][retain] handle of the queue object to get access -) { +ur_result_t UR_APICALL +urQueueRetain( + ur_queue_handle_t hQueue ///< [in][retain] handle of the queue object to get access + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -3747,17 +3743,17 @@ ur_result_t UR_APICALL urQueueRetain( /////////////////////////////////////////////////////////////////////////////// /// @brief Decrement the command queue's reference count and delete the command /// queue if the reference count becomes zero. -/// +/// /// @details /// - After the command queue reference count becomes zero and all queued /// commands in the queue have finished, the queue is deleted. /// - It also performs an implicit flush to issue all previously queued /// commands in the queue. -/// +/// /// @remarks /// _Analogues_ /// - **clReleaseCommandQueue** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -3768,17 +3764,18 @@ ur_result_t UR_APICALL urQueueRetain( /// - ::UR_RESULT_ERROR_INVALID_QUEUE /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urQueueRelease( - ur_queue_handle_t - hQueue ///< [in][release] handle of the queue object to release -) { +ur_result_t UR_APICALL +urQueueRelease( + ur_queue_handle_t hQueue ///< [in][release] handle of the queue object to release + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Return queue native queue handle. -/// +/// /// @details /// - Retrieved native handle can be used for direct interaction with the /// native platform driver. @@ -3787,7 +3784,7 @@ ur_result_t UR_APICALL urQueueRelease( /// - The application may call this function from simultaneous threads for /// the same context. /// - The implementation of this function should be thread-safe. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -3799,26 +3796,26 @@ ur_result_t UR_APICALL urQueueRelease( /// + `NULL == phNativeQueue` /// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE /// + If the adapter has no underlying equivalent handle. -ur_result_t UR_APICALL urQueueGetNativeHandle( - ur_queue_handle_t hQueue, ///< [in] handle of the queue. - ur_queue_native_desc_t - *pDesc, ///< [in][optional] pointer to native descriptor - ur_native_handle_t - *phNativeQueue ///< [out] a pointer to the native handle of the queue. -) { +ur_result_t UR_APICALL +urQueueGetNativeHandle( + ur_queue_handle_t hQueue, ///< [in] handle of the queue. + ur_queue_native_desc_t* pDesc, ///< [in][optional] pointer to native descriptor + ur_native_handle_t* phNativeQueue ///< [out] a pointer to the native handle of the queue. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Create runtime queue object from native queue handle. -/// +/// /// @details /// - Creates runtime queue handle from native driver queue handle. /// - The application may call this function from simultaneous threads for /// the same context. /// - The implementation of this function should be thread-safe. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -3830,16 +3827,15 @@ ur_result_t UR_APICALL urQueueGetNativeHandle( /// + `NULL == phQueue` /// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE /// + If the adapter has no underlying equivalent handle. -ur_result_t UR_APICALL urQueueCreateWithNativeHandle( - ur_native_handle_t - hNativeQueue, ///< [in][nocheck] the native handle of the queue. - ur_context_handle_t hContext, ///< [in] handle of the context object - ur_device_handle_t hDevice, ///< [in][optional] handle of the device object - const ur_queue_native_properties_t * - pProperties, ///< [in][optional] pointer to native queue properties struct - ur_queue_handle_t - *phQueue ///< [out] pointer to the handle of the queue object created. -) { +ur_result_t UR_APICALL +urQueueCreateWithNativeHandle( + ur_native_handle_t hNativeQueue, ///< [in][nocheck] the native handle of the queue. + ur_context_handle_t hContext, ///< [in] handle of the context object + ur_device_handle_t hDevice, ///< [in][optional] handle of the device object + const ur_queue_native_properties_t* pProperties,///< [in][optional] pointer to native queue properties struct + ur_queue_handle_t* phQueue ///< [out] pointer to the handle of the queue object created. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -3847,18 +3843,18 @@ ur_result_t UR_APICALL urQueueCreateWithNativeHandle( /////////////////////////////////////////////////////////////////////////////// /// @brief Blocks until all previously issued commands to the command queue are /// finished. -/// +/// /// @details /// - Blocks until all previously issued commands to the command queue are /// issued and completed. /// - ::urQueueFinish does not return until all enqueued commands have been /// processed and finished. /// - ::urQueueFinish acts as a synchronization point. -/// +/// /// @remarks /// _Analogues_ /// - **clFinish** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -3868,9 +3864,11 @@ ur_result_t UR_APICALL urQueueCreateWithNativeHandle( /// + `NULL == hQueue` /// - ::UR_RESULT_ERROR_INVALID_QUEUE /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY -ur_result_t UR_APICALL urQueueFinish( - ur_queue_handle_t hQueue ///< [in] handle of the queue to be finished. -) { +ur_result_t UR_APICALL +urQueueFinish( + ur_queue_handle_t hQueue ///< [in] handle of the queue to be finished. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -3878,17 +3876,17 @@ ur_result_t UR_APICALL urQueueFinish( /////////////////////////////////////////////////////////////////////////////// /// @brief Issues all previously enqueued commands in a command queue to the /// device. -/// +/// /// @details /// - Guarantees that all enqueued commands will be issued to the /// appropriate device. /// - There is no guarantee that they will be completed after ::urQueueFlush /// returns. -/// +/// /// @remarks /// _Analogues_ /// - **clFlush** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -3898,20 +3896,22 @@ ur_result_t UR_APICALL urQueueFinish( /// + `NULL == hQueue` /// - ::UR_RESULT_ERROR_INVALID_QUEUE /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY -ur_result_t UR_APICALL urQueueFlush( - ur_queue_handle_t hQueue ///< [in] handle of the queue to be flushed. -) { +ur_result_t UR_APICALL +urQueueFlush( + ur_queue_handle_t hQueue ///< [in] handle of the queue to be flushed. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Get event object information -/// +/// /// @remarks /// _Analogues_ /// - **clGetEventInfo** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -3932,15 +3932,16 @@ ur_result_t UR_APICALL urQueueFlush( /// - ::UR_RESULT_ERROR_INVALID_EVENT /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY -ur_result_t UR_APICALL urEventGetInfo( - ur_event_handle_t hEvent, ///< [in] handle of the event object - ur_event_info_t propName, ///< [in] the name of the event property to query - size_t propSize, ///< [in] size in bytes of the event property value - void * - pPropValue, ///< [out][optional][typename(propName, propSize)] value of the event - ///< property - size_t *pPropSizeRet ///< [out][optional] bytes returned in event property -) { +ur_result_t UR_APICALL +urEventGetInfo( + ur_event_handle_t hEvent, ///< [in] handle of the event object + ur_event_info_t propName, ///< [in] the name of the event property to query + size_t propSize, ///< [in] size in bytes of the event property value + void* pPropValue, ///< [out][optional][typename(propName, propSize)] value of the event + ///< property + size_t* pPropSizeRet ///< [out][optional] bytes returned in event property + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -3948,11 +3949,11 @@ ur_result_t UR_APICALL urEventGetInfo( /////////////////////////////////////////////////////////////////////////////// /// @brief Get profiling information for the command associated with an event /// object -/// +/// /// @remarks /// _Analogues_ /// - **clGetEventProfilingInfo** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -3969,29 +3970,28 @@ ur_result_t UR_APICALL urEventGetInfo( /// - ::UR_RESULT_ERROR_INVALID_EVENT /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY -ur_result_t UR_APICALL urEventGetProfilingInfo( - ur_event_handle_t hEvent, ///< [in] handle of the event object - ur_profiling_info_t - propName, ///< [in] the name of the profiling property to query - size_t propSize, ///< [in] size in bytes of the profiling property value - void * - pPropValue, ///< [out][optional][typename(propName, propSize)] value of the profiling - ///< property - size_t * - pPropSizeRet ///< [out][optional] pointer to the actual size in bytes returned in - ///< propValue -) { +ur_result_t UR_APICALL +urEventGetProfilingInfo( + ur_event_handle_t hEvent, ///< [in] handle of the event object + ur_profiling_info_t propName, ///< [in] the name of the profiling property to query + size_t propSize, ///< [in] size in bytes of the profiling property value + void* pPropValue, ///< [out][optional][typename(propName, propSize)] value of the profiling + ///< property + size_t* pPropSizeRet ///< [out][optional] pointer to the actual size in bytes returned in + ///< propValue + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Wait for a list of events to finish. -/// +/// /// @remarks /// _Analogues_ /// - **clWaitForEvent** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -4007,12 +4007,13 @@ ur_result_t UR_APICALL urEventGetProfilingInfo( /// - ::UR_RESULT_ERROR_INVALID_CONTEXT /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urEventWait( - uint32_t numEvents, ///< [in] number of events in the event list - const ur_event_handle_t * - phEventWaitList ///< [in][range(0, numEvents)] pointer to a list of events to wait for - ///< completion -) { +ur_result_t UR_APICALL +urEventWait( + uint32_t numEvents, ///< [in] number of events in the event list + const ur_event_handle_t* phEventWaitList ///< [in][range(0, numEvents)] pointer to a list of events to wait for + ///< completion + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -4020,11 +4021,11 @@ ur_result_t UR_APICALL urEventWait( /////////////////////////////////////////////////////////////////////////////// /// @brief Get a reference to an event handle. Increment the event object's /// reference count. -/// +/// /// @remarks /// _Analogues_ /// - **clRetainEvent** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -4035,9 +4036,11 @@ ur_result_t UR_APICALL urEventWait( /// - ::UR_RESULT_ERROR_INVALID_EVENT /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY -ur_result_t UR_APICALL urEventRetain( - ur_event_handle_t hEvent ///< [in][retain] handle of the event object -) { +ur_result_t UR_APICALL +urEventRetain( + ur_event_handle_t hEvent ///< [in][retain] handle of the event object + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -4045,11 +4048,11 @@ ur_result_t UR_APICALL urEventRetain( /////////////////////////////////////////////////////////////////////////////// /// @brief Decrement the event object's reference count and delete the event /// object if the reference count becomes zero. -/// +/// /// @remarks /// _Analogues_ /// - **clReleaseEvent** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -4060,16 +4063,18 @@ ur_result_t UR_APICALL urEventRetain( /// - ::UR_RESULT_ERROR_INVALID_EVENT /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY -ur_result_t UR_APICALL urEventRelease( - ur_event_handle_t hEvent ///< [in][release] handle of the event object -) { +ur_result_t UR_APICALL +urEventRelease( + ur_event_handle_t hEvent ///< [in][release] handle of the event object + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Return platform native event handle. -/// +/// /// @details /// - Retrieved native handle can be used for direct interaction with the /// native platform driver. @@ -4078,7 +4083,7 @@ ur_result_t UR_APICALL urEventRelease( /// - The application may call this function from simultaneous threads for /// the same context. /// - The implementation of this function should be thread-safe. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -4090,24 +4095,25 @@ ur_result_t UR_APICALL urEventRelease( /// + `NULL == phNativeEvent` /// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE /// + If the adapter has no underlying equivalent handle. -ur_result_t UR_APICALL urEventGetNativeHandle( - ur_event_handle_t hEvent, ///< [in] handle of the event. - ur_native_handle_t - *phNativeEvent ///< [out] a pointer to the native handle of the event. -) { +ur_result_t UR_APICALL +urEventGetNativeHandle( + ur_event_handle_t hEvent, ///< [in] handle of the event. + ur_native_handle_t* phNativeEvent ///< [out] a pointer to the native handle of the event. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Create runtime event object from native event handle. -/// +/// /// @details /// - Creates runtime event handle from native driver event handle. /// - The application may call this function from simultaneous threads for /// the same context. /// - The implementation of this function should be thread-safe. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -4119,15 +4125,14 @@ ur_result_t UR_APICALL urEventGetNativeHandle( /// + `NULL == phEvent` /// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE /// + If the adapter has no underlying equivalent handle. -ur_result_t UR_APICALL urEventCreateWithNativeHandle( - ur_native_handle_t - hNativeEvent, ///< [in][nocheck] the native handle of the event. - ur_context_handle_t hContext, ///< [in] handle of the context object - const ur_event_native_properties_t * - pProperties, ///< [in][optional] pointer to native event properties struct - ur_event_handle_t - *phEvent ///< [out] pointer to the handle of the event object created. -) { +ur_result_t UR_APICALL +urEventCreateWithNativeHandle( + ur_native_handle_t hNativeEvent, ///< [in][nocheck] the native handle of the event. + ur_context_handle_t hContext, ///< [in] handle of the context object + const ur_event_native_properties_t* pProperties,///< [in][optional] pointer to native event properties struct + ur_event_handle_t* phEvent ///< [out] pointer to the handle of the event object created. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -4135,7 +4140,7 @@ ur_result_t UR_APICALL urEventCreateWithNativeHandle( /////////////////////////////////////////////////////////////////////////////// /// @brief Register a user callback function for a specific command execution /// status. -/// +/// /// @details /// - The registered callback function will be called when the execution /// status of command associated with event changes to an execution status @@ -4145,7 +4150,7 @@ ur_result_t UR_APICALL urEventCreateWithNativeHandle( /// - The application may call this function from simultaneous threads for /// the same context. /// - The implementation of this function should be thread-safe. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -4159,24 +4164,25 @@ ur_result_t UR_APICALL urEventCreateWithNativeHandle( /// + `NULL == pfnNotify` /// - ::UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// + `execStatus == UR_EXECUTION_INFO_QUEUED` -ur_result_t UR_APICALL urEventSetCallback( - ur_event_handle_t hEvent, ///< [in] handle of the event object - ur_execution_info_t execStatus, ///< [in] execution status of the event - ur_event_callback_t pfnNotify, ///< [in] execution status of the event - void * - pUserData ///< [in][out][optional] pointer to data to be passed to callback. -) { +ur_result_t UR_APICALL +urEventSetCallback( + ur_event_handle_t hEvent, ///< [in] handle of the event object + ur_execution_info_t execStatus, ///< [in] execution status of the event + ur_event_callback_t pfnNotify, ///< [in] execution status of the event + void* pUserData ///< [in][out][optional] pointer to data to be passed to callback. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Enqueue a command to execute a kernel -/// +/// /// @remarks /// _Analogues_ /// - **clEnqueueNDRangeKernel** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -4203,34 +4209,30 @@ ur_result_t UR_APICALL urEventSetCallback( /// - ::UR_RESULT_ERROR_INVALID_KERNEL_ARGS - "The kernel argument values have not been specified." /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urEnqueueKernelLaunch( - ur_queue_handle_t hQueue, ///< [in] handle of the queue object - ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object - uint32_t - workDim, ///< [in] number of dimensions, from 1 to 3, to specify the global and - ///< work-group work-items - const size_t * - pGlobalWorkOffset, ///< [in] pointer to an array of workDim unsigned values that specify the - ///< offset used to calculate the global ID of a work-item - const size_t * - pGlobalWorkSize, ///< [in] pointer to an array of workDim unsigned values that specify the - ///< number of global work-items in workDim that will execute the kernel - ///< function - const size_t * - pLocalWorkSize, ///< [in][optional] pointer to an array of workDim unsigned values that - ///< specify the number of local work-items forming a work-group that will - ///< execute the kernel function. - ///< If nullptr, the runtime implementation will choose the work-group size. - uint32_t numEventsInWaitList, ///< [in] size of the event wait list - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before the kernel execution. - ///< If nullptr, the numEventsInWaitList must be 0, indicating that no wait event. - ur_event_handle_t * - phEvent ///< [out][optional] return an event object that identifies this particular - ///< kernel execution instance. If phEventWaitList and phEvent are not - ///< NULL, phEvent must not refer to an element of the phEventWaitList array. -) { +ur_result_t UR_APICALL +urEnqueueKernelLaunch( + ur_queue_handle_t hQueue, ///< [in] handle of the queue object + ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object + uint32_t workDim, ///< [in] number of dimensions, from 1 to 3, to specify the global and + ///< work-group work-items + const size_t* pGlobalWorkOffset, ///< [in] pointer to an array of workDim unsigned values that specify the + ///< offset used to calculate the global ID of a work-item + const size_t* pGlobalWorkSize, ///< [in] pointer to an array of workDim unsigned values that specify the + ///< number of global work-items in workDim that will execute the kernel + ///< function + const size_t* pLocalWorkSize, ///< [in][optional] pointer to an array of workDim unsigned values that + ///< specify the number of local work-items forming a work-group that will + ///< execute the kernel function. + ///< If nullptr, the runtime implementation will choose the work-group size. + uint32_t numEventsInWaitList, ///< [in] size of the event wait list + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before the kernel execution. + ///< If nullptr, the numEventsInWaitList must be 0, indicating that no wait event. + ur_event_handle_t* phEvent ///< [out][optional] return an event object that identifies this particular + ///< kernel execution instance. If phEventWaitList and phEvent are not + ///< NULL, phEvent must not refer to an element of the phEventWaitList array. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -4238,16 +4240,16 @@ ur_result_t UR_APICALL urEnqueueKernelLaunch( /////////////////////////////////////////////////////////////////////////////// /// @brief Enqueue a command which waits a list of events to complete before it /// completes -/// +/// /// @details /// - If the event list is empty, it waits for all previously enqueued /// commands to complete. /// - It returns an event which can be waited on. -/// +/// /// @remarks /// _Analogues_ /// - **clEnqueueMarkerWithWaitList** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -4266,20 +4268,20 @@ ur_result_t UR_APICALL urEnqueueKernelLaunch( /// - ::UR_RESULT_ERROR_INVALID_VALUE /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urEnqueueEventsWait( - ur_queue_handle_t hQueue, ///< [in] handle of the queue object - uint32_t numEventsInWaitList, ///< [in] size of the event wait list - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before this command can be executed. - ///< If nullptr, the numEventsInWaitList must be 0, indicating that all - ///< previously enqueued commands - ///< must be complete. - ur_event_handle_t * - phEvent ///< [out][optional] return an event object that identifies this particular - ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent - ///< must not refer to an element of the phEventWaitList array. -) { +ur_result_t UR_APICALL +urEnqueueEventsWait( + ur_queue_handle_t hQueue, ///< [in] handle of the queue object + uint32_t numEventsInWaitList, ///< [in] size of the event wait list + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before this command can be executed. + ///< If nullptr, the numEventsInWaitList must be 0, indicating that all + ///< previously enqueued commands + ///< must be complete. + ur_event_handle_t* phEvent ///< [out][optional] return an event object that identifies this particular + ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent + ///< must not refer to an element of the phEventWaitList array. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -4287,18 +4289,18 @@ ur_result_t UR_APICALL urEnqueueEventsWait( /////////////////////////////////////////////////////////////////////////////// /// @brief Enqueue a barrier command which waits a list of events to complete /// before it completes -/// +/// /// @details /// - If the event list is empty, it waits for all previously enqueued /// commands to complete. /// - It blocks command execution - any following commands enqueued after it /// do not execute until it completes. /// - It returns an event which can be waited on. -/// +/// /// @remarks /// _Analogues_ /// - **clEnqueueBarrierWithWaitList** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -4317,35 +4319,35 @@ ur_result_t UR_APICALL urEnqueueEventsWait( /// - ::UR_RESULT_ERROR_INVALID_VALUE /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urEnqueueEventsWaitWithBarrier( - ur_queue_handle_t hQueue, ///< [in] handle of the queue object - uint32_t numEventsInWaitList, ///< [in] size of the event wait list - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before this command can be executed. - ///< If nullptr, the numEventsInWaitList must be 0, indicating that all - ///< previously enqueued commands - ///< must be complete. - ur_event_handle_t * - phEvent ///< [out][optional] return an event object that identifies this particular - ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent - ///< must not refer to an element of the phEventWaitList array. -) { +ur_result_t UR_APICALL +urEnqueueEventsWaitWithBarrier( + ur_queue_handle_t hQueue, ///< [in] handle of the queue object + uint32_t numEventsInWaitList, ///< [in] size of the event wait list + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before this command can be executed. + ///< If nullptr, the numEventsInWaitList must be 0, indicating that all + ///< previously enqueued commands + ///< must be complete. + ur_event_handle_t* phEvent ///< [out][optional] return an event object that identifies this particular + ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent + ///< must not refer to an element of the phEventWaitList array. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Enqueue a command to read from a buffer object to host memory -/// +/// /// @details /// - Input parameter blockingRead indicates if the read is blocking or /// non-blocking. -/// +/// /// @remarks /// _Analogues_ /// - **clEnqueueReadBuffer** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -4369,40 +4371,39 @@ ur_result_t UR_APICALL urEnqueueEventsWaitWithBarrier( /// + If `offset + size` results in an out-of-bounds access. /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urEnqueueMemBufferRead( - ur_queue_handle_t hQueue, ///< [in] handle of the queue object - ur_mem_handle_t - hBuffer, ///< [in][bounds(offset, size)] handle of the buffer object - bool blockingRead, ///< [in] indicates blocking (true), non-blocking (false) - size_t offset, ///< [in] offset in bytes in the buffer object - size_t size, ///< [in] size in bytes of data being read - void *pDst, ///< [in] pointer to host memory where data is to be read into - uint32_t numEventsInWaitList, ///< [in] size of the event wait list - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before this command can be executed. - ///< If nullptr, the numEventsInWaitList must be 0, indicating that this - ///< command does not wait on any event to complete. - ur_event_handle_t * - phEvent ///< [out][optional] return an event object that identifies this particular - ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent - ///< must not refer to an element of the phEventWaitList array. -) { +ur_result_t UR_APICALL +urEnqueueMemBufferRead( + ur_queue_handle_t hQueue, ///< [in] handle of the queue object + ur_mem_handle_t hBuffer, ///< [in][bounds(offset, size)] handle of the buffer object + bool blockingRead, ///< [in] indicates blocking (true), non-blocking (false) + size_t offset, ///< [in] offset in bytes in the buffer object + size_t size, ///< [in] size in bytes of data being read + void* pDst, ///< [in] pointer to host memory where data is to be read into + uint32_t numEventsInWaitList, ///< [in] size of the event wait list + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before this command can be executed. + ///< If nullptr, the numEventsInWaitList must be 0, indicating that this + ///< command does not wait on any event to complete. + ur_event_handle_t* phEvent ///< [out][optional] return an event object that identifies this particular + ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent + ///< must not refer to an element of the phEventWaitList array. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Enqueue a command to write into a buffer object from host memory -/// +/// /// @details /// - Input parameter blockingWrite indicates if the write is blocking or /// non-blocking. -/// +/// /// @remarks /// _Analogues_ /// - **clEnqueueWriteBuffer** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -4426,27 +4427,24 @@ ur_result_t UR_APICALL urEnqueueMemBufferRead( /// + If `offset + size` results in an out-of-bounds access. /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urEnqueueMemBufferWrite( - ur_queue_handle_t hQueue, ///< [in] handle of the queue object - ur_mem_handle_t - hBuffer, ///< [in][bounds(offset, size)] handle of the buffer object - bool - blockingWrite, ///< [in] indicates blocking (true), non-blocking (false) - size_t offset, ///< [in] offset in bytes in the buffer object - size_t size, ///< [in] size in bytes of data being written - const void - *pSrc, ///< [in] pointer to host memory where data is to be written from - uint32_t numEventsInWaitList, ///< [in] size of the event wait list - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before this command can be executed. - ///< If nullptr, the numEventsInWaitList must be 0, indicating that this - ///< command does not wait on any event to complete. - ur_event_handle_t * - phEvent ///< [out][optional] return an event object that identifies this particular - ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent - ///< must not refer to an element of the phEventWaitList array. -) { +ur_result_t UR_APICALL +urEnqueueMemBufferWrite( + ur_queue_handle_t hQueue, ///< [in] handle of the queue object + ur_mem_handle_t hBuffer, ///< [in][bounds(offset, size)] handle of the buffer object + bool blockingWrite, ///< [in] indicates blocking (true), non-blocking (false) + size_t offset, ///< [in] offset in bytes in the buffer object + size_t size, ///< [in] size in bytes of data being written + const void* pSrc, ///< [in] pointer to host memory where data is to be written from + uint32_t numEventsInWaitList, ///< [in] size of the event wait list + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before this command can be executed. + ///< If nullptr, the numEventsInWaitList must be 0, indicating that this + ///< command does not wait on any event to complete. + ur_event_handle_t* phEvent ///< [out][optional] return an event object that identifies this particular + ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent + ///< must not refer to an element of the phEventWaitList array. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -4454,17 +4452,17 @@ ur_result_t UR_APICALL urEnqueueMemBufferWrite( /////////////////////////////////////////////////////////////////////////////// /// @brief Enqueue a command to read a 2D or 3D rectangular region from a buffer /// object to host memory -/// +/// /// @details /// - Input parameter blockingRead indicates if the read is blocking or /// non-blocking. /// - The buffer and host 2D or 3D rectangular regions can have different /// shapes. -/// +/// /// @remarks /// _Analogues_ /// - **clEnqueueReadBufferRect** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -4495,37 +4493,31 @@ ur_result_t UR_APICALL urEnqueueMemBufferWrite( /// + If the combination of `bufferOrigin`, `region`, `bufferRowPitch`, and `bufferSlicePitch` results in an out-of-bounds access. /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urEnqueueMemBufferReadRect( - ur_queue_handle_t hQueue, ///< [in] handle of the queue object - ur_mem_handle_t - hBuffer, ///< [in][bounds(bufferOrigin, region)] handle of the buffer object - bool blockingRead, ///< [in] indicates blocking (true), non-blocking (false) - ur_rect_offset_t bufferOrigin, ///< [in] 3D offset in the buffer - ur_rect_offset_t hostOrigin, ///< [in] 3D offset in the host region - ur_rect_region_t - region, ///< [in] 3D rectangular region descriptor: width, height, depth - size_t - bufferRowPitch, ///< [in] length of each row in bytes in the buffer object - size_t - bufferSlicePitch, ///< [in] length of each 2D slice in bytes in the buffer object being read - size_t - hostRowPitch, ///< [in] length of each row in bytes in the host memory region pointed by - ///< dst - size_t - hostSlicePitch, ///< [in] length of each 2D slice in bytes in the host memory region - ///< pointed by dst - void *pDst, ///< [in] pointer to host memory where data is to be read into - uint32_t numEventsInWaitList, ///< [in] size of the event wait list - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before this command can be executed. - ///< If nullptr, the numEventsInWaitList must be 0, indicating that this - ///< command does not wait on any event to complete. - ur_event_handle_t * - phEvent ///< [out][optional] return an event object that identifies this particular - ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent - ///< must not refer to an element of the phEventWaitList array. -) { +ur_result_t UR_APICALL +urEnqueueMemBufferReadRect( + ur_queue_handle_t hQueue, ///< [in] handle of the queue object + ur_mem_handle_t hBuffer, ///< [in][bounds(bufferOrigin, region)] handle of the buffer object + bool blockingRead, ///< [in] indicates blocking (true), non-blocking (false) + ur_rect_offset_t bufferOrigin, ///< [in] 3D offset in the buffer + ur_rect_offset_t hostOrigin, ///< [in] 3D offset in the host region + ur_rect_region_t region, ///< [in] 3D rectangular region descriptor: width, height, depth + size_t bufferRowPitch, ///< [in] length of each row in bytes in the buffer object + size_t bufferSlicePitch, ///< [in] length of each 2D slice in bytes in the buffer object being read + size_t hostRowPitch, ///< [in] length of each row in bytes in the host memory region pointed by + ///< dst + size_t hostSlicePitch, ///< [in] length of each 2D slice in bytes in the host memory region + ///< pointed by dst + void* pDst, ///< [in] pointer to host memory where data is to be read into + uint32_t numEventsInWaitList, ///< [in] size of the event wait list + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before this command can be executed. + ///< If nullptr, the numEventsInWaitList must be 0, indicating that this + ///< command does not wait on any event to complete. + ur_event_handle_t* phEvent ///< [out][optional] return an event object that identifies this particular + ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent + ///< must not refer to an element of the phEventWaitList array. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -4533,17 +4525,17 @@ ur_result_t UR_APICALL urEnqueueMemBufferReadRect( /////////////////////////////////////////////////////////////////////////////// /// @brief Enqueue a command to write a 2D or 3D rectangular region in a buffer /// object from host memory -/// +/// /// @details /// - Input parameter blockingWrite indicates if the write is blocking or /// non-blocking. /// - The buffer and host 2D or 3D rectangular regions can have different /// shapes. -/// +/// /// @remarks /// _Analogues_ /// - **clEnqueueWriteBufferRect** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -4574,51 +4566,43 @@ ur_result_t UR_APICALL urEnqueueMemBufferReadRect( /// + If the combination of `bufferOrigin`, `region`, `bufferRowPitch`, and `bufferSlicePitch` results in an out-of-bounds access. /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urEnqueueMemBufferWriteRect( - ur_queue_handle_t hQueue, ///< [in] handle of the queue object - ur_mem_handle_t - hBuffer, ///< [in][bounds(bufferOrigin, region)] handle of the buffer object - bool - blockingWrite, ///< [in] indicates blocking (true), non-blocking (false) - ur_rect_offset_t bufferOrigin, ///< [in] 3D offset in the buffer - ur_rect_offset_t hostOrigin, ///< [in] 3D offset in the host region - ur_rect_region_t - region, ///< [in] 3D rectangular region descriptor: width, height, depth - size_t - bufferRowPitch, ///< [in] length of each row in bytes in the buffer object - size_t - bufferSlicePitch, ///< [in] length of each 2D slice in bytes in the buffer object being - ///< written - size_t - hostRowPitch, ///< [in] length of each row in bytes in the host memory region pointed by - ///< src - size_t - hostSlicePitch, ///< [in] length of each 2D slice in bytes in the host memory region - ///< pointed by src - void - *pSrc, ///< [in] pointer to host memory where data is to be written from - uint32_t numEventsInWaitList, ///< [in] size of the event wait list - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] points to a list of - ///< events that must be complete before this command can be executed. - ///< If nullptr, the numEventsInWaitList must be 0, indicating that this - ///< command does not wait on any event to complete. - ur_event_handle_t * - phEvent ///< [out][optional] return an event object that identifies this particular - ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent - ///< must not refer to an element of the phEventWaitList array. -) { +ur_result_t UR_APICALL +urEnqueueMemBufferWriteRect( + ur_queue_handle_t hQueue, ///< [in] handle of the queue object + ur_mem_handle_t hBuffer, ///< [in][bounds(bufferOrigin, region)] handle of the buffer object + bool blockingWrite, ///< [in] indicates blocking (true), non-blocking (false) + ur_rect_offset_t bufferOrigin, ///< [in] 3D offset in the buffer + ur_rect_offset_t hostOrigin, ///< [in] 3D offset in the host region + ur_rect_region_t region, ///< [in] 3D rectangular region descriptor: width, height, depth + size_t bufferRowPitch, ///< [in] length of each row in bytes in the buffer object + size_t bufferSlicePitch, ///< [in] length of each 2D slice in bytes in the buffer object being + ///< written + size_t hostRowPitch, ///< [in] length of each row in bytes in the host memory region pointed by + ///< src + size_t hostSlicePitch, ///< [in] length of each 2D slice in bytes in the host memory region + ///< pointed by src + void* pSrc, ///< [in] pointer to host memory where data is to be written from + uint32_t numEventsInWaitList, ///< [in] size of the event wait list + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] points to a list of + ///< events that must be complete before this command can be executed. + ///< If nullptr, the numEventsInWaitList must be 0, indicating that this + ///< command does not wait on any event to complete. + ur_event_handle_t* phEvent ///< [out][optional] return an event object that identifies this particular + ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent + ///< must not refer to an element of the phEventWaitList array. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Enqueue a command to copy from a buffer object to another -/// +/// /// @remarks /// _Analogues_ /// - **clEnqueueCopyBuffer** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -4642,26 +4626,24 @@ ur_result_t UR_APICALL urEnqueueMemBufferWriteRect( /// + If `dstOffset + size` results in an out-of-bounds access. /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urEnqueueMemBufferCopy( - ur_queue_handle_t hQueue, ///< [in] handle of the queue object - ur_mem_handle_t - hBufferSrc, ///< [in][bounds(srcOffset, size)] handle of the src buffer object - ur_mem_handle_t - hBufferDst, ///< [in][bounds(dstOffset, size)] handle of the dest buffer object - size_t srcOffset, ///< [in] offset into hBufferSrc to begin copying from - size_t dstOffset, ///< [in] offset info hBufferDst to begin copying into - size_t size, ///< [in] size in bytes of data being copied - uint32_t numEventsInWaitList, ///< [in] size of the event wait list - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before this command can be executed. - ///< If nullptr, the numEventsInWaitList must be 0, indicating that this - ///< command does not wait on any event to complete. - ur_event_handle_t * - phEvent ///< [out][optional] return an event object that identifies this particular - ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent - ///< must not refer to an element of the phEventWaitList array. -) { +ur_result_t UR_APICALL +urEnqueueMemBufferCopy( + ur_queue_handle_t hQueue, ///< [in] handle of the queue object + ur_mem_handle_t hBufferSrc, ///< [in][bounds(srcOffset, size)] handle of the src buffer object + ur_mem_handle_t hBufferDst, ///< [in][bounds(dstOffset, size)] handle of the dest buffer object + size_t srcOffset, ///< [in] offset into hBufferSrc to begin copying from + size_t dstOffset, ///< [in] offset info hBufferDst to begin copying into + size_t size, ///< [in] size in bytes of data being copied + uint32_t numEventsInWaitList, ///< [in] size of the event wait list + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before this command can be executed. + ///< If nullptr, the numEventsInWaitList must be 0, indicating that this + ///< command does not wait on any event to complete. + ur_event_handle_t* phEvent ///< [out][optional] return an event object that identifies this particular + ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent + ///< must not refer to an element of the phEventWaitList array. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -4669,11 +4651,11 @@ ur_result_t UR_APICALL urEnqueueMemBufferCopy( /////////////////////////////////////////////////////////////////////////////// /// @brief Enqueue a command to copy a 2D or 3D rectangular region from one /// buffer object to another -/// +/// /// @remarks /// _Analogues_ /// - **clEnqueueCopyBufferRect** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -4704,35 +4686,28 @@ ur_result_t UR_APICALL urEnqueueMemBufferCopy( /// + If the combination of `dstOrigin`, `region`, `dstRowPitch`, and `dstSlicePitch` results in an out-of-bounds access. /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urEnqueueMemBufferCopyRect( - ur_queue_handle_t hQueue, ///< [in] handle of the queue object - ur_mem_handle_t - hBufferSrc, ///< [in][bounds(srcOrigin, region)] handle of the source buffer object - ur_mem_handle_t - hBufferDst, ///< [in][bounds(dstOrigin, region)] handle of the dest buffer object - ur_rect_offset_t srcOrigin, ///< [in] 3D offset in the source buffer - ur_rect_offset_t dstOrigin, ///< [in] 3D offset in the destination buffer - ur_rect_region_t - region, ///< [in] source 3D rectangular region descriptor: width, height, depth - size_t - srcRowPitch, ///< [in] length of each row in bytes in the source buffer object - size_t - srcSlicePitch, ///< [in] length of each 2D slice in bytes in the source buffer object - size_t - dstRowPitch, ///< [in] length of each row in bytes in the destination buffer object - size_t - dstSlicePitch, ///< [in] length of each 2D slice in bytes in the destination buffer object - uint32_t numEventsInWaitList, ///< [in] size of the event wait list - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before this command can be executed. - ///< If nullptr, the numEventsInWaitList must be 0, indicating that this - ///< command does not wait on any event to complete. - ur_event_handle_t * - phEvent ///< [out][optional] return an event object that identifies this particular - ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent - ///< must not refer to an element of the phEventWaitList array. -) { +ur_result_t UR_APICALL +urEnqueueMemBufferCopyRect( + ur_queue_handle_t hQueue, ///< [in] handle of the queue object + ur_mem_handle_t hBufferSrc, ///< [in][bounds(srcOrigin, region)] handle of the source buffer object + ur_mem_handle_t hBufferDst, ///< [in][bounds(dstOrigin, region)] handle of the dest buffer object + ur_rect_offset_t srcOrigin, ///< [in] 3D offset in the source buffer + ur_rect_offset_t dstOrigin, ///< [in] 3D offset in the destination buffer + ur_rect_region_t region, ///< [in] source 3D rectangular region descriptor: width, height, depth + size_t srcRowPitch, ///< [in] length of each row in bytes in the source buffer object + size_t srcSlicePitch, ///< [in] length of each 2D slice in bytes in the source buffer object + size_t dstRowPitch, ///< [in] length of each row in bytes in the destination buffer object + size_t dstSlicePitch, ///< [in] length of each 2D slice in bytes in the destination buffer object + uint32_t numEventsInWaitList, ///< [in] size of the event wait list + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before this command can be executed. + ///< If nullptr, the numEventsInWaitList must be 0, indicating that this + ///< command does not wait on any event to complete. + ur_event_handle_t* phEvent ///< [out][optional] return an event object that identifies this particular + ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent + ///< must not refer to an element of the phEventWaitList array. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -4740,11 +4715,11 @@ ur_result_t UR_APICALL urEnqueueMemBufferCopyRect( /////////////////////////////////////////////////////////////////////////////// /// @brief Enqueue a command to fill a buffer object with a pattern of a given /// size -/// +/// /// @remarks /// _Analogues_ /// - **clEnqueueFillBuffer** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -4773,25 +4748,24 @@ ur_result_t UR_APICALL urEnqueueMemBufferCopyRect( /// + If `offset + size` results in an out-of-bounds access. /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urEnqueueMemBufferFill( - ur_queue_handle_t hQueue, ///< [in] handle of the queue object - ur_mem_handle_t - hBuffer, ///< [in][bounds(offset, size)] handle of the buffer object - const void *pPattern, ///< [in] pointer to the fill pattern - size_t patternSize, ///< [in] size in bytes of the pattern - size_t offset, ///< [in] offset into the buffer - size_t size, ///< [in] fill size in bytes, must be a multiple of patternSize - uint32_t numEventsInWaitList, ///< [in] size of the event wait list - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before this command can be executed. - ///< If nullptr, the numEventsInWaitList must be 0, indicating that this - ///< command does not wait on any event to complete. - ur_event_handle_t * - phEvent ///< [out][optional] return an event object that identifies this particular - ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent - ///< must not refer to an element of the phEventWaitList array. -) { +ur_result_t UR_APICALL +urEnqueueMemBufferFill( + ur_queue_handle_t hQueue, ///< [in] handle of the queue object + ur_mem_handle_t hBuffer, ///< [in][bounds(offset, size)] handle of the buffer object + const void* pPattern, ///< [in] pointer to the fill pattern + size_t patternSize, ///< [in] size in bytes of the pattern + size_t offset, ///< [in] offset into the buffer + size_t size, ///< [in] fill size in bytes, must be a multiple of patternSize + uint32_t numEventsInWaitList, ///< [in] size of the event wait list + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before this command can be executed. + ///< If nullptr, the numEventsInWaitList must be 0, indicating that this + ///< command does not wait on any event to complete. + ur_event_handle_t* phEvent ///< [out][optional] return an event object that identifies this particular + ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent + ///< must not refer to an element of the phEventWaitList array. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -4799,15 +4773,15 @@ ur_result_t UR_APICALL urEnqueueMemBufferFill( /////////////////////////////////////////////////////////////////////////////// /// @brief Enqueue a command to read from an image or image array object to host /// memory -/// +/// /// @details /// - Input parameter blockingRead indicates if the read is blocking or /// non-blocking. -/// +/// /// @remarks /// _Analogues_ /// - **clEnqueueReadImage** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -4831,30 +4805,27 @@ ur_result_t UR_APICALL urEnqueueMemBufferFill( /// + `region.width == 0 || region.height == 0 || region.depth == 0` /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urEnqueueMemImageRead( - ur_queue_handle_t hQueue, ///< [in] handle of the queue object - ur_mem_handle_t - hImage, ///< [in][bounds(origin, region)] handle of the image object - bool blockingRead, ///< [in] indicates blocking (true), non-blocking (false) - ur_rect_offset_t - origin, ///< [in] defines the (x,y,z) offset in pixels in the 1D, 2D, or 3D image - ur_rect_region_t - region, ///< [in] defines the (width, height, depth) in pixels of the 1D, 2D, or 3D - ///< image - size_t rowPitch, ///< [in] length of each row in bytes - size_t slicePitch, ///< [in] length of each 2D slice of the 3D image - void *pDst, ///< [in] pointer to host memory where image is to be read into - uint32_t numEventsInWaitList, ///< [in] size of the event wait list - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before this command can be executed. - ///< If nullptr, the numEventsInWaitList must be 0, indicating that this - ///< command does not wait on any event to complete. - ur_event_handle_t * - phEvent ///< [out][optional] return an event object that identifies this particular - ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent - ///< must not refer to an element of the phEventWaitList array. -) { +ur_result_t UR_APICALL +urEnqueueMemImageRead( + ur_queue_handle_t hQueue, ///< [in] handle of the queue object + ur_mem_handle_t hImage, ///< [in][bounds(origin, region)] handle of the image object + bool blockingRead, ///< [in] indicates blocking (true), non-blocking (false) + ur_rect_offset_t origin, ///< [in] defines the (x,y,z) offset in pixels in the 1D, 2D, or 3D image + ur_rect_region_t region, ///< [in] defines the (width, height, depth) in pixels of the 1D, 2D, or 3D + ///< image + size_t rowPitch, ///< [in] length of each row in bytes + size_t slicePitch, ///< [in] length of each 2D slice of the 3D image + void* pDst, ///< [in] pointer to host memory where image is to be read into + uint32_t numEventsInWaitList, ///< [in] size of the event wait list + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before this command can be executed. + ///< If nullptr, the numEventsInWaitList must be 0, indicating that this + ///< command does not wait on any event to complete. + ur_event_handle_t* phEvent ///< [out][optional] return an event object that identifies this particular + ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent + ///< must not refer to an element of the phEventWaitList array. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -4862,15 +4833,15 @@ ur_result_t UR_APICALL urEnqueueMemImageRead( /////////////////////////////////////////////////////////////////////////////// /// @brief Enqueue a command to write an image or image array object from host /// memory -/// +/// /// @details /// - Input parameter blockingWrite indicates if the write is blocking or /// non-blocking. -/// +/// /// @remarks /// _Analogues_ /// - **clEnqueueWriteImage** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -4894,42 +4865,38 @@ ur_result_t UR_APICALL urEnqueueMemImageRead( /// + `region.width == 0 || region.height == 0 || region.depth == 0` /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urEnqueueMemImageWrite( - ur_queue_handle_t hQueue, ///< [in] handle of the queue object - ur_mem_handle_t - hImage, ///< [in][bounds(origin, region)] handle of the image object - bool - blockingWrite, ///< [in] indicates blocking (true), non-blocking (false) - ur_rect_offset_t - origin, ///< [in] defines the (x,y,z) offset in pixels in the 1D, 2D, or 3D image - ur_rect_region_t - region, ///< [in] defines the (width, height, depth) in pixels of the 1D, 2D, or 3D - ///< image - size_t rowPitch, ///< [in] length of each row in bytes - size_t slicePitch, ///< [in] length of each 2D slice of the 3D image - void *pSrc, ///< [in] pointer to host memory where image is to be read into - uint32_t numEventsInWaitList, ///< [in] size of the event wait list - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before this command can be executed. - ///< If nullptr, the numEventsInWaitList must be 0, indicating that this - ///< command does not wait on any event to complete. - ur_event_handle_t * - phEvent ///< [out][optional] return an event object that identifies this particular - ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent - ///< must not refer to an element of the phEventWaitList array. -) { +ur_result_t UR_APICALL +urEnqueueMemImageWrite( + ur_queue_handle_t hQueue, ///< [in] handle of the queue object + ur_mem_handle_t hImage, ///< [in][bounds(origin, region)] handle of the image object + bool blockingWrite, ///< [in] indicates blocking (true), non-blocking (false) + ur_rect_offset_t origin, ///< [in] defines the (x,y,z) offset in pixels in the 1D, 2D, or 3D image + ur_rect_region_t region, ///< [in] defines the (width, height, depth) in pixels of the 1D, 2D, or 3D + ///< image + size_t rowPitch, ///< [in] length of each row in bytes + size_t slicePitch, ///< [in] length of each 2D slice of the 3D image + void* pSrc, ///< [in] pointer to host memory where image is to be read into + uint32_t numEventsInWaitList, ///< [in] size of the event wait list + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before this command can be executed. + ///< If nullptr, the numEventsInWaitList must be 0, indicating that this + ///< command does not wait on any event to complete. + ur_event_handle_t* phEvent ///< [out][optional] return an event object that identifies this particular + ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent + ///< must not refer to an element of the phEventWaitList array. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Enqueue a command to copy from an image object to another -/// +/// /// @remarks /// _Analogues_ /// - **clEnqueueCopyImage** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -4952,32 +4919,27 @@ ur_result_t UR_APICALL urEnqueueMemImageWrite( /// + `region.width == 0 || region.height == 0 || region.depth == 0` /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urEnqueueMemImageCopy( - ur_queue_handle_t hQueue, ///< [in] handle of the queue object - ur_mem_handle_t - hImageSrc, ///< [in][bounds(srcOrigin, region)] handle of the src image object - ur_mem_handle_t - hImageDst, ///< [in][bounds(dstOrigin, region)] handle of the dest image object - ur_rect_offset_t - srcOrigin, ///< [in] defines the (x,y,z) offset in pixels in the source 1D, 2D, or 3D - ///< image - ur_rect_offset_t - dstOrigin, ///< [in] defines the (x,y,z) offset in pixels in the destination 1D, 2D, - ///< or 3D image - ur_rect_region_t - region, ///< [in] defines the (width, height, depth) in pixels of the 1D, 2D, or 3D - ///< image - uint32_t numEventsInWaitList, ///< [in] size of the event wait list - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before this command can be executed. - ///< If nullptr, the numEventsInWaitList must be 0, indicating that this - ///< command does not wait on any event to complete. - ur_event_handle_t * - phEvent ///< [out][optional] return an event object that identifies this particular - ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent - ///< must not refer to an element of the phEventWaitList array. -) { +ur_result_t UR_APICALL +urEnqueueMemImageCopy( + ur_queue_handle_t hQueue, ///< [in] handle of the queue object + ur_mem_handle_t hImageSrc, ///< [in][bounds(srcOrigin, region)] handle of the src image object + ur_mem_handle_t hImageDst, ///< [in][bounds(dstOrigin, region)] handle of the dest image object + ur_rect_offset_t srcOrigin, ///< [in] defines the (x,y,z) offset in pixels in the source 1D, 2D, or 3D + ///< image + ur_rect_offset_t dstOrigin, ///< [in] defines the (x,y,z) offset in pixels in the destination 1D, 2D, + ///< or 3D image + ur_rect_region_t region, ///< [in] defines the (width, height, depth) in pixels of the 1D, 2D, or 3D + ///< image + uint32_t numEventsInWaitList, ///< [in] size of the event wait list + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before this command can be executed. + ///< If nullptr, the numEventsInWaitList must be 0, indicating that this + ///< command does not wait on any event to complete. + ur_event_handle_t* phEvent ///< [out][optional] return an event object that identifies this particular + ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent + ///< must not refer to an element of the phEventWaitList array. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -4985,18 +4947,18 @@ ur_result_t UR_APICALL urEnqueueMemImageCopy( /////////////////////////////////////////////////////////////////////////////// /// @brief Enqueue a command to map a region of the buffer object into the host /// address space and return a pointer to the mapped region -/// +/// /// @details /// - Input parameter blockingMap indicates if the map is blocking or /// non-blocking. /// - Currently, no direct support in Level Zero. Implemented as a shared /// allocation followed by copying on discrete GPU /// - TODO: add a driver function in Level Zero? -/// +/// /// @remarks /// _Analogues_ /// - **clEnqueueMapBuffer** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -5022,27 +4984,26 @@ ur_result_t UR_APICALL urEnqueueMemImageCopy( /// + If `offset + size` results in an out-of-bounds access. /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urEnqueueMemBufferMap( - ur_queue_handle_t hQueue, ///< [in] handle of the queue object - ur_mem_handle_t - hBuffer, ///< [in][bounds(offset, size)] handle of the buffer object - bool blockingMap, ///< [in] indicates blocking (true), non-blocking (false) - ur_map_flags_t mapFlags, ///< [in] flags for read, write, readwrite mapping - size_t offset, ///< [in] offset in bytes of the buffer region being mapped - size_t size, ///< [in] size in bytes of the buffer region being mapped - uint32_t numEventsInWaitList, ///< [in] size of the event wait list - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before this command can be executed. - ///< If nullptr, the numEventsInWaitList must be 0, indicating that this - ///< command does not wait on any event to complete. - ur_event_handle_t * - phEvent, ///< [out][optional] return an event object that identifies this particular - ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent - ///< must not refer to an element of the phEventWaitList array. - void **ppRetMap ///< [out] return mapped pointer. TODO: move it before - ///< numEventsInWaitList? -) { +ur_result_t UR_APICALL +urEnqueueMemBufferMap( + ur_queue_handle_t hQueue, ///< [in] handle of the queue object + ur_mem_handle_t hBuffer, ///< [in][bounds(offset, size)] handle of the buffer object + bool blockingMap, ///< [in] indicates blocking (true), non-blocking (false) + ur_map_flags_t mapFlags, ///< [in] flags for read, write, readwrite mapping + size_t offset, ///< [in] offset in bytes of the buffer region being mapped + size_t size, ///< [in] size in bytes of the buffer region being mapped + uint32_t numEventsInWaitList, ///< [in] size of the event wait list + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before this command can be executed. + ///< If nullptr, the numEventsInWaitList must be 0, indicating that this + ///< command does not wait on any event to complete. + ur_event_handle_t* phEvent, ///< [out][optional] return an event object that identifies this particular + ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent + ///< must not refer to an element of the phEventWaitList array. + void** ppRetMap ///< [out] return mapped pointer. TODO: move it before + ///< numEventsInWaitList? + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -5050,11 +5011,11 @@ ur_result_t UR_APICALL urEnqueueMemBufferMap( /////////////////////////////////////////////////////////////////////////////// /// @brief Enqueue a command to unmap a previously mapped region of a memory /// object -/// +/// /// @remarks /// _Analogues_ /// - **clEnqueueUnmapMemObject** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -5076,29 +5037,28 @@ ur_result_t UR_APICALL urEnqueueMemBufferMap( /// - ::UR_RESULT_ERROR_INVALID_MEM_OBJECT /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urEnqueueMemUnmap( - ur_queue_handle_t hQueue, ///< [in] handle of the queue object - ur_mem_handle_t - hMem, ///< [in] handle of the memory (buffer or image) object - void *pMappedPtr, ///< [in] mapped host address - uint32_t numEventsInWaitList, ///< [in] size of the event wait list - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before this command can be executed. - ///< If nullptr, the numEventsInWaitList must be 0, indicating that this - ///< command does not wait on any event to complete. - ur_event_handle_t * - phEvent ///< [out][optional] return an event object that identifies this particular - ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent - ///< must not refer to an element of the phEventWaitList array. -) { +ur_result_t UR_APICALL +urEnqueueMemUnmap( + ur_queue_handle_t hQueue, ///< [in] handle of the queue object + ur_mem_handle_t hMem, ///< [in] handle of the memory (buffer or image) object + void* pMappedPtr, ///< [in] mapped host address + uint32_t numEventsInWaitList, ///< [in] size of the event wait list + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before this command can be executed. + ///< If nullptr, the numEventsInWaitList must be 0, indicating that this + ///< command does not wait on any event to complete. + ur_event_handle_t* phEvent ///< [out][optional] return an event object that identifies this particular + ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent + ///< must not refer to an element of the phEventWaitList array. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Enqueue a command to fill USM memory. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -5125,34 +5085,31 @@ ur_result_t UR_APICALL urEnqueueMemUnmap( /// - ::UR_RESULT_ERROR_INVALID_MEM_OBJECT /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urEnqueueUSMFill( - ur_queue_handle_t hQueue, ///< [in] handle of the queue object - void *pMem, ///< [in][bounds(0, size)] pointer to USM memory object - size_t - patternSize, ///< [in] the size in bytes of the pattern. Must be a power of 2 and less - ///< than or equal to width. - const void - *pPattern, ///< [in] pointer with the bytes of the pattern to set. - size_t - size, ///< [in] size in bytes to be set. Must be a multiple of patternSize. - uint32_t numEventsInWaitList, ///< [in] size of the event wait list - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before this command can be executed. - ///< If nullptr, the numEventsInWaitList must be 0, indicating that this - ///< command does not wait on any event to complete. - ur_event_handle_t * - phEvent ///< [out][optional] return an event object that identifies this particular - ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent - ///< must not refer to an element of the phEventWaitList array. -) { +ur_result_t UR_APICALL +urEnqueueUSMFill( + ur_queue_handle_t hQueue, ///< [in] handle of the queue object + void* pMem, ///< [in][bounds(0, size)] pointer to USM memory object + size_t patternSize, ///< [in] the size in bytes of the pattern. Must be a power of 2 and less + ///< than or equal to width. + const void* pPattern, ///< [in] pointer with the bytes of the pattern to set. + size_t size, ///< [in] size in bytes to be set. Must be a multiple of patternSize. + uint32_t numEventsInWaitList, ///< [in] size of the event wait list + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before this command can be executed. + ///< If nullptr, the numEventsInWaitList must be 0, indicating that this + ///< command does not wait on any event to complete. + ur_event_handle_t* phEvent ///< [out][optional] return an event object that identifies this particular + ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent + ///< must not refer to an element of the phEventWaitList array. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Enqueue a command to copy USM memory -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -5177,37 +5134,35 @@ ur_result_t UR_APICALL urEnqueueUSMFill( /// - ::UR_RESULT_ERROR_INVALID_MEM_OBJECT /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urEnqueueUSMMemcpy( - ur_queue_handle_t hQueue, ///< [in] handle of the queue object - bool blocking, ///< [in] blocking or non-blocking copy - void * - pDst, ///< [in][bounds(0, size)] pointer to the destination USM memory object - const void * - pSrc, ///< [in][bounds(0, size)] pointer to the source USM memory object - size_t size, ///< [in] size in bytes to be copied - uint32_t numEventsInWaitList, ///< [in] size of the event wait list - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before this command can be executed. - ///< If nullptr, the numEventsInWaitList must be 0, indicating that this - ///< command does not wait on any event to complete. - ur_event_handle_t * - phEvent ///< [out][optional] return an event object that identifies this particular - ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent - ///< must not refer to an element of the phEventWaitList array. -) { +ur_result_t UR_APICALL +urEnqueueUSMMemcpy( + ur_queue_handle_t hQueue, ///< [in] handle of the queue object + bool blocking, ///< [in] blocking or non-blocking copy + void* pDst, ///< [in][bounds(0, size)] pointer to the destination USM memory object + const void* pSrc, ///< [in][bounds(0, size)] pointer to the source USM memory object + size_t size, ///< [in] size in bytes to be copied + uint32_t numEventsInWaitList, ///< [in] size of the event wait list + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before this command can be executed. + ///< If nullptr, the numEventsInWaitList must be 0, indicating that this + ///< command does not wait on any event to complete. + ur_event_handle_t* phEvent ///< [out][optional] return an event object that identifies this particular + ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent + ///< must not refer to an element of the phEventWaitList array. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Enqueue a command to prefetch USM memory -/// +/// /// @details /// - Prefetching may not be supported for all devices or allocation types. /// If memory prefetching is not supported, the prefetch hint will be /// ignored. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -5233,35 +5188,34 @@ ur_result_t UR_APICALL urEnqueueUSMMemcpy( /// - ::UR_RESULT_ERROR_INVALID_MEM_OBJECT /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urEnqueueUSMPrefetch( - ur_queue_handle_t hQueue, ///< [in] handle of the queue object - const void - *pMem, ///< [in][bounds(0, size)] pointer to the USM memory object - size_t size, ///< [in] size in bytes to be fetched - ur_usm_migration_flags_t flags, ///< [in] USM prefetch flags - uint32_t numEventsInWaitList, ///< [in] size of the event wait list - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before this command can be executed. - ///< If nullptr, the numEventsInWaitList must be 0, indicating that this - ///< command does not wait on any event to complete. - ur_event_handle_t * - phEvent ///< [out][optional] return an event object that identifies this particular - ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent - ///< must not refer to an element of the phEventWaitList array. -) { +ur_result_t UR_APICALL +urEnqueueUSMPrefetch( + ur_queue_handle_t hQueue, ///< [in] handle of the queue object + const void* pMem, ///< [in][bounds(0, size)] pointer to the USM memory object + size_t size, ///< [in] size in bytes to be fetched + ur_usm_migration_flags_t flags, ///< [in] USM prefetch flags + uint32_t numEventsInWaitList, ///< [in] size of the event wait list + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before this command can be executed. + ///< If nullptr, the numEventsInWaitList must be 0, indicating that this + ///< command does not wait on any event to complete. + ur_event_handle_t* phEvent ///< [out][optional] return an event object that identifies this particular + ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent + ///< must not refer to an element of the phEventWaitList array. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Enqueue a command to set USM memory advice -/// +/// /// @details /// - Not all memory advice hints may be supported for all devices or /// allocation types. If a memory advice hint is not supported, it will be /// ignored. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -5281,23 +5235,23 @@ ur_result_t UR_APICALL urEnqueueUSMPrefetch( /// - ::UR_RESULT_ERROR_INVALID_MEM_OBJECT /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urEnqueueUSMAdvise( - ur_queue_handle_t hQueue, ///< [in] handle of the queue object - const void - *pMem, ///< [in][bounds(0, size)] pointer to the USM memory object - size_t size, ///< [in] size in bytes to be advised - ur_usm_advice_flags_t advice, ///< [in] USM memory advice - ur_event_handle_t * - phEvent ///< [out][optional] return an event object that identifies this particular - ///< command instance. -) { +ur_result_t UR_APICALL +urEnqueueUSMAdvise( + ur_queue_handle_t hQueue, ///< [in] handle of the queue object + const void* pMem, ///< [in][bounds(0, size)] pointer to the USM memory object + size_t size, ///< [in] size in bytes to be advised + ur_usm_advice_flags_t advice, ///< [in] USM memory advice + ur_event_handle_t* phEvent ///< [out][optional] return an event object that identifies this particular + ///< command instance. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Enqueue a command to fill 2D USM memory. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -5328,38 +5282,33 @@ ur_result_t UR_APICALL urEnqueueUSMAdvise( /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES /// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE -ur_result_t UR_APICALL urEnqueueUSMFill2D( - ur_queue_handle_t hQueue, ///< [in] handle of the queue to submit to. - void * - pMem, ///< [in][bounds(0, pitch * height)] pointer to memory to be filled. - size_t - pitch, ///< [in] the total width of the destination memory including padding. - size_t - patternSize, ///< [in] the size in bytes of the pattern. Must be a power of 2 and less - ///< than or equal to width. - const void - *pPattern, ///< [in] pointer with the bytes of the pattern to set. - size_t - width, ///< [in] the width in bytes of each row to fill. Must be a multiple of - ///< patternSize. - size_t height, ///< [in] the height of the columns to fill. - uint32_t numEventsInWaitList, ///< [in] size of the event wait list - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before the kernel execution. - ///< If nullptr, the numEventsInWaitList must be 0, indicating that no wait event. - ur_event_handle_t * - phEvent ///< [out][optional] return an event object that identifies this particular - ///< kernel execution instance. If phEventWaitList and phEvent are not - ///< NULL, phEvent must not refer to an element of the phEventWaitList array. -) { +ur_result_t UR_APICALL +urEnqueueUSMFill2D( + ur_queue_handle_t hQueue, ///< [in] handle of the queue to submit to. + void* pMem, ///< [in][bounds(0, pitch * height)] pointer to memory to be filled. + size_t pitch, ///< [in] the total width of the destination memory including padding. + size_t patternSize, ///< [in] the size in bytes of the pattern. Must be a power of 2 and less + ///< than or equal to width. + const void* pPattern, ///< [in] pointer with the bytes of the pattern to set. + size_t width, ///< [in] the width in bytes of each row to fill. Must be a multiple of + ///< patternSize. + size_t height, ///< [in] the height of the columns to fill. + uint32_t numEventsInWaitList, ///< [in] size of the event wait list + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before the kernel execution. + ///< If nullptr, the numEventsInWaitList must be 0, indicating that no wait event. + ur_event_handle_t* phEvent ///< [out][optional] return an event object that identifies this particular + ///< kernel execution instance. If phEventWaitList and phEvent are not + ///< NULL, phEvent must not refer to an element of the phEventWaitList array. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Enqueue a command to copy 2D USM memory. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -5388,30 +5337,26 @@ ur_result_t UR_APICALL urEnqueueUSMFill2D( /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES /// - ::UR_RESULT_ERROR_UNSUPPORTED_FEATURE -ur_result_t UR_APICALL urEnqueueUSMMemcpy2D( - ur_queue_handle_t hQueue, ///< [in] handle of the queue to submit to. - bool blocking, ///< [in] indicates if this operation should block the host. - void * - pDst, ///< [in][bounds(0, dstPitch * height)] pointer to memory where data will - ///< be copied. - size_t - dstPitch, ///< [in] the total width of the source memory including padding. - const void * - pSrc, ///< [in][bounds(0, srcPitch * height)] pointer to memory to be copied. - size_t - srcPitch, ///< [in] the total width of the source memory including padding. - size_t width, ///< [in] the width in bytes of each row to be copied. - size_t height, ///< [in] the height of columns to be copied. - uint32_t numEventsInWaitList, ///< [in] size of the event wait list - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before the kernel execution. - ///< If nullptr, the numEventsInWaitList must be 0, indicating that no wait event. - ur_event_handle_t * - phEvent ///< [out][optional] return an event object that identifies this particular - ///< kernel execution instance. If phEventWaitList and phEvent are not - ///< NULL, phEvent must not refer to an element of the phEventWaitList array. -) { +ur_result_t UR_APICALL +urEnqueueUSMMemcpy2D( + ur_queue_handle_t hQueue, ///< [in] handle of the queue to submit to. + bool blocking, ///< [in] indicates if this operation should block the host. + void* pDst, ///< [in][bounds(0, dstPitch * height)] pointer to memory where data will + ///< be copied. + size_t dstPitch, ///< [in] the total width of the source memory including padding. + const void* pSrc, ///< [in][bounds(0, srcPitch * height)] pointer to memory to be copied. + size_t srcPitch, ///< [in] the total width of the source memory including padding. + size_t width, ///< [in] the width in bytes of each row to be copied. + size_t height, ///< [in] the height of columns to be copied. + uint32_t numEventsInWaitList, ///< [in] size of the event wait list + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before the kernel execution. + ///< If nullptr, the numEventsInWaitList must be 0, indicating that no wait event. + ur_event_handle_t* phEvent ///< [out][optional] return an event object that identifies this particular + ///< kernel execution instance. If phEventWaitList and phEvent are not + ///< NULL, phEvent must not refer to an element of the phEventWaitList array. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -5419,7 +5364,7 @@ ur_result_t UR_APICALL urEnqueueUSMMemcpy2D( /////////////////////////////////////////////////////////////////////////////// /// @brief Enqueue a command to write data from the host to device global /// variable. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -5437,27 +5382,24 @@ ur_result_t UR_APICALL urEnqueueUSMMemcpy2D( /// + If event objects in phEventWaitList are not valid events. /// - ::UR_RESULT_ERROR_IN_EVENT_LIST_EXEC_STATUS /// + An event in `phEventWaitList` has ::UR_EVENT_STATUS_ERROR. -ur_result_t UR_APICALL urEnqueueDeviceGlobalVariableWrite( - ur_queue_handle_t hQueue, ///< [in] handle of the queue to submit to. - ur_program_handle_t - hProgram, ///< [in] handle of the program containing the device global variable. - const char - *name, ///< [in] the unique identifier for the device global variable. - bool blockingWrite, ///< [in] indicates if this operation should block. - size_t count, ///< [in] the number of bytes to copy. - size_t - offset, ///< [in] the byte offset into the device global variable to start copying. - const void *pSrc, ///< [in] pointer to where the data must be copied from. - uint32_t numEventsInWaitList, ///< [in] size of the event wait list. - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before the kernel execution. - ///< If nullptr, the numEventsInWaitList must be 0, indicating that no wait event. - ur_event_handle_t * - phEvent ///< [out][optional] return an event object that identifies this particular - ///< kernel execution instance. If phEventWaitList and phEvent are not - ///< NULL, phEvent must not refer to an element of the phEventWaitList array. -) { +ur_result_t UR_APICALL +urEnqueueDeviceGlobalVariableWrite( + ur_queue_handle_t hQueue, ///< [in] handle of the queue to submit to. + ur_program_handle_t hProgram, ///< [in] handle of the program containing the device global variable. + const char* name, ///< [in] the unique identifier for the device global variable. + bool blockingWrite, ///< [in] indicates if this operation should block. + size_t count, ///< [in] the number of bytes to copy. + size_t offset, ///< [in] the byte offset into the device global variable to start copying. + const void* pSrc, ///< [in] pointer to where the data must be copied from. + uint32_t numEventsInWaitList, ///< [in] size of the event wait list. + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before the kernel execution. + ///< If nullptr, the numEventsInWaitList must be 0, indicating that no wait event. + ur_event_handle_t* phEvent ///< [out][optional] return an event object that identifies this particular + ///< kernel execution instance. If phEventWaitList and phEvent are not + ///< NULL, phEvent must not refer to an element of the phEventWaitList array. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -5465,7 +5407,7 @@ ur_result_t UR_APICALL urEnqueueDeviceGlobalVariableWrite( /////////////////////////////////////////////////////////////////////////////// /// @brief Enqueue a command to read data from a device global variable to the /// host. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -5483,34 +5425,31 @@ ur_result_t UR_APICALL urEnqueueDeviceGlobalVariableWrite( /// + If event objects in phEventWaitList are not valid events. /// - ::UR_RESULT_ERROR_IN_EVENT_LIST_EXEC_STATUS /// + An event in `phEventWaitList` has ::UR_EVENT_STATUS_ERROR. -ur_result_t UR_APICALL urEnqueueDeviceGlobalVariableRead( - ur_queue_handle_t hQueue, ///< [in] handle of the queue to submit to. - ur_program_handle_t - hProgram, ///< [in] handle of the program containing the device global variable. - const char - *name, ///< [in] the unique identifier for the device global variable. - bool blockingRead, ///< [in] indicates if this operation should block. - size_t count, ///< [in] the number of bytes to copy. - size_t - offset, ///< [in] the byte offset into the device global variable to start copying. - void *pDst, ///< [in] pointer to where the data must be copied to. - uint32_t numEventsInWaitList, ///< [in] size of the event wait list. - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before the kernel execution. - ///< If nullptr, the numEventsInWaitList must be 0, indicating that no wait event. - ur_event_handle_t * - phEvent ///< [out][optional] return an event object that identifies this particular - ///< kernel execution instance. If phEventWaitList and phEvent are not - ///< NULL, phEvent must not refer to an element of the phEventWaitList array. -) { +ur_result_t UR_APICALL +urEnqueueDeviceGlobalVariableRead( + ur_queue_handle_t hQueue, ///< [in] handle of the queue to submit to. + ur_program_handle_t hProgram, ///< [in] handle of the program containing the device global variable. + const char* name, ///< [in] the unique identifier for the device global variable. + bool blockingRead, ///< [in] indicates if this operation should block. + size_t count, ///< [in] the number of bytes to copy. + size_t offset, ///< [in] the byte offset into the device global variable to start copying. + void* pDst, ///< [in] pointer to where the data must be copied to. + uint32_t numEventsInWaitList, ///< [in] size of the event wait list. + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before the kernel execution. + ///< If nullptr, the numEventsInWaitList must be 0, indicating that no wait event. + ur_event_handle_t* phEvent ///< [out][optional] return an event object that identifies this particular + ///< kernel execution instance. If phEventWaitList and phEvent are not + ///< NULL, phEvent must not refer to an element of the phEventWaitList array. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Enqueue a command to read from a pipe to the host. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -5528,39 +5467,34 @@ ur_result_t UR_APICALL urEnqueueDeviceGlobalVariableRead( /// + If event objects in phEventWaitList are not valid events. /// - ::UR_RESULT_ERROR_IN_EVENT_LIST_EXEC_STATUS /// + An event in `phEventWaitList` has ::UR_EVENT_STATUS_ERROR. -ur_result_t UR_APICALL urEnqueueReadHostPipe( - ur_queue_handle_t - hQueue, ///< [in] a valid host command-queue in which the read command - ///< will be queued. hQueue and hProgram must be created with the same - ///< UR context. - ur_program_handle_t - hProgram, ///< [in] a program object with a successfully built executable. - const char * - pipe_symbol, ///< [in] the name of the program scope pipe global variable. - bool - blocking, ///< [in] indicate if the read operation is blocking or non-blocking. - void * - pDst, ///< [in] a pointer to buffer in host memory that will hold resulting data - ///< from pipe. - size_t size, ///< [in] size of the memory region to read, in bytes. - uint32_t numEventsInWaitList, ///< [in] number of events in the wait list. - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before the host pipe read. - ///< If nullptr, the numEventsInWaitList must be 0, indicating that no wait event. - ur_event_handle_t * - phEvent ///< [out][optional] returns an event object that identifies this read command - ///< and can be used to query or queue a wait for this command to complete. - ///< If phEventWaitList and phEvent are not NULL, phEvent must not refer to - ///< an element of the phEventWaitList array. -) { +ur_result_t UR_APICALL +urEnqueueReadHostPipe( + ur_queue_handle_t hQueue, ///< [in] a valid host command-queue in which the read command + ///< will be queued. hQueue and hProgram must be created with the same + ///< UR context. + ur_program_handle_t hProgram, ///< [in] a program object with a successfully built executable. + const char* pipe_symbol, ///< [in] the name of the program scope pipe global variable. + bool blocking, ///< [in] indicate if the read operation is blocking or non-blocking. + void* pDst, ///< [in] a pointer to buffer in host memory that will hold resulting data + ///< from pipe. + size_t size, ///< [in] size of the memory region to read, in bytes. + uint32_t numEventsInWaitList, ///< [in] number of events in the wait list. + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before the host pipe read. + ///< If nullptr, the numEventsInWaitList must be 0, indicating that no wait event. + ur_event_handle_t* phEvent ///< [out][optional] returns an event object that identifies this read command + ///< and can be used to query or queue a wait for this command to complete. + ///< If phEventWaitList and phEvent are not NULL, phEvent must not refer to + ///< an element of the phEventWaitList array. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Enqueue a command to write data from the host to a pipe. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -5578,40 +5512,35 @@ ur_result_t UR_APICALL urEnqueueReadHostPipe( /// + If event objects in phEventWaitList are not valid events. /// - ::UR_RESULT_ERROR_IN_EVENT_LIST_EXEC_STATUS /// + An event in `phEventWaitList` has ::UR_EVENT_STATUS_ERROR. -ur_result_t UR_APICALL urEnqueueWriteHostPipe( - ur_queue_handle_t - hQueue, ///< [in] a valid host command-queue in which the write command - ///< will be queued. hQueue and hProgram must be created with the same - ///< UR context. - ur_program_handle_t - hProgram, ///< [in] a program object with a successfully built executable. - const char * - pipe_symbol, ///< [in] the name of the program scope pipe global variable. - bool - blocking, ///< [in] indicate if the read and write operations are blocking or - ///< non-blocking. - void * - pSrc, ///< [in] a pointer to buffer in host memory that holds data to be written - ///< to the host pipe. - size_t size, ///< [in] size of the memory region to read or write, in bytes. - uint32_t numEventsInWaitList, ///< [in] number of events in the wait list. - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before the host pipe write. - ///< If nullptr, the numEventsInWaitList must be 0, indicating that no wait event. - ur_event_handle_t * - phEvent ///< [out][optional] returns an event object that identifies this write command - ///< and can be used to query or queue a wait for this command to complete. - ///< If phEventWaitList and phEvent are not NULL, phEvent must not refer to - ///< an element of the phEventWaitList array. -) { +ur_result_t UR_APICALL +urEnqueueWriteHostPipe( + ur_queue_handle_t hQueue, ///< [in] a valid host command-queue in which the write command + ///< will be queued. hQueue and hProgram must be created with the same + ///< UR context. + ur_program_handle_t hProgram, ///< [in] a program object with a successfully built executable. + const char* pipe_symbol, ///< [in] the name of the program scope pipe global variable. + bool blocking, ///< [in] indicate if the read and write operations are blocking or + ///< non-blocking. + void* pSrc, ///< [in] a pointer to buffer in host memory that holds data to be written + ///< to the host pipe. + size_t size, ///< [in] size of the memory region to read or write, in bytes. + uint32_t numEventsInWaitList, ///< [in] number of events in the wait list. + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before the host pipe write. + ///< If nullptr, the numEventsInWaitList must be 0, indicating that no wait event. + ur_event_handle_t* phEvent ///< [out][optional] returns an event object that identifies this write command + ///< and can be used to query or queue a wait for this command to complete. + ///< If phEventWaitList and phEvent are not NULL, phEvent must not refer to + ///< an element of the phEventWaitList array. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief USM allocate pitched memory -/// +/// /// @details /// - This function must support memory pooling. /// - If pUSMDesc is not NULL and pUSMDesc->pool is not NULL the allocation @@ -5623,11 +5552,11 @@ ur_result_t UR_APICALL urEnqueueWriteHostPipe( /// allocation. /// - See also ::ur_usm_host_desc_t. /// - See also ::ur_usm_device_desc_t. -/// +/// /// @remarks /// _Analogues_ /// - **cuMemAllocPitch** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -5652,32 +5581,30 @@ ur_result_t UR_APICALL urEnqueueWriteHostPipe( /// + If `UR_DEVICE_INFO_USM_SINGLE_SHARED_SUPPORT` and `UR_DEVICE_INFO_USM_CROSS_SHARED_SUPPORT` are both false. /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urUSMPitchedAllocExp( - ur_context_handle_t hContext, ///< [in] handle of the context object - ur_device_handle_t hDevice, ///< [in] handle of the device object - const ur_usm_desc_t * - pUSMDesc, ///< [in][optional] Pointer to USM memory allocation descriptor. - ur_usm_pool_handle_t - pool, ///< [in][optional] Pointer to a pool created using urUSMPoolCreate - size_t - widthInBytes, ///< [in] width in bytes of the USM memory object to be allocated - size_t height, ///< [in] height of the USM memory object to be allocated - size_t - elementSizeBytes, ///< [in] size in bytes of an element in the allocation - void **ppMem, ///< [out] pointer to USM shared memory object - size_t *pResultPitch ///< [out] pitch of the allocation -) { +ur_result_t UR_APICALL +urUSMPitchedAllocExp( + ur_context_handle_t hContext, ///< [in] handle of the context object + ur_device_handle_t hDevice, ///< [in] handle of the device object + const ur_usm_desc_t* pUSMDesc, ///< [in][optional] Pointer to USM memory allocation descriptor. + ur_usm_pool_handle_t pool, ///< [in][optional] Pointer to a pool created using urUSMPoolCreate + size_t widthInBytes, ///< [in] width in bytes of the USM memory object to be allocated + size_t height, ///< [in] height of the USM memory object to be allocated + size_t elementSizeBytes, ///< [in] size in bytes of an element in the allocation + void** ppMem, ///< [out] pointer to USM shared memory object + size_t* pResultPitch ///< [out] pitch of the allocation + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Destroy bindless unsampled image handles -/// +/// /// @remarks /// _Analogues_ /// - **cuSurfObjectDestroy** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -5688,23 +5615,24 @@ ur_result_t UR_APICALL urUSMPitchedAllocExp( /// + `NULL == hDevice` /// - ::UR_RESULT_ERROR_INVALID_CONTEXT /// - ::UR_RESULT_ERROR_INVALID_VALUE -ur_result_t UR_APICALL urBindlessImagesUnsampledImageHandleDestroyExp( - ur_context_handle_t hContext, ///< [in] handle of the context object - ur_device_handle_t hDevice, ///< [in] handle of the device object - ur_exp_image_native_handle_t - hImage ///< [in][release] pointer to handle of image object to destroy -) { +ur_result_t UR_APICALL +urBindlessImagesUnsampledImageHandleDestroyExp( + ur_context_handle_t hContext, ///< [in] handle of the context object + ur_device_handle_t hDevice, ///< [in] handle of the device object + ur_exp_image_native_handle_t hImage ///< [in][release] pointer to handle of image object to destroy + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Destroy bindless sampled image handles -/// +/// /// @remarks /// _Analogues_ /// - **cuTexObjectDestroy** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -5715,24 +5643,25 @@ ur_result_t UR_APICALL urBindlessImagesUnsampledImageHandleDestroyExp( /// + `NULL == hDevice` /// - ::UR_RESULT_ERROR_INVALID_CONTEXT /// - ::UR_RESULT_ERROR_INVALID_VALUE -ur_result_t UR_APICALL urBindlessImagesSampledImageHandleDestroyExp( - ur_context_handle_t hContext, ///< [in] handle of the context object - ur_device_handle_t hDevice, ///< [in] handle of the device object - ur_exp_image_native_handle_t - hImage ///< [in][release] pointer to handle of image object to destroy -) { +ur_result_t UR_APICALL +urBindlessImagesSampledImageHandleDestroyExp( + ur_context_handle_t hContext, ///< [in] handle of the context object + ur_device_handle_t hDevice, ///< [in] handle of the device object + ur_exp_image_native_handle_t hImage ///< [in][release] pointer to handle of image object to destroy + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Allocate memory for bindless images -/// +/// /// @remarks /// _Analogues_ /// - **cuArray3DCreate** /// - **cuMipmappedArrayCreate** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -5751,26 +5680,26 @@ ur_result_t UR_APICALL urBindlessImagesSampledImageHandleDestroyExp( /// + `pImageDesc && UR_MEM_TYPE_IMAGE_CUBEMAP_EXP < pImageDesc->type` /// - ::UR_RESULT_ERROR_INVALID_IMAGE_SIZE /// - ::UR_RESULT_ERROR_INVALID_OPERATION -ur_result_t UR_APICALL urBindlessImagesImageAllocateExp( - ur_context_handle_t hContext, ///< [in] handle of the context object - ur_device_handle_t hDevice, ///< [in] handle of the device object - const ur_image_format_t - *pImageFormat, ///< [in] pointer to image format specification - const ur_image_desc_t *pImageDesc, ///< [in] pointer to image description - ur_exp_image_mem_native_handle_t - *phImageMem ///< [out] pointer to handle of image memory allocated -) { +ur_result_t UR_APICALL +urBindlessImagesImageAllocateExp( + ur_context_handle_t hContext, ///< [in] handle of the context object + ur_device_handle_t hDevice, ///< [in] handle of the device object + const ur_image_format_t* pImageFormat, ///< [in] pointer to image format specification + const ur_image_desc_t* pImageDesc, ///< [in] pointer to image description + ur_exp_image_mem_native_handle_t* phImageMem ///< [out] pointer to handle of image memory allocated + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Free memory for bindless images -/// +/// /// @remarks /// _Analogues_ /// - **cuArrayDestroy** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -5781,23 +5710,24 @@ ur_result_t UR_APICALL urBindlessImagesImageAllocateExp( /// + `NULL == hDevice` /// - ::UR_RESULT_ERROR_INVALID_CONTEXT /// - ::UR_RESULT_ERROR_INVALID_VALUE -ur_result_t UR_APICALL urBindlessImagesImageFreeExp( - ur_context_handle_t hContext, ///< [in] handle of the context object - ur_device_handle_t hDevice, ///< [in] handle of the device object - ur_exp_image_mem_native_handle_t - hImageMem ///< [in][release] handle of image memory to be freed -) { +ur_result_t UR_APICALL +urBindlessImagesImageFreeExp( + ur_context_handle_t hContext, ///< [in] handle of the context object + ur_device_handle_t hDevice, ///< [in] handle of the device object + ur_exp_image_mem_native_handle_t hImageMem ///< [in][release] handle of image memory to be freed + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Create a bindless unsampled image handle -/// +/// /// @remarks /// _Analogues_ /// - **cuSurfObjectCreate** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -5817,28 +5747,27 @@ ur_result_t UR_APICALL urBindlessImagesImageFreeExp( /// - ::UR_RESULT_ERROR_INVALID_IMAGE_SIZE /// - ::UR_RESULT_ERROR_INVALID_OPERATION /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC -ur_result_t UR_APICALL urBindlessImagesUnsampledImageCreateExp( - ur_context_handle_t hContext, ///< [in] handle of the context object - ur_device_handle_t hDevice, ///< [in] handle of the device object - ur_exp_image_mem_native_handle_t - hImageMem, ///< [in] handle to memory from which to create the image - const ur_image_format_t - *pImageFormat, ///< [in] pointer to image format specification - const ur_image_desc_t *pImageDesc, ///< [in] pointer to image description - ur_exp_image_native_handle_t - *phImage ///< [out] pointer to handle of image object created -) { +ur_result_t UR_APICALL +urBindlessImagesUnsampledImageCreateExp( + ur_context_handle_t hContext, ///< [in] handle of the context object + ur_device_handle_t hDevice, ///< [in] handle of the device object + ur_exp_image_mem_native_handle_t hImageMem, ///< [in] handle to memory from which to create the image + const ur_image_format_t* pImageFormat, ///< [in] pointer to image format specification + const ur_image_desc_t* pImageDesc, ///< [in] pointer to image description + ur_exp_image_native_handle_t* phImage ///< [out] pointer to handle of image object created + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Create a bindless sampled image handle -/// +/// /// @remarks /// _Analogues_ /// - **cuTexObjectCreate** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -5860,32 +5789,31 @@ ur_result_t UR_APICALL urBindlessImagesUnsampledImageCreateExp( /// - ::UR_RESULT_ERROR_INVALID_SAMPLER /// - ::UR_RESULT_ERROR_INVALID_OPERATION /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC -ur_result_t UR_APICALL urBindlessImagesSampledImageCreateExp( - ur_context_handle_t hContext, ///< [in] handle of the context object - ur_device_handle_t hDevice, ///< [in] handle of the device object - ur_exp_image_mem_native_handle_t - hImageMem, ///< [in] handle to memory from which to create the image - const ur_image_format_t - *pImageFormat, ///< [in] pointer to image format specification - const ur_image_desc_t *pImageDesc, ///< [in] pointer to image description - ur_sampler_handle_t hSampler, ///< [in] sampler to be used - ur_exp_image_native_handle_t - *phImage ///< [out] pointer to handle of image object created -) { +ur_result_t UR_APICALL +urBindlessImagesSampledImageCreateExp( + ur_context_handle_t hContext, ///< [in] handle of the context object + ur_device_handle_t hDevice, ///< [in] handle of the device object + ur_exp_image_mem_native_handle_t hImageMem, ///< [in] handle to memory from which to create the image + const ur_image_format_t* pImageFormat, ///< [in] pointer to image format specification + const ur_image_desc_t* pImageDesc, ///< [in] pointer to image description + ur_sampler_handle_t hSampler, ///< [in] sampler to be used + ur_exp_image_native_handle_t* phImage ///< [out] pointer to handle of image object created + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Copy image data Host to Device, Device to Host, or Device to Device -/// +/// /// @remarks /// _Analogues_ /// - **cuMemcpyHtoAAsync** /// - **cuMemcpyAtoHAsync** /// - **cuMemcpy2DAsync** /// - **cuMemcpy3DAsync** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -5910,40 +5838,36 @@ ur_result_t UR_APICALL urBindlessImagesSampledImageCreateExp( /// + `pDstImageDesc && UR_MEM_TYPE_IMAGE_CUBEMAP_EXP < pDstImageDesc->type` /// - ::UR_RESULT_ERROR_INVALID_IMAGE_SIZE /// - ::UR_RESULT_ERROR_INVALID_OPERATION -ur_result_t UR_APICALL urBindlessImagesImageCopyExp( - ur_queue_handle_t hQueue, ///< [in] handle of the queue object - const void *pSrc, ///< [in] location the data will be copied from - void *pDst, ///< [in] location the data will be copied to - const ur_image_desc_t *pSrcImageDesc, ///< [in] pointer to image description - const ur_image_desc_t *pDstImageDesc, ///< [in] pointer to image description - const ur_image_format_t - *pSrcImageFormat, ///< [in] pointer to image format specification - const ur_image_format_t - *pDstImageFormat, ///< [in] pointer to image format specification - ur_exp_image_copy_region_t * - pCopyRegion, ///< [in] Pointer to structure describing the (sub-)regions of source and - ///< destination images - ur_exp_image_copy_flags_t - imageCopyFlags, ///< [in] flags describing copy direction e.g. H2D or D2H - uint32_t numEventsInWaitList, ///< [in] size of the event wait list - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before this command can be executed. - ///< If nullptr, the numEventsInWaitList must be 0, indicating that all - ///< previously enqueued commands - ///< must be complete. - ur_event_handle_t * - phEvent ///< [out][optional] return an event object that identifies this particular - ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent - ///< must not refer to an element of the phEventWaitList array. -) { +ur_result_t UR_APICALL +urBindlessImagesImageCopyExp( + ur_queue_handle_t hQueue, ///< [in] handle of the queue object + const void* pSrc, ///< [in] location the data will be copied from + void* pDst, ///< [in] location the data will be copied to + const ur_image_desc_t* pSrcImageDesc, ///< [in] pointer to image description + const ur_image_desc_t* pDstImageDesc, ///< [in] pointer to image description + const ur_image_format_t* pSrcImageFormat, ///< [in] pointer to image format specification + const ur_image_format_t* pDstImageFormat, ///< [in] pointer to image format specification + ur_exp_image_copy_region_t* pCopyRegion, ///< [in] Pointer to structure describing the (sub-)regions of source and + ///< destination images + ur_exp_image_copy_flags_t imageCopyFlags, ///< [in] flags describing copy direction e.g. H2D or D2H + uint32_t numEventsInWaitList, ///< [in] size of the event wait list + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before this command can be executed. + ///< If nullptr, the numEventsInWaitList must be 0, indicating that all + ///< previously enqueued commands + ///< must be complete. + ur_event_handle_t* phEvent ///< [out][optional] return an event object that identifies this particular + ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent + ///< must not refer to an element of the phEventWaitList array. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Query an image memory handle for specific properties -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -5962,25 +5886,26 @@ ur_result_t UR_APICALL urBindlessImagesImageCopyExp( /// - ::UR_RESULT_ERROR_INVALID_DEVICE /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY -ur_result_t UR_APICALL urBindlessImagesImageGetInfoExp( - ur_context_handle_t hContext, ///< [in] handle of the context object - ur_exp_image_mem_native_handle_t - hImageMem, ///< [in] handle to the image memory - ur_image_info_t propName, ///< [in] queried info name - void *pPropValue, ///< [out][optional] returned query value - size_t *pPropSizeRet ///< [out][optional] returned query value size -) { +ur_result_t UR_APICALL +urBindlessImagesImageGetInfoExp( + ur_context_handle_t hContext, ///< [in] handle of the context object + ur_exp_image_mem_native_handle_t hImageMem, ///< [in] handle to the image memory + ur_image_info_t propName, ///< [in] queried info name + void* pPropValue, ///< [out][optional] returned query value + size_t* pPropSizeRet ///< [out][optional] returned query value size + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Retrieve individual image from mipmap -/// +/// /// @remarks /// _Analogues_ /// - **cuMipmappedArrayGetLevel** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -5993,26 +5918,26 @@ ur_result_t UR_APICALL urBindlessImagesImageGetInfoExp( /// + `NULL == phImageMem` /// - ::UR_RESULT_ERROR_INVALID_CONTEXT /// - ::UR_RESULT_ERROR_INVALID_VALUE -ur_result_t UR_APICALL urBindlessImagesMipmapGetLevelExp( - ur_context_handle_t hContext, ///< [in] handle of the context object - ur_device_handle_t hDevice, ///< [in] handle of the device object - ur_exp_image_mem_native_handle_t - hImageMem, ///< [in] memory handle to the mipmap image - uint32_t mipmapLevel, ///< [in] requested level of the mipmap - ur_exp_image_mem_native_handle_t - *phImageMem ///< [out] returning memory handle to the individual image -) { +ur_result_t UR_APICALL +urBindlessImagesMipmapGetLevelExp( + ur_context_handle_t hContext, ///< [in] handle of the context object + ur_device_handle_t hDevice, ///< [in] handle of the device object + ur_exp_image_mem_native_handle_t hImageMem, ///< [in] memory handle to the mipmap image + uint32_t mipmapLevel, ///< [in] requested level of the mipmap + ur_exp_image_mem_native_handle_t* phImageMem ///< [out] returning memory handle to the individual image + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Free mipmap memory for bindless images -/// +/// /// @remarks /// _Analogues_ /// - **cuMipmappedArrayDestroy** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -6023,23 +5948,24 @@ ur_result_t UR_APICALL urBindlessImagesMipmapGetLevelExp( /// + `NULL == hDevice` /// - ::UR_RESULT_ERROR_INVALID_CONTEXT /// - ::UR_RESULT_ERROR_INVALID_VALUE -ur_result_t UR_APICALL urBindlessImagesMipmapFreeExp( - ur_context_handle_t hContext, ///< [in] handle of the context object - ur_device_handle_t hDevice, ///< [in] handle of the device object - ur_exp_image_mem_native_handle_t - hMem ///< [in][release] handle of image memory to be freed -) { +ur_result_t UR_APICALL +urBindlessImagesMipmapFreeExp( + ur_context_handle_t hContext, ///< [in] handle of the context object + ur_device_handle_t hDevice, ///< [in] handle of the device object + ur_exp_image_mem_native_handle_t hMem ///< [in][release] handle of image memory to be freed + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Import external memory -/// +/// /// @remarks /// _Analogues_ /// - **cuImportExternalMemory** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -6056,24 +5982,23 @@ ur_result_t UR_APICALL urBindlessImagesMipmapFreeExp( /// - ::UR_RESULT_ERROR_INVALID_CONTEXT /// - ::UR_RESULT_ERROR_INVALID_VALUE /// - ::UR_RESULT_ERROR_INVALID_MEM_OBJECT -ur_result_t UR_APICALL urBindlessImagesImportExternalMemoryExp( - ur_context_handle_t hContext, ///< [in] handle of the context object - ur_device_handle_t hDevice, ///< [in] handle of the device object - size_t size, ///< [in] size of the external memory - ur_exp_external_mem_type_t - memHandleType, ///< [in] type of external memory handle - ur_exp_external_mem_desc_t - *pExternalMemDesc, ///< [in] the external memory descriptor - ur_exp_external_mem_handle_t - *phExternalMem ///< [out] external memory handle to the external memory -) { +ur_result_t UR_APICALL +urBindlessImagesImportExternalMemoryExp( + ur_context_handle_t hContext, ///< [in] handle of the context object + ur_device_handle_t hDevice, ///< [in] handle of the device object + size_t size, ///< [in] size of the external memory + ur_exp_external_mem_type_t memHandleType, ///< [in] type of external memory handle + ur_exp_external_mem_desc_t* pExternalMemDesc, ///< [in] the external memory descriptor + ur_exp_external_mem_handle_t* phExternalMem ///< [out] external memory handle to the external memory + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Map an external memory handle to an image memory handle -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -6094,17 +6019,16 @@ ur_result_t UR_APICALL urBindlessImagesImportExternalMemoryExp( /// - ::UR_RESULT_ERROR_INVALID_IMAGE_SIZE /// - ::UR_RESULT_ERROR_INVALID_OPERATION /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urBindlessImagesMapExternalArrayExp( - ur_context_handle_t hContext, ///< [in] handle of the context object - ur_device_handle_t hDevice, ///< [in] handle of the device object - const ur_image_format_t - *pImageFormat, ///< [in] pointer to image format specification - const ur_image_desc_t *pImageDesc, ///< [in] pointer to image description - ur_exp_external_mem_handle_t - hExternalMem, ///< [in] external memory handle to the external memory - ur_exp_image_mem_native_handle_t * - phImageMem ///< [out] image memory handle to the externally allocated memory -) { +ur_result_t UR_APICALL +urBindlessImagesMapExternalArrayExp( + ur_context_handle_t hContext, ///< [in] handle of the context object + ur_device_handle_t hDevice, ///< [in] handle of the device object + const ur_image_format_t* pImageFormat, ///< [in] pointer to image format specification + const ur_image_desc_t* pImageDesc, ///< [in] pointer to image description + ur_exp_external_mem_handle_t hExternalMem, ///< [in] external memory handle to the external memory + ur_exp_image_mem_native_handle_t* phImageMem ///< [out] image memory handle to the externally allocated memory + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -6112,7 +6036,7 @@ ur_result_t UR_APICALL urBindlessImagesMapExternalArrayExp( /////////////////////////////////////////////////////////////////////////////// /// @brief Map an external memory handle to a device memory region described by /// void* -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -6129,26 +6053,27 @@ ur_result_t UR_APICALL urBindlessImagesMapExternalArrayExp( /// - ::UR_RESULT_ERROR_INVALID_IMAGE_SIZE /// - ::UR_RESULT_ERROR_INVALID_OPERATION /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urBindlessImagesMapExternalLinearMemoryExp( - ur_context_handle_t hContext, ///< [in] handle of the context object - ur_device_handle_t hDevice, ///< [in] handle of the device object - uint64_t offset, ///< [in] offset into memory region to map - uint64_t size, ///< [in] size of memory region to map - ur_exp_external_mem_handle_t - hExternalMem, ///< [in] external memory handle to the external memory - void **ppRetMem ///< [out] pointer of the externally allocated memory -) { +ur_result_t UR_APICALL +urBindlessImagesMapExternalLinearMemoryExp( + ur_context_handle_t hContext, ///< [in] handle of the context object + ur_device_handle_t hDevice, ///< [in] handle of the device object + uint64_t offset, ///< [in] offset into memory region to map + uint64_t size, ///< [in] size of memory region to map + ur_exp_external_mem_handle_t hExternalMem, ///< [in] external memory handle to the external memory + void** ppRetMem ///< [out] pointer of the externally allocated memory + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Release external memory -/// +/// /// @remarks /// _Analogues_ /// - **cuDestroyExternalMemory** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -6160,23 +6085,24 @@ ur_result_t UR_APICALL urBindlessImagesMapExternalLinearMemoryExp( /// + `NULL == hExternalMem` /// - ::UR_RESULT_ERROR_INVALID_CONTEXT /// - ::UR_RESULT_ERROR_INVALID_VALUE -ur_result_t UR_APICALL urBindlessImagesReleaseExternalMemoryExp( - ur_context_handle_t hContext, ///< [in] handle of the context object - ur_device_handle_t hDevice, ///< [in] handle of the device object - ur_exp_external_mem_handle_t - hExternalMem ///< [in][release] handle of external memory to be destroyed -) { +ur_result_t UR_APICALL +urBindlessImagesReleaseExternalMemoryExp( + ur_context_handle_t hContext, ///< [in] handle of the context object + ur_device_handle_t hDevice, ///< [in] handle of the device object + ur_exp_external_mem_handle_t hExternalMem ///< [in][release] handle of external memory to be destroyed + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Import an external semaphore -/// +/// /// @remarks /// _Analogues_ /// - **cuImportExternalSemaphore** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -6192,27 +6118,26 @@ ur_result_t UR_APICALL urBindlessImagesReleaseExternalMemoryExp( /// + `NULL == phExternalSemaphore` /// - ::UR_RESULT_ERROR_INVALID_CONTEXT /// - ::UR_RESULT_ERROR_INVALID_VALUE -ur_result_t UR_APICALL urBindlessImagesImportExternalSemaphoreExp( - ur_context_handle_t hContext, ///< [in] handle of the context object - ur_device_handle_t hDevice, ///< [in] handle of the device object - ur_exp_external_semaphore_type_t - semHandleType, ///< [in] type of external memory handle - ur_exp_external_semaphore_desc_t - *pExternalSemaphoreDesc, ///< [in] the external semaphore descriptor - ur_exp_external_semaphore_handle_t * - phExternalSemaphore ///< [out] external semaphore handle to the external semaphore -) { +ur_result_t UR_APICALL +urBindlessImagesImportExternalSemaphoreExp( + ur_context_handle_t hContext, ///< [in] handle of the context object + ur_device_handle_t hDevice, ///< [in] handle of the device object + ur_exp_external_semaphore_type_t semHandleType, ///< [in] type of external memory handle + ur_exp_external_semaphore_desc_t* pExternalSemaphoreDesc, ///< [in] the external semaphore descriptor + ur_exp_external_semaphore_handle_t* phExternalSemaphore ///< [out] external semaphore handle to the external semaphore + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Release the external semaphore -/// +/// /// @remarks /// _Analogues_ /// - **cuDestroyExternalSemaphore** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -6224,23 +6149,24 @@ ur_result_t UR_APICALL urBindlessImagesImportExternalSemaphoreExp( /// + `NULL == hExternalSemaphore` /// - ::UR_RESULT_ERROR_INVALID_CONTEXT /// - ::UR_RESULT_ERROR_INVALID_VALUE -ur_result_t UR_APICALL urBindlessImagesReleaseExternalSemaphoreExp( - ur_context_handle_t hContext, ///< [in] handle of the context object - ur_device_handle_t hDevice, ///< [in] handle of the device object - ur_exp_external_semaphore_handle_t - hExternalSemaphore ///< [in][release] handle of external semaphore to be destroyed -) { +ur_result_t UR_APICALL +urBindlessImagesReleaseExternalSemaphoreExp( + ur_context_handle_t hContext, ///< [in] handle of the context object + ur_device_handle_t hDevice, ///< [in] handle of the device object + ur_exp_external_semaphore_handle_t hExternalSemaphore ///< [in][release] handle of external semaphore to be destroyed + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Instruct the queue with a non-blocking wait on an external semaphore -/// +/// /// @remarks /// _Analogues_ /// - **cuWaitExternalSemaphoresAsync** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -6251,28 +6177,26 @@ ur_result_t UR_APICALL urBindlessImagesReleaseExternalSemaphoreExp( /// + `NULL == hSemaphore` /// - ::UR_RESULT_ERROR_INVALID_QUEUE /// - ::UR_RESULT_ERROR_INVALID_VALUE -ur_result_t UR_APICALL urBindlessImagesWaitExternalSemaphoreExp( - ur_queue_handle_t hQueue, ///< [in] handle of the queue object - ur_exp_external_semaphore_handle_t - hSemaphore, ///< [in] external semaphore handle - bool - hasWaitValue, ///< [in] indicates whether the samephore is capable and should wait on a - ///< certain value. - ///< Otherwise the semaphore is treated like a binary state, and - ///< `waitValue` is ignored. - uint64_t waitValue, ///< [in] the value to be waited on - uint32_t numEventsInWaitList, ///< [in] size of the event wait list - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before this command can be executed. - ///< If nullptr, the numEventsInWaitList must be 0, indicating that all - ///< previously enqueued commands - ///< must be complete. - ur_event_handle_t * - phEvent ///< [out][optional] return an event object that identifies this particular - ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent - ///< must not refer to an element of the phEventWaitList array. -) { +ur_result_t UR_APICALL +urBindlessImagesWaitExternalSemaphoreExp( + ur_queue_handle_t hQueue, ///< [in] handle of the queue object + ur_exp_external_semaphore_handle_t hSemaphore, ///< [in] external semaphore handle + bool hasWaitValue, ///< [in] indicates whether the samephore is capable and should wait on a + ///< certain value. + ///< Otherwise the semaphore is treated like a binary state, and + ///< `waitValue` is ignored. + uint64_t waitValue, ///< [in] the value to be waited on + uint32_t numEventsInWaitList, ///< [in] size of the event wait list + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before this command can be executed. + ///< If nullptr, the numEventsInWaitList must be 0, indicating that all + ///< previously enqueued commands + ///< must be complete. + ur_event_handle_t* phEvent ///< [out][optional] return an event object that identifies this particular + ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent + ///< must not refer to an element of the phEventWaitList array. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -6280,11 +6204,11 @@ ur_result_t UR_APICALL urBindlessImagesWaitExternalSemaphoreExp( /////////////////////////////////////////////////////////////////////////////// /// @brief Instruct the queue to signal the external semaphore handle once all /// previous commands have completed execution -/// +/// /// @remarks /// _Analogues_ /// - **cuSignalExternalSemaphoresAsync** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -6295,38 +6219,36 @@ ur_result_t UR_APICALL urBindlessImagesWaitExternalSemaphoreExp( /// + `NULL == hSemaphore` /// - ::UR_RESULT_ERROR_INVALID_QUEUE /// - ::UR_RESULT_ERROR_INVALID_VALUE -ur_result_t UR_APICALL urBindlessImagesSignalExternalSemaphoreExp( - ur_queue_handle_t hQueue, ///< [in] handle of the queue object - ur_exp_external_semaphore_handle_t - hSemaphore, ///< [in] external semaphore handle - bool - hasSignalValue, ///< [in] indicates whether the samephore is capable and should signal on a - ///< certain value. - ///< Otherwise the semaphore is treated like a binary state, and - ///< `signalValue` is ignored. - uint64_t signalValue, ///< [in] the value to be signalled - uint32_t numEventsInWaitList, ///< [in] size of the event wait list - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before this command can be executed. - ///< If nullptr, the numEventsInWaitList must be 0, indicating that all - ///< previously enqueued commands - ///< must be complete. - ur_event_handle_t * - phEvent ///< [out][optional] return an event object that identifies this particular - ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent - ///< must not refer to an element of the phEventWaitList array. -) { +ur_result_t UR_APICALL +urBindlessImagesSignalExternalSemaphoreExp( + ur_queue_handle_t hQueue, ///< [in] handle of the queue object + ur_exp_external_semaphore_handle_t hSemaphore, ///< [in] external semaphore handle + bool hasSignalValue, ///< [in] indicates whether the samephore is capable and should signal on a + ///< certain value. + ///< Otherwise the semaphore is treated like a binary state, and + ///< `signalValue` is ignored. + uint64_t signalValue, ///< [in] the value to be signalled + uint32_t numEventsInWaitList, ///< [in] size of the event wait list + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before this command can be executed. + ///< If nullptr, the numEventsInWaitList must be 0, indicating that all + ///< previously enqueued commands + ///< must be complete. + ur_event_handle_t* phEvent ///< [out][optional] return an event object that identifies this particular + ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent + ///< must not refer to an element of the phEventWaitList array. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Create a Command-Buffer object -/// +/// /// @details /// - Create a command-buffer object. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -6343,21 +6265,21 @@ ur_result_t UR_APICALL urBindlessImagesSignalExternalSemaphoreExp( /// + If `pCommandBufferDesc->isUpdatable` is true and `hDevice` does not support UR_DEVICE_INFO_COMMAND_BUFFER_UPDATE_SUPPORT_EXP. /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urCommandBufferCreateExp( - ur_context_handle_t hContext, ///< [in] Handle of the context object. - ur_device_handle_t hDevice, ///< [in] Handle of the device object. - const ur_exp_command_buffer_desc_t - *pCommandBufferDesc, ///< [in][optional] command-buffer descriptor. - ur_exp_command_buffer_handle_t - *phCommandBuffer ///< [out] Pointer to command-Buffer handle. -) { +ur_result_t UR_APICALL +urCommandBufferCreateExp( + ur_context_handle_t hContext, ///< [in] Handle of the context object. + ur_device_handle_t hDevice, ///< [in] Handle of the device object. + const ur_exp_command_buffer_desc_t* pCommandBufferDesc, ///< [in][optional] command-buffer descriptor. + ur_exp_command_buffer_handle_t* phCommandBuffer ///< [out] Pointer to command-Buffer handle. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Increment the command-buffer object's reference count. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -6368,10 +6290,11 @@ ur_result_t UR_APICALL urCommandBufferCreateExp( /// - ::UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_EXP /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY -ur_result_t UR_APICALL urCommandBufferRetainExp( - ur_exp_command_buffer_handle_t - hCommandBuffer ///< [in][retain] Handle of the command-buffer object. -) { +ur_result_t UR_APICALL +urCommandBufferRetainExp( + ur_exp_command_buffer_handle_t hCommandBuffer ///< [in][retain] Handle of the command-buffer object. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -6379,7 +6302,7 @@ ur_result_t UR_APICALL urCommandBufferRetainExp( /////////////////////////////////////////////////////////////////////////////// /// @brief Decrement the command-buffer object's reference count and delete the /// command-buffer object if the reference count becomes zero. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -6390,10 +6313,11 @@ ur_result_t UR_APICALL urCommandBufferRetainExp( /// - ::UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_EXP /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY -ur_result_t UR_APICALL urCommandBufferReleaseExp( - ur_exp_command_buffer_handle_t - hCommandBuffer ///< [in][release] Handle of the command-buffer object. -) { +ur_result_t UR_APICALL +urCommandBufferReleaseExp( + ur_exp_command_buffer_handle_t hCommandBuffer ///< [in][release] Handle of the command-buffer object. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -6401,7 +6325,7 @@ ur_result_t UR_APICALL urCommandBufferReleaseExp( /////////////////////////////////////////////////////////////////////////////// /// @brief Stop recording on a command-buffer object such that no more commands /// can be appended and make it ready to enqueue. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -6412,17 +6336,18 @@ ur_result_t UR_APICALL urCommandBufferReleaseExp( /// - ::UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_EXP /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urCommandBufferFinalizeExp( - ur_exp_command_buffer_handle_t - hCommandBuffer ///< [in] Handle of the command-buffer object. -) { +ur_result_t UR_APICALL +urCommandBufferFinalizeExp( + ur_exp_command_buffer_handle_t hCommandBuffer ///< [in] Handle of the command-buffer object. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Append a kernel execution command to a command-buffer object. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -6456,55 +6381,45 @@ ur_result_t UR_APICALL urCommandBufferFinalizeExp( /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES /// - ::UR_RESULT_ERROR_INVALID_OPERATION - "phCommand is not NULL and hCommandBuffer is not updatable." -ur_result_t UR_APICALL urCommandBufferAppendKernelLaunchExp( - ur_exp_command_buffer_handle_t - hCommandBuffer, ///< [in] Handle of the command-buffer object. - ur_kernel_handle_t hKernel, ///< [in] Kernel to append. - uint32_t workDim, ///< [in] Dimension of the kernel execution. - const size_t - *pGlobalWorkOffset, ///< [in] Offset to use when executing kernel. - const size_t * - pGlobalWorkSize, ///< [in] Global work size to use when executing kernel. - const size_t * - pLocalWorkSize, ///< [in][optional] Local work size to use when executing kernel. If this - ///< parameter is nullptr, then a local work size will be generated by the - ///< implementation. - uint32_t - numKernelAlternatives, ///< [in] The number of kernel alternatives provided in - ///< phKernelAlternatives. - ur_kernel_handle_t * - phKernelAlternatives, ///< [in][optional][range(0, numKernelAlternatives)] List of kernel handles - ///< that might be used to update the kernel in this - ///< command after the command-buffer is finalized. The default kernel - ///< `hKernel` is implicitly marked as an alternative. It's - ///< invalid to specify it as part of this list. - uint32_t - numSyncPointsInWaitList, ///< [in] The number of sync points in the provided dependency list. - const ur_exp_command_buffer_sync_point_t * - pSyncPointWaitList, ///< [in][optional] A list of sync points that this command depends on. May - ///< be ignored if command-buffer is in-order. - uint32_t numEventsInWaitList, ///< [in] Size of the event wait list. - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before the command execution. If nullptr, - ///< the numEventsInWaitList must be 0, indicating no wait events. - ur_exp_command_buffer_sync_point_t * - pSyncPoint, ///< [out][optional] Sync point associated with this command. - ur_event_handle_t * - phEvent, ///< [out][optional] return an event object that will be signaled by the - ///< completion of this command in the next execution of the - ///< command-buffer. - ur_exp_command_buffer_command_handle_t * - phCommand ///< [out][optional] Handle to this command. Only available if the - ///< command-buffer is updatable. -) { +ur_result_t UR_APICALL +urCommandBufferAppendKernelLaunchExp( + ur_exp_command_buffer_handle_t hCommandBuffer, ///< [in] Handle of the command-buffer object. + ur_kernel_handle_t hKernel, ///< [in] Kernel to append. + uint32_t workDim, ///< [in] Dimension of the kernel execution. + const size_t* pGlobalWorkOffset, ///< [in] Offset to use when executing kernel. + const size_t* pGlobalWorkSize, ///< [in] Global work size to use when executing kernel. + const size_t* pLocalWorkSize, ///< [in][optional] Local work size to use when executing kernel. If this + ///< parameter is nullptr, then a local work size will be generated by the + ///< implementation. + uint32_t numKernelAlternatives, ///< [in] The number of kernel alternatives provided in + ///< phKernelAlternatives. + ur_kernel_handle_t* phKernelAlternatives, ///< [in][optional][range(0, numKernelAlternatives)] List of kernel handles + ///< that might be used to update the kernel in this + ///< command after the command-buffer is finalized. The default kernel + ///< `hKernel` is implicitly marked as an alternative. It's + ///< invalid to specify it as part of this list. + uint32_t numSyncPointsInWaitList, ///< [in] The number of sync points in the provided dependency list. + const ur_exp_command_buffer_sync_point_t* pSyncPointWaitList, ///< [in][optional] A list of sync points that this command depends on. May + ///< be ignored if command-buffer is in-order. + uint32_t numEventsInWaitList, ///< [in] Size of the event wait list. + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before the command execution. If nullptr, + ///< the numEventsInWaitList must be 0, indicating no wait events. + ur_exp_command_buffer_sync_point_t* pSyncPoint, ///< [out][optional] Sync point associated with this command. + ur_event_handle_t* phEvent, ///< [out][optional] return an event object that will be signaled by the + ///< completion of this command in the next execution of the + ///< command-buffer. + ur_exp_command_buffer_command_handle_t* phCommand ///< [out][optional] Handle to this command. Only available if the + ///< command-buffer is updatable. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Append a USM memcpy command to a command-buffer object. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -6533,38 +6448,33 @@ ur_result_t UR_APICALL urCommandBufferAppendKernelLaunchExp( /// + If the device associated with `hCommandBuffer` does not support UR_DEVICE_INFO_COMMAND_BUFFER_EVENT_SUPPORT_EXP and either `phEvent` or `phEventWaitList` are not NULL. /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urCommandBufferAppendUSMMemcpyExp( - ur_exp_command_buffer_handle_t - hCommandBuffer, ///< [in] Handle of the command-buffer object. - void *pDst, ///< [in] Location the data will be copied to. - const void *pSrc, ///< [in] The data to be copied. - size_t size, ///< [in] The number of bytes to copy. - uint32_t - numSyncPointsInWaitList, ///< [in] The number of sync points in the provided dependency list. - const ur_exp_command_buffer_sync_point_t * - pSyncPointWaitList, ///< [in][optional] A list of sync points that this command depends on. May - ///< be ignored if command-buffer is in-order. - uint32_t numEventsInWaitList, ///< [in] Size of the event wait list. - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before the command execution. If nullptr, - ///< the numEventsInWaitList must be 0, indicating no wait events. - ur_exp_command_buffer_sync_point_t * - pSyncPoint, ///< [out][optional] Sync point associated with this command. - ur_event_handle_t * - phEvent, ///< [out][optional] return an event object that will be signaled by the - ///< completion of this command in the next execution of the - ///< command-buffer. - ur_exp_command_buffer_command_handle_t - *phCommand ///< [out][optional] Handle to this command. -) { +ur_result_t UR_APICALL +urCommandBufferAppendUSMMemcpyExp( + ur_exp_command_buffer_handle_t hCommandBuffer, ///< [in] Handle of the command-buffer object. + void* pDst, ///< [in] Location the data will be copied to. + const void* pSrc, ///< [in] The data to be copied. + size_t size, ///< [in] The number of bytes to copy. + uint32_t numSyncPointsInWaitList, ///< [in] The number of sync points in the provided dependency list. + const ur_exp_command_buffer_sync_point_t* pSyncPointWaitList, ///< [in][optional] A list of sync points that this command depends on. May + ///< be ignored if command-buffer is in-order. + uint32_t numEventsInWaitList, ///< [in] Size of the event wait list. + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before the command execution. If nullptr, + ///< the numEventsInWaitList must be 0, indicating no wait events. + ur_exp_command_buffer_sync_point_t* pSyncPoint, ///< [out][optional] Sync point associated with this command. + ur_event_handle_t* phEvent, ///< [out][optional] return an event object that will be signaled by the + ///< completion of this command in the next execution of the + ///< command-buffer. + ur_exp_command_buffer_command_handle_t* phCommand ///< [out][optional] Handle to this command. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Append a USM fill command to a command-buffer object. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -6595,40 +6505,34 @@ ur_result_t UR_APICALL urCommandBufferAppendUSMMemcpyExp( /// + If the device associated with `hCommandBuffer` does not support UR_DEVICE_INFO_COMMAND_BUFFER_EVENT_SUPPORT_EXP and either `phEvent` or `phEventWaitList` are not NULL. /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urCommandBufferAppendUSMFillExp( - ur_exp_command_buffer_handle_t - hCommandBuffer, ///< [in] handle of the command-buffer object. - void *pMemory, ///< [in] pointer to USM allocated memory to fill. - const void *pPattern, ///< [in] pointer to the fill pattern. - size_t patternSize, ///< [in] size in bytes of the pattern. - size_t - size, ///< [in] fill size in bytes, must be a multiple of patternSize. - uint32_t - numSyncPointsInWaitList, ///< [in] The number of sync points in the provided dependency list. - const ur_exp_command_buffer_sync_point_t * - pSyncPointWaitList, ///< [in][optional] A list of sync points that this command depends on. May - ///< be ignored if command-buffer is in-order. - uint32_t numEventsInWaitList, ///< [in] Size of the event wait list. - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before the command execution. If nullptr, - ///< the numEventsInWaitList must be 0, indicating no wait events. - ur_exp_command_buffer_sync_point_t * - pSyncPoint, ///< [out][optional] sync point associated with this command. - ur_event_handle_t * - phEvent, ///< [out][optional] return an event object that will be signaled by the - ///< completion of this command in the next execution of the - ///< command-buffer. - ur_exp_command_buffer_command_handle_t - *phCommand ///< [out][optional] Handle to this command. -) { +ur_result_t UR_APICALL +urCommandBufferAppendUSMFillExp( + ur_exp_command_buffer_handle_t hCommandBuffer, ///< [in] handle of the command-buffer object. + void* pMemory, ///< [in] pointer to USM allocated memory to fill. + const void* pPattern, ///< [in] pointer to the fill pattern. + size_t patternSize, ///< [in] size in bytes of the pattern. + size_t size, ///< [in] fill size in bytes, must be a multiple of patternSize. + uint32_t numSyncPointsInWaitList, ///< [in] The number of sync points in the provided dependency list. + const ur_exp_command_buffer_sync_point_t* pSyncPointWaitList, ///< [in][optional] A list of sync points that this command depends on. May + ///< be ignored if command-buffer is in-order. + uint32_t numEventsInWaitList, ///< [in] Size of the event wait list. + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before the command execution. If nullptr, + ///< the numEventsInWaitList must be 0, indicating no wait events. + ur_exp_command_buffer_sync_point_t* pSyncPoint, ///< [out][optional] sync point associated with this command. + ur_event_handle_t* phEvent, ///< [out][optional] return an event object that will be signaled by the + ///< completion of this command in the next execution of the + ///< command-buffer. + ur_exp_command_buffer_command_handle_t* phCommand ///< [out][optional] Handle to this command. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Append a memory copy command to a command-buffer object. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -6653,40 +6557,35 @@ ur_result_t UR_APICALL urCommandBufferAppendUSMFillExp( /// + If the device associated with `hCommandBuffer` does not support UR_DEVICE_INFO_COMMAND_BUFFER_EVENT_SUPPORT_EXP and either `phEvent` or `phEventWaitList` are not NULL. /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urCommandBufferAppendMemBufferCopyExp( - ur_exp_command_buffer_handle_t - hCommandBuffer, ///< [in] Handle of the command-buffer object. - ur_mem_handle_t hSrcMem, ///< [in] The data to be copied. - ur_mem_handle_t hDstMem, ///< [in] The location the data will be copied to. - size_t srcOffset, ///< [in] Offset into the source memory. - size_t dstOffset, ///< [in] Offset into the destination memory - size_t size, ///< [in] The number of bytes to be copied. - uint32_t - numSyncPointsInWaitList, ///< [in] The number of sync points in the provided dependency list. - const ur_exp_command_buffer_sync_point_t * - pSyncPointWaitList, ///< [in][optional] A list of sync points that this command depends on. May - ///< be ignored if command-buffer is in-order. - uint32_t numEventsInWaitList, ///< [in] Size of the event wait list. - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before the command execution. If nullptr, - ///< the numEventsInWaitList must be 0, indicating no wait events. - ur_exp_command_buffer_sync_point_t * - pSyncPoint, ///< [out][optional] Sync point associated with this command. - ur_event_handle_t * - phEvent, ///< [out][optional] return an event object that will be signaled by the - ///< completion of this command in the next execution of the - ///< command-buffer. - ur_exp_command_buffer_command_handle_t - *phCommand ///< [out][optional] Handle to this command. -) { +ur_result_t UR_APICALL +urCommandBufferAppendMemBufferCopyExp( + ur_exp_command_buffer_handle_t hCommandBuffer, ///< [in] Handle of the command-buffer object. + ur_mem_handle_t hSrcMem, ///< [in] The data to be copied. + ur_mem_handle_t hDstMem, ///< [in] The location the data will be copied to. + size_t srcOffset, ///< [in] Offset into the source memory. + size_t dstOffset, ///< [in] Offset into the destination memory + size_t size, ///< [in] The number of bytes to be copied. + uint32_t numSyncPointsInWaitList, ///< [in] The number of sync points in the provided dependency list. + const ur_exp_command_buffer_sync_point_t* pSyncPointWaitList, ///< [in][optional] A list of sync points that this command depends on. May + ///< be ignored if command-buffer is in-order. + uint32_t numEventsInWaitList, ///< [in] Size of the event wait list. + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before the command execution. If nullptr, + ///< the numEventsInWaitList must be 0, indicating no wait events. + ur_exp_command_buffer_sync_point_t* pSyncPoint, ///< [out][optional] Sync point associated with this command. + ur_event_handle_t* phEvent, ///< [out][optional] return an event object that will be signaled by the + ///< completion of this command in the next execution of the + ///< command-buffer. + ur_exp_command_buffer_command_handle_t* phCommand ///< [out][optional] Handle to this command. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Append a memory write command to a command-buffer object. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -6712,40 +6611,34 @@ ur_result_t UR_APICALL urCommandBufferAppendMemBufferCopyExp( /// + If the device associated with `hCommandBuffer` does not support UR_DEVICE_INFO_COMMAND_BUFFER_EVENT_SUPPORT_EXP and either `phEvent` or `phEventWaitList` are not NULL. /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urCommandBufferAppendMemBufferWriteExp( - ur_exp_command_buffer_handle_t - hCommandBuffer, ///< [in] Handle of the command-buffer object. - ur_mem_handle_t hBuffer, ///< [in] Handle of the buffer object. - size_t offset, ///< [in] Offset in bytes in the buffer object. - size_t size, ///< [in] Size in bytes of data being written. - const void * - pSrc, ///< [in] Pointer to host memory where data is to be written from. - uint32_t - numSyncPointsInWaitList, ///< [in] The number of sync points in the provided dependency list. - const ur_exp_command_buffer_sync_point_t * - pSyncPointWaitList, ///< [in][optional] A list of sync points that this command depends on. May - ///< be ignored if command-buffer is in-order. - uint32_t numEventsInWaitList, ///< [in] Size of the event wait list. - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before the command execution. If nullptr, - ///< the numEventsInWaitList must be 0, indicating no wait events. - ur_exp_command_buffer_sync_point_t * - pSyncPoint, ///< [out][optional] Sync point associated with this command. - ur_event_handle_t * - phEvent, ///< [out][optional] return an event object that will be signaled by the - ///< completion of this command in the next execution of the - ///< command-buffer. - ur_exp_command_buffer_command_handle_t - *phCommand ///< [out][optional] Handle to this command. -) { +ur_result_t UR_APICALL +urCommandBufferAppendMemBufferWriteExp( + ur_exp_command_buffer_handle_t hCommandBuffer, ///< [in] Handle of the command-buffer object. + ur_mem_handle_t hBuffer, ///< [in] Handle of the buffer object. + size_t offset, ///< [in] Offset in bytes in the buffer object. + size_t size, ///< [in] Size in bytes of data being written. + const void* pSrc, ///< [in] Pointer to host memory where data is to be written from. + uint32_t numSyncPointsInWaitList, ///< [in] The number of sync points in the provided dependency list. + const ur_exp_command_buffer_sync_point_t* pSyncPointWaitList, ///< [in][optional] A list of sync points that this command depends on. May + ///< be ignored if command-buffer is in-order. + uint32_t numEventsInWaitList, ///< [in] Size of the event wait list. + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before the command execution. If nullptr, + ///< the numEventsInWaitList must be 0, indicating no wait events. + ur_exp_command_buffer_sync_point_t* pSyncPoint, ///< [out][optional] Sync point associated with this command. + ur_event_handle_t* phEvent, ///< [out][optional] return an event object that will be signaled by the + ///< completion of this command in the next execution of the + ///< command-buffer. + ur_exp_command_buffer_command_handle_t* phCommand ///< [out][optional] Handle to this command. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Append a memory read command to a command-buffer object. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -6771,39 +6664,34 @@ ur_result_t UR_APICALL urCommandBufferAppendMemBufferWriteExp( /// + If the device associated with `hCommandBuffer` does not support UR_DEVICE_INFO_COMMAND_BUFFER_EVENT_SUPPORT_EXP and either `phEvent` or `phEventWaitList` are not NULL. /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urCommandBufferAppendMemBufferReadExp( - ur_exp_command_buffer_handle_t - hCommandBuffer, ///< [in] Handle of the command-buffer object. - ur_mem_handle_t hBuffer, ///< [in] Handle of the buffer object. - size_t offset, ///< [in] Offset in bytes in the buffer object. - size_t size, ///< [in] Size in bytes of data being written. - void *pDst, ///< [in] Pointer to host memory where data is to be written to. - uint32_t - numSyncPointsInWaitList, ///< [in] The number of sync points in the provided dependency list. - const ur_exp_command_buffer_sync_point_t * - pSyncPointWaitList, ///< [in][optional] A list of sync points that this command depends on. May - ///< be ignored if command-buffer is in-order. - uint32_t numEventsInWaitList, ///< [in] Size of the event wait list. - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before the command execution. If nullptr, - ///< the numEventsInWaitList must be 0, indicating no wait events. - ur_exp_command_buffer_sync_point_t * - pSyncPoint, ///< [out][optional] Sync point associated with this command. - ur_event_handle_t * - phEvent, ///< [out][optional] return an event object that will be signaled by the - ///< completion of this command in the next execution of the - ///< command-buffer. - ur_exp_command_buffer_command_handle_t - *phCommand ///< [out][optional] Handle to this command. -) { +ur_result_t UR_APICALL +urCommandBufferAppendMemBufferReadExp( + ur_exp_command_buffer_handle_t hCommandBuffer, ///< [in] Handle of the command-buffer object. + ur_mem_handle_t hBuffer, ///< [in] Handle of the buffer object. + size_t offset, ///< [in] Offset in bytes in the buffer object. + size_t size, ///< [in] Size in bytes of data being written. + void* pDst, ///< [in] Pointer to host memory where data is to be written to. + uint32_t numSyncPointsInWaitList, ///< [in] The number of sync points in the provided dependency list. + const ur_exp_command_buffer_sync_point_t* pSyncPointWaitList, ///< [in][optional] A list of sync points that this command depends on. May + ///< be ignored if command-buffer is in-order. + uint32_t numEventsInWaitList, ///< [in] Size of the event wait list. + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before the command execution. If nullptr, + ///< the numEventsInWaitList must be 0, indicating no wait events. + ur_exp_command_buffer_sync_point_t* pSyncPoint, ///< [out][optional] Sync point associated with this command. + ur_event_handle_t* phEvent, ///< [out][optional] return an event object that will be signaled by the + ///< completion of this command in the next execution of the + ///< command-buffer. + ur_exp_command_buffer_command_handle_t* phCommand ///< [out][optional] Handle to this command. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Append a rectangular memory copy command to a command-buffer object. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -6828,47 +6716,39 @@ ur_result_t UR_APICALL urCommandBufferAppendMemBufferReadExp( /// + If the device associated with `hCommandBuffer` does not support UR_DEVICE_INFO_COMMAND_BUFFER_EVENT_SUPPORT_EXP and either `phEvent` or `phEventWaitList` are not NULL. /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urCommandBufferAppendMemBufferCopyRectExp( - ur_exp_command_buffer_handle_t - hCommandBuffer, ///< [in] Handle of the command-buffer object. - ur_mem_handle_t hSrcMem, ///< [in] The data to be copied. - ur_mem_handle_t hDstMem, ///< [in] The location the data will be copied to. - ur_rect_offset_t - srcOrigin, ///< [in] Origin for the region of data to be copied from the source. - ur_rect_offset_t - dstOrigin, ///< [in] Origin for the region of data to be copied to in the destination. - ur_rect_region_t - region, ///< [in] The extents describing the region to be copied. - size_t srcRowPitch, ///< [in] Row pitch of the source memory. - size_t srcSlicePitch, ///< [in] Slice pitch of the source memory. - size_t dstRowPitch, ///< [in] Row pitch of the destination memory. - size_t dstSlicePitch, ///< [in] Slice pitch of the destination memory. - uint32_t - numSyncPointsInWaitList, ///< [in] The number of sync points in the provided dependency list. - const ur_exp_command_buffer_sync_point_t * - pSyncPointWaitList, ///< [in][optional] A list of sync points that this command depends on. May - ///< be ignored if command-buffer is in-order. - uint32_t numEventsInWaitList, ///< [in] Size of the event wait list. - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before the command execution. If nullptr, - ///< the numEventsInWaitList must be 0, indicating no wait events. - ur_exp_command_buffer_sync_point_t * - pSyncPoint, ///< [out][optional] Sync point associated with this command. - ur_event_handle_t * - phEvent, ///< [out][optional] return an event object that will be signaled by the - ///< completion of this command in the next execution of the - ///< command-buffer. - ur_exp_command_buffer_command_handle_t - *phCommand ///< [out][optional] Handle to this command. -) { +ur_result_t UR_APICALL +urCommandBufferAppendMemBufferCopyRectExp( + ur_exp_command_buffer_handle_t hCommandBuffer, ///< [in] Handle of the command-buffer object. + ur_mem_handle_t hSrcMem, ///< [in] The data to be copied. + ur_mem_handle_t hDstMem, ///< [in] The location the data will be copied to. + ur_rect_offset_t srcOrigin, ///< [in] Origin for the region of data to be copied from the source. + ur_rect_offset_t dstOrigin, ///< [in] Origin for the region of data to be copied to in the destination. + ur_rect_region_t region, ///< [in] The extents describing the region to be copied. + size_t srcRowPitch, ///< [in] Row pitch of the source memory. + size_t srcSlicePitch, ///< [in] Slice pitch of the source memory. + size_t dstRowPitch, ///< [in] Row pitch of the destination memory. + size_t dstSlicePitch, ///< [in] Slice pitch of the destination memory. + uint32_t numSyncPointsInWaitList, ///< [in] The number of sync points in the provided dependency list. + const ur_exp_command_buffer_sync_point_t* pSyncPointWaitList, ///< [in][optional] A list of sync points that this command depends on. May + ///< be ignored if command-buffer is in-order. + uint32_t numEventsInWaitList, ///< [in] Size of the event wait list. + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before the command execution. If nullptr, + ///< the numEventsInWaitList must be 0, indicating no wait events. + ur_exp_command_buffer_sync_point_t* pSyncPoint, ///< [out][optional] Sync point associated with this command. + ur_event_handle_t* phEvent, ///< [out][optional] return an event object that will be signaled by the + ///< completion of this command in the next execution of the + ///< command-buffer. + ur_exp_command_buffer_command_handle_t* phCommand ///< [out][optional] Handle to this command. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Append a rectangular memory write command to a command-buffer object. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -6894,53 +6774,42 @@ ur_result_t UR_APICALL urCommandBufferAppendMemBufferCopyRectExp( /// + If the device associated with `hCommandBuffer` does not support UR_DEVICE_INFO_COMMAND_BUFFER_EVENT_SUPPORT_EXP and either `phEvent` or `phEventWaitList` are not NULL. /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urCommandBufferAppendMemBufferWriteRectExp( - ur_exp_command_buffer_handle_t - hCommandBuffer, ///< [in] Handle of the command-buffer object. - ur_mem_handle_t hBuffer, ///< [in] Handle of the buffer object. - ur_rect_offset_t bufferOffset, ///< [in] 3D offset in the buffer. - ur_rect_offset_t hostOffset, ///< [in] 3D offset in the host region. - ur_rect_region_t - region, ///< [in] 3D rectangular region descriptor: width, height, depth. - size_t - bufferRowPitch, ///< [in] Length of each row in bytes in the buffer object. - size_t - bufferSlicePitch, ///< [in] Length of each 2D slice in bytes in the buffer object being - ///< written. - size_t - hostRowPitch, ///< [in] Length of each row in bytes in the host memory region pointed to - ///< by pSrc. - size_t - hostSlicePitch, ///< [in] Length of each 2D slice in bytes in the host memory region - ///< pointed to by pSrc. - void * - pSrc, ///< [in] Pointer to host memory where data is to be written from. - uint32_t - numSyncPointsInWaitList, ///< [in] The number of sync points in the provided dependency list. - const ur_exp_command_buffer_sync_point_t * - pSyncPointWaitList, ///< [in][optional] A list of sync points that this command depends on. May - ///< be ignored if command-buffer is in-order. - uint32_t numEventsInWaitList, ///< [in] Size of the event wait list. - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before the command execution. If nullptr, - ///< the numEventsInWaitList must be 0, indicating no wait events. - ur_exp_command_buffer_sync_point_t * - pSyncPoint, ///< [out][optional] Sync point associated with this command. - ur_event_handle_t * - phEvent, ///< [out][optional] return an event object that will be signaled by the - ///< completion of this command in the next execution of the - ///< command-buffer. - ur_exp_command_buffer_command_handle_t - *phCommand ///< [out][optional] Handle to this command. -) { +ur_result_t UR_APICALL +urCommandBufferAppendMemBufferWriteRectExp( + ur_exp_command_buffer_handle_t hCommandBuffer, ///< [in] Handle of the command-buffer object. + ur_mem_handle_t hBuffer, ///< [in] Handle of the buffer object. + ur_rect_offset_t bufferOffset, ///< [in] 3D offset in the buffer. + ur_rect_offset_t hostOffset, ///< [in] 3D offset in the host region. + ur_rect_region_t region, ///< [in] 3D rectangular region descriptor: width, height, depth. + size_t bufferRowPitch, ///< [in] Length of each row in bytes in the buffer object. + size_t bufferSlicePitch, ///< [in] Length of each 2D slice in bytes in the buffer object being + ///< written. + size_t hostRowPitch, ///< [in] Length of each row in bytes in the host memory region pointed to + ///< by pSrc. + size_t hostSlicePitch, ///< [in] Length of each 2D slice in bytes in the host memory region + ///< pointed to by pSrc. + void* pSrc, ///< [in] Pointer to host memory where data is to be written from. + uint32_t numSyncPointsInWaitList, ///< [in] The number of sync points in the provided dependency list. + const ur_exp_command_buffer_sync_point_t* pSyncPointWaitList, ///< [in][optional] A list of sync points that this command depends on. May + ///< be ignored if command-buffer is in-order. + uint32_t numEventsInWaitList, ///< [in] Size of the event wait list. + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before the command execution. If nullptr, + ///< the numEventsInWaitList must be 0, indicating no wait events. + ur_exp_command_buffer_sync_point_t* pSyncPoint, ///< [out][optional] Sync point associated with this command. + ur_event_handle_t* phEvent, ///< [out][optional] return an event object that will be signaled by the + ///< completion of this command in the next execution of the + ///< command-buffer. + ur_exp_command_buffer_command_handle_t* phCommand ///< [out][optional] Handle to this command. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Append a rectangular memory read command to a command-buffer object. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -6966,51 +6835,41 @@ ur_result_t UR_APICALL urCommandBufferAppendMemBufferWriteRectExp( /// + If the device associated with `hCommandBuffer` does not support UR_DEVICE_INFO_COMMAND_BUFFER_EVENT_SUPPORT_EXP and either `phEvent` or `phEventWaitList` are not NULL. /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urCommandBufferAppendMemBufferReadRectExp( - ur_exp_command_buffer_handle_t - hCommandBuffer, ///< [in] Handle of the command-buffer object. - ur_mem_handle_t hBuffer, ///< [in] Handle of the buffer object. - ur_rect_offset_t bufferOffset, ///< [in] 3D offset in the buffer. - ur_rect_offset_t hostOffset, ///< [in] 3D offset in the host region. - ur_rect_region_t - region, ///< [in] 3D rectangular region descriptor: width, height, depth. - size_t - bufferRowPitch, ///< [in] Length of each row in bytes in the buffer object. - size_t - bufferSlicePitch, ///< [in] Length of each 2D slice in bytes in the buffer object being read. - size_t - hostRowPitch, ///< [in] Length of each row in bytes in the host memory region pointed to - ///< by pDst. - size_t - hostSlicePitch, ///< [in] Length of each 2D slice in bytes in the host memory region - ///< pointed to by pDst. - void *pDst, ///< [in] Pointer to host memory where data is to be read into. - uint32_t - numSyncPointsInWaitList, ///< [in] The number of sync points in the provided dependency list. - const ur_exp_command_buffer_sync_point_t * - pSyncPointWaitList, ///< [in][optional] A list of sync points that this command depends on. May - ///< be ignored if command-buffer is in-order. - uint32_t numEventsInWaitList, ///< [in] Size of the event wait list. - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before the command execution. If nullptr, - ///< the numEventsInWaitList must be 0, indicating no wait events. - ur_exp_command_buffer_sync_point_t * - pSyncPoint, ///< [out][optional] Sync point associated with this command. - ur_event_handle_t * - phEvent, ///< [out][optional] return an event object that will be signaled by the - ///< completion of this command in the next execution of the - ///< command-buffer. - ur_exp_command_buffer_command_handle_t - *phCommand ///< [out][optional] Handle to this command. -) { +ur_result_t UR_APICALL +urCommandBufferAppendMemBufferReadRectExp( + ur_exp_command_buffer_handle_t hCommandBuffer, ///< [in] Handle of the command-buffer object. + ur_mem_handle_t hBuffer, ///< [in] Handle of the buffer object. + ur_rect_offset_t bufferOffset, ///< [in] 3D offset in the buffer. + ur_rect_offset_t hostOffset, ///< [in] 3D offset in the host region. + ur_rect_region_t region, ///< [in] 3D rectangular region descriptor: width, height, depth. + size_t bufferRowPitch, ///< [in] Length of each row in bytes in the buffer object. + size_t bufferSlicePitch, ///< [in] Length of each 2D slice in bytes in the buffer object being read. + size_t hostRowPitch, ///< [in] Length of each row in bytes in the host memory region pointed to + ///< by pDst. + size_t hostSlicePitch, ///< [in] Length of each 2D slice in bytes in the host memory region + ///< pointed to by pDst. + void* pDst, ///< [in] Pointer to host memory where data is to be read into. + uint32_t numSyncPointsInWaitList, ///< [in] The number of sync points in the provided dependency list. + const ur_exp_command_buffer_sync_point_t* pSyncPointWaitList, ///< [in][optional] A list of sync points that this command depends on. May + ///< be ignored if command-buffer is in-order. + uint32_t numEventsInWaitList, ///< [in] Size of the event wait list. + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before the command execution. If nullptr, + ///< the numEventsInWaitList must be 0, indicating no wait events. + ur_exp_command_buffer_sync_point_t* pSyncPoint, ///< [out][optional] Sync point associated with this command. + ur_event_handle_t* phEvent, ///< [out][optional] return an event object that will be signaled by the + ///< completion of this command in the next execution of the + ///< command-buffer. + ur_exp_command_buffer_command_handle_t* phCommand ///< [out][optional] Handle to this command. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Append a memory fill command to a command-buffer object. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -7038,46 +6897,40 @@ ur_result_t UR_APICALL urCommandBufferAppendMemBufferReadRectExp( /// + If the device associated with `hCommandBuffer` does not support UR_DEVICE_INFO_COMMAND_BUFFER_EVENT_SUPPORT_EXP and either `phEvent` or `phEventWaitList` are not NULL. /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urCommandBufferAppendMemBufferFillExp( - ur_exp_command_buffer_handle_t - hCommandBuffer, ///< [in] handle of the command-buffer object. - ur_mem_handle_t hBuffer, ///< [in] handle of the buffer object. - const void *pPattern, ///< [in] pointer to the fill pattern. - size_t patternSize, ///< [in] size in bytes of the pattern. - size_t offset, ///< [in] offset into the buffer. - size_t - size, ///< [in] fill size in bytes, must be a multiple of patternSize. - uint32_t - numSyncPointsInWaitList, ///< [in] The number of sync points in the provided dependency list. - const ur_exp_command_buffer_sync_point_t * - pSyncPointWaitList, ///< [in][optional] A list of sync points that this command depends on. May - ///< be ignored if command-buffer is in-order. - uint32_t numEventsInWaitList, ///< [in] Size of the event wait list. - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before the command execution. If nullptr, - ///< the numEventsInWaitList must be 0, indicating no wait events. - ur_exp_command_buffer_sync_point_t * - pSyncPoint, ///< [out][optional] sync point associated with this command. - ur_event_handle_t * - phEvent, ///< [out][optional] return an event object that will be signaled by the - ///< completion of this command in the next execution of the - ///< command-buffer. - ur_exp_command_buffer_command_handle_t - *phCommand ///< [out][optional] Handle to this command. -) { +ur_result_t UR_APICALL +urCommandBufferAppendMemBufferFillExp( + ur_exp_command_buffer_handle_t hCommandBuffer, ///< [in] handle of the command-buffer object. + ur_mem_handle_t hBuffer, ///< [in] handle of the buffer object. + const void* pPattern, ///< [in] pointer to the fill pattern. + size_t patternSize, ///< [in] size in bytes of the pattern. + size_t offset, ///< [in] offset into the buffer. + size_t size, ///< [in] fill size in bytes, must be a multiple of patternSize. + uint32_t numSyncPointsInWaitList, ///< [in] The number of sync points in the provided dependency list. + const ur_exp_command_buffer_sync_point_t* pSyncPointWaitList, ///< [in][optional] A list of sync points that this command depends on. May + ///< be ignored if command-buffer is in-order. + uint32_t numEventsInWaitList, ///< [in] Size of the event wait list. + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before the command execution. If nullptr, + ///< the numEventsInWaitList must be 0, indicating no wait events. + ur_exp_command_buffer_sync_point_t* pSyncPoint, ///< [out][optional] sync point associated with this command. + ur_event_handle_t* phEvent, ///< [out][optional] return an event object that will be signaled by the + ///< completion of this command in the next execution of the + ///< command-buffer. + ur_exp_command_buffer_command_handle_t* phCommand ///< [out][optional] Handle to this command. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Append a USM Prefetch command to a command-buffer object. -/// +/// /// @details /// - Prefetching may not be supported for all devices or allocation types. /// If memory prefetching is not supported, the prefetch hint will be /// ignored. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -7107,43 +6960,38 @@ ur_result_t UR_APICALL urCommandBufferAppendMemBufferFillExp( /// + If the device associated with `hCommandBuffer` does not support UR_DEVICE_INFO_COMMAND_BUFFER_EVENT_SUPPORT_EXP and either `phEvent` or `phEventWaitList` are not NULL. /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urCommandBufferAppendUSMPrefetchExp( - ur_exp_command_buffer_handle_t - hCommandBuffer, ///< [in] handle of the command-buffer object. - const void *pMemory, ///< [in] pointer to USM allocated memory to prefetch. - size_t size, ///< [in] size in bytes to be fetched. - ur_usm_migration_flags_t flags, ///< [in] USM prefetch flags - uint32_t - numSyncPointsInWaitList, ///< [in] The number of sync points in the provided dependency list. - const ur_exp_command_buffer_sync_point_t * - pSyncPointWaitList, ///< [in][optional] A list of sync points that this command depends on. May - ///< be ignored if command-buffer is in-order. - uint32_t numEventsInWaitList, ///< [in] Size of the event wait list. - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before the command execution. If nullptr, - ///< the numEventsInWaitList must be 0, indicating no wait events. - ur_exp_command_buffer_sync_point_t * - pSyncPoint, ///< [out][optional] sync point associated with this command. - ur_event_handle_t * - phEvent, ///< [out][optional] return an event object that will be signaled by the - ///< completion of this command in the next execution of the - ///< command-buffer. - ur_exp_command_buffer_command_handle_t - *phCommand ///< [out][optional] Handle to this command. -) { +ur_result_t UR_APICALL +urCommandBufferAppendUSMPrefetchExp( + ur_exp_command_buffer_handle_t hCommandBuffer, ///< [in] handle of the command-buffer object. + const void* pMemory, ///< [in] pointer to USM allocated memory to prefetch. + size_t size, ///< [in] size in bytes to be fetched. + ur_usm_migration_flags_t flags, ///< [in] USM prefetch flags + uint32_t numSyncPointsInWaitList, ///< [in] The number of sync points in the provided dependency list. + const ur_exp_command_buffer_sync_point_t* pSyncPointWaitList, ///< [in][optional] A list of sync points that this command depends on. May + ///< be ignored if command-buffer is in-order. + uint32_t numEventsInWaitList, ///< [in] Size of the event wait list. + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before the command execution. If nullptr, + ///< the numEventsInWaitList must be 0, indicating no wait events. + ur_exp_command_buffer_sync_point_t* pSyncPoint, ///< [out][optional] sync point associated with this command. + ur_event_handle_t* phEvent, ///< [out][optional] return an event object that will be signaled by the + ///< completion of this command in the next execution of the + ///< command-buffer. + ur_exp_command_buffer_command_handle_t* phCommand ///< [out][optional] Handle to this command. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Append a USM Advise command to a command-buffer object. -/// +/// /// @details /// - Not all memory advice hints may be supported for all devices or /// allocation types. If a memory advice hint is not supported, it will be /// ignored. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -7173,38 +7021,33 @@ ur_result_t UR_APICALL urCommandBufferAppendUSMPrefetchExp( /// + If the device associated with `hCommandBuffer` does not support UR_DEVICE_INFO_COMMAND_BUFFER_EVENT_SUPPORT_EXP and either `phEvent` or `phEventWaitList` are not NULL. /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urCommandBufferAppendUSMAdviseExp( - ur_exp_command_buffer_handle_t - hCommandBuffer, ///< [in] handle of the command-buffer object. - const void *pMemory, ///< [in] pointer to the USM memory object. - size_t size, ///< [in] size in bytes to be advised. - ur_usm_advice_flags_t advice, ///< [in] USM memory advice - uint32_t - numSyncPointsInWaitList, ///< [in] The number of sync points in the provided dependency list. - const ur_exp_command_buffer_sync_point_t * - pSyncPointWaitList, ///< [in][optional] A list of sync points that this command depends on. May - ///< be ignored if command-buffer is in-order. - uint32_t numEventsInWaitList, ///< [in] Size of the event wait list. - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before the command execution. If nullptr, - ///< the numEventsInWaitList must be 0, indicating no wait events. - ur_exp_command_buffer_sync_point_t * - pSyncPoint, ///< [out][optional] sync point associated with this command. - ur_event_handle_t * - phEvent, ///< [out][optional] return an event object that will be signaled by the - ///< completion of this command in the next execution of the - ///< command-buffer. - ur_exp_command_buffer_command_handle_t - *phCommand ///< [out][optional] Handle to this command. -) { +ur_result_t UR_APICALL +urCommandBufferAppendUSMAdviseExp( + ur_exp_command_buffer_handle_t hCommandBuffer, ///< [in] handle of the command-buffer object. + const void* pMemory, ///< [in] pointer to the USM memory object. + size_t size, ///< [in] size in bytes to be advised. + ur_usm_advice_flags_t advice, ///< [in] USM memory advice + uint32_t numSyncPointsInWaitList, ///< [in] The number of sync points in the provided dependency list. + const ur_exp_command_buffer_sync_point_t* pSyncPointWaitList, ///< [in][optional] A list of sync points that this command depends on. May + ///< be ignored if command-buffer is in-order. + uint32_t numEventsInWaitList, ///< [in] Size of the event wait list. + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before the command execution. If nullptr, + ///< the numEventsInWaitList must be 0, indicating no wait events. + ur_exp_command_buffer_sync_point_t* pSyncPoint, ///< [out][optional] sync point associated with this command. + ur_event_handle_t* phEvent, ///< [out][optional] return an event object that will be signaled by the + ///< completion of this command in the next execution of the + ///< command-buffer. + ur_exp_command_buffer_command_handle_t* phCommand ///< [out][optional] Handle to this command. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Submit a command-buffer for execution on a queue. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -7222,28 +7065,26 @@ ur_result_t UR_APICALL urCommandBufferAppendUSMAdviseExp( /// + If event objects in phEventWaitList are not valid events. /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urCommandBufferEnqueueExp( - ur_exp_command_buffer_handle_t - hCommandBuffer, ///< [in] Handle of the command-buffer object. - ur_queue_handle_t - hQueue, ///< [in] The queue to submit this command-buffer for execution. - uint32_t numEventsInWaitList, ///< [in] Size of the event wait list. - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before the command-buffer execution. - ///< If nullptr, the numEventsInWaitList must be 0, indicating no wait events. - ur_event_handle_t * - phEvent ///< [out][optional] return an event object that identifies this particular - ///< command-buffer execution instance. If phEventWaitList and phEvent are - ///< not NULL, phEvent must not refer to an element of the phEventWaitList array. -) { +ur_result_t UR_APICALL +urCommandBufferEnqueueExp( + ur_exp_command_buffer_handle_t hCommandBuffer, ///< [in] Handle of the command-buffer object. + ur_queue_handle_t hQueue, ///< [in] The queue to submit this command-buffer for execution. + uint32_t numEventsInWaitList, ///< [in] Size of the event wait list. + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before the command-buffer execution. + ///< If nullptr, the numEventsInWaitList must be 0, indicating no wait events. + ur_event_handle_t* phEvent ///< [out][optional] return an event object that identifies this particular + ///< command-buffer execution instance. If phEventWaitList and phEvent are + ///< not NULL, phEvent must not refer to an element of the phEventWaitList array. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Increment the command object's reference count. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -7254,10 +7095,11 @@ ur_result_t UR_APICALL urCommandBufferEnqueueExp( /// - ::UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_COMMAND_HANDLE_EXP /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY -ur_result_t UR_APICALL urCommandBufferRetainCommandExp( - ur_exp_command_buffer_command_handle_t - hCommand ///< [in][retain] Handle of the command-buffer command. -) { +ur_result_t UR_APICALL +urCommandBufferRetainCommandExp( + ur_exp_command_buffer_command_handle_t hCommand ///< [in][retain] Handle of the command-buffer command. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -7265,7 +7107,7 @@ ur_result_t UR_APICALL urCommandBufferRetainCommandExp( /////////////////////////////////////////////////////////////////////////////// /// @brief Decrement the command object's reference count and delete the command /// object if the reference count becomes zero. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -7276,20 +7118,21 @@ ur_result_t UR_APICALL urCommandBufferRetainCommandExp( /// - ::UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_COMMAND_HANDLE_EXP /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY -ur_result_t UR_APICALL urCommandBufferReleaseCommandExp( - ur_exp_command_buffer_command_handle_t - hCommand ///< [in][release] Handle of the command-buffer command. -) { +ur_result_t UR_APICALL +urCommandBufferReleaseCommandExp( + ur_exp_command_buffer_command_handle_t hCommand ///< [in][release] Handle of the command-buffer command. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Update a kernel launch command in a finalized command-buffer. -/// +/// /// @details /// This entry-point is synchronous and may block if the command-buffer is executing when the entry-point is called. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -7317,12 +7160,12 @@ ur_result_t UR_APICALL urCommandBufferReleaseCommandExp( /// + If `pUpdateKernelLaunch->newWorkDim` is different from the current workDim in `hCommand` and, pUpdateKernelLaunch->pNewGlobalWorkSize, or pUpdateKernelLaunch->pNewGlobalWorkOffset are nullptr. /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urCommandBufferUpdateKernelLaunchExp( - ur_exp_command_buffer_command_handle_t - hCommand, ///< [in] Handle of the command-buffer kernel command to update. - const ur_exp_command_buffer_update_kernel_launch_desc_t * - pUpdateKernelLaunch ///< [in] Struct defining how the kernel command is to be updated. -) { +ur_result_t UR_APICALL +urCommandBufferUpdateKernelLaunchExp( + ur_exp_command_buffer_command_handle_t hCommand,///< [in] Handle of the command-buffer kernel command to update. + const ur_exp_command_buffer_update_kernel_launch_desc_t* pUpdateKernelLaunch///< [in] Struct defining how the kernel command is to be updated. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -7330,10 +7173,10 @@ ur_result_t UR_APICALL urCommandBufferUpdateKernelLaunchExp( /////////////////////////////////////////////////////////////////////////////// /// @brief Get a new event that will be signaled the next time the command in the /// command-buffer executes. -/// +/// /// @details /// It is the users responsibility to release the returned `phSignalEvent`. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -7353,11 +7196,12 @@ ur_result_t UR_APICALL urCommandBufferUpdateKernelLaunchExp( /// - ::UR_RESULT_ERROR_INVALID_VALUE /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urCommandBufferUpdateSignalEventExp( - ur_exp_command_buffer_command_handle_t - hCommand, ///< [in] Handle of the command-buffer command to update. - ur_event_handle_t *phSignalEvent ///< [out] Event to be signaled. -) { +ur_result_t UR_APICALL +urCommandBufferUpdateSignalEventExp( + ur_exp_command_buffer_command_handle_t hCommand,///< [in] Handle of the command-buffer command to update. + ur_event_handle_t* phSignalEvent ///< [out] Event to be signaled. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -7365,7 +7209,7 @@ ur_result_t UR_APICALL urCommandBufferUpdateSignalEventExp( /////////////////////////////////////////////////////////////////////////////// /// @brief Set the list of wait events for a command to depend on to a list of /// new events. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -7386,22 +7230,22 @@ ur_result_t UR_APICALL urCommandBufferUpdateSignalEventExp( /// + If `numEventsInWaitList` does not match the number of wait events set when the command associated with `hCommand` was created. /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urCommandBufferUpdateWaitEventsExp( - ur_exp_command_buffer_command_handle_t - hCommand, ///< [in] Handle of the command-buffer command to update. - uint32_t numEventsInWaitList, ///< [in] Size of the event wait list. - const ur_event_handle_t * - phEventWaitList ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before the command execution. If nullptr, - ///< the numEventsInWaitList must be 0, indicating no wait events. -) { +ur_result_t UR_APICALL +urCommandBufferUpdateWaitEventsExp( + ur_exp_command_buffer_command_handle_t hCommand,///< [in] Handle of the command-buffer command to update. + uint32_t numEventsInWaitList, ///< [in] Size of the event wait list. + const ur_event_handle_t* phEventWaitList ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before the command execution. If nullptr, + ///< the numEventsInWaitList must be 0, indicating no wait events. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Get command-buffer object information. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -7422,26 +7266,23 @@ ur_result_t UR_APICALL urCommandBufferUpdateWaitEventsExp( /// - ::UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_EXP /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY -ur_result_t UR_APICALL urCommandBufferGetInfoExp( - ur_exp_command_buffer_handle_t - hCommandBuffer, ///< [in] handle of the command-buffer object - ur_exp_command_buffer_info_t - propName, ///< [in] the name of the command-buffer property to query - size_t - propSize, ///< [in] size in bytes of the command-buffer property value - void * - pPropValue, ///< [out][optional][typename(propName, propSize)] value of the - ///< command-buffer property - size_t * - pPropSizeRet ///< [out][optional] bytes returned in command-buffer property -) { +ur_result_t UR_APICALL +urCommandBufferGetInfoExp( + ur_exp_command_buffer_handle_t hCommandBuffer, ///< [in] handle of the command-buffer object + ur_exp_command_buffer_info_t propName, ///< [in] the name of the command-buffer property to query + size_t propSize, ///< [in] size in bytes of the command-buffer property value + void* pPropValue, ///< [out][optional][typename(propName, propSize)] value of the + ///< command-buffer property + size_t* pPropSizeRet ///< [out][optional] bytes returned in command-buffer property + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Get command-buffer object information. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -7462,26 +7303,23 @@ ur_result_t UR_APICALL urCommandBufferGetInfoExp( /// - ::UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_COMMAND_HANDLE_EXP /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY -ur_result_t UR_APICALL urCommandBufferCommandGetInfoExp( - ur_exp_command_buffer_command_handle_t - hCommand, ///< [in] handle of the command-buffer command object - ur_exp_command_buffer_command_info_t - propName, ///< [in] the name of the command-buffer command property to query - size_t - propSize, ///< [in] size in bytes of the command-buffer command property value - void * - pPropValue, ///< [out][optional][typename(propName, propSize)] value of the - ///< command-buffer command property - size_t * - pPropSizeRet ///< [out][optional] bytes returned in command-buffer command property -) { +ur_result_t UR_APICALL +urCommandBufferCommandGetInfoExp( + ur_exp_command_buffer_command_handle_t hCommand,///< [in] handle of the command-buffer command object + ur_exp_command_buffer_command_info_t propName, ///< [in] the name of the command-buffer command property to query + size_t propSize, ///< [in] size in bytes of the command-buffer command property value + void* pPropValue, ///< [out][optional][typename(propName, propSize)] value of the + ///< command-buffer command property + size_t* pPropSizeRet ///< [out][optional] bytes returned in command-buffer command property + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Enqueue a command to execute a cooperative kernel -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -7505,41 +7343,37 @@ ur_result_t UR_APICALL urCommandBufferCommandGetInfoExp( /// - ::UR_RESULT_ERROR_INVALID_VALUE /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urEnqueueCooperativeKernelLaunchExp( - ur_queue_handle_t hQueue, ///< [in] handle of the queue object - ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object - uint32_t - workDim, ///< [in] number of dimensions, from 1 to 3, to specify the global and - ///< work-group work-items - const size_t * - pGlobalWorkOffset, ///< [in] pointer to an array of workDim unsigned values that specify the - ///< offset used to calculate the global ID of a work-item - const size_t * - pGlobalWorkSize, ///< [in] pointer to an array of workDim unsigned values that specify the - ///< number of global work-items in workDim that will execute the kernel - ///< function - const size_t * - pLocalWorkSize, ///< [in][optional] pointer to an array of workDim unsigned values that - ///< specify the number of local work-items forming a work-group that will - ///< execute the kernel function. - ///< If nullptr, the runtime implementation will choose the work-group size. - uint32_t numEventsInWaitList, ///< [in] size of the event wait list - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before the kernel execution. - ///< If nullptr, the numEventsInWaitList must be 0, indicating that no wait event. - ur_event_handle_t * - phEvent ///< [out][optional] return an event object that identifies this particular - ///< kernel execution instance. If phEventWaitList and phEvent are not - ///< NULL, phEvent must not refer to an element of the phEventWaitList array. -) { +ur_result_t UR_APICALL +urEnqueueCooperativeKernelLaunchExp( + ur_queue_handle_t hQueue, ///< [in] handle of the queue object + ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object + uint32_t workDim, ///< [in] number of dimensions, from 1 to 3, to specify the global and + ///< work-group work-items + const size_t* pGlobalWorkOffset, ///< [in] pointer to an array of workDim unsigned values that specify the + ///< offset used to calculate the global ID of a work-item + const size_t* pGlobalWorkSize, ///< [in] pointer to an array of workDim unsigned values that specify the + ///< number of global work-items in workDim that will execute the kernel + ///< function + const size_t* pLocalWorkSize, ///< [in][optional] pointer to an array of workDim unsigned values that + ///< specify the number of local work-items forming a work-group that will + ///< execute the kernel function. + ///< If nullptr, the runtime implementation will choose the work-group size. + uint32_t numEventsInWaitList, ///< [in] size of the event wait list + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before the kernel execution. + ///< If nullptr, the numEventsInWaitList must be 0, indicating that no wait event. + ur_event_handle_t* phEvent ///< [out][optional] return an event object that identifies this particular + ///< kernel execution instance. If phEventWaitList and phEvent are not + ///< NULL, phEvent must not refer to an element of the phEventWaitList array. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Query the maximum number of work groups for a cooperative kernel -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -7551,27 +7385,26 @@ ur_result_t UR_APICALL urEnqueueCooperativeKernelLaunchExp( /// + `NULL == pLocalWorkSize` /// + `NULL == pGroupCountRet` /// - ::UR_RESULT_ERROR_INVALID_KERNEL -ur_result_t UR_APICALL urKernelSuggestMaxCooperativeGroupCountExp( - ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object - uint32_t - workDim, ///< [in] number of dimensions, from 1 to 3, to specify the work-group - ///< work-items - const size_t * - pLocalWorkSize, ///< [in] pointer to an array of workDim unsigned values that specify the - ///< number of local work-items forming a work-group that will execute the - ///< kernel function. - size_t - dynamicSharedMemorySize, ///< [in] size of dynamic shared memory, for each work-group, in bytes, - ///< that will be used when the kernel is launched - uint32_t *pGroupCountRet ///< [out] pointer to maximum number of groups -) { +ur_result_t UR_APICALL +urKernelSuggestMaxCooperativeGroupCountExp( + ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object + uint32_t workDim, ///< [in] number of dimensions, from 1 to 3, to specify the work-group + ///< work-items + const size_t* pLocalWorkSize, ///< [in] pointer to an array of workDim unsigned values that specify the + ///< number of local work-items forming a work-group that will execute the + ///< kernel function. + size_t dynamicSharedMemorySize, ///< [in] size of dynamic shared memory, for each work-group, in bytes, + ///< that will be used when the kernel is launched + uint32_t* pGroupCountRet ///< [out] pointer to maximum number of groups + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Enqueue a command for recording the device timestamp -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -7584,46 +7417,45 @@ ur_result_t UR_APICALL urKernelSuggestMaxCooperativeGroupCountExp( /// - ::UR_RESULT_ERROR_INVALID_EVENT_WAIT_LIST /// + `phEventWaitList == NULL && numEventsInWaitList > 0` /// + `phEventWaitList != NULL && numEventsInWaitList == 0` -ur_result_t UR_APICALL urEnqueueTimestampRecordingExp( - ur_queue_handle_t hQueue, ///< [in] handle of the queue object - bool - blocking, ///< [in] indicates whether the call to this function should block until - ///< until the device timestamp recording command has executed on the - ///< device. - uint32_t numEventsInWaitList, ///< [in] size of the event wait list - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before the kernel execution. - ///< If nullptr, the numEventsInWaitList must be 0, indicating no wait events. - ur_event_handle_t * - phEvent ///< [in,out] return an event object that identifies this particular kernel - ///< execution instance. Profiling information can be queried - ///< from this event as if `hQueue` had profiling enabled. Querying - ///< `UR_PROFILING_INFO_COMMAND_QUEUED` or `UR_PROFILING_INFO_COMMAND_SUBMIT` - ///< reports the timestamp at the time of the call to this function. - ///< Querying `UR_PROFILING_INFO_COMMAND_START` or `UR_PROFILING_INFO_COMMAND_END` - ///< reports the timestamp recorded when the command is executed on the - ///< device. If phEventWaitList and phEvent are not NULL, phEvent must not - ///< refer to an element of the phEventWaitList array. -) { +ur_result_t UR_APICALL +urEnqueueTimestampRecordingExp( + ur_queue_handle_t hQueue, ///< [in] handle of the queue object + bool blocking, ///< [in] indicates whether the call to this function should block until + ///< until the device timestamp recording command has executed on the + ///< device. + uint32_t numEventsInWaitList, ///< [in] size of the event wait list + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before the kernel execution. + ///< If nullptr, the numEventsInWaitList must be 0, indicating no wait events. + ur_event_handle_t* phEvent ///< [in,out] return an event object that identifies this particular kernel + ///< execution instance. Profiling information can be queried + ///< from this event as if `hQueue` had profiling enabled. Querying + ///< `UR_PROFILING_INFO_COMMAND_QUEUED` or `UR_PROFILING_INFO_COMMAND_SUBMIT` + ///< reports the timestamp at the time of the call to this function. + ///< Querying `UR_PROFILING_INFO_COMMAND_START` or `UR_PROFILING_INFO_COMMAND_END` + ///< reports the timestamp recorded when the command is executed on the + ///< device. If phEventWaitList and phEvent are not NULL, phEvent must not + ///< refer to an element of the phEventWaitList array. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Launch kernel with custom launch properties -/// +/// /// @details /// - Launches the kernel using the specified launch properties /// - If numPropsInLaunchPropList == 0 then a regular kernel launch is used: /// `urEnqueueKernelLaunch` /// - Consult the appropriate adapter driver documentation for details of /// adapter specific behavior and native error codes that may be returned. -/// +/// /// @remarks /// _Analogues_ /// - **cuLaunchKernelEx** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -7658,39 +7490,34 @@ ur_result_t UR_APICALL urEnqueueTimestampRecordingExp( /// - ::UR_RESULT_ERROR_INVALID_VALUE /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urEnqueueKernelLaunchCustomExp( - ur_queue_handle_t hQueue, ///< [in] handle of the queue object - ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object - uint32_t - workDim, ///< [in] number of dimensions, from 1 to 3, to specify the global and - ///< work-group work-items - const size_t * - pGlobalWorkOffset, ///< [in] pointer to an array of workDim unsigned values that specify the - ///< offset used to calculate the global ID of a work-item - const size_t * - pGlobalWorkSize, ///< [in] pointer to an array of workDim unsigned values that specify the - ///< number of global work-items in workDim that will execute the kernel - ///< function - const size_t * - pLocalWorkSize, ///< [in][optional] pointer to an array of workDim unsigned values that - ///< specify the number of local work-items forming a work-group that will - ///< execute the kernel function. If nullptr, the runtime implementation - ///< will choose the work-group size. - uint32_t numPropsInLaunchPropList, ///< [in] size of the launch prop list - const ur_exp_launch_property_t * - launchPropList, ///< [in][range(0, numPropsInLaunchPropList)] pointer to a list of launch - ///< properties - uint32_t numEventsInWaitList, ///< [in] size of the event wait list - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before the kernel execution. If nullptr, - ///< the numEventsInWaitList must be 0, indicating that no wait event. - ur_event_handle_t * - phEvent ///< [out][optional] return an event object that identifies this particular - ///< kernel execution instance. If phEventWaitList and phEvent are not - ///< NULL, phEvent must not refer to an element of the phEventWaitList - ///< array. -) { +ur_result_t UR_APICALL +urEnqueueKernelLaunchCustomExp( + ur_queue_handle_t hQueue, ///< [in] handle of the queue object + ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object + uint32_t workDim, ///< [in] number of dimensions, from 1 to 3, to specify the global and + ///< work-group work-items + const size_t* pGlobalWorkOffset, ///< [in] pointer to an array of workDim unsigned values that specify the + ///< offset used to calculate the global ID of a work-item + const size_t* pGlobalWorkSize, ///< [in] pointer to an array of workDim unsigned values that specify the + ///< number of global work-items in workDim that will execute the kernel + ///< function + const size_t* pLocalWorkSize, ///< [in][optional] pointer to an array of workDim unsigned values that + ///< specify the number of local work-items forming a work-group that will + ///< execute the kernel function. If nullptr, the runtime implementation + ///< will choose the work-group size. + uint32_t numPropsInLaunchPropList, ///< [in] size of the launch prop list + const ur_exp_launch_property_t* launchPropList, ///< [in][range(0, numPropsInLaunchPropList)] pointer to a list of launch + ///< properties + uint32_t numEventsInWaitList, ///< [in] size of the event wait list + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before the kernel execution. If nullptr, + ///< the numEventsInWaitList must be 0, indicating that no wait event. + ur_event_handle_t* phEvent ///< [out][optional] return an event object that identifies this particular + ///< kernel execution instance. If phEventWaitList and phEvent are not + ///< NULL, phEvent must not refer to an element of the phEventWaitList + ///< array. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -7698,17 +7525,17 @@ ur_result_t UR_APICALL urEnqueueKernelLaunchCustomExp( /////////////////////////////////////////////////////////////////////////////// /// @brief Produces an executable program from one program, negates need for the /// linking step. -/// +/// /// @details /// - The application may call this function from simultaneous threads. /// - Following a successful call to this entry point, the program passed /// will contain a binary of the ::UR_PROGRAM_BINARY_TYPE_EXECUTABLE type /// for each device in `phDevices`. -/// +/// /// @remarks /// _Analogues_ /// - **clBuildProgram** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -7722,31 +7549,31 @@ ur_result_t UR_APICALL urEnqueueKernelLaunchCustomExp( /// + If `hProgram` isn't a valid program object. /// - ::UR_RESULT_ERROR_PROGRAM_BUILD_FAILURE /// + If an error occurred when building `hProgram`. -ur_result_t UR_APICALL urProgramBuildExp( - ur_program_handle_t hProgram, ///< [in] Handle of the program to build. - uint32_t numDevices, ///< [in] number of devices - ur_device_handle_t * - phDevices, ///< [in][range(0, numDevices)] pointer to array of device handles - const char * - pOptions ///< [in][optional] pointer to build options null-terminated string. -) { +ur_result_t UR_APICALL +urProgramBuildExp( + ur_program_handle_t hProgram, ///< [in] Handle of the program to build. + uint32_t numDevices, ///< [in] number of devices + ur_device_handle_t* phDevices, ///< [in][range(0, numDevices)] pointer to array of device handles + const char* pOptions ///< [in][optional] pointer to build options null-terminated string. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Produces an executable program from one or more programs. -/// +/// /// @details /// - The application may call this function from simultaneous threads. /// - Following a successful call to this entry point `hProgram` will /// contain a binary of the ::UR_PROGRAM_BINARY_TYPE_COMPILED_OBJECT type /// for each device in `phDevices`. -/// +/// /// @remarks /// _Analogues_ /// - **clCompileProgram** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -7760,22 +7587,21 @@ ur_result_t UR_APICALL urProgramBuildExp( /// + If `hProgram` isn't a valid program object. /// - ::UR_RESULT_ERROR_PROGRAM_BUILD_FAILURE /// + If an error occurred while compiling `hProgram`. -ur_result_t UR_APICALL urProgramCompileExp( - ur_program_handle_t - hProgram, ///< [in][out] handle of the program to compile. - uint32_t numDevices, ///< [in] number of devices - ur_device_handle_t * - phDevices, ///< [in][range(0, numDevices)] pointer to array of device handles - const char * - pOptions ///< [in][optional] pointer to build options null-terminated string. -) { +ur_result_t UR_APICALL +urProgramCompileExp( + ur_program_handle_t hProgram, ///< [in][out] handle of the program to compile. + uint32_t numDevices, ///< [in] number of devices + ur_device_handle_t* phDevices, ///< [in][range(0, numDevices)] pointer to array of device handles + const char* pOptions ///< [in][optional] pointer to build options null-terminated string. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Produces an executable program from one or more programs. -/// +/// /// @details /// - The application may call this function from simultaneous threads. /// - Following a successful call to this entry point the program returned @@ -7787,11 +7613,11 @@ ur_result_t UR_APICALL urProgramCompileExp( /// use the build log of this program (accessible via /// ::urProgramGetBuildInfo) to provide an error log for the linking /// failure. -/// +/// /// @remarks /// _Analogues_ /// - **clLinkProgram** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -7809,29 +7635,27 @@ ur_result_t UR_APICALL urProgramCompileExp( /// + `count == 0` /// - ::UR_RESULT_ERROR_PROGRAM_LINK_FAILURE /// + If an error occurred while linking `phPrograms`. -ur_result_t UR_APICALL urProgramLinkExp( - ur_context_handle_t hContext, ///< [in] handle of the context instance. - uint32_t numDevices, ///< [in] number of devices - ur_device_handle_t * - phDevices, ///< [in][range(0, numDevices)] pointer to array of device handles - uint32_t count, ///< [in] number of program handles in `phPrograms`. - const ur_program_handle_t * - phPrograms, ///< [in][range(0, count)] pointer to array of program handles. - const char * - pOptions, ///< [in][optional] pointer to linker options null-terminated string. - ur_program_handle_t - *phProgram ///< [out] pointer to handle of program object created. -) { +ur_result_t UR_APICALL +urProgramLinkExp( + ur_context_handle_t hContext, ///< [in] handle of the context instance. + uint32_t numDevices, ///< [in] number of devices + ur_device_handle_t* phDevices, ///< [in][range(0, numDevices)] pointer to array of device handles + uint32_t count, ///< [in] number of program handles in `phPrograms`. + const ur_program_handle_t* phPrograms, ///< [in][range(0, count)] pointer to array of program handles. + const char* pOptions, ///< [in][optional] pointer to linker options null-terminated string. + ur_program_handle_t* phProgram ///< [out] pointer to handle of program object created. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Import memory into USM -/// +/// /// @details /// - Import memory into USM -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -7843,21 +7667,23 @@ ur_result_t UR_APICALL urProgramLinkExp( /// + `NULL == pMem` /// - ::UR_RESULT_ERROR_INVALID_CONTEXT /// - ::UR_RESULT_ERROR_INVALID_SIZE -ur_result_t UR_APICALL urUSMImportExp( - ur_context_handle_t hContext, ///< [in] handle of the context object - void *pMem, ///< [in] pointer to host memory object - size_t size ///< [in] size in bytes of the host memory object to be imported -) { +ur_result_t UR_APICALL +urUSMImportExp( + ur_context_handle_t hContext, ///< [in] handle of the context object + void* pMem, ///< [in] pointer to host memory object + size_t size ///< [in] size in bytes of the host memory object to be imported + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Release memory from USM -/// +/// /// @details /// - Release memory from USM -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -7868,17 +7694,19 @@ ur_result_t UR_APICALL urUSMImportExp( /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER /// + `NULL == pMem` /// - ::UR_RESULT_ERROR_INVALID_CONTEXT -ur_result_t UR_APICALL urUSMReleaseExp( - ur_context_handle_t hContext, ///< [in] handle of the context object - void *pMem ///< [in] pointer to host memory object -) { +ur_result_t UR_APICALL +urUSMReleaseExp( + ur_context_handle_t hContext, ///< [in] handle of the context object + void* pMem ///< [in] pointer to host memory object + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Enable access to peer device memory -/// +/// /// @details /// - Enables the command device to access and write device memory /// allocations located on the peer device, provided that a P2P link @@ -7896,11 +7724,11 @@ ur_result_t UR_APICALL urUSMReleaseExp( /// device. /// - Consult the appropriate adapter driver documentation for details of /// adapter specific behavior and native error codes that may be returned. -/// +/// /// @remarks /// _Analogues_ /// - **cuCtxEnablePeerAccess** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -7911,18 +7739,19 @@ ur_result_t UR_APICALL urUSMReleaseExp( /// + `NULL == peerDevice` /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC -ur_result_t UR_APICALL urUsmP2PEnablePeerAccessExp( - ur_device_handle_t - commandDevice, ///< [in] handle of the command device object - ur_device_handle_t peerDevice ///< [in] handle of the peer device object -) { +ur_result_t UR_APICALL +urUsmP2PEnablePeerAccessExp( + ur_device_handle_t commandDevice, ///< [in] handle of the command device object + ur_device_handle_t peerDevice ///< [in] handle of the peer device object + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Disable access to peer device memory -/// +/// /// @details /// - Disables the ability of the command device to access and write device /// memory allocations located on the peer device, provided that a P2P @@ -7941,11 +7770,11 @@ ur_result_t UR_APICALL urUsmP2PEnablePeerAccessExp( /// device. /// - Consult the appropriate adapter driver documentation for details of /// adapter specific behavior and native error codes that may be returned. -/// +/// /// @remarks /// _Analogues_ /// - **cuCtxDisablePeerAccess** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -7956,26 +7785,27 @@ ur_result_t UR_APICALL urUsmP2PEnablePeerAccessExp( /// + `NULL == peerDevice` /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC -ur_result_t UR_APICALL urUsmP2PDisablePeerAccessExp( - ur_device_handle_t - commandDevice, ///< [in] handle of the command device object - ur_device_handle_t peerDevice ///< [in] handle of the peer device object -) { +ur_result_t UR_APICALL +urUsmP2PDisablePeerAccessExp( + ur_device_handle_t commandDevice, ///< [in] handle of the command device object + ur_device_handle_t peerDevice ///< [in] handle of the peer device object + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Disable access to peer device memory -/// +/// /// @details /// - Queries the peer access capabilities from the command device to the /// peer device according to the query `propName`. -/// +/// /// @remarks /// _Analogues_ /// - **cuDeviceGetP2PAttribute** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -7985,7 +7815,7 @@ ur_result_t UR_APICALL urUsmP2PDisablePeerAccessExp( /// + `NULL == commandDevice` /// + `NULL == peerDevice` /// - ::UR_RESULT_ERROR_INVALID_ENUMERATION -/// + `::UR_EXP_PEER_INFO_UR_PEER_ATOMICS_SUPPORTED < propName` +/// + `::UR_EXP_PEER_INFO_UR_PEER_ATOMICS_SUPPORT < propName` /// - ::UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// + If `propName` is not supported by the adapter. /// - ::UR_RESULT_ERROR_INVALID_SIZE @@ -7996,22 +7826,21 @@ ur_result_t UR_APICALL urUsmP2PDisablePeerAccessExp( /// + `pPropValue == NULL && pPropSizeRet == NULL` /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC -ur_result_t UR_APICALL urUsmP2PPeerAccessGetInfoExp( - ur_device_handle_t - commandDevice, ///< [in] handle of the command device object - ur_device_handle_t peerDevice, ///< [in] handle of the peer device object - ur_exp_peer_info_t propName, ///< [in] type of the info to retrieve - size_t propSize, ///< [in] the number of bytes pointed to by pPropValue. - void * - pPropValue, ///< [out][optional][typename(propName, propSize)] array of bytes holding - ///< the info. - ///< If propSize is not equal to or greater than the real number of bytes - ///< needed to return the info - ///< then the ::UR_RESULT_ERROR_INVALID_SIZE error is returned and - ///< pPropValue is not used. - size_t * - pPropSizeRet ///< [out][optional] pointer to the actual size in bytes of the queried propName. -) { +ur_result_t UR_APICALL +urUsmP2PPeerAccessGetInfoExp( + ur_device_handle_t commandDevice, ///< [in] handle of the command device object + ur_device_handle_t peerDevice, ///< [in] handle of the peer device object + ur_exp_peer_info_t propName, ///< [in] type of the info to retrieve + size_t propSize, ///< [in] the number of bytes pointed to by pPropValue. + void* pPropValue, ///< [out][optional][typename(propName, propSize)] array of bytes holding + ///< the info. + ///< If propSize is not equal to or greater than the real number of bytes + ///< needed to return the info + ///< then the ::UR_RESULT_ERROR_INVALID_SIZE error is returned and + ///< pPropValue is not used. + size_t* pPropSizeRet ///< [out][optional] pointer to the actual size in bytes of the queried propName. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } @@ -8019,18 +7848,18 @@ ur_result_t UR_APICALL urUsmP2PPeerAccessGetInfoExp( /////////////////////////////////////////////////////////////////////////////// /// @brief Enqueue a barrier command which waits a list of events to complete /// before it completes, with optional extended properties -/// +/// /// @details /// - If the event list is empty, it waits for all previously enqueued /// commands to complete. /// - It blocks command execution - any following commands enqueued after it /// do not execute until it completes. /// - It returns an event which can be waited on. -/// +/// /// @remarks /// _Analogues_ /// - **clEnqueueBarrierWithWaitList** -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -8051,29 +7880,28 @@ ur_result_t UR_APICALL urUsmP2PPeerAccessGetInfoExp( /// - ::UR_RESULT_ERROR_INVALID_VALUE /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urEnqueueEventsWaitWithBarrierExt( - ur_queue_handle_t hQueue, ///< [in] handle of the queue object - const ur_exp_enqueue_ext_properties_t * - pProperties, ///< [in][optional] pointer to the extended enqueue properties - uint32_t numEventsInWaitList, ///< [in] size of the event wait list - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before this command can be executed. - ///< If nullptr, the numEventsInWaitList must be 0, indicating that all - ///< previously enqueued commands - ///< must be complete. - ur_event_handle_t * - phEvent ///< [out][optional] return an event object that identifies this particular - ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent - ///< must not refer to an element of the phEventWaitList array. -) { +ur_result_t UR_APICALL +urEnqueueEventsWaitWithBarrierExt( + ur_queue_handle_t hQueue, ///< [in] handle of the queue object + const ur_exp_enqueue_ext_properties_t* pProperties, ///< [in][optional] pointer to the extended enqueue properties + uint32_t numEventsInWaitList, ///< [in] size of the event wait list + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before this command can be executed. + ///< If nullptr, the numEventsInWaitList must be 0, indicating that all + ///< previously enqueued commands + ///< must be complete. + ur_event_handle_t* phEvent ///< [out][optional] return an event object that identifies this particular + ///< command instance. If phEventWaitList and phEvent are not NULL, phEvent + ///< must not refer to an element of the phEventWaitList array. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Immediately enqueue work through a native backend API -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -8086,40 +7914,37 @@ ur_result_t UR_APICALL urEnqueueEventsWaitWithBarrierExt( /// - ::UR_RESULT_ERROR_INVALID_ENUMERATION /// + `NULL != pProperties && ::UR_EXP_ENQUEUE_NATIVE_COMMAND_FLAGS_MASK & pProperties->flags` /// - ::UR_RESULT_ERROR_INVALID_EVENT_WAIT_LIST -ur_result_t UR_APICALL urEnqueueNativeCommandExp( - ur_queue_handle_t hQueue, ///< [in] handle of the queue object - ur_exp_enqueue_native_command_function_t - pfnNativeEnqueue, ///< [in] function calling the native underlying API, to be executed - ///< immediately. - void *data, ///< [in][optional] data used by pfnNativeEnqueue - uint32_t numMemsInMemList, ///< [in] size of the mem list - const ur_mem_handle_t * - phMemList, ///< [in][optional][range(0, numMemsInMemList)] mems that are used within - ///< pfnNativeEnqueue using ::urMemGetNativeHandle. - ///< If nullptr, the numMemsInMemList must be 0, indicating that no mems - ///< are accessed with ::urMemGetNativeHandle within pfnNativeEnqueue. - const ur_exp_enqueue_native_command_properties_t * - pProperties, ///< [in][optional] pointer to the native enqueue properties - uint32_t numEventsInWaitList, ///< [in] size of the event wait list - const ur_event_handle_t * - phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of - ///< events that must be complete before the kernel execution. - ///< If nullptr, the numEventsInWaitList must be 0, indicating no wait events. - ur_event_handle_t * - phEvent ///< [out][optional] return an event object that identifies the work that has - ///< been enqueued in nativeEnqueueFunc. If phEventWaitList and phEvent are - ///< not NULL, phEvent must not refer to an element of the phEventWaitList array. -) { +ur_result_t UR_APICALL +urEnqueueNativeCommandExp( + ur_queue_handle_t hQueue, ///< [in] handle of the queue object + ur_exp_enqueue_native_command_function_t pfnNativeEnqueue, ///< [in] function calling the native underlying API, to be executed + ///< immediately. + void* data, ///< [in][optional] data used by pfnNativeEnqueue + uint32_t numMemsInMemList, ///< [in] size of the mem list + const ur_mem_handle_t* phMemList, ///< [in][optional][range(0, numMemsInMemList)] mems that are used within + ///< pfnNativeEnqueue using ::urMemGetNativeHandle. + ///< If nullptr, the numMemsInMemList must be 0, indicating that no mems + ///< are accessed with ::urMemGetNativeHandle within pfnNativeEnqueue. + const ur_exp_enqueue_native_command_properties_t* pProperties, ///< [in][optional] pointer to the native enqueue properties + uint32_t numEventsInWaitList, ///< [in] size of the event wait list + const ur_event_handle_t* phEventWaitList, ///< [in][optional][range(0, numEventsInWaitList)] pointer to a list of + ///< events that must be complete before the kernel execution. + ///< If nullptr, the numEventsInWaitList must be 0, indicating no wait events. + ur_event_handle_t* phEvent ///< [out][optional] return an event object that identifies the work that has + ///< been enqueued in nativeEnqueueFunc. If phEventWaitList and phEvent are + ///< not NULL, phEvent must not refer to an element of the phEventWaitList array. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Encode tensor map with image data -/// +/// /// @details /// - Map encode using im2col. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -8143,50 +7968,40 @@ ur_result_t UR_APICALL urEnqueueNativeCommandExp( /// + `NULL == hTensorMap` /// - ::UR_RESULT_ERROR_INVALID_ARGUMENT /// + `TensorRank < 3` -ur_result_t UR_APICALL urTensorMapEncodeIm2ColExp( - ur_device_handle_t hDevice, ///< [in] Handle of the device object. - ur_exp_tensor_map_data_type_flags_t - TensorMapType, ///< [in] Data type of the tensor object. - uint32_t TensorRank, ///< [in] Dimensionality of tensor; must be at least 3. - void * - GlobalAddress, ///< [in] Starting address of memory region described by tensor. - const uint64_t * - GlobalDim, ///< [in] Array containing tensor size (number of elements) along each of - ///< the TensorRank dimensions. - const uint64_t * - GlobalStrides, ///< [in] Array containing stride size (in bytes) along each of the - ///< TensorRank - 1 dimensions. - const int * - PixelBoxLowerCorner, ///< [in] Array containing DHW dimensions of lower box corner. - const int * - PixelBoxUpperCorner, ///< [in] Array containing DHW dimensions of upper box corner. - uint32_t ChannelsPerPixel, ///< [in] Number of channels per pixel. - uint32_t PixelsPerColumn, ///< [in] Number of pixels per column. - const uint32_t * - ElementStrides, ///< [in] Array containing traversal stride in each of the TensorRank - ///< dimensions. - ur_exp_tensor_map_interleave_flags_t - Interleave, ///< [in] Type of interleaved layout the tensor addresses - ur_exp_tensor_map_swizzle_flags_t - Swizzle, ///< [in] Bank swizzling pattern inside shared memory - ur_exp_tensor_map_l2_promotion_flags_t - L2Promotion, ///< [in] L2 promotion size. - ur_exp_tensor_map_oob_fill_flags_t - OobFill, ///< [in] Indicates whether zero or special NaN constant will be used to - ///< fill out-of-bounds elements. - ur_exp_tensor_map_handle_t - *hTensorMap ///< [out] Handle of the tensor map object. -) { +ur_result_t UR_APICALL +urTensorMapEncodeIm2ColExp( + ur_device_handle_t hDevice, ///< [in] Handle of the device object. + ur_exp_tensor_map_data_type_flags_t TensorMapType, ///< [in] Data type of the tensor object. + uint32_t TensorRank, ///< [in] Dimensionality of tensor; must be at least 3. + void* GlobalAddress, ///< [in] Starting address of memory region described by tensor. + const uint64_t* GlobalDim, ///< [in] Array containing tensor size (number of elements) along each of + ///< the TensorRank dimensions. + const uint64_t* GlobalStrides, ///< [in] Array containing stride size (in bytes) along each of the + ///< TensorRank - 1 dimensions. + const int* PixelBoxLowerCorner, ///< [in] Array containing DHW dimensions of lower box corner. + const int* PixelBoxUpperCorner, ///< [in] Array containing DHW dimensions of upper box corner. + uint32_t ChannelsPerPixel, ///< [in] Number of channels per pixel. + uint32_t PixelsPerColumn, ///< [in] Number of pixels per column. + const uint32_t* ElementStrides, ///< [in] Array containing traversal stride in each of the TensorRank + ///< dimensions. + ur_exp_tensor_map_interleave_flags_t Interleave,///< [in] Type of interleaved layout the tensor addresses + ur_exp_tensor_map_swizzle_flags_t Swizzle, ///< [in] Bank swizzling pattern inside shared memory + ur_exp_tensor_map_l2_promotion_flags_t L2Promotion, ///< [in] L2 promotion size. + ur_exp_tensor_map_oob_fill_flags_t OobFill, ///< [in] Indicates whether zero or special NaN constant will be used to + ///< fill out-of-bounds elements. + ur_exp_tensor_map_handle_t* hTensorMap ///< [out] Handle of the tensor map object. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } /////////////////////////////////////////////////////////////////////////////// /// @brief Encode tensor map with tiled data -/// +/// /// @details /// - Tiled map encode. -/// +/// /// @returns /// - ::UR_RESULT_SUCCESS /// - ::UR_RESULT_ERROR_UNINITIALIZED @@ -8209,38 +8024,30 @@ ur_result_t UR_APICALL urTensorMapEncodeIm2ColExp( /// + `NULL == hTensorMap` /// - ::UR_RESULT_ERROR_INVALID_ARGUMENT /// + `TensorRank < 3` -ur_result_t UR_APICALL urTensorMapEncodeTiledExp( - ur_device_handle_t hDevice, ///< [in] Handle of the device object. - ur_exp_tensor_map_data_type_flags_t - TensorMapType, ///< [in] Data type of the tensor object. - uint32_t TensorRank, ///< [in] Dimensionality of tensor; must be at least 3. - void * - GlobalAddress, ///< [in] Starting address of memory region described by tensor. - const uint64_t * - GlobalDim, ///< [in] Array containing tensor size (number of elements) along each of - ///< the TensorRank dimensions. - const uint64_t * - GlobalStrides, ///< [in] Array containing stride size (in bytes) along each of the - ///< TensorRank - 1 dimensions. - const uint32_t * - BoxDim, ///< [in] Array containing traversal box size (number of elments) along - ///< each of the TensorRank dimensions. Specifies how many elements to be - ///< traversed along each tensor dimension. - const uint32_t * - ElementStrides, ///< [in] Array containing traversal stride in each of the TensorRank - ///< dimensions. - ur_exp_tensor_map_interleave_flags_t - Interleave, ///< [in] Type of interleaved layout the tensor addresses - ur_exp_tensor_map_swizzle_flags_t - Swizzle, ///< [in] Bank swizzling pattern inside shared memory - ur_exp_tensor_map_l2_promotion_flags_t - L2Promotion, ///< [in] L2 promotion size. - ur_exp_tensor_map_oob_fill_flags_t - OobFill, ///< [in] Indicates whether zero or special NaN constant will be used to - ///< fill out-of-bounds elements. - ur_exp_tensor_map_handle_t - *hTensorMap ///< [out] Handle of the tensor map object. -) { +ur_result_t UR_APICALL +urTensorMapEncodeTiledExp( + ur_device_handle_t hDevice, ///< [in] Handle of the device object. + ur_exp_tensor_map_data_type_flags_t TensorMapType, ///< [in] Data type of the tensor object. + uint32_t TensorRank, ///< [in] Dimensionality of tensor; must be at least 3. + void* GlobalAddress, ///< [in] Starting address of memory region described by tensor. + const uint64_t* GlobalDim, ///< [in] Array containing tensor size (number of elements) along each of + ///< the TensorRank dimensions. + const uint64_t* GlobalStrides, ///< [in] Array containing stride size (in bytes) along each of the + ///< TensorRank - 1 dimensions. + const uint32_t* BoxDim, ///< [in] Array containing traversal box size (number of elments) along + ///< each of the TensorRank dimensions. Specifies how many elements to be + ///< traversed along each tensor dimension. + const uint32_t* ElementStrides, ///< [in] Array containing traversal stride in each of the TensorRank + ///< dimensions. + ur_exp_tensor_map_interleave_flags_t Interleave,///< [in] Type of interleaved layout the tensor addresses + ur_exp_tensor_map_swizzle_flags_t Swizzle, ///< [in] Bank swizzling pattern inside shared memory + ur_exp_tensor_map_l2_promotion_flags_t L2Promotion, ///< [in] L2 promotion size. + ur_exp_tensor_map_oob_fill_flags_t OobFill, ///< [in] Indicates whether zero or special NaN constant will be used to + ///< fill out-of-bounds elements. + ur_exp_tensor_map_handle_t* hTensorMap ///< [out] Handle of the tensor map object. + ) +{ ur_result_t result = UR_RESULT_SUCCESS; return result; } + diff --git a/test/conformance/device/device_adapter_native_cpu.match b/test/conformance/device/device_adapter_native_cpu.match index 00b3642e71..b4631d8e13 100644 --- a/test/conformance/device/device_adapter_native_cpu.match +++ b/test/conformance/device/device_adapter_native_cpu.match @@ -24,6 +24,6 @@ urDeviceGetInfoTest.Success/UR_DEVICE_INFO_MAX_COMPUTE_QUEUE_INDICES urDeviceGetInfoTest.Success/UR_DEVICE_INFO_MEMORY_BUS_WIDTH urDeviceGetInfoTest.Success/UR_DEVICE_INFO_MAX_WORK_GROUPS_3D urDeviceGetInfoTest.Success/UR_DEVICE_INFO_ASYNC_BARRIER -urDeviceGetInfoTest.Success/UR_DEVICE_INFO_HOST_PIPE_READ_WRITE_SUPPORTED +urDeviceGetInfoTest.Success/UR_DEVICE_INFO_HOST_PIPE_READ_WRITE_SUPPORT urDeviceGetInfoTest.Success/UR_DEVICE_INFO_MAX_REGISTERS_PER_WORK_GROUP urDeviceGetInfoTest.Success/UR_DEVICE_INFO_KERNEL_SET_SPECIALIZATION_CONSTANTS diff --git a/test/conformance/device/device_adapter_opencl.match b/test/conformance/device/device_adapter_opencl.match new file mode 100644 index 0000000000..716ebd54fe --- /dev/null +++ b/test/conformance/device/device_adapter_opencl.match @@ -0,0 +1 @@ +urDeviceGetInfoTest.Success/UR_DEVICE_INFO_HALF_FP_CONFIG diff --git a/test/conformance/device/urDeviceGetInfo.cpp b/test/conformance/device/urDeviceGetInfo.cpp index 23a2f7f237..39b8137b93 100644 --- a/test/conformance/device/urDeviceGetInfo.cpp +++ b/test/conformance/device/urDeviceGetInfo.cpp @@ -7,296 +7,2036 @@ #include #include -static std::unordered_map device_info_size_map = { - {UR_DEVICE_INFO_TYPE, sizeof(ur_device_type_t)}, - {UR_DEVICE_INFO_VENDOR_ID, sizeof(uint32_t)}, - {UR_DEVICE_INFO_DEVICE_ID, sizeof(uint32_t)}, - {UR_DEVICE_INFO_MAX_COMPUTE_UNITS, sizeof(uint32_t)}, - {UR_DEVICE_INFO_MAX_WORK_ITEM_DIMENSIONS, sizeof(uint32_t)}, - {UR_DEVICE_INFO_MAX_WORK_GROUP_SIZE, sizeof(size_t)}, - {UR_DEVICE_INFO_SINGLE_FP_CONFIG, sizeof(ur_device_fp_capability_flags_t)}, - {UR_DEVICE_INFO_HALF_FP_CONFIG, sizeof(ur_device_fp_capability_flags_t)}, - {UR_DEVICE_INFO_DOUBLE_FP_CONFIG, sizeof(ur_device_fp_capability_flags_t)}, - {UR_DEVICE_INFO_QUEUE_PROPERTIES, sizeof(ur_queue_flags_t)}, - {UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_CHAR, sizeof(uint32_t)}, - {UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_SHORT, sizeof(uint32_t)}, - {UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_INT, sizeof(uint32_t)}, - {UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG, sizeof(uint32_t)}, - {UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_FLOAT, sizeof(uint32_t)}, - {UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_DOUBLE, sizeof(uint32_t)}, - {UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_HALF, sizeof(uint32_t)}, - {UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_CHAR, sizeof(uint32_t)}, - {UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_SHORT, sizeof(uint32_t)}, - {UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_INT, sizeof(uint32_t)}, - {UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG, sizeof(uint32_t)}, - {UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_FLOAT, sizeof(uint32_t)}, - {UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_DOUBLE, sizeof(uint32_t)}, - {UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_HALF, sizeof(uint32_t)}, - {UR_DEVICE_INFO_MAX_CLOCK_FREQUENCY, sizeof(uint32_t)}, - {UR_DEVICE_INFO_MEMORY_CLOCK_RATE, sizeof(uint32_t)}, - {UR_DEVICE_INFO_ADDRESS_BITS, sizeof(uint32_t)}, - {UR_DEVICE_INFO_MAX_MEM_ALLOC_SIZE, sizeof(uint64_t)}, - {UR_DEVICE_INFO_IMAGE_SUPPORTED, sizeof(ur_bool_t)}, - {UR_DEVICE_INFO_MAX_READ_IMAGE_ARGS, sizeof(uint32_t)}, - {UR_DEVICE_INFO_MAX_WRITE_IMAGE_ARGS, sizeof(uint32_t)}, - {UR_DEVICE_INFO_MAX_READ_WRITE_IMAGE_ARGS, sizeof(uint32_t)}, - {UR_DEVICE_INFO_IMAGE2D_MAX_WIDTH, sizeof(size_t)}, - {UR_DEVICE_INFO_IMAGE2D_MAX_HEIGHT, sizeof(size_t)}, - {UR_DEVICE_INFO_IMAGE3D_MAX_WIDTH, sizeof(size_t)}, - {UR_DEVICE_INFO_IMAGE3D_MAX_HEIGHT, sizeof(size_t)}, - {UR_DEVICE_INFO_IMAGE3D_MAX_DEPTH, sizeof(size_t)}, - {UR_DEVICE_INFO_IMAGE_MAX_BUFFER_SIZE, sizeof(size_t)}, - {UR_DEVICE_INFO_IMAGE_MAX_ARRAY_SIZE, sizeof(size_t)}, - {UR_DEVICE_INFO_MAX_SAMPLERS, sizeof(uint32_t)}, - {UR_DEVICE_INFO_MAX_PARAMETER_SIZE, sizeof(size_t)}, - {UR_DEVICE_INFO_MEM_BASE_ADDR_ALIGN, sizeof(uint32_t)}, - {UR_DEVICE_INFO_GLOBAL_MEM_CACHE_TYPE, sizeof(ur_device_mem_cache_type_t)}, - {UR_DEVICE_INFO_GLOBAL_MEM_CACHELINE_SIZE, sizeof(uint32_t)}, - {UR_DEVICE_INFO_GLOBAL_MEM_CACHE_SIZE, sizeof(uint64_t)}, - {UR_DEVICE_INFO_GLOBAL_MEM_SIZE, sizeof(uint64_t)}, - {UR_DEVICE_INFO_GLOBAL_MEM_FREE, sizeof(uint64_t)}, - {UR_DEVICE_INFO_MAX_CONSTANT_BUFFER_SIZE, sizeof(uint64_t)}, - {UR_DEVICE_INFO_MAX_CONSTANT_ARGS, sizeof(uint32_t)}, - {UR_DEVICE_INFO_LOCAL_MEM_TYPE, sizeof(ur_device_local_mem_type_t)}, - {UR_DEVICE_INFO_LOCAL_MEM_SIZE, sizeof(uint64_t)}, - {UR_DEVICE_INFO_ERROR_CORRECTION_SUPPORT, sizeof(ur_bool_t)}, - {UR_DEVICE_INFO_HOST_UNIFIED_MEMORY, sizeof(ur_bool_t)}, - {UR_DEVICE_INFO_PROFILING_TIMER_RESOLUTION, sizeof(size_t)}, - {UR_DEVICE_INFO_ENDIAN_LITTLE, sizeof(ur_bool_t)}, - {UR_DEVICE_INFO_AVAILABLE, sizeof(ur_bool_t)}, - {UR_DEVICE_INFO_COMPILER_AVAILABLE, sizeof(ur_bool_t)}, - {UR_DEVICE_INFO_LINKER_AVAILABLE, sizeof(ur_bool_t)}, - {UR_DEVICE_INFO_EXECUTION_CAPABILITIES, - sizeof(ur_device_exec_capability_flags_t)}, - {UR_DEVICE_INFO_QUEUE_ON_DEVICE_PROPERTIES, sizeof(ur_queue_flags_t)}, - {UR_DEVICE_INFO_QUEUE_ON_HOST_PROPERTIES, sizeof(ur_queue_flags_t)}, - {UR_DEVICE_INFO_PLATFORM, sizeof(ur_platform_handle_t)}, - {UR_DEVICE_INFO_REFERENCE_COUNT, sizeof(uint32_t)}, - {UR_DEVICE_INFO_PRINTF_BUFFER_SIZE, sizeof(size_t)}, - {UR_DEVICE_INFO_PREFERRED_INTEROP_USER_SYNC, sizeof(ur_bool_t)}, - {UR_DEVICE_INFO_PARENT_DEVICE, sizeof(ur_device_handle_t)}, - {UR_DEVICE_INFO_PARTITION_MAX_SUB_DEVICES, sizeof(uint32_t)}, - {UR_DEVICE_INFO_PARTITION_AFFINITY_DOMAIN, - sizeof(ur_device_affinity_domain_flags_t)}, - {UR_DEVICE_INFO_MAX_NUM_SUB_GROUPS, sizeof(uint32_t)}, - {UR_DEVICE_INFO_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS, sizeof(ur_bool_t)}, - {UR_DEVICE_INFO_USM_HOST_SUPPORT, - sizeof(ur_device_usm_access_capability_flags_t)}, - {UR_DEVICE_INFO_USM_DEVICE_SUPPORT, - sizeof(ur_device_usm_access_capability_flags_t)}, - {UR_DEVICE_INFO_USM_SINGLE_SHARED_SUPPORT, - sizeof(ur_device_usm_access_capability_flags_t)}, - {UR_DEVICE_INFO_USM_CROSS_SHARED_SUPPORT, - sizeof(ur_device_usm_access_capability_flags_t)}, - {UR_DEVICE_INFO_USM_SYSTEM_SHARED_SUPPORT, - sizeof(ur_device_usm_access_capability_flags_t)}, - {UR_DEVICE_INFO_GPU_EU_COUNT, sizeof(uint32_t)}, - {UR_DEVICE_INFO_GPU_EU_SIMD_WIDTH, sizeof(uint32_t)}, - {UR_DEVICE_INFO_GPU_EU_SLICES, sizeof(uint32_t)}, - {UR_DEVICE_INFO_GPU_EU_COUNT_PER_SUBSLICE, sizeof(uint32_t)}, - {UR_DEVICE_INFO_GPU_SUBSLICES_PER_SLICE, sizeof(uint32_t)}, - {UR_DEVICE_INFO_GPU_HW_THREADS_PER_EU, sizeof(uint32_t)}, - {UR_DEVICE_INFO_MAX_MEMORY_BANDWIDTH, sizeof(uint32_t)}, - {UR_DEVICE_INFO_IMAGE_SRGB, sizeof(ur_bool_t)}, - {UR_DEVICE_INFO_BUILD_ON_SUBDEVICE, sizeof(ur_bool_t)}, - {UR_DEVICE_INFO_ATOMIC_64, sizeof(ur_bool_t)}, - {UR_DEVICE_INFO_ATOMIC_MEMORY_ORDER_CAPABILITIES, - sizeof(ur_memory_order_capability_flags_t)}, - {UR_DEVICE_INFO_ATOMIC_MEMORY_SCOPE_CAPABILITIES, - sizeof(ur_memory_scope_capability_flags_t)}, - {UR_DEVICE_INFO_BFLOAT16, sizeof(ur_bool_t)}, - {UR_DEVICE_INFO_MAX_COMPUTE_QUEUE_INDICES, sizeof(uint32_t)}, - {UR_DEVICE_INFO_KERNEL_SET_SPECIALIZATION_CONSTANTS, sizeof(ur_bool_t)}, - {UR_DEVICE_INFO_MEMORY_BUS_WIDTH, sizeof(uint32_t)}, - {UR_DEVICE_INFO_MAX_WORK_GROUPS_3D, sizeof(size_t[3])}, - {UR_DEVICE_INFO_ASYNC_BARRIER, sizeof(ur_bool_t)}, - {UR_DEVICE_INFO_MEM_CHANNEL_SUPPORT, sizeof(ur_bool_t)}, - {UR_DEVICE_INFO_HOST_PIPE_READ_WRITE_SUPPORTED, sizeof(ur_bool_t)}, - {UR_DEVICE_INFO_MAX_REGISTERS_PER_WORK_GROUP, sizeof(uint32_t)}, - {UR_DEVICE_INFO_COMPONENT_DEVICES, sizeof(uint32_t)}, - {UR_DEVICE_INFO_COMPOSITE_DEVICE, sizeof(ur_device_handle_t)}, - {UR_DEVICE_INFO_USM_POOL_SUPPORT, sizeof(ur_bool_t)}, - {UR_DEVICE_INFO_2D_BLOCK_ARRAY_CAPABILITIES_EXP, - sizeof(ur_exp_device_2d_block_array_capability_flags_t)}}; - -struct urDeviceGetInfoTest : uur::urAllDevicesTest, - ::testing::WithParamInterface { - - void SetUp() override { - UUR_RETURN_ON_FATAL_FAILURE(uur::urAllDevicesTest::SetUp()); - } -}; - -INSTANTIATE_TEST_SUITE_P( - , urDeviceGetInfoTest, - ::testing::Values( - - UR_DEVICE_INFO_TYPE, - UR_DEVICE_INFO_VENDOR_ID, // - UR_DEVICE_INFO_DEVICE_ID, // - UR_DEVICE_INFO_MAX_COMPUTE_UNITS, // - UR_DEVICE_INFO_MAX_WORK_ITEM_DIMENSIONS, // - UR_DEVICE_INFO_MAX_WORK_ITEM_SIZES, // - UR_DEVICE_INFO_MAX_WORK_GROUP_SIZE, // - UR_DEVICE_INFO_SINGLE_FP_CONFIG, // - UR_DEVICE_INFO_HALF_FP_CONFIG, // - UR_DEVICE_INFO_DOUBLE_FP_CONFIG, // - UR_DEVICE_INFO_QUEUE_PROPERTIES, // - UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_CHAR, // - UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_SHORT, // - UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG, // - UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_FLOAT, // - UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_CHAR, // - UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_SHORT, // - UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_INT, // - UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG, // - UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_FLOAT, // - UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_DOUBLE, // - UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_HALF, // - UR_DEVICE_INFO_MAX_CLOCK_FREQUENCY, // - UR_DEVICE_INFO_MEMORY_CLOCK_RATE, // - UR_DEVICE_INFO_ADDRESS_BITS, // - UR_DEVICE_INFO_MAX_MEM_ALLOC_SIZE, // - UR_DEVICE_INFO_IMAGE_SUPPORTED, // - UR_DEVICE_INFO_MAX_READ_IMAGE_ARGS, // - UR_DEVICE_INFO_MAX_WRITE_IMAGE_ARGS, // - UR_DEVICE_INFO_MAX_READ_WRITE_IMAGE_ARGS, // - UR_DEVICE_INFO_IMAGE2D_MAX_WIDTH, // - UR_DEVICE_INFO_IMAGE2D_MAX_HEIGHT, // - UR_DEVICE_INFO_IMAGE3D_MAX_WIDTH, // - UR_DEVICE_INFO_IMAGE3D_MAX_HEIGHT, // - UR_DEVICE_INFO_IMAGE3D_MAX_DEPTH, // - UR_DEVICE_INFO_IMAGE_MAX_BUFFER_SIZE, // - UR_DEVICE_INFO_IMAGE_MAX_ARRAY_SIZE, // - UR_DEVICE_INFO_MAX_SAMPLERS, // - UR_DEVICE_INFO_MAX_PARAMETER_SIZE, // - UR_DEVICE_INFO_MEM_BASE_ADDR_ALIGN, // - UR_DEVICE_INFO_GLOBAL_MEM_CACHE_TYPE, // - UR_DEVICE_INFO_GLOBAL_MEM_CACHELINE_SIZE, // - UR_DEVICE_INFO_GLOBAL_MEM_CACHE_SIZE, // - UR_DEVICE_INFO_GLOBAL_MEM_SIZE, // - UR_DEVICE_INFO_GLOBAL_MEM_FREE, // - UR_DEVICE_INFO_MAX_CONSTANT_BUFFER_SIZE, // - UR_DEVICE_INFO_MAX_CONSTANT_ARGS, // - UR_DEVICE_INFO_LOCAL_MEM_TYPE, // - UR_DEVICE_INFO_LOCAL_MEM_SIZE, // - UR_DEVICE_INFO_ERROR_CORRECTION_SUPPORT, // - UR_DEVICE_INFO_HOST_UNIFIED_MEMORY, // - UR_DEVICE_INFO_PROFILING_TIMER_RESOLUTION, // - UR_DEVICE_INFO_ENDIAN_LITTLE, // - UR_DEVICE_INFO_AVAILABLE, // - UR_DEVICE_INFO_COMPILER_AVAILABLE, // - UR_DEVICE_INFO_LINKER_AVAILABLE, // - UR_DEVICE_INFO_EXECUTION_CAPABILITIES, // - UR_DEVICE_INFO_QUEUE_ON_DEVICE_PROPERTIES, // - UR_DEVICE_INFO_QUEUE_ON_HOST_PROPERTIES, // - UR_DEVICE_INFO_BUILT_IN_KERNELS, // - UR_DEVICE_INFO_PLATFORM, // - UR_DEVICE_INFO_REFERENCE_COUNT, // - UR_DEVICE_INFO_IL_VERSION, // - UR_DEVICE_INFO_NAME, // - UR_DEVICE_INFO_VENDOR, // - UR_DEVICE_INFO_DRIVER_VERSION, // - UR_DEVICE_INFO_PROFILE, // - UR_DEVICE_INFO_VERSION, // - UR_DEVICE_INFO_BACKEND_RUNTIME_VERSION, // - UR_DEVICE_INFO_EXTENSIONS, // - UR_DEVICE_INFO_PRINTF_BUFFER_SIZE, // - UR_DEVICE_INFO_PREFERRED_INTEROP_USER_SYNC, // - UR_DEVICE_INFO_PARENT_DEVICE, // - UR_DEVICE_INFO_SUPPORTED_PARTITIONS, // - UR_DEVICE_INFO_PARTITION_MAX_SUB_DEVICES, // - UR_DEVICE_INFO_PARTITION_AFFINITY_DOMAIN, // - UR_DEVICE_INFO_PARTITION_TYPE, // - UR_DEVICE_INFO_MAX_NUM_SUB_GROUPS, // - UR_DEVICE_INFO_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS, // - UR_DEVICE_INFO_SUB_GROUP_SIZES_INTEL, // - UR_DEVICE_INFO_USM_HOST_SUPPORT, // - UR_DEVICE_INFO_USM_DEVICE_SUPPORT, // - UR_DEVICE_INFO_USM_SINGLE_SHARED_SUPPORT, // - UR_DEVICE_INFO_USM_CROSS_SHARED_SUPPORT, // - UR_DEVICE_INFO_USM_SYSTEM_SHARED_SUPPORT, // - UR_DEVICE_INFO_UUID, // - UR_DEVICE_INFO_PCI_ADDRESS, // - UR_DEVICE_INFO_GPU_EU_COUNT, // - UR_DEVICE_INFO_GPU_EU_SIMD_WIDTH, // - UR_DEVICE_INFO_GPU_EU_SLICES, // - UR_DEVICE_INFO_GPU_EU_COUNT_PER_SUBSLICE, // - UR_DEVICE_INFO_GPU_SUBSLICES_PER_SLICE, // - UR_DEVICE_INFO_GPU_HW_THREADS_PER_EU, // - UR_DEVICE_INFO_MAX_MEMORY_BANDWIDTH, // - UR_DEVICE_INFO_IMAGE_SRGB, // - UR_DEVICE_INFO_BUILD_ON_SUBDEVICE, // - UR_DEVICE_INFO_ATOMIC_64, // - UR_DEVICE_INFO_ATOMIC_MEMORY_ORDER_CAPABILITIES, // - UR_DEVICE_INFO_BFLOAT16, // - UR_DEVICE_INFO_MAX_COMPUTE_QUEUE_INDICES, // - UR_DEVICE_INFO_MEMORY_BUS_WIDTH, // - UR_DEVICE_INFO_MAX_WORK_GROUPS_3D, // - UR_DEVICE_INFO_ASYNC_BARRIER, // - UR_DEVICE_INFO_MEM_CHANNEL_SUPPORT, // - UR_DEVICE_INFO_HOST_PIPE_READ_WRITE_SUPPORTED, // - UR_DEVICE_INFO_MAX_REGISTERS_PER_WORK_GROUP, // - UR_DEVICE_INFO_VIRTUAL_MEMORY_SUPPORT, // - UR_DEVICE_INFO_KERNEL_SET_SPECIALIZATION_CONSTANTS, // - UR_DEVICE_INFO_USM_POOL_SUPPORT, // - UR_DEVICE_INFO_2D_BLOCK_ARRAY_CAPABILITIES_EXP // - ), - [](const ::testing::TestParamInfo &info) { - std::stringstream ss; - ss << info.param; - return ss.str(); - }); - -struct urDeviceGetInfoSingleTest : uur::urAllDevicesTest { - void SetUp() override { - UUR_RETURN_ON_FATAL_FAILURE(uur::urAllDevicesTest::SetUp()); - } -}; - -bool doesReturnArray(ur_device_info_t info_type) { - if (info_type == UR_DEVICE_INFO_SUPPORTED_PARTITIONS || - info_type == UR_DEVICE_INFO_PARTITION_TYPE) { - return true; - } - return false; -} - -TEST_P(urDeviceGetInfoTest, Success) { - ur_device_info_t info_type = GetParam(); - for (auto device : devices) { - size_t size = 0; - ur_result_t result = - urDeviceGetInfo(device, info_type, 0, nullptr, &size); - - if (result == UR_RESULT_SUCCESS) { - if (doesReturnArray(info_type) && size == 0) { - return; +using urDeviceGetInfoTest = uur::urAllDevicesTest; + +TEST_F(urDeviceGetInfoTest, SuccessDeviceType) { + size_t size = 0; + const ur_device_info_t info_type = UR_DEVICE_INFO_TYPE; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_device_type_t)); + + std::vector info_data(size); + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, size, + info_data.data(), nullptr)); + + const auto returned_data = + reinterpret_cast(info_data.data()); + ASSERT_GE(*returned_data, UR_DEVICE_TYPE_DEFAULT); + ASSERT_LT(*returned_data, UR_DEVICE_TYPE_FORCE_UINT32); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessVendorId) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, UR_DEVICE_INFO_VENDOR_ID, 0, + nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessDeviceId) { + size_t size = 0; + const ur_device_info_t info_type = UR_DEVICE_INFO_DEVICE_ID; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED( + urDeviceGetInfo(device, info_type, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + + std::vector info_data(size); + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, size, + info_data.data(), nullptr)); + + const auto returned_data = + reinterpret_cast(info_data.data()); + ASSERT_GT(*returned_data, 0); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessMaxComputeUnits) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, UR_DEVICE_INFO_MAX_COMPUTE_UNITS, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessMaxWorkItemDimensions) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, + UR_DEVICE_INFO_MAX_WORK_ITEM_DIMENSIONS, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessMaxWorkItemSizes) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo( + device, UR_DEVICE_INFO_MAX_WORK_ITEM_SIZES, 0, nullptr, &size)); + ASSERT_NE(size, 0); + + size_t max_dimensions = 0; + urDeviceGetInfo(device, UR_DEVICE_INFO_MAX_WORK_ITEM_DIMENSIONS, + sizeof(max_dimensions), &max_dimensions, nullptr); + + std::vector max_work_item_sizes(max_dimensions); + urDeviceGetInfo(device, UR_DEVICE_INFO_MAX_WORK_ITEM_SIZES, + max_dimensions * sizeof(size_t), + max_work_item_sizes.data(), nullptr); + + size_t returned_size = 0; + urDeviceGetInfo(device, UR_DEVICE_INFO_MAX_WORK_ITEM_SIZES, 0, nullptr, + &returned_size); + + EXPECT_EQ(returned_size, max_dimensions * sizeof(size_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessMaxWorkGroupSize) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo( + device, UR_DEVICE_INFO_MAX_WORK_GROUP_SIZE, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(size_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessSingleFPConfig) { + size_t size = 0; + const ur_device_info_t info_type = UR_DEVICE_INFO_SINGLE_FP_CONFIG; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_device_fp_capability_flags_t)); + + std::vector info_data(size); + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, size, + info_data.data(), nullptr)); + + const auto returned_data = + reinterpret_cast( + info_data.data()); + ASSERT_EQ(*returned_data & UR_DEVICE_FP_CAPABILITY_FLAGS_MASK, 0); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessHalfFPConfig) { + size_t size = 0; + const ur_device_info_t info_type = UR_DEVICE_INFO_HALF_FP_CONFIG; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_device_fp_capability_flags_t)); + + std::vector info_data(size); + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, size, + info_data.data(), nullptr)); + + const auto returned_data = + reinterpret_cast( + info_data.data()); + ASSERT_EQ(*returned_data & UR_DEVICE_FP_CAPABILITY_FLAGS_MASK, 0); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessDoubleFPConfig) { + size_t size = 0; + const ur_device_info_t info_type = UR_DEVICE_INFO_DOUBLE_FP_CONFIG; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_device_fp_capability_flags_t)); + + std::vector info_data(size); + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, size, + info_data.data(), nullptr)); + + const auto returned_data = + reinterpret_cast( + info_data.data()); + ASSERT_EQ(*returned_data & UR_DEVICE_FP_CAPABILITY_FLAGS_MASK, 0); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessQueueProperties) { + size_t size = 0; + const ur_device_info_t info_type = UR_DEVICE_INFO_QUEUE_PROPERTIES; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_queue_flags_t)); + + std::vector info_data(size); + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, size, + info_data.data(), nullptr)); + + const auto returned_data = + reinterpret_cast(info_data.data()); + ASSERT_EQ(*returned_data & UR_QUEUE_FLAGS_MASK, 0); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessPreferredVectorWidthChar) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS( + urDeviceGetInfo(device, UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_CHAR, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessPreferredVectorWidthShort) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS( + urDeviceGetInfo(device, UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_SHORT, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessPreferredVectorWidthInt) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS( + urDeviceGetInfo(device, UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_INT, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessPreferredVectorWidthLong) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS( + urDeviceGetInfo(device, UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessPreferredVectorWidthFloat) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS( + urDeviceGetInfo(device, UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_FLOAT, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessPreferredVectorWidthDouble) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo( + device, UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_DOUBLE, 0, nullptr, + &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessPreferredVectorWidthHalf) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS( + urDeviceGetInfo(device, UR_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_HALF, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessNativeVectorWidthChar) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, + UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_CHAR, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessNativeVectorWidthShort) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, + UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_SHORT, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessNativeVectorWidthInt) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo( + device, UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_INT, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessNativeVectorWidthLong) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, + UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessNativeVectorWidthFloat) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, + UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_FLOAT, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessNativeVectorWidthDouble) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS( + urDeviceGetInfo(device, UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_DOUBLE, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessNativeVectorWidthHalf) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, + UR_DEVICE_INFO_NATIVE_VECTOR_WIDTH_HALF, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessMaxClockFrequency) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo( + device, UR_DEVICE_INFO_MAX_CLOCK_FREQUENCY, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessMemoryClockRate) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo( + device, UR_DEVICE_INFO_MEMORY_CLOCK_RATE, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessAddressBits) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, UR_DEVICE_INFO_ADDRESS_BITS, 0, + nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessMaxMemAllocSize) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo( + device, UR_DEVICE_INFO_MAX_MEM_ALLOC_SIZE, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint64_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessImageSupported) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, UR_DEVICE_INFO_IMAGE_SUPPORT, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessMaxReadImageArgs) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo( + device, UR_DEVICE_INFO_MAX_READ_IMAGE_ARGS, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessMaxWriteImageArgs) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo( + device, UR_DEVICE_INFO_MAX_WRITE_IMAGE_ARGS, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessMaxReadWriteImageArgs) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, + UR_DEVICE_INFO_MAX_READ_WRITE_IMAGE_ARGS, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessImage2DMaxWidth) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, UR_DEVICE_INFO_IMAGE2D_MAX_WIDTH, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(size_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessImage2DMaxHeight) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo( + device, UR_DEVICE_INFO_IMAGE2D_MAX_HEIGHT, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(size_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessImage3DMaxWidth) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, UR_DEVICE_INFO_IMAGE3D_MAX_WIDTH, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(size_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessImage3DMaxHeight) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo( + device, UR_DEVICE_INFO_IMAGE3D_MAX_HEIGHT, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(size_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessImage3DMaxDepth) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, UR_DEVICE_INFO_IMAGE3D_MAX_DEPTH, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(size_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessImageMaxBufferSize) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo( + device, UR_DEVICE_INFO_IMAGE_MAX_BUFFER_SIZE, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(size_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessImageMaxArraySize) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo( + device, UR_DEVICE_INFO_IMAGE_MAX_ARRAY_SIZE, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(size_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessMaxSamplers) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, UR_DEVICE_INFO_MAX_SAMPLERS, 0, + nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessMaxParameterSize) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo( + device, UR_DEVICE_INFO_MAX_PARAMETER_SIZE, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(size_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessMemoryBaseAddressAlignment) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo( + device, UR_DEVICE_INFO_MEM_BASE_ADDR_ALIGN, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessGlobalMemoryCacheType) { + size_t size = 0; + const ur_device_info_t info_type = UR_DEVICE_INFO_GLOBAL_MEM_CACHE_TYPE; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_device_mem_cache_type_t)); + + std::vector info_data(size); + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, size, + info_data.data(), nullptr)); + + const auto returned_data = + reinterpret_cast(info_data.data()); + ASSERT_GE(*returned_data, UR_DEVICE_MEM_CACHE_TYPE_NONE); + ASSERT_LT(*returned_data, UR_DEVICE_MEM_CACHE_TYPE_FORCE_UINT32); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessGlobalMemoryCacheLineSize) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, + UR_DEVICE_INFO_GLOBAL_MEM_CACHELINE_SIZE, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessGlobalMemoryCacheSize) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo( + device, UR_DEVICE_INFO_GLOBAL_MEM_CACHE_SIZE, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint64_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessGlobalMemorySize) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, UR_DEVICE_INFO_GLOBAL_MEM_SIZE, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint64_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessGlobalMemoryFreeSize) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo( + device, UR_DEVICE_INFO_GLOBAL_MEM_FREE, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint64_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessMaxConstantBufferSize) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, + UR_DEVICE_INFO_MAX_CONSTANT_BUFFER_SIZE, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint64_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessMaxConstantArgs) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, UR_DEVICE_INFO_MAX_CONSTANT_ARGS, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessLocalMemoryType) { + size_t size = 0; + const ur_device_info_t info_type = UR_DEVICE_INFO_LOCAL_MEM_TYPE; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_device_local_mem_type_t)); + + std::vector info_data(size); + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, size, + info_data.data(), nullptr)); + + const auto returned_data = + reinterpret_cast(info_data.data()); + ASSERT_GE(*returned_data, UR_DEVICE_LOCAL_MEM_TYPE_NONE); + ASSERT_LT(*returned_data, UR_DEVICE_LOCAL_MEM_TYPE_FORCE_UINT32); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessLocalMemorySize) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, UR_DEVICE_INFO_LOCAL_MEM_SIZE, 0, + nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint64_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessErrorCorrectionSupport) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, + UR_DEVICE_INFO_ERROR_CORRECTION_SUPPORT, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessHostUnifiedMemory) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo( + device, UR_DEVICE_INFO_HOST_UNIFIED_MEMORY, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessProfilingTimerResolution) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS( + urDeviceGetInfo(device, UR_DEVICE_INFO_PROFILING_TIMER_RESOLUTION, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(size_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessEndianLittle) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, UR_DEVICE_INFO_ENDIAN_LITTLE, 0, + nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessAvailable) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, UR_DEVICE_INFO_AVAILABLE, 0, + nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessCompilerAvailable) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo( + device, UR_DEVICE_INFO_COMPILER_AVAILABLE, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessLinkerAvailable) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, UR_DEVICE_INFO_LINKER_AVAILABLE, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessExecutionCapabilities) { + size_t size = 0; + const ur_device_info_t info_type = UR_DEVICE_INFO_EXECUTION_CAPABILITIES; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_device_exec_capability_flags_t)); + + std::vector info_data(size); + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, size, + info_data.data(), nullptr)); + + const auto returned_data = + reinterpret_cast( + info_data.data()); + ASSERT_EQ(*returned_data & UR_DEVICE_EXEC_CAPABILITY_FLAGS_MASK, 0); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessQueueOnDeviceProperties) { + size_t size = 0; + const ur_device_info_t info_type = + UR_DEVICE_INFO_QUEUE_ON_DEVICE_PROPERTIES; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_queue_flags_t)); + + std::vector info_data(size); + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, size, + info_data.data(), nullptr)); + + const auto returned_data = + reinterpret_cast(info_data.data()); + ASSERT_EQ(*returned_data & UR_QUEUE_FLAGS_MASK, 0); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessQueueOnHostProperties) { + size_t size = 0; + const ur_device_info_t info_type = UR_DEVICE_INFO_QUEUE_ON_HOST_PROPERTIES; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_queue_flags_t)); + + std::vector info_data(size); + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, size, + info_data.data(), nullptr)); + + const auto returned_data = + reinterpret_cast(info_data.data()); + ASSERT_EQ(*returned_data & UR_QUEUE_FLAGS_MASK, 0); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessBuiltInKernels) { + size_t size = 0; + const ur_device_info_t info_type = UR_DEVICE_INFO_BUILT_IN_KERNELS; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_GT(size, 0); + + std::vector info_data(size); + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, size, + info_data.data(), nullptr)); + EXPECT_EQ(info_data[size - 1], '\0'); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessPlatform) { + size_t size = 0; + const ur_device_info_t info_type = UR_DEVICE_INFO_PLATFORM; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_platform_handle_t)); + + std::vector info_data(size); + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, size, + info_data.data(), nullptr)); + + const auto returned_data = + reinterpret_cast(info_data.data()); + ASSERT_EQ(*returned_data, platform); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessReferenceCount) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, UR_DEVICE_INFO_REFERENCE_COUNT, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessILVersion) { + size_t size = 0; + const ur_device_info_t info_type = UR_DEVICE_INFO_IL_VERSION; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_GT(size, 0); + + std::vector info_data(size); + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, size, + info_data.data(), nullptr)); + EXPECT_EQ(info_data[size - 1], '\0'); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessName) { + size_t size = 0; + const ur_device_info_t info_type = UR_DEVICE_INFO_NAME; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_GT(size, 0); + + std::vector info_data(size); + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, size, + info_data.data(), nullptr)); + EXPECT_EQ(info_data[size - 1], '\0'); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessVendor) { + size_t size = 0; + const ur_device_info_t info_type = UR_DEVICE_INFO_VENDOR; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_GT(size, 0); + + std::vector info_data(size); + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, size, + info_data.data(), nullptr)); + EXPECT_EQ(info_data[size - 1], '\0'); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessDriverVersion) { + size_t size = 0; + const ur_device_info_t info_type = UR_DEVICE_INFO_DRIVER_VERSION; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_GT(size, 0); + + std::vector info_data(size); + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, size, + info_data.data(), nullptr)); + EXPECT_EQ(info_data[size - 1], '\0'); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessProfile) { + size_t size = 0; + const ur_device_info_t info_type = UR_DEVICE_INFO_PROFILE; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_GT(size, 0); + + std::vector info_data(size); + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, size, + info_data.data(), nullptr)); + EXPECT_EQ(info_data[size - 1], '\0'); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessVersion) { + size_t size = 0; + const ur_device_info_t info_type = UR_DEVICE_INFO_VERSION; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_GT(size, 0); + + std::vector info_data(size); + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, size, + info_data.data(), nullptr)); + EXPECT_EQ(info_data[size - 1], '\0'); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessBackendRuntimeVersion) { + size_t size = 0; + const ur_device_info_t info_type = UR_DEVICE_INFO_BACKEND_RUNTIME_VERSION; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_GT(size, 0); + + std::vector info_data(size); + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, size, + info_data.data(), nullptr)); + EXPECT_EQ(info_data[size - 1], '\0'); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessExtensions) { + size_t size = 0; + const ur_device_info_t info_type = UR_DEVICE_INFO_EXTENSIONS; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_GT(size, 0); + + std::vector info_data(size); + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, size, + info_data.data(), nullptr)); + EXPECT_EQ(info_data[size - 1], '\0'); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessPrintfBufferSize) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo( + device, UR_DEVICE_INFO_PRINTF_BUFFER_SIZE, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(size_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessPreferredInteropUserSync) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS( + urDeviceGetInfo(device, UR_DEVICE_INFO_PREFERRED_INTEROP_USER_SYNC, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessParentDevice) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, UR_DEVICE_INFO_PARENT_DEVICE, 0, + nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_device_handle_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessSupportedPartitions) { + size_t size = 0; + const ur_device_info_t info_type = UR_DEVICE_INFO_SUPPORTED_PARTITIONS; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, 0, nullptr, &size)); + ASSERT_NE(size, 0); + + size_t num_partitions = size / sizeof(ur_device_partition_t); + std::vector partitions(num_partitions); + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, size, + partitions.data(), nullptr)); + + for (const auto &partition : partitions) { + EXPECT_GE(partition, UR_DEVICE_PARTITION_EQUALLY); + EXPECT_LT(partition, UR_DEVICE_PARTITION_FORCE_UINT32); + } + } +} + +TEST_F(urDeviceGetInfoTest, SuccessPartitionMaxSubDevices) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, + UR_DEVICE_INFO_PARTITION_MAX_SUB_DEVICES, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessPartitionAffinityDomain) { + size_t size = 0; + const ur_device_info_t info_type = UR_DEVICE_INFO_PARTITION_AFFINITY_DOMAIN; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_device_affinity_domain_flags_t)); + + std::vector info_data(size); + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, size, + info_data.data(), nullptr)); + + const auto returned_data = + reinterpret_cast( + info_data.data()); + ASSERT_EQ(*returned_data & UR_DEVICE_AFFINITY_DOMAIN_FLAGS_MASK, 0); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessPartitionType) { + size_t size = 0; + const ur_device_info_t info_type = UR_DEVICE_INFO_PARTITION_TYPE; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, 0, nullptr, &size)); + ASSERT_GE(size, 0); + + if (size > 0) { + size_t num_properties = + size / sizeof(ur_device_partition_property_t); + std::vector properties( + num_properties); + + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, size, + properties.data(), nullptr)); + + for (const auto prop : properties) { + ASSERT_GE(prop.type, UR_DEVICE_PARTITION_EQUALLY); + ASSERT_LE(prop.type, UR_DEVICE_PARTITION_FORCE_UINT32); } - ASSERT_NE(size, 0); + } + } +} + +TEST_F(urDeviceGetInfoTest, SuccessMaxSubGroups) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo( + device, UR_DEVICE_INFO_MAX_NUM_SUB_GROUPS, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessSubGroupIndependentForwardProgress) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo( + device, UR_DEVICE_INFO_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS, 0, + nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessSubGroupSizesIntel) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo( + device, UR_DEVICE_INFO_SUB_GROUP_SIZES_INTEL, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size % sizeof(uint32_t), 0); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessUSMHostSupport) { + size_t size = 0; + const ur_device_info_t info_type = UR_DEVICE_INFO_USM_HOST_SUPPORT; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_device_usm_access_capability_flags_t)); + + std::vector info_data(size); + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, size, + info_data.data(), nullptr)); + + const auto returned_data = + reinterpret_cast( + info_data.data()); + ASSERT_EQ(*returned_data & UR_DEVICE_USM_ACCESS_CAPABILITY_FLAGS_MASK, + 0); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessUSMDeviceSupport) { + size_t size = 0; + const ur_device_info_t info_type = UR_DEVICE_INFO_USM_DEVICE_SUPPORT; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_device_usm_access_capability_flags_t)); + + std::vector info_data(size); + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, size, + info_data.data(), nullptr)); + + const auto returned_data = + reinterpret_cast( + info_data.data()); + ASSERT_EQ(*returned_data & UR_DEVICE_USM_ACCESS_CAPABILITY_FLAGS_MASK, + 0); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessUSMSingleSharedSupport) { + size_t size = 0; + const ur_device_info_t info_type = UR_DEVICE_INFO_USM_SINGLE_SHARED_SUPPORT; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_device_usm_access_capability_flags_t)); + + std::vector info_data(size); + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, size, + info_data.data(), nullptr)); + + const auto returned_data = + reinterpret_cast( + info_data.data()); + ASSERT_EQ(*returned_data & UR_DEVICE_USM_ACCESS_CAPABILITY_FLAGS_MASK, + 0); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessUSMCrossSharedSupport) { + size_t size = 0; + const ur_device_info_t info_type = UR_DEVICE_INFO_USM_CROSS_SHARED_SUPPORT; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_device_usm_access_capability_flags_t)); + + std::vector info_data(size); + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, size, + info_data.data(), nullptr)); + + const auto returned_data = + reinterpret_cast( + info_data.data()); + ASSERT_EQ(*returned_data & UR_DEVICE_USM_ACCESS_CAPABILITY_FLAGS_MASK, + 0); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessUSMSystemSharedSupport) { + size_t size = 0; + const ur_device_info_t info_type = UR_DEVICE_INFO_USM_SYSTEM_SHARED_SUPPORT; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_device_usm_access_capability_flags_t)); + + std::vector info_data(size); + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, size, + info_data.data(), nullptr)); + + const auto returned_data = + reinterpret_cast( + info_data.data()); + ASSERT_EQ(*returned_data & UR_DEVICE_USM_ACCESS_CAPABILITY_FLAGS_MASK, + 0); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessUUID) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED( + urDeviceGetInfo(device, UR_DEVICE_INFO_UUID, 0, nullptr, &size)); + ASSERT_NE(size, 0); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessPCIAddress) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo( + device, UR_DEVICE_INFO_PCI_ADDRESS, 0, nullptr, &size)); + ASSERT_NE(size, 0); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessIntelGPUEUCount) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo( + device, UR_DEVICE_INFO_GPU_EU_COUNT, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessIntelGPUEUSIMDWidth) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo( + device, UR_DEVICE_INFO_GPU_EU_SIMD_WIDTH, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessIntelGPUEUSlices) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo( + device, UR_DEVICE_INFO_GPU_EU_SLICES, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessIntelGPUEUCountPerSlice) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED( + urDeviceGetInfo(device, UR_DEVICE_INFO_GPU_EU_COUNT_PER_SUBSLICE, 0, + nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessIntelGPUSubslicesPerSplice) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo( + device, UR_DEVICE_INFO_GPU_SUBSLICES_PER_SLICE, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessIntelGPUHWThreadsPerEU) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo( + device, UR_DEVICE_INFO_GPU_HW_THREADS_PER_EU, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessIntelMaxMemoryBandwidth) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo( + device, UR_DEVICE_INFO_MAX_MEMORY_BANDWIDTH, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessImageSRGB) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, UR_DEVICE_INFO_IMAGE_SRGB, 0, + nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessAtomic64) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, UR_DEVICE_INFO_ATOMIC_64, 0, + nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessAtomicMemoryOrderCapabilities) { + size_t size = 0; + ur_device_info_t info_type = + UR_DEVICE_INFO_ATOMIC_MEMORY_ORDER_CAPABILITIES; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_memory_order_capability_flags_t)); + + std::vector info_data(size); + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, size, + info_data.data(), nullptr)); + + const auto returned_data = + reinterpret_cast( + info_data.data()); + ASSERT_EQ(*returned_data & UR_MEMORY_ORDER_CAPABILITY_FLAGS_MASK, 0); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessAtomicMemoryScopeCapabilities) { + size_t size = 0; + ur_device_info_t info_type = + UR_DEVICE_INFO_ATOMIC_MEMORY_SCOPE_CAPABILITIES; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_memory_scope_capability_flags_t)); + + std::vector info_data(size); + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, size, + info_data.data(), nullptr)); + + const auto returned_data = + reinterpret_cast( + info_data.data()); + ASSERT_EQ(*returned_data & UR_MEMORY_SCOPE_CAPABILITY_FLAGS_MASK, 0); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessAtomicFenceOrderCapabilities) { + size_t size = 0; + const ur_device_info_t info_type = + UR_DEVICE_INFO_ATOMIC_FENCE_ORDER_CAPABILITIES; - if (const auto expected_size = device_info_size_map.find(info_type); - expected_size != device_info_size_map.end()) { - ASSERT_EQ(expected_size->second, size); - } + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_memory_order_capability_flags_t)); - std::vector info_data(size); - ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, size, - info_data.data(), nullptr)); + std::vector info_data(size); + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, size, + info_data.data(), nullptr)); - if (info_type == UR_DEVICE_INFO_PLATFORM) { - auto returned_platform = - reinterpret_cast(info_data.data()); - ASSERT_EQ(*returned_platform, platform); - } + const auto returned_data = + reinterpret_cast( + info_data.data()); + ASSERT_EQ(*returned_data & UR_MEMORY_ORDER_CAPABILITY_FLAGS_MASK, 0); + } +} - } else { - ASSERT_EQ_RESULT(result, UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION); - } +TEST_F(urDeviceGetInfoTest, SuccessAtomicFenceScopeCapabilities) { + size_t size = 0; + const ur_device_info_t info_type = + UR_DEVICE_INFO_ATOMIC_FENCE_SCOPE_CAPABILITIES; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_memory_scope_capability_flags_t)); + + std::vector info_data(size); + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, size, + info_data.data(), nullptr)); + + const auto returned_data = + reinterpret_cast( + info_data.data()); + ASSERT_EQ(*returned_data & UR_MEMORY_SCOPE_CAPABILITY_FLAGS_MASK, 0); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessBFloat64) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, UR_DEVICE_INFO_BFLOAT16, 0, + nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessMaxComputeQueueIndices) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, + UR_DEVICE_INFO_MAX_COMPUTE_QUEUE_INDICES, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessKernelSetSpecializationConstants) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo( + device, UR_DEVICE_INFO_KERNEL_SET_SPECIALIZATION_CONSTANTS, 0, + nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessMemoryBusWidth) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo( + device, UR_DEVICE_INFO_MEMORY_BUS_WIDTH, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessMaxWorkGroups3D) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo( + device, UR_DEVICE_INFO_MAX_WORK_GROUPS_3D, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(size_t) * 3); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessAsyncBarrier) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, UR_DEVICE_INFO_ASYNC_BARRIER, 0, + nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessMemoryChannelSupport) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo( + device, UR_DEVICE_INFO_MEM_CHANNEL_SUPPORT, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessHostPipeReadWriteSupported) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo( + device, UR_DEVICE_INFO_HOST_PIPE_READ_WRITE_SUPPORT, 0, nullptr, + &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessMaxRegistersPerWorkGroup) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED( + urDeviceGetInfo(device, UR_DEVICE_INFO_MAX_REGISTERS_PER_WORK_GROUP, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessIPVersion) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo( + device, UR_DEVICE_INFO_IP_VERSION, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessVirtualMemorySupported) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo( + device, UR_DEVICE_INFO_VIRTUAL_MEMORY_SUPPORT, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessESIMDSupported) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, UR_DEVICE_INFO_ESIMD_SUPPORT, 0, + nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessComponentDevices) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo(device, UR_DEVICE_INFO_COMPONENT_DEVICES, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size % sizeof(ur_device_handle_t), 0); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessCompositeDevice) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo(device, UR_DEVICE_INFO_COMPOSITE_DEVICE, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_device_handle_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessGlobalVariableSupport) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo( + device, UR_DEVICE_INFO_GLOBAL_VARIABLE_SUPPORT, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessUSMPoolSupport) { + size_t size = 0; + + for (auto device : devices) { + ASSERT_SUCCESS(urDeviceGetInfo(device, UR_DEVICE_INFO_USM_POOL_SUPPORT, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessCommandBufferSupport) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED( + urDeviceGetInfo(device, UR_DEVICE_INFO_COMMAND_BUFFER_SUPPORT_EXP, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessCommandBufferUpdateCapabilities) { + size_t size = 0; + const ur_device_info_t info_type = + UR_DEVICE_INFO_COMMAND_BUFFER_UPDATE_CAPABILITIES_EXP; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo(device, info_type, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, + sizeof(ur_device_command_buffer_update_capability_flags_t)); + + std::vector info_data(size); + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, size, + info_data.data(), nullptr)); + + const auto returned_data = reinterpret_cast< + ur_device_command_buffer_update_capability_flags_t *>( + info_data.data()); + ASSERT_EQ(*returned_data & + UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAGS_MASK, + 0); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessCommandBufferEventSupport) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo( + device, UR_DEVICE_INFO_COMMAND_BUFFER_EVENT_SUPPORT_EXP, 0, nullptr, + &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessClusterLaunch) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED( + urDeviceGetInfo(device, UR_DEVICE_INFO_CLUSTER_LAUNCH_SUPPORT_EXP, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessBindlessImagesSupport) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED( + urDeviceGetInfo(device, UR_DEVICE_INFO_BINDLESS_IMAGES_SUPPORT_EXP, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessBindlessImagesSharedUSMSupport) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo( + device, UR_DEVICE_INFO_BINDLESS_IMAGES_SHARED_USM_SUPPORT_EXP, 0, + nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessBindlessImagesShared1DUSMSupport) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo( + device, UR_DEVICE_INFO_BINDLESS_IMAGES_1D_USM_SUPPORT_EXP, 0, + nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessBindlessImagesShared2DUSMSupport) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo( + device, UR_DEVICE_INFO_BINDLESS_IMAGES_2D_USM_SUPPORT_EXP, 0, + nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessImagePitchAlign) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo( + device, UR_DEVICE_INFO_IMAGE_PITCH_ALIGN_EXP, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessMaxImageLinearWidth) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED( + urDeviceGetInfo(device, UR_DEVICE_INFO_MAX_IMAGE_LINEAR_WIDTH_EXP, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(size_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessMaxImageLinearHeight) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED( + urDeviceGetInfo(device, UR_DEVICE_INFO_MAX_IMAGE_LINEAR_HEIGHT_EXP, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(size_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessMaxImageLinearPitch) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED( + urDeviceGetInfo(device, UR_DEVICE_INFO_MAX_IMAGE_LINEAR_PITCH_EXP, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(size_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessMipMapSupport) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo( + device, UR_DEVICE_INFO_MIPMAP_SUPPORT_EXP, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessMipMapAnisotropySupport) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo( + device, UR_DEVICE_INFO_MIPMAP_ANISOTROPY_SUPPORT_EXP, 0, nullptr, + &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessMipMapMaxAnisotropy) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo(device, + UR_DEVICE_INFO_MIPMAP_MAX_ANISOTROPY_EXP, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(uint32_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessMipMapLevelReferenceSupport) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo( + device, UR_DEVICE_INFO_MIPMAP_LEVEL_REFERENCE_SUPPORT_EXP, 0, + nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessExternalMemoryImportSupport) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo( + device, UR_DEVICE_INFO_EXTERNAL_MEMORY_IMPORT_SUPPORT_EXP, 0, + nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessExternalSemaphoreImportSupport) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo( + device, UR_DEVICE_INFO_EXTERNAL_SEMAPHORE_IMPORT_SUPPORT_EXP, 0, + nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessCubemapSupport) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo( + device, UR_DEVICE_INFO_CUBEMAP_SUPPORT_EXP, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessCubemapSeamlessFilteringSupport) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo( + device, UR_DEVICE_INFO_CUBEMAP_SEAMLESS_FILTERING_SUPPORT_EXP, 0, + nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessBindlessSampledImageFetch1DUSM) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo( + device, + UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_USM_SUPPORT_EXP, 0, + nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessBindlessSampledImageFetch1D) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo( + device, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_SUPPORT_EXP, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessBindlessSampledImageFetch2DUSM) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo( + device, + UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_USM_SUPPORT_EXP, 0, + nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessBindlessSampledImageFetch2D) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo( + device, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_SUPPORT_EXP, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessBindlessSampledImageFetch3D) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo( + device, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_3D_SUPPORT_EXP, + 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessTimestampRecordingSupport) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo( + device, UR_DEVICE_INFO_TIMESTAMP_RECORDING_SUPPORT_EXP, 0, nullptr, + &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessImageArraySupport) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo( + device, UR_DEVICE_INFO_IMAGE_ARRAY_SUPPORT_EXP, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessBindlessUniqueAddressingPerDim) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo( + device, + UR_DEVICE_INFO_BINDLESS_UNIQUE_ADDRESSING_PER_DIM_SUPPORT_EXP, 0, + nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessBindlessSample1DUSM) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo( + device, UR_DEVICE_INFO_BINDLESS_SAMPLE_1D_USM_SUPPORT_EXP, 0, + nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessBindlessSample2DUSM) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo( + device, UR_DEVICE_INFO_BINDLESS_SAMPLE_2D_USM_SUPPORT_EXP, 0, + nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, SuccessEnqueueNativeCommandSupport) { + size_t size = 0; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo( + device, UR_DEVICE_INFO_ENQUEUE_NATIVE_COMMAND_SUPPORT_EXP, 0, + nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, sizeof(ur_bool_t)); + } +} + +TEST_F(urDeviceGetInfoTest, Success2DBlockArrayCapabilities) { + size_t size = 0; + const ur_device_info_t info_type = + UR_DEVICE_INFO_2D_BLOCK_ARRAY_CAPABILITIES_EXP; + + for (auto device : devices) { + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(urDeviceGetInfo(device, info_type, 0, nullptr, &size)); + ASSERT_NE(size, 0); + ASSERT_EQ(size, + sizeof(ur_exp_device_2d_block_array_capability_flags_t)); + + std::vector info_data(size); + ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, size, + info_data.data(), nullptr)); + + const auto returned_data = + reinterpret_cast( + info_data.data()); + ASSERT_EQ(*returned_data & + UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAGS_MASK, + 0); } } -TEST_F(urDeviceGetInfoSingleTest, InvalidNullHandleDevice) { +TEST_F(urDeviceGetInfoTest, InvalidNullHandleDevice) { ur_device_type_t device_type; ASSERT_EQ_RESULT(UR_RESULT_ERROR_INVALID_NULL_HANDLE, urDeviceGetInfo(nullptr, UR_DEVICE_INFO_TYPE, @@ -304,7 +2044,7 @@ TEST_F(urDeviceGetInfoSingleTest, InvalidNullHandleDevice) { nullptr)); } -TEST_F(urDeviceGetInfoSingleTest, InvalidEnumerationInfoType) { +TEST_F(urDeviceGetInfoTest, InvalidEnumerationInfoType) { for (auto device : devices) { ur_device_type_t device_type; ASSERT_EQ_RESULT(UR_RESULT_ERROR_INVALID_ENUMERATION, @@ -314,7 +2054,7 @@ TEST_F(urDeviceGetInfoSingleTest, InvalidEnumerationInfoType) { } } -TEST_F(urDeviceGetInfoSingleTest, InvalidSizePropSize) { +TEST_F(urDeviceGetInfoTest, InvalidSizePropSize) { for (auto device : devices) { ur_device_type_t device_type; ASSERT_EQ_RESULT(UR_RESULT_ERROR_INVALID_SIZE, @@ -323,7 +2063,7 @@ TEST_F(urDeviceGetInfoSingleTest, InvalidSizePropSize) { } } -TEST_F(urDeviceGetInfoSingleTest, InvalidSizePropSizeSmall) { +TEST_F(urDeviceGetInfoTest, InvalidSizePropSizeSmall) { for (auto device : devices) { ur_device_type_t device_type; ASSERT_EQ_RESULT(UR_RESULT_ERROR_INVALID_SIZE, @@ -333,7 +2073,7 @@ TEST_F(urDeviceGetInfoSingleTest, InvalidSizePropSizeSmall) { } } -TEST_F(urDeviceGetInfoSingleTest, InvalidNullPointerPropValue) { +TEST_F(urDeviceGetInfoTest, InvalidNullPointerPropValue) { for (auto device : devices) { ur_device_type_t device_type; ASSERT_EQ_RESULT(UR_RESULT_ERROR_INVALID_NULL_POINTER, @@ -343,7 +2083,7 @@ TEST_F(urDeviceGetInfoSingleTest, InvalidNullPointerPropValue) { } } -TEST_F(urDeviceGetInfoSingleTest, InvalidNullPointerPropSizeRet) { +TEST_F(urDeviceGetInfoTest, InvalidNullPointerPropSizeRet) { for (auto device : devices) { ASSERT_EQ_RESULT( UR_RESULT_ERROR_INVALID_NULL_POINTER, @@ -351,7 +2091,7 @@ TEST_F(urDeviceGetInfoSingleTest, InvalidNullPointerPropSizeRet) { } } -TEST_F(urDeviceGetInfoSingleTest, MaxWorkGroupSizeIsNonzero) { +TEST_F(urDeviceGetInfoTest, MaxWorkGroupSizeIsNonzero) { for (auto device : devices) { size_t max_global_size; diff --git a/test/conformance/device/urDevicePartition.cpp b/test/conformance/device/urDevicePartition.cpp index cdba0d9d1c..d83d63e3c7 100644 --- a/test/conformance/device/urDevicePartition.cpp +++ b/test/conformance/device/urDevicePartition.cpp @@ -149,6 +149,56 @@ TEST_F(urDevicePartitionTest, PartitionByCounts) { } } +TEST_F(urDevicePartitionTest, PartitionParentSuccess) { + for (auto device : devices) { + + if (!uur::hasDevicePartitionSupport(device, + UR_DEVICE_PARTITION_EQUALLY)) { + ::testing::Message() << "Device: \'" << device + << "\' does not support partitioning equally."; + continue; + } + + uint32_t n_compute_units = 0; + ASSERT_NO_FATAL_FAILURE(getNumberComputeUnits(device, n_compute_units)); + + for (uint32_t i = 1; i < n_compute_units; ++i) { + ur_device_partition_property_t property = + uur::makePartitionEquallyDesc(i); + + ur_device_partition_properties_t properties{ + UR_STRUCTURE_TYPE_DEVICE_PARTITION_PROPERTIES, + nullptr, + &property, + 1, + }; + + // Get the number of devices that will be created + uint32_t n_devices = 0; + ASSERT_SUCCESS( + urDevicePartition(device, &properties, 0, nullptr, &n_devices)); + ASSERT_NE(n_devices, 0); + + std::vector sub_devices(n_devices); + ASSERT_SUCCESS(urDevicePartition( + device, &properties, static_cast(sub_devices.size()), + sub_devices.data(), nullptr)); + for (auto sub_device : sub_devices) { + size_t size = 0; + urDeviceGetInfo(sub_device, UR_DEVICE_INFO_PARENT_DEVICE, 0, + nullptr, &size); + ur_device_handle_t parent_device = nullptr; + urDeviceGetInfo(sub_device, UR_DEVICE_INFO_PARENT_DEVICE, size, + &parent_device, nullptr); + ASSERT_EQ(parent_device, device); + + ASSERT_NE(sub_device, nullptr); + ASSERT_SUCCESS(urDeviceRelease(sub_device)); + } + } + } +} + using urDevicePartitionAffinityDomainTest = urDevicePartitionTestWithParam; TEST_P(urDevicePartitionAffinityDomainTest, PartitionByAffinityDomain) { diff --git a/test/conformance/enqueue/urEnqueueMemImageCopy.cpp b/test/conformance/enqueue/urEnqueueMemImageCopy.cpp index 715fd66773..2937b78551 100644 --- a/test/conformance/enqueue/urEnqueueMemImageCopy.cpp +++ b/test/conformance/enqueue/urEnqueueMemImageCopy.cpp @@ -15,7 +15,7 @@ struct urEnqueueMemImageCopyTest ur_bool_t imageSupported; ASSERT_SUCCESS( - urDeviceGetInfo(this->device, UR_DEVICE_INFO_IMAGE_SUPPORTED, + urDeviceGetInfo(this->device, UR_DEVICE_INFO_IMAGE_SUPPORT, sizeof(ur_bool_t), &imageSupported, nullptr)); if (!imageSupported) { GTEST_SKIP(); diff --git a/test/conformance/testing/include/uur/fixtures.h b/test/conformance/testing/include/uur/fixtures.h index b1c90883d8..fe282b1164 100644 --- a/test/conformance/testing/include/uur/fixtures.h +++ b/test/conformance/testing/include/uur/fixtures.h @@ -204,7 +204,7 @@ struct urMemImageTest : urContextTest { UUR_RETURN_ON_FATAL_FAILURE(urContextTest::SetUp()); ur_bool_t imageSupported = false; ASSERT_SUCCESS( - urDeviceGetInfo(this->device, UR_DEVICE_INFO_IMAGE_SUPPORTED, + urDeviceGetInfo(this->device, UR_DEVICE_INFO_IMAGE_SUPPORT, sizeof(ur_bool_t), &imageSupported, nullptr)); if (!imageSupported) { GTEST_SKIP(); @@ -318,7 +318,7 @@ template struct urMemImageTestWithParam : urContextTestWithParam { UUR_RETURN_ON_FATAL_FAILURE(urContextTestWithParam::SetUp()); ur_bool_t imageSupported = false; ASSERT_SUCCESS( - urDeviceGetInfo(this->device, UR_DEVICE_INFO_IMAGE_SUPPORTED, + urDeviceGetInfo(this->device, UR_DEVICE_INFO_IMAGE_SUPPORT, sizeof(ur_bool_t), &imageSupported, nullptr)); if (!imageSupported) { GTEST_SKIP(); @@ -380,13 +380,13 @@ struct urHostPipeTest : urQueueTest { size_t size = 0; ASSERT_SUCCESS(urDeviceGetInfo( - device, UR_DEVICE_INFO_HOST_PIPE_READ_WRITE_SUPPORTED, 0, nullptr, + device, UR_DEVICE_INFO_HOST_PIPE_READ_WRITE_SUPPORT, 0, nullptr, &size)); ASSERT_NE(size, 0); ASSERT_EQ(sizeof(ur_bool_t), size); void *info_data = alloca(size); ASSERT_SUCCESS(urDeviceGetInfo( - device, UR_DEVICE_INFO_HOST_PIPE_READ_WRITE_SUPPORTED, size, + device, UR_DEVICE_INFO_HOST_PIPE_READ_WRITE_SUPPORT, size, info_data, nullptr)); ASSERT_NE(info_data, nullptr); @@ -633,7 +633,7 @@ struct urMemImageQueueTest : urQueueTest { UUR_RETURN_ON_FATAL_FAILURE(urQueueTest::SetUp()); ur_bool_t imageSupported = false; ASSERT_SUCCESS( - urDeviceGetInfo(this->device, UR_DEVICE_INFO_IMAGE_SUPPORTED, + urDeviceGetInfo(this->device, UR_DEVICE_INFO_IMAGE_SUPPORT, sizeof(ur_bool_t), &imageSupported, nullptr)); if (!imageSupported) { GTEST_SKIP(); @@ -716,7 +716,7 @@ struct urMultiDeviceMemImageTest : urMultiDeviceContextTest { for (auto device : DevicesEnvironment::instance->devices) { ur_bool_t imageSupported = false; ASSERT_SUCCESS( - urDeviceGetInfo(device, UR_DEVICE_INFO_IMAGE_SUPPORTED, + urDeviceGetInfo(device, UR_DEVICE_INFO_IMAGE_SUPPORT, sizeof(ur_bool_t), &imageSupported, nullptr)); if (!imageSupported) { GTEST_SKIP(); diff --git a/test/conformance/testing/source/utils.cpp b/test/conformance/testing/source/utils.cpp index 0ab058bc30..00800535ba 100644 --- a/test/conformance/testing/source/utils.cpp +++ b/test/conformance/testing/source/utils.cpp @@ -211,7 +211,7 @@ ur_result_t GetDeviceMaxMemAllocSize(ur_device_handle_t device, ur_result_t GetDeviceImageSupport(ur_device_handle_t device, bool &image_support) { - return GetDeviceInfo(device, UR_DEVICE_INFO_IMAGE_SUPPORTED, + return GetDeviceInfo(device, UR_DEVICE_INFO_IMAGE_SUPPORT, image_support); } @@ -638,7 +638,7 @@ ur_result_t GetDeviceMaxComputeQueueIndices(ur_device_handle_t device, ur_result_t GetDeviceHostPipeRWSupported(ur_device_handle_t device, bool &support) { return GetDeviceInfo( - device, UR_DEVICE_INFO_HOST_PIPE_READ_WRITE_SUPPORTED, support); + device, UR_DEVICE_INFO_HOST_PIPE_READ_WRITE_SUPPORT, support); } ur_result_t GetTimestampRecordingSupport(ur_device_handle_t device, diff --git a/tools/urinfo/urinfo.hpp b/tools/urinfo/urinfo.hpp index 813ca34da1..867014e085 100644 --- a/tools/urinfo/urinfo.hpp +++ b/tools/urinfo/urinfo.hpp @@ -123,7 +123,7 @@ inline void printDeviceInfos(ur_device_handle_t hDevice, std::cout << prefix; printDeviceInfo(hDevice, UR_DEVICE_INFO_MAX_MEM_ALLOC_SIZE); std::cout << prefix; - printDeviceInfo(hDevice, UR_DEVICE_INFO_IMAGE_SUPPORTED); + printDeviceInfo(hDevice, UR_DEVICE_INFO_IMAGE_SUPPORT); std::cout << prefix; printDeviceInfo(hDevice, UR_DEVICE_INFO_MAX_READ_IMAGE_ARGS); std::cout << prefix; @@ -314,7 +314,7 @@ inline void printDeviceInfos(ur_device_handle_t hDevice, printDeviceInfo(hDevice, UR_DEVICE_INFO_MEM_CHANNEL_SUPPORT); std::cout << prefix; printDeviceInfo(hDevice, - UR_DEVICE_INFO_HOST_PIPE_READ_WRITE_SUPPORTED); + UR_DEVICE_INFO_HOST_PIPE_READ_WRITE_SUPPORT); std::cout << prefix; printDeviceInfo(hDevice, UR_DEVICE_INFO_MAX_REGISTERS_PER_WORK_GROUP); @@ -344,7 +344,8 @@ inline void printDeviceInfos(ur_device_handle_t hDevice, printDeviceInfo(hDevice, UR_DEVICE_INFO_COMMAND_BUFFER_EVENT_SUPPORT_EXP); std::cout << prefix; - printDeviceInfo(hDevice, UR_DEVICE_INFO_CLUSTER_LAUNCH_EXP); + printDeviceInfo(hDevice, + UR_DEVICE_INFO_CLUSTER_LAUNCH_SUPPORT_EXP); std::cout << prefix; printDeviceInfo(hDevice, UR_DEVICE_INFO_BINDLESS_IMAGES_SUPPORT_EXP); @@ -390,19 +391,21 @@ inline void printDeviceInfos(ur_device_handle_t hDevice, hDevice, UR_DEVICE_INFO_CUBEMAP_SEAMLESS_FILTERING_SUPPORT_EXP); std::cout << prefix; printDeviceInfo( - hDevice, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_USM_EXP); + hDevice, + UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_USM_SUPPORT_EXP); std::cout << prefix; printDeviceInfo( - hDevice, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_EXP); + hDevice, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_SUPPORT_EXP); std::cout << prefix; printDeviceInfo( - hDevice, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_USM_EXP); + hDevice, + UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_USM_SUPPORT_EXP); std::cout << prefix; printDeviceInfo( - hDevice, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_EXP); + hDevice, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_SUPPORT_EXP); std::cout << prefix; printDeviceInfo( - hDevice, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_3D_EXP); + hDevice, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_3D_SUPPORT_EXP); std::cout << prefix; printDeviceInfo(hDevice, UR_DEVICE_INFO_TIMESTAMP_RECORDING_SUPPORT_EXP); @@ -410,18 +413,19 @@ inline void printDeviceInfos(ur_device_handle_t hDevice, printDeviceInfo(hDevice, UR_DEVICE_INFO_IMAGE_ARRAY_SUPPORT_EXP); std::cout << prefix; printDeviceInfo( - hDevice, UR_DEVICE_INFO_BINDLESS_UNIQUE_ADDRESSING_PER_DIM_EXP); + hDevice, UR_DEVICE_INFO_BINDLESS_UNIQUE_ADDRESSING_PER_DIM_SUPPORT_EXP); std::cout << prefix; - printDeviceInfo(hDevice, - UR_DEVICE_INFO_BINDLESS_SAMPLE_1D_USM_EXP); + printDeviceInfo( + hDevice, UR_DEVICE_INFO_BINDLESS_SAMPLE_1D_USM_SUPPORT_EXP); std::cout << prefix; - printDeviceInfo(hDevice, - UR_DEVICE_INFO_BINDLESS_SAMPLE_2D_USM_EXP); + printDeviceInfo( + hDevice, UR_DEVICE_INFO_BINDLESS_SAMPLE_2D_USM_SUPPORT_EXP); std::cout << prefix; printDeviceInfo( hDevice, UR_DEVICE_INFO_ENQUEUE_NATIVE_COMMAND_SUPPORT_EXP); std::cout << prefix; - printDeviceInfo(hDevice, UR_DEVICE_INFO_LOW_POWER_EVENTS_EXP); + printDeviceInfo(hDevice, + UR_DEVICE_INFO_LOW_POWER_EVENTS_SUPPORT_EXP); std::cout << prefix; printDeviceInfo( hDevice, UR_DEVICE_INFO_2D_BLOCK_ARRAY_CAPABILITIES_EXP);